diff --git a/CHANGELOG.md b/CHANGELOG.md index 03a93d74525..0a1b57d8df4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## 6.4.0 (July 24, 2024) + +### Added +- Support for APM - Synthetics - SQL Monitor Type Support +- Support for Oracle Sharded Database +- Support for ADB-S: Licenses Input option for better BYOL flexibility +- Support for Data Safe - Usability enhancements to data discovery feature +- Support for Operations Insights : MYSQL Analytics +- Support for [Add subscriptionId attribute support for AutonomousDatabase resource] Terraform Setup +- Support for Add subscriptionId attribute support for Cloud Exa Infra/VM Cluster +- Support for ExaDB-C@C OKV Integration Phase 2 with EXACC to Manage TDE Keys Dataguard / Create DB +### Bug Fix +- Terraform bug fixes - Data safe Audit (Provider-Only) + ## 6.3.0 (July 16, 2024) ### Deprecation diff --git a/examples/README.md b/examples/README.md index 47a3b33e430..49fba9a5ee7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -103,6 +103,8 @@ This directory contains Terraform configuration files showing how to create spec [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/fusionapps.zip) - generative_ai [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/generative_ai.zip) +- globally_distributed_database + [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/globally_distributed_database.zip) - goldengate [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/goldengate.zip) - health_checks diff --git a/examples/apm/apm_synthetics/monitors/ftp_monitor/monitor.tf b/examples/apm/apm_synthetics/monitors/ftp_monitor/monitor.tf new file mode 100644 index 00000000000..82caf2a363f --- /dev/null +++ b/examples/apm/apm_synthetics/monitors/ftp_monitor/monitor.tf @@ -0,0 +1,212 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "tenancy_ocid" {} +variable "user_ocid" {} +variable "fingerprint" {} +variable "private_key_path" {} +variable "region" {} +variable "compartment_ocid" {} +variable "apm_domain_id" {} + +variable "apm_domain_description" { + default = "description" +} + +variable "apm_domain_display_name" { + default = "displayName" +} + +variable "apm_domain_freeform_tags" { + default = { "Department" = "Finance" } +} + +variable "apm_domain_is_free_tier" { + default = false +} + +variable "apm_domain_state" { + default = "ACTIVE" +} + +variable "data_key_data_key_type" { + default = "PRIVATE" +} + +variable "monitor_configuration_config_type" { + default = "FTP_CONFIG" +} + +variable "monitor_configuration_query" { + default = "query" +} + +variable "monitor_configuration_is_failure_retried" { + default = false +} + +variable "monitor_configuration_ftp_protocol" { + default = "FTP" +} + +variable "monitor_configuration_ftp_request_type" { + default = "LIST" +} + +variable "monitor_configuration_ftp_basic_authentication_details_username" { + default = "username" +} + +variable "monitor_configuration_ftp_basic_authentication_details_password_password_type" { + default = "IN_TEXT" +} + +variable "monitor_configuration_ftp_basic_authentication_details_password_password" { + default = "BEstrO0ng_#11" +} + +variable "monitor_display_name" { + default = "displayName" +} + +variable "monitor_freeform_tags" { + default = { "bar-key" = "value" } +} + +variable "monitor_monitor_type" { + default = "FTP" +} + +variable "monitor_repeat_interval_in_seconds" { + default = 600 +} + +variable "monitor_is_run_once" { + default = false +} + +variable "monitor_is_run_now" { + default = false +} + +variable "monitor_scheduling_policy" { + default = "ALL" +} + +variable "monitor_status" { + default = "ENABLED" +} + +variable "monitor_target" { + default = "www.oracle.com:80" +} + +variable "monitor_timeout_in_seconds" { + default = 60 +} + +variable "monitor_tag_name" { + default = "tagName" +} + +variable "monitor_tag_value" { + default = "tagValue" +} + +variable "monitor_availability_configuration_max_allowed_failures_per_interval" { + default = 0 +} + +variable "monitor_availability_configuration_min_allowed_runs_per_interval" { + default = 1 +} + +variable "monitor_maintenance_window_schedule_time_ended" { + default = "2025-02-12T22:47:12.613Z" +} + +variable "monitor_maintenance_window_schedule_time_started" { + default = "2024-12-18T22:47:12.654Z" +} + +variable "monitor_vantage_points_name" { + default = "us-phoenix-internal" +} + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +resource "oci_apm_synthetics_monitor" "test_monitor" { + #Required + apm_domain_id = oci_apm_apm_domain.test_apm_domain.id + display_name = var.monitor_display_name + monitor_type = var.monitor_monitor_type + repeat_interval_in_seconds = var.monitor_repeat_interval_in_seconds + vantage_points { + #Required + name = var.monitor_vantage_points_name + } + + configuration { + + config_type = var.monitor_configuration_config_type + is_failure_retried = var.monitor_configuration_is_failure_retried + ftp_protocol = var.monitor_configuration_ftp_protocol + ftp_request_type = var.monitor_configuration_ftp_request_type + + ftp_basic_authentication_details { + username = var.monitor_configuration_ftp_basic_authentication_details_username + password { + password = var.monitor_configuration_ftp_basic_authentication_details_password_password + password_type = var.monitor_configuration_ftp_basic_authentication_details_password_password_type + } + } + + } + freeform_tags = var.monitor_freeform_tags + + status = var.monitor_status + target = var.monitor_target + timeout_in_seconds = var.monitor_timeout_in_seconds + is_run_once = var.monitor_is_run_once + is_run_now = var.monitor_is_run_now + scheduling_policy = var.monitor_scheduling_policy + #Optional + availability_configuration { + max_allowed_failures_per_interval = var.monitor_availability_configuration_max_allowed_failures_per_interval + min_allowed_runs_per_interval = var.monitor_availability_configuration_min_allowed_runs_per_interval + } + maintenance_window_schedule { + time_ended = var.monitor_maintenance_window_schedule_time_ended + time_started = var.monitor_maintenance_window_schedule_time_started + } +} + +data "oci_apm_synthetics_monitors" "test_monitors" { + #Required + apm_domain_id = oci_apm_apm_domain.test_apm_domain.id + + #Optional + display_name = var.monitor_display_name + monitor_type = var.monitor_monitor_type + status = var.monitor_status +} + + +resource "oci_apm_apm_domain" "test_apm_domain" { + #Required + compartment_id = var.compartment_ocid + display_name = var.apm_domain_display_name + + #Optional + description = var.apm_domain_description + freeform_tags = var.apm_domain_freeform_tags + is_free_tier = var.apm_domain_is_free_tier +} + + diff --git a/examples/apm/apm_synthetics/monitors/network_monitor/monitor.tf b/examples/apm/apm_synthetics/monitors/network_monitor/monitor.tf index 68ed8e561b1..e324be473d3 100644 --- a/examples/apm/apm_synthetics/monitors/network_monitor/monitor.tf +++ b/examples/apm/apm_synthetics/monitors/network_monitor/monitor.tf @@ -81,14 +81,6 @@ variable "monitor_scheduling_policy" { default = "ALL" } -variable "monitor_script_parameters_param_name" { - default = "testName" -} - -variable "monitor_script_parameters_param_value" { - default = "myTest1" -} - variable "monitor_status" { default = "ENABLED" } @@ -207,12 +199,7 @@ resource "oci_apm_synthetics_monitor" "test_monitor" { override_dns_ip = var.monitor_configuration_dns_configuration_override_dns_ip } } - freeform_tags = var.monitor_freeform_tags - script_parameters { - #Required - param_name = var.monitor_script_parameters_param_name - param_value = var.monitor_script_parameters_param_value - } + freeform_tags = var.monitor_freeform_tags status = var.monitor_status target = var.monitor_target timeout_in_seconds = var.monitor_timeout_in_seconds diff --git a/examples/apm/apm_synthetics/monitors/sql_monitor/files/wallet.zip b/examples/apm/apm_synthetics/monitors/sql_monitor/files/wallet.zip new file mode 100644 index 00000000000..9144c43e3bb Binary files /dev/null and b/examples/apm/apm_synthetics/monitors/sql_monitor/files/wallet.zip differ diff --git a/examples/apm/apm_synthetics/monitors/sql_monitor/monitor.tf b/examples/apm/apm_synthetics/monitors/sql_monitor/monitor.tf new file mode 100644 index 00000000000..d337951a1b9 --- /dev/null +++ b/examples/apm/apm_synthetics/monitors/sql_monitor/monitor.tf @@ -0,0 +1,230 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "tenancy_ocid" {} +variable "user_ocid" {} +variable "fingerprint" {} +variable "private_key_path" {} +variable "region" {} +variable "compartment_ocid" {} +variable "apm_domain_id" {} + +variable "apm_domain_description" { + default = "description" +} + +variable "apm_domain_display_name" { + default = "displayName" +} + +variable "apm_domain_freeform_tags" { + default = { "Department" = "Finance" } +} + +variable "apm_domain_is_free_tier" { + default = false +} + +variable "apm_domain_state" { + default = "ACTIVE" +} + +variable "data_key_data_key_type" { + default = "PRIVATE" +} + +variable "monitor_configuration_config_type" { + default = "SQL_CONFIG" +} + +variable "monitor_configuration_query" { + default = "query" +} + +variable "monitor_configuration_is_failure_retried" { + default = false +} + +variable "monitor_configuration_database_type" { + default = "ORACLE" +} + +variable "monitor_configuration_database_role" { + default = "DEFAULT" +} + +variable "monitor_configuration_database_connection_type" { + default = "CLOUD_WALLET" +} + +variable "monitor_configuration_database_authentication_details_username" { + default = "username" +} + +variable "monitor_configuration_database_authentication_details_password_password_type" { + default = "IN_TEXT" +} + +variable "monitor_configuration_database_authentication_details_password_password" { + default = "BEstrO0ng_#11" +} + +variable "monitor_configuration_database_wallet_details_database_wallet" { + default = "files/wallet.zip" +} + +variable "monitor_configuration_database_wallet_details_service_name" { + default = "synthetic_low" +} + +variable "monitor_display_name" { + default = "displayName" +} + +variable "monitor_freeform_tags" { + default = { "bar-key" = "value" } +} + +variable "monitor_monitor_type" { + default = "SQL" +} + +variable "monitor_repeat_interval_in_seconds" { + default = 600 +} + +variable "monitor_is_run_once" { + default = false +} + +variable "monitor_is_run_now" { + default = false +} + +variable "monitor_scheduling_policy" { + default = "ALL" +} + +variable "monitor_status" { + default = "ENABLED" +} + +variable "monitor_target" { + default = "www.oracle.com:80" +} + +variable "monitor_timeout_in_seconds" { + default = 60 +} + +variable "monitor_tag_name" { + default = "tagName" +} + +variable "monitor_tag_value" { + default = "tagValue" +} + +variable "monitor_availability_configuration_max_allowed_failures_per_interval" { + default = 0 +} + +variable "monitor_availability_configuration_min_allowed_runs_per_interval" { + default = 1 +} + +variable "monitor_maintenance_window_schedule_time_ended" { + default = "2025-02-12T22:47:12.613Z" +} + +variable "monitor_maintenance_window_schedule_time_started" { + default = "2024-12-18T22:47:12.654Z" +} + +variable "monitor_vantage_points_name" { + default = "us-phoenix-internal" +} + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +resource "oci_apm_synthetics_monitor" "test_monitor" { + #Required + apm_domain_id = oci_apm_apm_domain.test_apm_domain.id + display_name = var.monitor_display_name + monitor_type = var.monitor_monitor_type + repeat_interval_in_seconds = var.monitor_repeat_interval_in_seconds + vantage_points { + #Required + name = var.monitor_vantage_points_name + } + + configuration { + + config_type = var.monitor_configuration_config_type + is_failure_retried = var.monitor_configuration_is_failure_retried + query = var.monitor_configuration_query + database_type = var.monitor_configuration_database_type + database_role = var.monitor_configuration_database_role + database_connection_type = var.monitor_configuration_database_connection_type + + database_authentication_details { + username = var.monitor_configuration_database_authentication_details_username + password { + password = var.monitor_configuration_database_authentication_details_password_password + password_type = var.monitor_configuration_database_authentication_details_password_password_type + } + } + + database_wallet_details { + database_wallet = var.monitor_configuration_database_wallet_details_database_wallet + service_name = var.monitor_configuration_database_wallet_details_service_name + } + } + freeform_tags = var.monitor_freeform_tags + + status = var.monitor_status + target = var.monitor_target + timeout_in_seconds = var.monitor_timeout_in_seconds + is_run_once = var.monitor_is_run_once + is_run_now = var.monitor_is_run_now + scheduling_policy = var.monitor_scheduling_policy + #Optional + availability_configuration { + max_allowed_failures_per_interval = var.monitor_availability_configuration_max_allowed_failures_per_interval + min_allowed_runs_per_interval = var.monitor_availability_configuration_min_allowed_runs_per_interval + } + maintenance_window_schedule { + time_ended = var.monitor_maintenance_window_schedule_time_ended + time_started = var.monitor_maintenance_window_schedule_time_started + } +} + +data "oci_apm_synthetics_monitors" "test_monitors" { + #Required + apm_domain_id = oci_apm_apm_domain.test_apm_domain.id + + #Optional + display_name = var.monitor_display_name + monitor_type = var.monitor_monitor_type + status = var.monitor_status +} + + +resource "oci_apm_apm_domain" "test_apm_domain" { + #Required + compartment_id = var.compartment_ocid + display_name = var.apm_domain_display_name + + #Optional + description = var.apm_domain_description + freeform_tags = var.apm_domain_freeform_tags + is_free_tier = var.apm_domain_is_free_tier +} + + diff --git a/examples/database/adb/autonomous_database.tf b/examples/database/adb/autonomous_database.tf index 39f3ac39942..992b709f5fe 100644 --- a/examples/database/adb/autonomous_database.tf +++ b/examples/database/adb/autonomous_database.tf @@ -346,3 +346,14 @@ resource "oci_database_autonomous_database" "test_autonomous_database_shrink" { is_auto_scaling_for_storage_enabled = "true" } +resource "oci_database_autonomous_database" "test_autonomous_database_subscriptionId" { + admin_password = random_string.autonomous_database_admin_password.result + compartment_id = var.compartment_ocid + cpu_core_count = "1" + data_storage_size_in_tbs = "1" + db_name = "adbsubscription" + db_version = "19c" + db_workload = "OLTP" + license_model = "LICENSE_INCLUDED" + subscription_id = "SubscriptionID" +} \ No newline at end of file diff --git a/examples/database/adb/byol_compute_count_limit/autonomous_database_byol_compute_count_limit.tf b/examples/database/adb/byol_compute_count_limit/autonomous_database_byol_compute_count_limit.tf new file mode 100644 index 00000000000..91eef909392 --- /dev/null +++ b/examples/database/adb/byol_compute_count_limit/autonomous_database_byol_compute_count_limit.tf @@ -0,0 +1,41 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "tenancy_ocid" { +} + +variable "user_ocid" { +} + +variable "fingerprint" { +} + +variable "private_key_path" { +} + +variable "region" { +} + +variable "compartment_ocid" { +} + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +resource "oci_database_autonomous_database" "test_autonomous_database" { + admin_password = "BEstrO0ng_#11" + compartment_id = var.compartment_ocid + cpu_core_count = "1" + data_storage_size_in_tbs = "1" + db_name = "Xsk523nccsdf23" + db_version = "19c" + db_workload = "OLTP" + license_model = "BRING_YOUR_OWN_LICENSE" + database_edition = "STANDARD_EDITION" + byol_compute_count_limit = "10" +} diff --git a/examples/database/db_systems/db_exacs/resources.tf b/examples/database/db_systems/db_exacs/resources.tf index 2dc12f693ee..9777d7c48b2 100644 --- a/examples/database/db_systems/db_exacs/resources.tf +++ b/examples/database/db_systems/db_exacs/resources.tf @@ -9,6 +9,7 @@ resource "oci_database_cloud_exadata_infrastructure" "test_cloud_exadata_infrast #Optional cluster_placement_group_id = var.cloud_exadata_infrastructure_cluster_placement_group_id + subscription_id = var.tenant_subscription_id compute_count = var.cloud_exadata_infrastructure_compute_count storage_count = var.cloud_exadata_infrastructure_storage_count } @@ -35,6 +36,7 @@ resource "oci_database_cloud_vm_cluster" "test_cloud_vm_cluster" { scan_listener_port_tcp = var.cloud_vm_cluster_scan_listener_port_tcp scan_listener_port_tcp_ssl = var.cloud_vm_cluster_scan_listener_port_tcp_ssl private_zone_id = oci_dns_zone.test_zone.id + subscription_id = var.tenant_subscription_id data_collection_options { #Optional diff --git a/examples/database/db_systems/db_exacs/variables.tf b/examples/database/db_systems/db_exacs/variables.tf index 74c591b6ce3..fdfba0929b2 100644 --- a/examples/database/db_systems/db_exacs/variables.tf +++ b/examples/database/db_systems/db_exacs/variables.tf @@ -19,6 +19,11 @@ variable "cloud_exadata_infrastructure_shape" { } variable "cloud_exadata_infrastructure_cluster_placement_group_id" { + default = null +} + +variable "tenant_subscription_id" { + default = null } variable "cloud_exadata_infrastructure_compute_count" { diff --git a/examples/datasafe/report_definition/report_definition.tf b/examples/datasafe/report_definition/report_definition.tf index 1fab23921ba..b4fbe538985 100644 --- a/examples/datasafe/report_definition/report_definition.tf +++ b/examples/datasafe/report_definition/report_definition.tf @@ -118,7 +118,7 @@ variable "report_definition_summary_name" { } variable "report_definition_summary_scim_filter" { - default = "scimFilter" + default = "operation eq \"LOGIN\"" } diff --git a/examples/datasafe/sensitive_data_model_sensitive_types/sensitive_data_model_sensitive_types.tf b/examples/datasafe/sensitive_data_model_sensitive_types/sensitive_data_model_sensitive_types.tf new file mode 100644 index 00000000000..3d499ffc06d --- /dev/null +++ b/examples/datasafe/sensitive_data_model_sensitive_types/sensitive_data_model_sensitive_types.tf @@ -0,0 +1,27 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "tenancy_ocid" {} +variable "user_ocid" {} +variable "fingerprint" {} +variable "private_key_path" {} +variable "region" {} +variable "sensitive_data_model_id" {} +variable "sensitive_type_id" {} + + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +data "oci_data_safe_sensitive_data_model_sensitive_types" "test_sensitive_data_model_sensitive_types" { + #Required + sensitive_data_model_id = var.sensitive_data_model_id + + #Optional + sensitive_type_id = var.sensitive_type_id +} \ No newline at end of file diff --git a/examples/globally_distributed_database/README.md b/examples/globally_distributed_database/README.md new file mode 100644 index 00000000000..46e150c2789 --- /dev/null +++ b/examples/globally_distributed_database/README.md @@ -0,0 +1,4 @@ +# Overview +This is a Terraform configuration that creates the Globally Distributed Database service on Oracle Cloud Infrastructure. +## Magic Button +[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/globally_distributed_database.zip) \ No newline at end of file diff --git a/examples/globally_distributed_database/datasources.tf b/examples/globally_distributed_database/datasources.tf new file mode 100644 index 00000000000..108697b8c20 --- /dev/null +++ b/examples/globally_distributed_database/datasources.tf @@ -0,0 +1,30 @@ +data "oci_globally_distributed_database_private_endpoint" "this" { + #Required + private_endpoint_id = oci_globally_distributed_database_private_endpoint.this.id +} + +data "oci_globally_distributed_database_private_endpoints" "this" { + #Required + compartment_id = oci_globally_distributed_database_private_endpoint.this.compartment_id + + #Optional + display_name = oci_globally_distributed_database_private_endpoint.this.display_name + state = oci_globally_distributed_database_private_endpoint.this.state +} + +data "oci_globally_distributed_database_sharded_database" "this" { + #Required + sharded_database_id = oci_globally_distributed_database_sharded_database.this.id + + #Optional + metadata = "test" //oci_globally_distributed_database_sharded_database.this.metadata +} + +data "oci_globally_distributed_database_sharded_databases" "this" { + #Required + compartment_id = oci_globally_distributed_database_sharded_database.this.compartment_id + + #Optional + display_name = oci_globally_distributed_database_sharded_database.this.display_name + state = oci_globally_distributed_database_sharded_database.this.state +} \ No newline at end of file diff --git a/examples/globally_distributed_database/description.md b/examples/globally_distributed_database/description.md new file mode 100644 index 00000000000..21c5b220f2b --- /dev/null +++ b/examples/globally_distributed_database/description.md @@ -0,0 +1,2 @@ +# Overview +This is a Terraform configuration that creates the Globally Distributed Database service on Oracle Cloud Infrastructure. \ No newline at end of file diff --git a/examples/globally_distributed_database/oci_globally_distributed_database_private_endpoints.tf b/examples/globally_distributed_database/oci_globally_distributed_database_private_endpoints.tf new file mode 100644 index 00000000000..7700391321e --- /dev/null +++ b/examples/globally_distributed_database/oci_globally_distributed_database_private_endpoints.tf @@ -0,0 +1,12 @@ +resource "oci_globally_distributed_database_private_endpoint" "this" { + #Required + compartment_id = var.compartment_ocid + display_name = "GloballyDistributedDB-PrivateEndpoint-Example" + subnet_id = var.subnet_ocid + + #Optional + #defined_tags = var.oci_globally_distributed_database_defined_tags_value + description = "Test OCI Globally Distributed Database Private Endpoint" + #freeform_tags = var.oci_globally_distributed_database_freeform_tags + nsg_ids = var.nsg_ocids +} \ No newline at end of file diff --git a/examples/globally_distributed_database/oci_globally_distributed_database_sharded_databases.tf b/examples/globally_distributed_database/oci_globally_distributed_database_sharded_databases.tf new file mode 100644 index 00000000000..b9694b09fec --- /dev/null +++ b/examples/globally_distributed_database/oci_globally_distributed_database_sharded_databases.tf @@ -0,0 +1,73 @@ + +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +resource "oci_globally_distributed_database_sharded_database" "this" { + #Required + catalog_details { + #Required + admin_password = var.ogdd_sharded_database_catalog_details_admin_password + cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id + compute_count = var.ogdd_sharded_database_catalog_details_compute_count + data_storage_size_in_gbs = var.ogdd_sharded_database_catalog_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.ogdd_sharded_database_catalog_details_is_auto_scaling_enabled + peer_cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_catalog_details_peer_cloud_autonomous_vm_cluster_id + } + + character_set = var.ogdd_sharded_database_character_set + compartment_id = var.compartment_ocid + db_deployment_type = var.ogdd_sharded_database_db_deployment_type + db_version = var.ogdd_sharded_database_db_version + db_workload = var.ogdd_sharded_database_db_workload + display_name = "GloballyDistributedDB-Sharded-Database-Example" + listener_port = var.ogdd_sharded_database_listener_port + listener_port_tls = var.listener_port_tls + ncharacter_set = var.ogdd_sharded_database_ncharacter_set + ons_port_local = var.ogdd_sharded_database_ons_port_local + ons_port_remote = var.ogdd_sharded_database_ons_port_remote + prefix = var.ogdd_sharded_database_prefix + + shard_details { + #Required + admin_password = var.ogdd_sharded_database_shard_details_admin_password + cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id + compute_count = var.ogdd_sharded_database_shard_details_compute_count + data_storage_size_in_gbs = var.ogdd_sharded_database_shard_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.ogdd_sharded_database_shard_details_is_auto_scaling_enabled + peer_cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_peer_cloud_autonomous_vm_cluster_id + shard_space = var.ogdd_sharded_database_shard_details_shard_space + } + + sharding_method = var.ogdd_sharded_database_sharding_method + chunks = var.ogdd_sharded_database_chunks + cluster_certificate_common_name = var.ogdd_sharded_database_cluster_certificate_common_name + #defined_tags = var.oci_globally_distributed_database_defined_tags_value + #freeform_tags = var.oci_globally_distributed_database_freeform_tags + + # POST OPERATIONS + # POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value. + + configure_sharding_trigger = var.oci_globally_distributed_database_configure_sharding_trigger + download_gsm_certificate_signing_request_trigger = var.oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger + generate_gsm_certificate_signing_request_trigger = var.oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger + get_connection_string_trigger = var.oci_globally_distributed_database_get_connection_string_trigger + start_database_trigger = var.oci_globally_distributed_database_start_database_trigger + stop_database_trigger = var.oci_globally_distributed_database_stop_database_trigger + validate_network_trigger = var.oci_globally_distributed_database_validate_network_trigger + + # PATCH Operations + /* + patch_operations { + #Required + operation = var.oci_globally_distributed_database_patch_operation_operation + selection = var.oci_globally_distributed_database_patch_operation_selection + + #Optional + value = var.oci_globally_distributed_database_patch_operation_value + } + */ + + depends_on = [oci_globally_distributed_database_private_endpoint.this] +} + diff --git a/examples/globally_distributed_database/outputs.tf b/examples/globally_distributed_database/outputs.tf new file mode 100644 index 00000000000..4207ac9e9b7 --- /dev/null +++ b/examples/globally_distributed_database/outputs.tf @@ -0,0 +1,106 @@ +output "oci_globally_distributed_database_private_endpoints" { + value = { + oci_globally_distributed_database_private_endpoint = oci_globally_distributed_database_private_endpoint.this + data_source_private_endpoint = data.oci_globally_distributed_database_private_endpoint.this + data_source_private_endpoints = data.oci_globally_distributed_database_private_endpoints.this + } +} + +output "oci_globally_distributed_database_sharded_database_non_secret" { + value = { + oci_globally_distributed_database_sharded_database = { + catalog_details = [ + for catalog_detail in oci_globally_distributed_database_sharded_database.this.catalog_details : { + admin_password = nonsensitive(catalog_detail.admin_password) + cloud_autonomous_vm_cluster_id = catalog_detail.cloud_autonomous_vm_cluster_id + compute_count = catalog_detail.compute_count + container_database_id = catalog_detail.container_database_id + container_database_parent_id = catalog_detail.container_database_parent_id + data_storage_size_in_gbs = catalog_detail.container_database_parent_id + encryption_key_details = catalog_detail.encryption_key_details + is_auto_scaling_enabled = catalog_detail.is_auto_scaling_enabled + metadata = catalog_detail.metadata + name = catalog_detail.name + peer_cloud_autonomous_vm_cluster_id = catalog_detail.peer_cloud_autonomous_vm_cluster_id + shard_group = catalog_detail.shard_group + status = catalog_detail.status + supporting_resource_id = catalog_detail.supporting_resource_id + time_created = catalog_detail.time_created + time_ssl_certificate_expires = catalog_detail.time_ssl_certificate_expires + time_updated = catalog_detail.time_updated + } + ] + character_set = oci_globally_distributed_database_sharded_database.this.character_set + chunks = oci_globally_distributed_database_sharded_database.this.chunks + cluster_certificate_common_name = oci_globally_distributed_database_sharded_database.this.cluster_certificate_common_name + compartment_id = oci_globally_distributed_database_sharded_database.this.compartment_id + configure_sharding_trigger = oci_globally_distributed_database_sharded_database.this.configure_sharding_trigger + connection_strings = oci_globally_distributed_database_sharded_database.this.connection_strings + db_deployment_type = oci_globally_distributed_database_sharded_database.this.db_deployment_type + db_version = oci_globally_distributed_database_sharded_database.this.db_version + db_workload = oci_globally_distributed_database_sharded_database.this.db_workload + defined_tags = oci_globally_distributed_database_sharded_database.this.defined_tags + display_name = oci_globally_distributed_database_sharded_database.this.display_name + download_gsm_certificate_signing_request_trigger = oci_globally_distributed_database_sharded_database.this.download_gsm_certificate_signing_request_trigger + freeform_tags = oci_globally_distributed_database_sharded_database.this.freeform_tags + generate_gsm_certificate_signing_request_trigger = oci_globally_distributed_database_sharded_database.this.generate_gsm_certificate_signing_request_trigger + //fetched_all_connection_strings = oci_globally_distributed_database_sharded_database.this.fetched_all_connection_strings + gsms = oci_globally_distributed_database_sharded_database.this.gsms + id = oci_globally_distributed_database_sharded_database.this.id + lifecycle_state_details = oci_globally_distributed_database_sharded_database.this.lifecycle_state_details + listener_port = oci_globally_distributed_database_sharded_database.this.listener_port + listener_port_tls = oci_globally_distributed_database_sharded_database.this.listener_port_tls + ncharacter_set = oci_globally_distributed_database_sharded_database.this.ncharacter_set + ons_port_local = oci_globally_distributed_database_sharded_database.this.ons_port_local + ons_port_remote = oci_globally_distributed_database_sharded_database.this.ons_port_remote + patch_operations = oci_globally_distributed_database_sharded_database.this.patch_operations + prefix = oci_globally_distributed_database_sharded_database.this.prefix + private_endpoint = oci_globally_distributed_database_sharded_database.this.private_endpoint + shard_details = [ + for shard_detail in oci_globally_distributed_database_sharded_database.this.shard_details : { + admin_password = nonsensitive(shard_detail.admin_password) + cloud_autonomous_vm_cluster_id = shard_detail.cloud_autonomous_vm_cluster_id + compute_count = shard_detail.compute_count + container_database_id = shard_detail.container_database_id + container_database_parent_id = shard_detail.container_database_parent_id + data_storage_size_in_gbs = shard_detail.data_storage_size_in_gbs + encryption_key_details = shard_detail.encryption_key_details + is_auto_scaling_enabled = shard_detail.is_auto_scaling_enabled + metadata = shard_detail.metadata + name = shard_detail.name + peer_cloud_autonomous_vm_cluster_id = shard_detail.peer_cloud_autonomous_vm_cluster_id + shard_group = shard_detail.shard_group + shard_space = shard_detail.shard_space + status = shard_detail.status + supporting_resource_id = shard_detail.supporting_resource_id + time_created = shard_detail.time_created + time_ssl_certificate_expires = shard_detail.time_ssl_certificate_expires + time_updated = shard_detail.time_updated + } + ] + sharded_database_id = oci_globally_distributed_database_sharded_database.this.sharded_database_id + sharding_method = oci_globally_distributed_database_sharded_database.this.sharding_method + start_database_trigger = oci_globally_distributed_database_sharded_database.this.start_database_trigger + state = oci_globally_distributed_database_sharded_database.this.state + stop_database_trigger = oci_globally_distributed_database_sharded_database.this.stop_database_trigger + system_tags = oci_globally_distributed_database_sharded_database.this.system_tags + time_created = oci_globally_distributed_database_sharded_database.this.time_created + time_updated = oci_globally_distributed_database_sharded_database.this.time_updated + time_zone = oci_globally_distributed_database_sharded_database.this.time_zone + timeouts = oci_globally_distributed_database_sharded_database.this.timeouts + get_connection_string_trigger = oci_globally_distributed_database_sharded_database.this.get_connection_string_trigger + validate_network_trigger = oci_globally_distributed_database_sharded_database.this.validate_network_trigger + }, + data_source_sharded_database = data.oci_globally_distributed_database_sharded_database.this + data_source_sharded_databases = data.oci_globally_distributed_database_sharded_databases.this + } +} + +output "oci_globally_distributed_database_sharded_database" { + value = { + oci_globally_distributed_database_sharded_database = oci_globally_distributed_database_sharded_database.this, + data_source_sharded_database = data.oci_globally_distributed_database_sharded_database.this + data_source_sharded_databases = data.oci_globally_distributed_database_sharded_databases.this + } + sensitive = true +} \ No newline at end of file diff --git a/examples/globally_distributed_database/provider.tf b/examples/globally_distributed_database/provider.tf new file mode 100644 index 00000000000..e20c788228d --- /dev/null +++ b/examples/globally_distributed_database/provider.tf @@ -0,0 +1,16 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "config_file_profile" { +} + +provider "oci" { + auth = "SecurityToken" + config_file_profile = var.config_file_profile + region = var.region +} + +provider "local" { + version = ">=1.3.0" # Need this version of the local provider to support base64 encoded inputs +} + diff --git a/examples/globally_distributed_database/terraform.auto.tfvars.example b/examples/globally_distributed_database/terraform.auto.tfvars.example new file mode 100644 index 00000000000..d92fb3cb2a7 --- /dev/null +++ b/examples/globally_distributed_database/terraform.auto.tfvars.example @@ -0,0 +1,46 @@ +compartment_ocid = "" +subnet_ocid = "" +oci_globally_distributed_database_defined_tags_value = null +ogdd_sharded_database_catalog_details_admin_password = "Admin PWD" +ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_db_version = "19c" +ogdd_sharded_database_listener_port = 37382 +listener_port_tls = 37383 +ogdd_sharded_database_ons_port_local = 37385 +ogdd_sharded_database_ons_port_remote = 37386 +ogdd_sharded_database_prefix = "c19" +ogdd_sharded_database_shard_details_admin_password = "Admin PWD" +ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_shard_details_shard_space = "xyz" +ogdd_sharded_database_cluster_certificate_common_name = "gdad_preprod" + +# POST +oci_globally_distributed_database_configure_sharding_trigger = null +oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_get_connection_string_trigger = null +oci_globally_distributed_database_start_database_trigger = null +oci_globally_distributed_database_stop_database_trigger = null +oci_globally_distributed_database_validate_network_trigger = null + +#PATCH + +/* +oci_globally_distributed_database_patch_operation_operation = "MERGE" +oci_globally_distributed_database_patch_operation_selection = "shardDetails[?name=='c5600000td']" +oci_globally_distributed_database_patch_operation_value = "{\"computeCount\":4,\"dataStorageSizeInGbs\":16,\"isAutoScalingEnabled\":false}" +*/ + +/* +oci_globally_distributed_database_patch_operation_operation = "REMOVE" +oci_globally_distributed_database_patch_operation_selection = "shardDetails[?name=='c5600000td']" +oci_globally_distributed_database_patch_operation_value = "" +*/ + +/* +oci_globally_distributed_database_patch_operation_operation = "INSERT" +oci_globally_distributed_database_patch_operation_selection = "shardDetails" +oci_globally_distributed_database_patch_operation_value = "{ \"characterSet\": \"AL32UTF8\", \"ncharacterSet\": \"AL16UTF16\", \"computeCount\": 2, \"dataStorageSizeInGbs\": 32, \"shardSpace\": \"shardSpace1\", \"isAutoScalingEnabled\": \"false\", \"cloudAutonomousVmClusterId\": \"\" }" +*/ + + diff --git a/examples/globally_distributed_database/terraform.tfvars.template b/examples/globally_distributed_database/terraform.tfvars.template new file mode 100644 index 00000000000..6a4d6a05ef5 --- /dev/null +++ b/examples/globally_distributed_database/terraform.tfvars.template @@ -0,0 +1,78 @@ +# GETTING STARTED +# +# 1. Download and install TerraForm (https://www.terraform.io/downloads.html) +# 2. Download and install the OCI TerraForm provider (https://github.com/oracle/terraform-provider-oci/) +# 3. Make sure that you have an OCI API key setup +# See https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm for directions on creating an API signing key +# See https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm on how to manage API keys in the OCI UI or API +# 4. Copy your tenancy OCID below (bottom part of OCI screen, after Tenancy OCID: heading) +# 5. Copy your OCI user account OCID (login to OCI > Identity > Users) +# 6. Copy the required API key fingerprint and private key path (below) +# 7. Fill-in the full path to the SSH public and private keys (this can be used when creating new instances) +# See https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Tasks/creatingkeys.htm for directions on how to create this key pair +# +# HELPFUL URLs +# * https://github.com/oracle/terraform-provider-oci/blob/master/docs/Table%20of%20Contents.md +# + +# RUNNING TerraForm +# +# Once you've gone through the steps mentioned above, you need to populate your environment variables, by sourcing this file... steps are below: +# 1. Modify this file (so it reflects your OCIDs, etc.) +# 2. $ terraform init +# You only have to do this once after installing or upgrading your TerraForm plugins +# 3. $ terraform plan +# This will show you what TerraForm might do if you applied it +# 4. $ terraform apply + +# Get this from the bottom of the OCI screen (after logging in, after Tenancy ID: heading) +tenancy_ocid=" Identity > Users (for your user account) +user_ocid="" + +# the fingerprint can be gathered from your user account (OCI > Identity > Users > click your username > API Keys fingerprint (select it, copy it and paste it below)) +fingerprint="" +# this is the full path on your local system to the private key used for the API key pair +private_key_path="" + +# region (us-phoenix-1, ca-toronto-1, etc) +region="" + + +# Globally Distributed Database Example Configuration + +compartment_ocid = "" +subnet_ocid = "" +oci_globally_distributed_database_defined_tags_value = null +ogdd_sharded_database_catalog_details_admin_password = "Admin PWD" +ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_db_version = "19c" +ogdd_sharded_database_listener_port = 37382 +listener_port_tls = 37383 +ogdd_sharded_database_ons_port_local = 37385 +ogdd_sharded_database_ons_port_remote = 37386 +ogdd_sharded_database_prefix = "c19" +ogdd_sharded_database_shard_details_admin_password = "Admin PWD" +ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_shard_details_shard_space = "xyz" +ogdd_sharded_database_cluster_certificate_common_name = "gdad_preprod" + +# POST +oci_globally_distributed_database_configure_sharding_trigger = null +oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_get_connection_string_trigger = null +oci_globally_distributed_database_start_database_trigger = null +oci_globally_distributed_database_stop_database_trigger = null +oci_globally_distributed_database_validate_network_trigger = null + +#PATCH + + +oci_globally_distributed_database_patch_operation_operation = "MERGE" +oci_globally_distributed_database_patch_operation_selection = "shardDetails[?name=='c3900001td']" +oci_globally_distributed_database_patch_operation_value = { + computeCount = 4 + dataStorageSizeInGbs = 32 + isAutoScalingEnabled = true +} diff --git a/examples/globally_distributed_database/variables.tf b/examples/globally_distributed_database/variables.tf new file mode 100644 index 00000000000..b7ba1504a9f --- /dev/null +++ b/examples/globally_distributed_database/variables.tf @@ -0,0 +1,209 @@ + +variable "tenancy_ocid" { +} + +variable "user_ocid" { +} + +variable "fingerprint" { +} + +variable "private_key_path" { +} + +variable "private_key_password" { + default = null +} + +variable "region" { +} + +variable "compartment_ocid" { +} + +variable "subnet_ocid" { +} + +variable "nsg_ocids" { + type = list(string) + default = null +} + +variable "ogdd_sharded_database_catalog_details_admin_password" { +} + +variable "ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id" { +} + +variable "ogdd_sharded_database_catalog_details_compute_count" { + default = 2 +} + +variable "ogdd_sharded_database_catalog_details_data_storage_size_in_gbs" { + default = 32 +} + +variable "ogdd_sharded_database_catalog_details_is_auto_scaling_enabled" { + type = bool + default = false +} + +variable "ogdd_sharded_database_catalog_details_peer_cloud_autonomous_vm_cluster_id" { + default = null +} + +variable "ogdd_sharded_database_character_set" { + default = "AL32UTF8" +} + +variable "ogdd_sharded_database_db_deployment_type" { + default = "DEDICATED" +} + +variable "ogdd_sharded_database_db_version" { + default = "19c" +} + +variable "ogdd_sharded_database_db_workload" { + default = "OLTP" +} + +variable "ogdd_sharded_database_listener_port" { + type = number + default = 37381 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "listener_port_tls" { + type = number + default = 37382 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "ogdd_sharded_database_ncharacter_set" { + default = "AL16UTF16" +} + +variable "ogdd_sharded_database_ons_port_local" { + type = number + default = 37384 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "ogdd_sharded_database_ons_port_remote" { + type = number + default = 37385 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "ogdd_sharded_database_prefix" { + default = "p1" + description = "Needs to be updated to a unqiue value for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + + +variable "ogdd_sharded_database_shard_details_admin_password" { +} + +variable "ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id" { +} + +variable "ogdd_sharded_database_shard_details_compute_count" { + default = 2 +} + +variable "ogdd_sharded_database_shard_details_data_storage_size_in_gbs" { + default = 32 +} + +variable "ogdd_sharded_database_shard_details_is_auto_scaling_enabled" { + type = bool + default = false +} + +variable "ogdd_sharded_database_shard_details_peer_cloud_autonomous_vm_cluster_id" { + default = null +} + +variable "ogdd_sharded_database_shard_details_shard_space" { + default = "my-shard-space" +} + +variable "ogdd_sharded_database_sharding_method" { + default = "USER" +} + +variable "ogdd_sharded_database_chunks" { + default = 120 +} + +variable "ogdd_sharded_database_cluster_certificate_common_name" { + default = "gdad_test" +} + +variable "autonomous_data_warehouse_db_workload" { + default = "DW" +} + +variable "oci_globally_distributed_database_defined_tags_value" { + default = { + "foo-namespace.bar-key" = "value" + } +} + +variable "oci_globally_distributed_database_freeform_tags" { + default = { + "Department" = "Finance" + } +} + +variable "oci_globally_distributed_database_configure_sharding_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_get_connection_string_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_start_database_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_stop_database_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_validate_network_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_patch_operation_operation" { + description = "(Required) (Updatable) The operation can be one of these values: INSERT, MERGE, REMOVE" + default = null +} + +variable "oci_globally_distributed_database_patch_operation_selection" { + description = "(Required) (Updatable)" + default = null +} + +variable "oci_globally_distributed_database_patch_operation_value" { + description = "(Required when operation=INSERT | MERGE) (Updatable)" + type = string + default = null +} \ No newline at end of file diff --git a/examples/opsi/database_insight/mds_mysql_database_insight/mds_mysql_database_insight.tf b/examples/opsi/database_insight/mds_mysql_database_insight/mds_mysql_database_insight.tf new file mode 100644 index 00000000000..10adf030430 --- /dev/null +++ b/examples/opsi/database_insight/mds_mysql_database_insight/mds_mysql_database_insight.tf @@ -0,0 +1,104 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "tenancy_ocid" {} +variable "user_ocid" {} +variable "fingerprint" {} +variable "private_key_path" {} +variable "region" {} +variable "compartment_ocid" {} +variable "mds_mysql_database_id" {} + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +resource "oci_identity_tag_namespace" "tag-namespace1" { + compartment_id = var.tenancy_ocid + description = "example tag namespace" + name = "examples-tag-namespace-all" + is_retired = false +} + + +resource "oci_identity_tag" "tag1" { + description = "example tag" + name = "example-tag" + tag_namespace_id = oci_identity_tag_namespace.tag-namespace1.id + is_cost_tracking = false + is_retired = false +} + +variable "database_insight_database_type" { + default = ["MDS-MYSQL"] +} + +variable "database_insight_database_resource_type" { + default = "mysqldbsystem" +} + +variable "database_insight_defined_tags_value" { + default = "value" +} + +variable "database_insight_entity_source" { + default = "MDS_MYSQL_DATABASE_SYSTEM" +} + +variable "database_insight_fields" { + default = ["databaseName", "databaseType", "compartmentId", "databaseDisplayName", "freeformTags", "definedTags"] +} + +variable "database_insight_freeform_tags" { + default = { "bar-key" = "value" } +} + +variable "resource_status" { + default = "ENABLED" +} + +// Create Database insight for MDS MySQL Database +resource "oci_opsi_database_insight" "test_database_insight" { + #Required + compartment_id = var.compartment_ocid + entity_source = var.database_insight_entity_source + database_id = var.mds_mysql_database_id + + #Optional + database_resource_type = var.database_insight_database_resource_type + defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "${var.database_insight_defined_tags_value}")}" + freeform_tags = var.database_insight_freeform_tags + status = var.resource_status + enterprise_manager_bridge_id = "" + enterprise_manager_entity_identifier = "" + enterprise_manager_identifier = "" +} + +variable "database_insight_state" { + default = ["ACTIVE"] +} + +variable "database_insight_status" { + default = ["ENABLED"] +} + +// List MDS MySQL database insights +data "oci_opsi_database_insights" "test_database_insights" { + + #Optional + compartment_id = var.compartment_ocid + database_type = var.database_insight_database_type + fields = var.database_insight_fields + state = var.database_insight_state + status = var.database_insight_status +} + +// Get an MDS MySQL database insight +data "oci_opsi_database_insight" "test_database_insight" { + database_insight_id = oci_opsi_database_insight.test_database_insight.id +} + diff --git a/examples/zips/adm.zip b/examples/zips/adm.zip index 320c038b2ef..7eb638a4e46 100644 Binary files a/examples/zips/adm.zip and b/examples/zips/adm.zip differ diff --git a/examples/zips/aiAnomalyDetection.zip b/examples/zips/aiAnomalyDetection.zip index 124a6a04002..5e75929be28 100644 Binary files a/examples/zips/aiAnomalyDetection.zip and b/examples/zips/aiAnomalyDetection.zip differ diff --git a/examples/zips/aiDocument.zip b/examples/zips/aiDocument.zip index 7156a1f543e..b24eaa9330e 100644 Binary files a/examples/zips/aiDocument.zip and b/examples/zips/aiDocument.zip differ diff --git a/examples/zips/aiLanguage.zip b/examples/zips/aiLanguage.zip index 765822a0d31..93307887758 100644 Binary files a/examples/zips/aiLanguage.zip and b/examples/zips/aiLanguage.zip differ diff --git a/examples/zips/aiVision.zip b/examples/zips/aiVision.zip index 2341ea136e7..df72937065b 100644 Binary files a/examples/zips/aiVision.zip and b/examples/zips/aiVision.zip differ diff --git a/examples/zips/always_free.zip b/examples/zips/always_free.zip index 4d7fdbe42ec..b5270318e01 100644 Binary files a/examples/zips/always_free.zip and b/examples/zips/always_free.zip differ diff --git a/examples/zips/analytics.zip b/examples/zips/analytics.zip index 4b54284a500..11578041c62 100644 Binary files a/examples/zips/analytics.zip and b/examples/zips/analytics.zip differ diff --git a/examples/zips/announcements_service.zip b/examples/zips/announcements_service.zip index 94c4aec78d4..9f085e74c9f 100644 Binary files a/examples/zips/announcements_service.zip and b/examples/zips/announcements_service.zip differ diff --git a/examples/zips/api_gateway.zip b/examples/zips/api_gateway.zip index c23d3a613dd..ba6c81753b7 100644 Binary files a/examples/zips/api_gateway.zip and b/examples/zips/api_gateway.zip differ diff --git a/examples/zips/apm.zip b/examples/zips/apm.zip index 3cb67fa3da3..06590d4bf08 100644 Binary files a/examples/zips/apm.zip and b/examples/zips/apm.zip differ diff --git a/examples/zips/appmgmt_control.zip b/examples/zips/appmgmt_control.zip index 421c80428c4..3f0b4b92621 100644 Binary files a/examples/zips/appmgmt_control.zip and b/examples/zips/appmgmt_control.zip differ diff --git a/examples/zips/artifacts.zip b/examples/zips/artifacts.zip index 274823a1542..d96544c8f37 100644 Binary files a/examples/zips/artifacts.zip and b/examples/zips/artifacts.zip differ diff --git a/examples/zips/audit.zip b/examples/zips/audit.zip index 4e8e24b7bb4..05bc50ff3a9 100644 Binary files a/examples/zips/audit.zip and b/examples/zips/audit.zip differ diff --git a/examples/zips/autoscaling.zip b/examples/zips/autoscaling.zip index 414533a51d5..00a986abb25 100644 Binary files a/examples/zips/autoscaling.zip and b/examples/zips/autoscaling.zip differ diff --git a/examples/zips/bastion.zip b/examples/zips/bastion.zip index 594966f366c..02ae151c647 100644 Binary files a/examples/zips/bastion.zip and b/examples/zips/bastion.zip differ diff --git a/examples/zips/big_data_service.zip b/examples/zips/big_data_service.zip index ce966fe3324..430a2157e98 100644 Binary files a/examples/zips/big_data_service.zip and b/examples/zips/big_data_service.zip differ diff --git a/examples/zips/blockchain.zip b/examples/zips/blockchain.zip index a415631529e..77c14003826 100644 Binary files a/examples/zips/blockchain.zip and b/examples/zips/blockchain.zip differ diff --git a/examples/zips/budget.zip b/examples/zips/budget.zip index 078ff2a55f9..0c563180724 100644 Binary files a/examples/zips/budget.zip and b/examples/zips/budget.zip differ diff --git a/examples/zips/capacity_management.zip b/examples/zips/capacity_management.zip index 0652b80ae31..aa922e7effd 100644 Binary files a/examples/zips/capacity_management.zip and b/examples/zips/capacity_management.zip differ diff --git a/examples/zips/certificatesManagement.zip b/examples/zips/certificatesManagement.zip index f1ddacbc24c..aa195bb33fe 100644 Binary files a/examples/zips/certificatesManagement.zip and b/examples/zips/certificatesManagement.zip differ diff --git a/examples/zips/cloudBridge.zip b/examples/zips/cloudBridge.zip index ef581349e0d..b166551be35 100644 Binary files a/examples/zips/cloudBridge.zip and b/examples/zips/cloudBridge.zip differ diff --git a/examples/zips/cloudMigrations.zip b/examples/zips/cloudMigrations.zip index 8b857e8ff6c..263aba4aa77 100644 Binary files a/examples/zips/cloudMigrations.zip and b/examples/zips/cloudMigrations.zip differ diff --git a/examples/zips/cloudguard.zip b/examples/zips/cloudguard.zip index b90f9466aa5..1dcaa87d146 100644 Binary files a/examples/zips/cloudguard.zip and b/examples/zips/cloudguard.zip differ diff --git a/examples/zips/cluster_placement_groups.zip b/examples/zips/cluster_placement_groups.zip index 74dcaa12f7b..bd8cfc82e6e 100644 Binary files a/examples/zips/cluster_placement_groups.zip and b/examples/zips/cluster_placement_groups.zip differ diff --git a/examples/zips/compute.zip b/examples/zips/compute.zip index 584cb03a16b..81f3e7185a3 100644 Binary files a/examples/zips/compute.zip and b/examples/zips/compute.zip differ diff --git a/examples/zips/computecloudatcustomer.zip b/examples/zips/computecloudatcustomer.zip index dd6e94c5007..31c48002d3c 100644 Binary files a/examples/zips/computecloudatcustomer.zip and b/examples/zips/computecloudatcustomer.zip differ diff --git a/examples/zips/computeinstanceagent.zip b/examples/zips/computeinstanceagent.zip index 3a574e07252..a7151cf6aab 100644 Binary files a/examples/zips/computeinstanceagent.zip and b/examples/zips/computeinstanceagent.zip differ diff --git a/examples/zips/concepts.zip b/examples/zips/concepts.zip index a69e87787eb..7d8e7f50508 100644 Binary files a/examples/zips/concepts.zip and b/examples/zips/concepts.zip differ diff --git a/examples/zips/container_engine.zip b/examples/zips/container_engine.zip index aea964812a4..7574d07bbd1 100644 Binary files a/examples/zips/container_engine.zip and b/examples/zips/container_engine.zip differ diff --git a/examples/zips/container_instances.zip b/examples/zips/container_instances.zip index 7e7edccda49..6895e62ca81 100644 Binary files a/examples/zips/container_instances.zip and b/examples/zips/container_instances.zip differ diff --git a/examples/zips/database.zip b/examples/zips/database.zip index 1da98f53c3c..ce172715feb 100644 Binary files a/examples/zips/database.zip and b/examples/zips/database.zip differ diff --git a/examples/zips/databaseTools.zip b/examples/zips/databaseTools.zip index 71f537c6ebf..3604f7a8bee 100644 Binary files a/examples/zips/databaseTools.zip and b/examples/zips/databaseTools.zip differ diff --git a/examples/zips/databasemanagement.zip b/examples/zips/databasemanagement.zip index 562cc865952..9a08ab1fefc 100644 Binary files a/examples/zips/databasemanagement.zip and b/examples/zips/databasemanagement.zip differ diff --git a/examples/zips/databasemigration.zip b/examples/zips/databasemigration.zip index b80ffd78a5a..444ee0463dc 100644 Binary files a/examples/zips/databasemigration.zip and b/examples/zips/databasemigration.zip differ diff --git a/examples/zips/datacatalog.zip b/examples/zips/datacatalog.zip index b0ea316f8cc..41088dab20e 100644 Binary files a/examples/zips/datacatalog.zip and b/examples/zips/datacatalog.zip differ diff --git a/examples/zips/dataflow.zip b/examples/zips/dataflow.zip index 7a36ed364ef..5d9b3538383 100644 Binary files a/examples/zips/dataflow.zip and b/examples/zips/dataflow.zip differ diff --git a/examples/zips/dataintegration.zip b/examples/zips/dataintegration.zip index 3ec543a632f..e8225220114 100644 Binary files a/examples/zips/dataintegration.zip and b/examples/zips/dataintegration.zip differ diff --git a/examples/zips/datalabeling.zip b/examples/zips/datalabeling.zip index 4abb949742a..e266b0f7d38 100644 Binary files a/examples/zips/datalabeling.zip and b/examples/zips/datalabeling.zip differ diff --git a/examples/zips/datasafe.zip b/examples/zips/datasafe.zip index a836f1b1318..ede89da92b4 100644 Binary files a/examples/zips/datasafe.zip and b/examples/zips/datasafe.zip differ diff --git a/examples/zips/datascience.zip b/examples/zips/datascience.zip index 511aa3f7b1b..876739bfc6f 100644 Binary files a/examples/zips/datascience.zip and b/examples/zips/datascience.zip differ diff --git a/examples/zips/demand_signal.zip b/examples/zips/demand_signal.zip index a5f9735d021..6e6518883f3 100644 Binary files a/examples/zips/demand_signal.zip and b/examples/zips/demand_signal.zip differ diff --git a/examples/zips/devops.zip b/examples/zips/devops.zip index 519c328a592..455689e39eb 100644 Binary files a/examples/zips/devops.zip and b/examples/zips/devops.zip differ diff --git a/examples/zips/disaster_recovery.zip b/examples/zips/disaster_recovery.zip index 86d938f5b2b..295f38c7700 100644 Binary files a/examples/zips/disaster_recovery.zip and b/examples/zips/disaster_recovery.zip differ diff --git a/examples/zips/dns.zip b/examples/zips/dns.zip index 50879feecfa..da8c8927439 100644 Binary files a/examples/zips/dns.zip and b/examples/zips/dns.zip differ diff --git a/examples/zips/em_warehouse.zip b/examples/zips/em_warehouse.zip index 2df7bd8fdb4..930a87267e4 100644 Binary files a/examples/zips/em_warehouse.zip and b/examples/zips/em_warehouse.zip differ diff --git a/examples/zips/email.zip b/examples/zips/email.zip index 1ef3466e856..371c9b46b84 100644 Binary files a/examples/zips/email.zip and b/examples/zips/email.zip differ diff --git a/examples/zips/events.zip b/examples/zips/events.zip index 60627b09842..1f32110a7c1 100644 Binary files a/examples/zips/events.zip and b/examples/zips/events.zip differ diff --git a/examples/zips/fast_connect.zip b/examples/zips/fast_connect.zip index 9ff0e991d1e..f8eb557fa7f 100644 Binary files a/examples/zips/fast_connect.zip and b/examples/zips/fast_connect.zip differ diff --git a/examples/zips/functions.zip b/examples/zips/functions.zip index d83519fb40a..6393694166f 100644 Binary files a/examples/zips/functions.zip and b/examples/zips/functions.zip differ diff --git a/examples/zips/fusionapps.zip b/examples/zips/fusionapps.zip index 288504ec448..a342f7f33d9 100644 Binary files a/examples/zips/fusionapps.zip and b/examples/zips/fusionapps.zip differ diff --git a/examples/zips/generative_ai.zip b/examples/zips/generative_ai.zip index c17ab7ce8df..3e17df32228 100644 Binary files a/examples/zips/generative_ai.zip and b/examples/zips/generative_ai.zip differ diff --git a/examples/zips/globally_distributed_database.zip b/examples/zips/globally_distributed_database.zip new file mode 100644 index 00000000000..809620c3b5c Binary files /dev/null and b/examples/zips/globally_distributed_database.zip differ diff --git a/examples/zips/goldengate.zip b/examples/zips/goldengate.zip index 3d16e0c8db1..1110de842da 100644 Binary files a/examples/zips/goldengate.zip and b/examples/zips/goldengate.zip differ diff --git a/examples/zips/health_checks.zip b/examples/zips/health_checks.zip index 120602e80fb..b42127098ee 100644 Binary files a/examples/zips/health_checks.zip and b/examples/zips/health_checks.zip differ diff --git a/examples/zips/id6.zip b/examples/zips/id6.zip index c1fb2c37bba..07425df0e98 100644 Binary files a/examples/zips/id6.zip and b/examples/zips/id6.zip differ diff --git a/examples/zips/identity.zip b/examples/zips/identity.zip index e0b3cc04c5d..e7a3760e496 100644 Binary files a/examples/zips/identity.zip and b/examples/zips/identity.zip differ diff --git a/examples/zips/identity_data_plane.zip b/examples/zips/identity_data_plane.zip index 80aa0f2f588..b73978e0eb7 100644 Binary files a/examples/zips/identity_data_plane.zip and b/examples/zips/identity_data_plane.zip differ diff --git a/examples/zips/identity_domains.zip b/examples/zips/identity_domains.zip index e612220f828..0596b39f86c 100644 Binary files a/examples/zips/identity_domains.zip and b/examples/zips/identity_domains.zip differ diff --git a/examples/zips/integration.zip b/examples/zips/integration.zip index 30aaf85999a..0e53084f4b0 100644 Binary files a/examples/zips/integration.zip and b/examples/zips/integration.zip differ diff --git a/examples/zips/jms.zip b/examples/zips/jms.zip index 5e990974739..7c533b7df08 100644 Binary files a/examples/zips/jms.zip and b/examples/zips/jms.zip differ diff --git a/examples/zips/jms_java_downloads.zip b/examples/zips/jms_java_downloads.zip index b078bd790f3..84f6415aef5 100644 Binary files a/examples/zips/jms_java_downloads.zip and b/examples/zips/jms_java_downloads.zip differ diff --git a/examples/zips/kms.zip b/examples/zips/kms.zip index 09e05844820..71ab108e78f 100644 Binary files a/examples/zips/kms.zip and b/examples/zips/kms.zip differ diff --git a/examples/zips/license_manager.zip b/examples/zips/license_manager.zip index 6605a66d892..57bdf27e363 100644 Binary files a/examples/zips/license_manager.zip and b/examples/zips/license_manager.zip differ diff --git a/examples/zips/limits.zip b/examples/zips/limits.zip index 7d9084a7e27..01921abda6c 100644 Binary files a/examples/zips/limits.zip and b/examples/zips/limits.zip differ diff --git a/examples/zips/load_balancer.zip b/examples/zips/load_balancer.zip index 6650b365252..eaa4c414ecf 100644 Binary files a/examples/zips/load_balancer.zip and b/examples/zips/load_balancer.zip differ diff --git a/examples/zips/log_analytics.zip b/examples/zips/log_analytics.zip index dac80a9f945..8a1e9286c8d 100644 Binary files a/examples/zips/log_analytics.zip and b/examples/zips/log_analytics.zip differ diff --git a/examples/zips/logging.zip b/examples/zips/logging.zip index 07b98d3180e..d0144ee55f2 100644 Binary files a/examples/zips/logging.zip and b/examples/zips/logging.zip differ diff --git a/examples/zips/management_agent.zip b/examples/zips/management_agent.zip index 8258944a345..1719173a50a 100644 Binary files a/examples/zips/management_agent.zip and b/examples/zips/management_agent.zip differ diff --git a/examples/zips/management_dashboard.zip b/examples/zips/management_dashboard.zip index 9265c69be60..951dbce20d9 100644 Binary files a/examples/zips/management_dashboard.zip and b/examples/zips/management_dashboard.zip differ diff --git a/examples/zips/marketplace.zip b/examples/zips/marketplace.zip index 9fad629fa96..fa29051e5dc 100644 Binary files a/examples/zips/marketplace.zip and b/examples/zips/marketplace.zip differ diff --git a/examples/zips/media_services.zip b/examples/zips/media_services.zip index f1ce1b26d29..d605596a788 100644 Binary files a/examples/zips/media_services.zip and b/examples/zips/media_services.zip differ diff --git a/examples/zips/metering_computation.zip b/examples/zips/metering_computation.zip index 7e58c39814b..35c3558f6b7 100644 Binary files a/examples/zips/metering_computation.zip and b/examples/zips/metering_computation.zip differ diff --git a/examples/zips/monitoring.zip b/examples/zips/monitoring.zip index 42e18a94235..c5fe9ac07b0 100644 Binary files a/examples/zips/monitoring.zip and b/examples/zips/monitoring.zip differ diff --git a/examples/zips/mysql.zip b/examples/zips/mysql.zip index ef9f1446b79..60d664f183c 100644 Binary files a/examples/zips/mysql.zip and b/examples/zips/mysql.zip differ diff --git a/examples/zips/network_firewall.zip b/examples/zips/network_firewall.zip index 0c6c5d28318..904bfcb95b2 100644 Binary files a/examples/zips/network_firewall.zip and b/examples/zips/network_firewall.zip differ diff --git a/examples/zips/network_load_balancer.zip b/examples/zips/network_load_balancer.zip index 6835d17ce4f..293535c759a 100644 Binary files a/examples/zips/network_load_balancer.zip and b/examples/zips/network_load_balancer.zip differ diff --git a/examples/zips/networking.zip b/examples/zips/networking.zip index aa0b6254326..c91800a740e 100644 Binary files a/examples/zips/networking.zip and b/examples/zips/networking.zip differ diff --git a/examples/zips/nosql.zip b/examples/zips/nosql.zip index 40fb208ce7a..0f38f271520 100644 Binary files a/examples/zips/nosql.zip and b/examples/zips/nosql.zip differ diff --git a/examples/zips/notifications.zip b/examples/zips/notifications.zip index 759bd7f81d8..ae61ef87964 100644 Binary files a/examples/zips/notifications.zip and b/examples/zips/notifications.zip differ diff --git a/examples/zips/object_storage.zip b/examples/zips/object_storage.zip index 12931b8c27d..58eaf3a2655 100644 Binary files a/examples/zips/object_storage.zip and b/examples/zips/object_storage.zip differ diff --git a/examples/zips/ocvp.zip b/examples/zips/ocvp.zip index 8fa4ddf4ec9..949a4ce4b43 100644 Binary files a/examples/zips/ocvp.zip and b/examples/zips/ocvp.zip differ diff --git a/examples/zips/onesubscription.zip b/examples/zips/onesubscription.zip index a1b59378210..cc89d7b6bae 100644 Binary files a/examples/zips/onesubscription.zip and b/examples/zips/onesubscription.zip differ diff --git a/examples/zips/opa.zip b/examples/zips/opa.zip index d13ad2dd9db..ca12af6b7a7 100644 Binary files a/examples/zips/opa.zip and b/examples/zips/opa.zip differ diff --git a/examples/zips/opensearch.zip b/examples/zips/opensearch.zip index 5f5697dfae2..042a546a442 100644 Binary files a/examples/zips/opensearch.zip and b/examples/zips/opensearch.zip differ diff --git a/examples/zips/operator_access_control.zip b/examples/zips/operator_access_control.zip index df4ac1c45ca..69bcc09acc2 100644 Binary files a/examples/zips/operator_access_control.zip and b/examples/zips/operator_access_control.zip differ diff --git a/examples/zips/opsi.zip b/examples/zips/opsi.zip index a19b94816d7..b2516e80c9a 100644 Binary files a/examples/zips/opsi.zip and b/examples/zips/opsi.zip differ diff --git a/examples/zips/optimizer.zip b/examples/zips/optimizer.zip index b1b96eb38c6..8bc347e39b6 100644 Binary files a/examples/zips/optimizer.zip and b/examples/zips/optimizer.zip differ diff --git a/examples/zips/oracle_cloud_vmware_solution.zip b/examples/zips/oracle_cloud_vmware_solution.zip index d095fe79794..2a2e96ae33b 100644 Binary files a/examples/zips/oracle_cloud_vmware_solution.zip and b/examples/zips/oracle_cloud_vmware_solution.zip differ diff --git a/examples/zips/oracle_content_experience.zip b/examples/zips/oracle_content_experience.zip index 99f6cefef8f..1c59c5fe3b2 100644 Binary files a/examples/zips/oracle_content_experience.zip and b/examples/zips/oracle_content_experience.zip differ diff --git a/examples/zips/oracle_digital_assistant.zip b/examples/zips/oracle_digital_assistant.zip index b40b25178e2..5ee6a2f0af0 100644 Binary files a/examples/zips/oracle_digital_assistant.zip and b/examples/zips/oracle_digital_assistant.zip differ diff --git a/examples/zips/os_management_hub.zip b/examples/zips/os_management_hub.zip index 6b8a352c7a7..c3da47b5bec 100644 Binary files a/examples/zips/os_management_hub.zip and b/examples/zips/os_management_hub.zip differ diff --git a/examples/zips/osmanagement.zip b/examples/zips/osmanagement.zip index 9385d043e4a..9075cd296ce 100644 Binary files a/examples/zips/osmanagement.zip and b/examples/zips/osmanagement.zip differ diff --git a/examples/zips/osp_gateway.zip b/examples/zips/osp_gateway.zip index 0708fa73fde..6ec3ce6d1a4 100644 Binary files a/examples/zips/osp_gateway.zip and b/examples/zips/osp_gateway.zip differ diff --git a/examples/zips/osub_billing_schedule.zip b/examples/zips/osub_billing_schedule.zip index f2df8417c38..dd7b059a7cf 100644 Binary files a/examples/zips/osub_billing_schedule.zip and b/examples/zips/osub_billing_schedule.zip differ diff --git a/examples/zips/osub_organization_subscription.zip b/examples/zips/osub_organization_subscription.zip index ddfbd7ad583..45a4901c2c0 100644 Binary files a/examples/zips/osub_organization_subscription.zip and b/examples/zips/osub_organization_subscription.zip differ diff --git a/examples/zips/osub_subscription.zip b/examples/zips/osub_subscription.zip index b86b0b952ca..c2a1bac6a7f 100644 Binary files a/examples/zips/osub_subscription.zip and b/examples/zips/osub_subscription.zip differ diff --git a/examples/zips/osub_usage.zip b/examples/zips/osub_usage.zip index 0c95a06247e..cbbf4cd8bdd 100644 Binary files a/examples/zips/osub_usage.zip and b/examples/zips/osub_usage.zip differ diff --git a/examples/zips/pic.zip b/examples/zips/pic.zip index 693bb786fdb..932bdcf187a 100644 Binary files a/examples/zips/pic.zip and b/examples/zips/pic.zip differ diff --git a/examples/zips/psql.zip b/examples/zips/psql.zip index 2c74287b321..c665a858a62 100644 Binary files a/examples/zips/psql.zip and b/examples/zips/psql.zip differ diff --git a/examples/zips/queue.zip b/examples/zips/queue.zip index bd4367e7948..060bc2a1ef2 100644 Binary files a/examples/zips/queue.zip and b/examples/zips/queue.zip differ diff --git a/examples/zips/recovery.zip b/examples/zips/recovery.zip index 712469b34c9..13d49619f5c 100644 Binary files a/examples/zips/recovery.zip and b/examples/zips/recovery.zip differ diff --git a/examples/zips/redis.zip b/examples/zips/redis.zip index 77a2002f924..0c0d428c6e2 100644 Binary files a/examples/zips/redis.zip and b/examples/zips/redis.zip differ diff --git a/examples/zips/resourcemanager.zip b/examples/zips/resourcemanager.zip index 0b14c488a4d..a156d7a43ab 100644 Binary files a/examples/zips/resourcemanager.zip and b/examples/zips/resourcemanager.zip differ diff --git a/examples/zips/resourcescheduler.zip b/examples/zips/resourcescheduler.zip index ae5fb98bccf..16335bc93a1 100644 Binary files a/examples/zips/resourcescheduler.zip and b/examples/zips/resourcescheduler.zip differ diff --git a/examples/zips/serviceManagerProxy.zip b/examples/zips/serviceManagerProxy.zip index 79e6a70b7cd..9143cbeedf7 100644 Binary files a/examples/zips/serviceManagerProxy.zip and b/examples/zips/serviceManagerProxy.zip differ diff --git a/examples/zips/service_catalog.zip b/examples/zips/service_catalog.zip index 6228216d8e6..b0e9d9e0f26 100644 Binary files a/examples/zips/service_catalog.zip and b/examples/zips/service_catalog.zip differ diff --git a/examples/zips/service_connector_hub.zip b/examples/zips/service_connector_hub.zip index 6d1e75b2ed4..7c68265ea26 100644 Binary files a/examples/zips/service_connector_hub.zip and b/examples/zips/service_connector_hub.zip differ diff --git a/examples/zips/service_mesh.zip b/examples/zips/service_mesh.zip index beaf32aa647..75625982a55 100644 Binary files a/examples/zips/service_mesh.zip and b/examples/zips/service_mesh.zip differ diff --git a/examples/zips/stack_monitoring.zip b/examples/zips/stack_monitoring.zip index db2bad38635..509bba4310f 100644 Binary files a/examples/zips/stack_monitoring.zip and b/examples/zips/stack_monitoring.zip differ diff --git a/examples/zips/storage.zip b/examples/zips/storage.zip index a84fe62d045..127f2bd08fe 100644 Binary files a/examples/zips/storage.zip and b/examples/zips/storage.zip differ diff --git a/examples/zips/streaming.zip b/examples/zips/streaming.zip index f96ce969b02..27e3833bdb1 100644 Binary files a/examples/zips/streaming.zip and b/examples/zips/streaming.zip differ diff --git a/examples/zips/usage_proxy.zip b/examples/zips/usage_proxy.zip index 1cc07527319..8310cf6937c 100644 Binary files a/examples/zips/usage_proxy.zip and b/examples/zips/usage_proxy.zip differ diff --git a/examples/zips/vault_secret.zip b/examples/zips/vault_secret.zip index 823601ca2b4..64b790486c6 100644 Binary files a/examples/zips/vault_secret.zip and b/examples/zips/vault_secret.zip differ diff --git a/examples/zips/vbs_inst.zip b/examples/zips/vbs_inst.zip index 012ad80b202..a22db632b99 100644 Binary files a/examples/zips/vbs_inst.zip and b/examples/zips/vbs_inst.zip differ diff --git a/examples/zips/visual_builder.zip b/examples/zips/visual_builder.zip index fad92bf91f8..da131da28ae 100644 Binary files a/examples/zips/visual_builder.zip and b/examples/zips/visual_builder.zip differ diff --git a/examples/zips/vn_monitoring.zip b/examples/zips/vn_monitoring.zip index 0bb093832d1..6b3044771af 100644 Binary files a/examples/zips/vn_monitoring.zip and b/examples/zips/vn_monitoring.zip differ diff --git a/examples/zips/vulnerability_scanning_service.zip b/examples/zips/vulnerability_scanning_service.zip index 9924bc52d5f..13cd400fed6 100644 Binary files a/examples/zips/vulnerability_scanning_service.zip and b/examples/zips/vulnerability_scanning_service.zip differ diff --git a/examples/zips/web_app_acceleration.zip b/examples/zips/web_app_acceleration.zip index 56a510217cd..64e008c97d4 100644 Binary files a/examples/zips/web_app_acceleration.zip and b/examples/zips/web_app_acceleration.zip differ diff --git a/examples/zips/web_app_firewall.zip b/examples/zips/web_app_firewall.zip index 45508cdece5..31179762945 100644 Binary files a/examples/zips/web_app_firewall.zip and b/examples/zips/web_app_firewall.zip differ diff --git a/examples/zips/web_application_acceleration_and_security.zip b/examples/zips/web_application_acceleration_and_security.zip index 0d11532e17e..5b25a66e565 100644 Binary files a/examples/zips/web_application_acceleration_and_security.zip and b/examples/zips/web_application_acceleration_and_security.zip differ diff --git a/go.mod b/go.mod index 04915480c8c..66815ff354f 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/oklog/run v1.0.0 // indirect - github.com/oracle/oci-go-sdk/v65 v65.69.2 + github.com/oracle/oci-go-sdk/v65 v65.69.3 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect diff --git a/go.sum b/go.sum index 2604f8bc0fe..65d96e6401a 100644 --- a/go.sum +++ b/go.sum @@ -140,8 +140,8 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/oracle/oci-go-sdk/v65 v65.69.2 h1:lROMJ8/VakGOGObAWUxTVY2AX1wQCUIzVqfL4Fb2Ay8= -github.com/oracle/oci-go-sdk/v65 v65.69.2/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= +github.com/oracle/oci-go-sdk/v65 v65.69.3 h1:CFpvgj+0k131osppFg8GlDZW9J5GBvZOVQoBJySJP+8= +github.com/oracle/oci-go-sdk/v65 v65.69.3/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/internal/client/globally_distributed_database_clients.go b/internal/client/globally_distributed_database_clients.go new file mode 100644 index 00000000000..0e91ad3b225 --- /dev/null +++ b/internal/client/globally_distributed_database_clients.go @@ -0,0 +1,34 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package client + +import ( + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + oci_common "github.com/oracle/oci-go-sdk/v65/common" +) + +func init() { + RegisterOracleClient("oci_globally_distributed_database.ShardedDatabaseServiceClient", &OracleClient{InitClientFn: initGloballydistributeddatabaseShardedDatabaseServiceClient}) +} + +func initGloballydistributeddatabaseShardedDatabaseServiceClient(configProvider oci_common.ConfigurationProvider, configureClient ConfigureClient, serviceClientOverrides ServiceClientOverrides) (interface{}, error) { + client, err := oci_globally_distributed_database.NewShardedDatabaseServiceClientWithConfigurationProvider(configProvider) + if err != nil { + return nil, err + } + err = configureClient(&client.BaseClient) + if err != nil { + return nil, err + } + + if serviceClientOverrides.HostUrlOverride != "" { + client.Host = serviceClientOverrides.HostUrlOverride + } + return &client, nil +} + +func (m *OracleClients) ShardedDatabaseServiceClient() *oci_globally_distributed_database.ShardedDatabaseServiceClient { + return m.GetClient("oci_globally_distributed_database.ShardedDatabaseServiceClient").(*oci_globally_distributed_database.ShardedDatabaseServiceClient) +} diff --git a/internal/globalvar/version.go b/internal/globalvar/version.go index 67cfa53558f..26eff114ece 100644 --- a/internal/globalvar/version.go +++ b/internal/globalvar/version.go @@ -7,8 +7,9 @@ import ( "log" ) -const Version = "6.3.0" -const ReleaseDate = "2024-07-17" +const Version = "6.4.0" + +const ReleaseDate = "2024-07-24" func PrintVersion() { log.Printf("[INFO] terraform-provider-oci %s\n", Version) diff --git a/internal/integrationtest/apm_synthetics_monitor_test.go b/internal/integrationtest/apm_synthetics_monitor_test.go index 65fe02566df..7af57ee0a58 100644 --- a/internal/integrationtest/apm_synthetics_monitor_test.go +++ b/internal/integrationtest/apm_synthetics_monitor_test.go @@ -26,13 +26,15 @@ import ( "github.com/oracle/terraform-provider-oci/httpreplay" ) +const zipDatabaseWallet = "../../examples/apm/apm_synthetics/monitors/sql_monitor/files/wallet.zip" + var ( ApmSyntheticsMonitorSingularDataSourceRepresentation = map[string]interface{}{ "apm_domain_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_apm_apm_domain.test_apm_domain.id}`}, "monitor_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_apm_synthetics_monitor.test_monitor.id}`}, } - ApmSyntheticsMonitorDataSourceRepresentation = map[string]interface{}{ + ApmSyntheticsScriptedBrowserMonitorDataSourceRepresentation = map[string]interface{}{ "apm_domain_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_apm_apm_domain.test_apm_domain.id}`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, "monitor_type": acctest.Representation{RepType: acctest.Optional, Create: `SCRIPTED_BROWSER`}, @@ -47,7 +49,7 @@ var ( } ApmSyntheticsMonitorVantagePointsRepresentation = map[string]interface{}{ - "name": acctest.Representation{RepType: acctest.Required, Create: `OraclePublic-us-ashburn-1`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `us-phoenix-internal`}, } ApmSyntheticsMonitorAvailabilityConfigurationRepresentation = map[string]interface{}{ @@ -182,6 +184,7 @@ var ( "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, "is_run_once": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "is_run_now": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "is_ipv6": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "maintenance_window_schedule": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorMaintenanceWindowScheduleRepresentation}, "scheduling_policy": acctest.Representation{RepType: acctest.Optional, Create: `ALL`, Update: `ROUND_ROBIN`}, "script_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_apm_synthetics_script.test_script.id}`}, @@ -192,6 +195,101 @@ var ( "script_parameters": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorScriptParametersRepresentation}, } + ApmSyntheticsSqlMonitorRequiredOnlyResource = ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Required, acctest.Create, ApmSyntheticsSqlMonitorRepresentation) + + ApmSyntheticsSqlMonitorResourceConfig = ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Update, ApmSyntheticsSqlMonitorRepresentation) + + ApmSyntheticsSqlMonitorDataSourceRepresentation = map[string]interface{}{ + "apm_domain_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_apm_apm_domain.test_apm_domain.id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, + "monitor_type": acctest.Representation{RepType: acctest.Optional, Create: `SQL`}, + "status": acctest.Representation{RepType: acctest.Optional, Create: `ENABLED`, Update: `DISABLED`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: ApmSyntheticsMonitorDataSourceFilterRepresentation}} + + ApmSyntheticsSqlMonitorRepresentation = map[string]interface{}{ + "apm_domain_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_apm_apm_domain.test_apm_domain.id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `displayName`, Update: `displayName2`}, + "monitor_type": acctest.Representation{RepType: acctest.Required, Create: `SQL`}, + "repeat_interval_in_seconds": acctest.Representation{RepType: acctest.Required, Create: `600`, Update: `1200`}, + "vantage_points": acctest.RepresentationGroup{RepType: acctest.Required, Group: ApmSyntheticsMonitorVantagePointsRepresentation}, + "availability_configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorAvailabilityConfigurationRepresentation}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + "status": acctest.Representation{RepType: acctest.Optional, Create: `ENABLED`, Update: `DISABLED`}, + "timeout_in_seconds": acctest.Representation{RepType: acctest.Optional, Create: `60`, Update: `120`}, + "is_ipv6": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "maintenance_window_schedule": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorMaintenanceWindowScheduleRepresentation}, + "configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsSqlMonitorConfigurationRepresentation}, + } + + ApmSyntheticsSqlMonitorConfigurationRepresentation = map[string]interface{}{ + "database_wallet_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationDatabaseWalletDetailsRepresentation}, + "config_type": acctest.Representation{RepType: acctest.Optional, Create: `SQL_CONFIG`}, + "database_authentication_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationDatabaseAuthenticationDetailsRepresentation}, + "database_connection_type": acctest.Representation{RepType: acctest.Optional, Create: `CLOUD_WALLET`}, + "database_role": acctest.Representation{RepType: acctest.Optional, Create: `DEFAULT`, Update: `SYSDBA`}, + "database_type": acctest.Representation{RepType: acctest.Optional, Create: `ORACLE`}, + "is_failure_retried": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "query": acctest.Representation{RepType: acctest.Optional, Create: `query`, Update: `query2`}, + } + + ApmSyntheticsFtpMonitorRequiredOnlyResource = ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Required, acctest.Create, ApmSyntheticsFtpMonitorRepresentation) + + ApmSyntheticsFtpMonitorResourceConfig = ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Update, ApmSyntheticsFtpMonitorRepresentation) + + ApmSyntheticsFtpMonitorDataSourceRepresentation = map[string]interface{}{ + "apm_domain_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_apm_apm_domain.test_apm_domain.id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, + "monitor_type": acctest.Representation{RepType: acctest.Optional, Create: `FTP`}, + "status": acctest.Representation{RepType: acctest.Optional, Create: `ENABLED`, Update: `DISABLED`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: ApmSyntheticsMonitorDataSourceFilterRepresentation}} + + ApmSyntheticsFtpMonitorRepresentation = map[string]interface{}{ + "apm_domain_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_apm_apm_domain.test_apm_domain.id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `displayName`, Update: `displayName2`}, + "monitor_type": acctest.Representation{RepType: acctest.Required, Create: `FTP`}, + "repeat_interval_in_seconds": acctest.Representation{RepType: acctest.Required, Create: `600`, Update: `1200`}, + "vantage_points": acctest.RepresentationGroup{RepType: acctest.Required, Group: ApmSyntheticsMonitorVantagePointsRepresentation}, + "availability_configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorAvailabilityConfigurationRepresentation}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + "status": acctest.Representation{RepType: acctest.Optional, Create: `ENABLED`, Update: `DISABLED`}, + "target": acctest.Representation{RepType: acctest.Optional, Create: `oracle.com/path/to/file`, Update: `oracle.com/path/to/file1`}, + "timeout_in_seconds": acctest.Representation{RepType: acctest.Optional, Create: `60`, Update: `120`}, + "is_ipv6": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "maintenance_window_schedule": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorMaintenanceWindowScheduleRepresentation}, + "configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsFtpMonitorConfigurationRepresentation}, + } + + ApmSyntheticsFtpMonitorConfigurationRepresentation = map[string]interface{}{ + "dns_configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationDnsConfigurationRepresentation}, + "config_type": acctest.Representation{RepType: acctest.Optional, Create: `FTP_CONFIG`}, + "ftp_basic_authentication_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationFtpBasicAuthenticationDetailsRepresentation}, + "ftp_protocol": acctest.Representation{RepType: acctest.Optional, Create: `FTP`, Update: `FTPS`}, + "ftp_request_type": acctest.Representation{RepType: acctest.Optional, Create: `DOWNLOAD`}, + "is_failure_retried": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "network_configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationNetworkConfigurationRepresentation}, + "download_size_limit_in_bytes": acctest.Representation{RepType: acctest.Optional, Create: `10`, Update: `11`}, + "verify_response_codes": acctest.Representation{RepType: acctest.Optional, Create: []string{`200`, `300`, `400`}}, + } + + ApmSyntheticsMonitorConfigurationDatabaseAuthenticationDetailsRepresentation = map[string]interface{}{ + "password": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationDatabaseAuthenticationDetailsPasswordRepresentation}, + "username": acctest.Representation{RepType: acctest.Optional, Create: `username`, Update: `username2`}, + } + ApmSyntheticsMonitorConfigurationDatabaseWalletDetailsRepresentation = map[string]interface{}{ + "database_wallet": acctest.Representation{RepType: acctest.Optional, Create: zipDatabaseWallet}, + "service_name": acctest.Representation{RepType: acctest.Optional, Create: `synthetic_low`}, + } + ApmSyntheticsMonitorConfigurationFtpBasicAuthenticationDetailsRepresentation = map[string]interface{}{ + "password": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationFtpBasicAuthenticationDetailsPasswordRepresentation}, + "username": acctest.Representation{RepType: acctest.Optional, Create: `username`, Update: `username2`}, + } + ApmSyntheticsScriptedBrowserMonitorConfigurationRepresentation = map[string]interface{}{ "dns_configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationDnsConfigurationRepresentation}, "config_type": acctest.Representation{RepType: acctest.Optional, Create: `SCRIPTED_BROWSER_CONFIG`}, @@ -339,6 +437,15 @@ var ( "timeout_in_seconds": acctest.Representation{RepType: acctest.Optional, Create: `60`, Update: `120`}, "configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsDNSTraceMonitorConfigurationRepresentation}, } + ApmSyntheticsMonitorConfigurationDatabaseAuthenticationDetailsPasswordRepresentation = map[string]interface{}{ + "password": acctest.Representation{RepType: acctest.Optional, Create: `BEstrO0ng_#11`, Update: `BEstrO0ng_#12`}, + "password_type": acctest.Representation{RepType: acctest.Optional, Create: `IN_TEXT`}, + } + + ApmSyntheticsMonitorConfigurationFtpBasicAuthenticationDetailsPasswordRepresentation = map[string]interface{}{ + "password": acctest.Representation{RepType: acctest.Optional, Create: `BEstrO0ng_#11`, Update: `BEstrO0ng_#12`}, + "password_type": acctest.Representation{RepType: acctest.Optional, Create: `IN_TEXT`}, + } ApmSyntheticsDNSTraceMonitorConfigurationRepresentation = map[string]interface{}{ "dns_configuration": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ApmSyntheticsMonitorConfigurationDnsConfigurationRepresentation}, @@ -356,6 +463,411 @@ var ( acctest.GenerateResourceFromRepresentationMap("oci_apm_apm_domain", "test_apm_domain", acctest.Required, acctest.Create, apmDomainRepresentation) ) +// issue-routing-tag: apm_synthetics/default +func TestApmSyntheticsFtpMonitorResource_basic(t *testing.T) { + httpreplay.SetScenario("TestApmSyntheticsFtpMonitorResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + resourceName := "oci_apm_synthetics_monitor.test_monitor" + datasourceName := "data.oci_apm_synthetics_monitors.test_monitors" + singularDatasourceName := "data.oci_apm_synthetics_monitor.test_monitor" + + var resId, resId2 string + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "Create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+ApmSyntheticsMonitorResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Create, ApmSyntheticsFtpMonitorRepresentation), "apmsynthetics", "monitor", t) + + acctest.ResourceTest(t, testAccCheckApmSyntheticsMonitorDestroy, []resource.TestStep{ + + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Create, ApmSyntheticsFtpMonitorRepresentation), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "apm_domain_id"), + resource.TestCheckResourceAttr(resourceName, "availability_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "availability_configuration.0.max_allowed_failures_per_interval", "0"), + resource.TestCheckResourceAttr(resourceName, "availability_configuration.0.min_allowed_runs_per_interval", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.config_type", "FTP_CONFIG"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_basic_authentication_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_basic_authentication_details.0.username", "username"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_basic_authentication_details.0.password.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "configuration.0.ftp_basic_authentication_details.0.password.0.password"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_protocol", "FTP"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_request_type", "DOWNLOAD"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.dns_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.dns_configuration.0.is_override_dns", "false"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.dns_configuration.0.override_dns_ip", "12.1.21.1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.is_failure_retried", "false"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.number_of_hops", "10"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.probe_mode", "SACK"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.probe_per_hop", "10"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.protocol", "TCP"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.transmission_rate", "10"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_ipv6", "false"), + resource.TestCheckResourceAttr(resourceName, "is_run_now", "false"), + resource.TestCheckResourceAttr(resourceName, "is_run_once", "false"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_ended", TimeEnded1), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_started", TimeStarted1), + resource.TestCheckResourceAttr(resourceName, "monitor_type", "FTP"), + resource.TestCheckResourceAttr(resourceName, "repeat_interval_in_seconds", "600"), + resource.TestCheckResourceAttr(resourceName, "status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "target", "oracle.com/path/to/file"), + resource.TestCheckResourceAttr(resourceName, "timeout_in_seconds", "60"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_point_count"), + resource.TestCheckResourceAttr(resourceName, "vantage_points.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_points.0.name"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Update, ApmSyntheticsFtpMonitorRepresentation), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "apm_domain_id"), + resource.TestCheckResourceAttr(resourceName, "availability_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "availability_configuration.0.max_allowed_failures_per_interval", "0"), + resource.TestCheckResourceAttr(resourceName, "availability_configuration.0.min_allowed_runs_per_interval", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.config_type", "FTP_CONFIG"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.dns_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.dns_configuration.0.is_override_dns", "true"), + + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_basic_authentication_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_basic_authentication_details.0.username", "username2"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_basic_authentication_details.0.password.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "configuration.0.ftp_basic_authentication_details.0.password.0.password"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_protocol", "FTPS"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.ftp_request_type", "DOWNLOAD"), + + resource.TestCheckResourceAttr(resourceName, "configuration.0.dns_configuration.0.override_dns_ip", "12.1.21.2"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.is_failure_retried", "true"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.number_of_hops", "11"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.probe_mode", "SYN"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.probe_per_hop", "9"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.protocol", "TCP"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.network_configuration.0.transmission_rate", "11"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_ipv6", "false"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_ended", TimeEnded2), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_started", TimeStarted2), + resource.TestCheckResourceAttr(resourceName, "is_run_now", "false"), + resource.TestCheckResourceAttr(resourceName, "is_run_once", "false"), + resource.TestCheckResourceAttr(resourceName, "monitor_type", "FTP"), + resource.TestCheckResourceAttr(resourceName, "repeat_interval_in_seconds", "1200"), + resource.TestCheckResourceAttr(resourceName, "status", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "target", "oracle.com/path/to/file1"), + resource.TestCheckResourceAttr(resourceName, "timeout_in_seconds", "120"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_point_count"), + resource.TestCheckResourceAttr(resourceName, "vantage_points.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_points.0.name"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_apm_synthetics_monitors", "test_monitors", acctest.Optional, acctest.Update, ApmSyntheticsFtpMonitorDataSourceRepresentation) + + compartmentIdVariableStr + ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Update, ApmSyntheticsFtpMonitorRepresentation), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(datasourceName, "apm_domain_id"), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "monitor_type", "FTP"), + resource.TestCheckResourceAttr(datasourceName, "status", "DISABLED"), + + resource.TestCheckResourceAttr(datasourceName, "monitor_collection.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "monitor_collection.0.items.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Required, acctest.Create, ApmSyntheticsMonitorSingularDataSourceRepresentation) + + compartmentIdVariableStr + ApmSyntheticsFtpMonitorResourceConfig, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(singularDatasourceName, "apm_domain_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "monitor_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "availability_configuration.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "availability_configuration.0.max_allowed_failures_per_interval", "0"), + resource.TestCheckResourceAttr(singularDatasourceName, "availability_configuration.0.min_allowed_runs_per_interval", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.config_type", "FTP_CONFIG"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.dns_configuration.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.dns_configuration.0.is_override_dns", "true"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.ftp_basic_authentication_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.ftp_basic_authentication_details.0.username", "username2"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.ftp_basic_authentication_details.0.password.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "configuration.0.ftp_basic_authentication_details.0.password.0.password"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.ftp_protocol", "FTPS"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.ftp_request_type", "DOWNLOAD"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.is_failure_retried", "true"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.dns_configuration.0.override_dns_ip", "12.1.21.2"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.is_failure_retried", "true"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.network_configuration.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.network_configuration.0.number_of_hops", "11"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.network_configuration.0.probe_mode", "SYN"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.network_configuration.0.probe_per_hop", "9"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.network_configuration.0.protocol", "TCP"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.network_configuration.0.transmission_rate", "11"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_ipv6", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "maintenance_window_schedule.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "maintenance_window_schedule.0.time_ended"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "maintenance_window_schedule.0.time_started"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_run_now", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_run_once", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "monitor_type", "FTP"), + resource.TestCheckResourceAttr(singularDatasourceName, "repeat_interval_in_seconds", "1200"), + resource.TestCheckResourceAttr(singularDatasourceName, "status", "DISABLED"), + resource.TestCheckResourceAttr(singularDatasourceName, "target", "oracle.com/path/to/file1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + resource.TestCheckResourceAttr(singularDatasourceName, "timeout_in_seconds", "120"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "vantage_point_count"), + resource.TestCheckResourceAttr(singularDatasourceName, "vantage_points.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "vantage_points.0.name"), + ), + }, + // verify resource import + { + Config: config + ApmSyntheticsFtpMonitorRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "apm_domain_id", + "batch_interval_in_seconds", //ignore as it does not apply to this case + }, + ResourceName: resourceName, + }, + }) +} + +// issue-routing-tag: apm_synthetics/default +func TestApmSyntheticsSqlMonitorResource_basic(t *testing.T) { + httpreplay.SetScenario("TestApmSyntheticsScriptedBrowserMonitorResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + resourceName := "oci_apm_synthetics_monitor.test_monitor" + datasourceName := "data.oci_apm_synthetics_monitors.test_monitors" + singularDatasourceName := "data.oci_apm_synthetics_monitor.test_monitor" + + var resId, resId2 string + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "Create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+ApmSyntheticsMonitorResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Create, ApmSyntheticsSqlMonitorRepresentation), "apmsynthetics", "monitor", t) + + acctest.ResourceTest(t, testAccCheckApmSyntheticsMonitorDestroy, []resource.TestStep{ + + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Create, ApmSyntheticsSqlMonitorRepresentation), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "apm_domain_id"), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_wallet_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "configuration.0.database_wallet_details.0.database_wallet"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_wallet_details.0.service_name", "synthetic_low"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.config_type", "SQL_CONFIG"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_authentication_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_authentication_details.0.password.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "configuration.0.database_authentication_details.0.password.0.password"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_authentication_details.0.username", "username"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_connection_type", "CLOUD_WALLET"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_role", "DEFAULT"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_type", "ORACLE"), + + resource.TestCheckResourceAttr(resourceName, "configuration.0.is_failure_retried", "false"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_ipv6", "false"), + resource.TestCheckResourceAttr(resourceName, "is_run_now", "false"), + resource.TestCheckResourceAttr(resourceName, "is_run_once", "false"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_ended", TimeEnded1), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_started", TimeStarted1), + resource.TestCheckResourceAttr(resourceName, "monitor_type", "SQL"), + resource.TestCheckResourceAttr(resourceName, "scheduling_policy", "ALL"), + resource.TestCheckResourceAttr(resourceName, "status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "timeout_in_seconds", "60"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_point_count"), + resource.TestCheckResourceAttr(resourceName, "vantage_points.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_points.0.name"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Update, ApmSyntheticsSqlMonitorRepresentation), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "apm_domain_id"), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_wallet_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "configuration.0.database_wallet_details.0.database_wallet"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_wallet_details.0.service_name", "synthetic_low"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.config_type", "SQL_CONFIG"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_authentication_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_authentication_details.0.password.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "configuration.0.database_authentication_details.0.password.0.password"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_authentication_details.0.username", "username2"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_connection_type", "CLOUD_WALLET"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_role", "SYSDBA"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.database_type", "ORACLE"), + resource.TestCheckResourceAttr(resourceName, "configuration.0.is_failure_retried", "true"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_ipv6", "false"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_ended", TimeEnded2), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_schedule.0.time_started", TimeStarted2), + resource.TestCheckResourceAttr(resourceName, "is_run_now", "false"), + resource.TestCheckResourceAttr(resourceName, "scheduling_policy", "ALL"), + resource.TestCheckResourceAttr(resourceName, "is_run_once", "false"), + resource.TestCheckResourceAttr(resourceName, "monitor_type", "SQL"), + resource.TestCheckResourceAttr(resourceName, "repeat_interval_in_seconds", "1200"), + resource.TestCheckResourceAttr(resourceName, "status", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "timeout_in_seconds", "120"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_point_count"), + resource.TestCheckResourceAttr(resourceName, "vantage_points.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "vantage_points.0.name"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_apm_synthetics_monitors", "test_monitors", acctest.Optional, acctest.Update, ApmSyntheticsSqlMonitorDataSourceRepresentation) + + compartmentIdVariableStr + ApmSyntheticsMonitorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Update, ApmSyntheticsSqlMonitorRepresentation), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(datasourceName, "apm_domain_id"), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "monitor_type", "SQL"), + resource.TestCheckResourceAttr(datasourceName, "status", "DISABLED"), + resource.TestCheckResourceAttr(datasourceName, "monitor_collection.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "monitor_collection.0.items.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Required, acctest.Create, ApmSyntheticsMonitorSingularDataSourceRepresentation) + + compartmentIdVariableStr + ApmSyntheticsSqlMonitorResourceConfig, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(singularDatasourceName, "apm_domain_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "monitor_id"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_wallet_details.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "configuration.0.database_wallet_details.0.database_wallet"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_wallet_details.0.service_name", "synthetic_low"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.config_type", "SQL_CONFIG"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_authentication_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_authentication_details.0.password.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "configuration.0.database_authentication_details.0.password.0.password"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_authentication_details.0.username", "username2"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_connection_type", "CLOUD_WALLET"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_role", "SYSDBA"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.database_type", "ORACLE"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.is_failure_retried", "true"), + resource.TestCheckResourceAttr(singularDatasourceName, "configuration.0.is_failure_retried", "true"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_ipv6", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "maintenance_window_schedule.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "maintenance_window_schedule.0.time_ended"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "maintenance_window_schedule.0.time_started"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_run_now", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "scheduling_policy", "ALL"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_run_once", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "monitor_type", "SQL"), + resource.TestCheckResourceAttr(singularDatasourceName, "repeat_interval_in_seconds", "1200"), + resource.TestCheckResourceAttr(singularDatasourceName, "status", "DISABLED"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + resource.TestCheckResourceAttr(singularDatasourceName, "timeout_in_seconds", "120"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "vantage_point_count"), + resource.TestCheckResourceAttr(singularDatasourceName, "vantage_points.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "vantage_points.0.name"), + ), + }, + // verify resource import + { + Config: config + ApmSyntheticsSqlMonitorRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "apm_domain_id", + "batch_interval_in_seconds", //ignore as it does not apply to this case + }, + ResourceName: resourceName, + }, + }) +} + // issue-routing-tag: apm_synthetics/default func TestApmSyntheticsScriptedBrowserMonitorResource_basic(t *testing.T) { httpreplay.SetScenario("TestApmSyntheticsScriptedBrowserMonitorResource_basic") @@ -499,7 +1011,7 @@ func TestApmSyntheticsScriptedBrowserMonitorResource_basic(t *testing.T) { // verify datasource { Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_apm_synthetics_monitors", "test_monitors", acctest.Optional, acctest.Update, ApmSyntheticsMonitorDataSourceRepresentation) + + acctest.GenerateDataSourceFromRepresentationMap("oci_apm_synthetics_monitors", "test_monitors", acctest.Optional, acctest.Update, ApmSyntheticsScriptedBrowserMonitorDataSourceRepresentation) + compartmentIdVariableStr + ApmSyntheticsScriptedMonitorResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_apm_synthetics_monitor", "test_monitor", acctest.Optional, acctest.Update, ApmSyntheticsScriptedBrowserMonitorRepresentation), Check: resource.ComposeAggregateTestCheckFunc( diff --git a/internal/integrationtest/data_safe_discovery_job_test.go b/internal/integrationtest/data_safe_discovery_job_test.go index d30d7245749..2a2d832f289 100644 --- a/internal/integrationtest/data_safe_discovery_job_test.go +++ b/internal/integrationtest/data_safe_discovery_job_test.go @@ -6,12 +6,9 @@ package integrationtest import ( "context" "fmt" - "strconv" "testing" "time" - "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" - "github.com/oracle/terraform-provider-oci/internal/acctest" "github.com/oracle/terraform-provider-oci/internal/client" tf_client "github.com/oracle/terraform-provider-oci/internal/client" @@ -37,15 +34,15 @@ var ( acctest.GenerateResourceFromRepresentationMap("oci_data_safe_discovery_job", "test_discovery_job", acctest.Optional, acctest.Update, discoveryJobRepresentation) DataSafediscoveryJobSingularDataSourceRepresentation = map[string]interface{}{ - "discovery_job_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_discovery_job.test_discovery_job.id}`}, + "discovery_job_id": acctest.Representation{RepType: acctest.Required, Create: `${var.discovery_job_id}`}, } DataSafediscoveryJobDataSourceRepresentation = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, - "discovery_job_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_data_safe_discovery_job.test_discovery_job.id}`}, + "discovery_job_id": acctest.Representation{RepType: acctest.Required, Create: `${var.discovery_job_id}`}, "sensitive_data_model_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_data_safe_sensitive_data_model.test_sensitive_data_model.id}`}, "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, - "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: discoveryJobDataSourceFilterRepresentation}} + "filter": acctest.RepresentationGroup{RepType: acctest.Optional, Group: discoveryJobDataSourceFilterRepresentation}} discoveryJobDataSourceFilterRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_data_safe_discovery_job.test_discovery_job.id}`}}, @@ -57,10 +54,16 @@ var ( "discovery_type": acctest.Representation{RepType: acctest.Optional, Create: `ALL`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, "is_app_defined_relation_discovery_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`}, - "is_include_all_schemas": acctest.Representation{RepType: acctest.Optional, Create: `true`}, - "is_include_all_sensitive_types": acctest.Representation{RepType: acctest.Optional, Create: `true`}, + "is_include_all_schemas": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "is_include_all_sensitive_types": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "is_sample_data_collection_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`}, - "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDiscoveryJobSystemTagsChangesRep}, + "schemas_for_discovery": acctest.Representation{RepType: acctest.Optional, Create: []string{`ZX`}}, + "sensitive_type_ids_for_discovery": acctest.Representation{RepType: acctest.Optional, Create: []string{`${var.sensitive_type_id}`}}, + "tables_for_discovery": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DataSafeDiscoveryJobTablesForDiscoveryRepresentation}, + } + DataSafeDiscoveryJobTablesForDiscoveryRepresentation = map[string]interface{}{ + "schema_name": acctest.Representation{RepType: acctest.Required, Create: `ZX`}, + "table_names": acctest.Representation{RepType: acctest.Optional, Create: []string{`ZX_API_REGISTRATIONS`}}, } DataSafeDiscoveryJobResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Required, acctest.Create, sensitiveDataModelRepresentation) @@ -83,20 +86,26 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { targetId := utils.GetEnvSettingWithBlankDefault("data_safe_target_ocid") targetIdVariableStr := fmt.Sprintf("variable \"target_id\" { default = \"%s\" }\n", targetId) + discoveryJobId := utils.GetEnvSettingWithBlankDefault("data_safe_discovery_job_ocid") + discoveryJobIdVariableStr := fmt.Sprintf("variable \"discovery_job_id\" { default = \"%s\" }\n", discoveryJobId) + compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_update", compartmentId) compartmentIdUVariableStr := fmt.Sprintf("variable \"compartment_id_for_update\" { default = \"%s\" }\n", compartmentIdU) + sensitiveTypeId := utils.GetEnvSettingWithBlankDefault("sensitive_type_id") + sensitiveTypeIdVariableStr := fmt.Sprintf("variable \"sensitive_type_id\" { default = \"%s\" }\n", sensitiveTypeId) + resourceName := "oci_data_safe_discovery_job.test_discovery_job" datasourceName := "data.oci_data_safe_discovery_jobs.test_discovery_jobs" singularDatasourceName := "data.oci_data_safe_discovery_job.test_discovery_job" - + // var resId string var resId2 string // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. acctest.SaveConfigContent(config+compartmentIdVariableStr+DataSafeDiscoveryJobResourceDependencies+ acctest.GenerateResourceFromRepresentationMap("oci_data_safe_discovery_job", "test_discovery_job", acctest.Optional, acctest.Create, discoveryJobRepresentation), "datasafe", "discoveryJob", t) - acctest.ResourceTest(t, testAccCheckDataSafeDiscoveryJobDestroy, []resource.TestStep{ + acctest.ResourceTest(t, nil, []resource.TestStep{ // verify Create { Config: config + compartmentIdVariableStr + DataSafeDiscoveryJobResourceDependencies + targetIdVariableStr + @@ -113,7 +122,7 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { }, // verify Create with optionals { - Config: config + compartmentIdVariableStr + DataSafeDiscoveryJobResourceDependencies + targetIdVariableStr + + Config: config + compartmentIdVariableStr + DataSafeDiscoveryJobResourceDependencies + targetIdVariableStr + sensitiveTypeIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_discovery_job", "test_discovery_job", acctest.Optional, acctest.Create, discoveryJobRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), @@ -121,11 +130,13 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "is_app_defined_relation_discovery_enabled", "false"), - resource.TestCheckResourceAttr(resourceName, "is_include_all_schemas", "true"), - resource.TestCheckResourceAttr(resourceName, "is_include_all_sensitive_types", "true"), + resource.TestCheckResourceAttr(resourceName, "is_include_all_schemas", "false"), + resource.TestCheckResourceAttr(resourceName, "is_include_all_sensitive_types", "false"), resource.TestCheckResourceAttr(resourceName, "is_sample_data_collection_enabled", "false"), resource.TestCheckResourceAttrSet(resourceName, "sensitive_data_model_id"), resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "tables_for_discovery.#", "1"), + resource.TestCheckResourceAttr(resourceName, "tables_for_discovery.0.table_names.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_finished"), resource.TestCheckResourceAttrSet(resourceName, "time_started"), @@ -138,11 +149,6 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") - if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { - if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { - return errExport - } - } return err }, ), @@ -150,7 +156,7 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { // verify Update to the compartment (the compartment will be switched back in the next step) { - Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DataSafeDiscoveryJobResourceDependencies + targetIdVariableStr + + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DataSafeDiscoveryJobResourceDependencies + targetIdVariableStr + sensitiveTypeIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_discovery_job", "test_discovery_job", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithNewProperties(discoveryJobRepresentation, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, @@ -161,12 +167,13 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "is_app_defined_relation_discovery_enabled", "false"), - resource.TestCheckResourceAttr(resourceName, "is_include_all_schemas", "true"), - resource.TestCheckResourceAttr(resourceName, "is_include_all_sensitive_types", "true"), + resource.TestCheckResourceAttr(resourceName, "is_include_all_schemas", "false"), + resource.TestCheckResourceAttr(resourceName, "is_include_all_sensitive_types", "false"), resource.TestCheckResourceAttr(resourceName, "is_sample_data_collection_enabled", "false"), resource.TestCheckResourceAttrSet(resourceName, "sensitive_data_model_id"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), + resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_finished"), resource.TestCheckResourceAttrSet(resourceName, "time_started"), resource.TestCheckResourceAttrSet(resourceName, "total_columns_scanned"), @@ -189,35 +196,33 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { // verify datasource { Config: config + targetIdVariableStr + - acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_discovery_jobs", "test_discovery_jobs", acctest.Optional, acctest.Update, DataSafediscoveryJobDataSourceRepresentation) + - compartmentIdVariableStr + DataSafeDiscoveryJobResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_discovery_job", "test_discovery_job", acctest.Optional, acctest.Update, discoveryJobRepresentation), + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_discovery_jobs", "test_discovery_jobs", acctest.Required, acctest.Create, DataSafediscoveryJobDataSourceRepresentation) + + compartmentIdVariableStr + discoveryJobIdVariableStr, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttrSet(datasourceName, "discovery_job_id"), - resource.TestCheckResourceAttrSet(datasourceName, "sensitive_data_model_id"), - resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), resource.TestCheckResourceAttr(datasourceName, "discovery_job_collection.#", "1"), - resource.TestCheckResourceAttr(datasourceName, "discovery_job_collection.0.items.#", "1"), ), }, // verify singular datasource { Config: config + targetIdVariableStr + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_discovery_job", "test_discovery_job", acctest.Required, acctest.Create, DataSafediscoveryJobSingularDataSourceRepresentation) + - compartmentIdVariableStr + DataSafeDiscoveryJobResourceConfig, + compartmentIdVariableStr + discoveryJobIdVariableStr, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "discovery_job_id"), - resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(singularDatasourceName, "compartment_id"), resource.TestCheckResourceAttr(singularDatasourceName, "discovery_type", "ALL"), - resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "0"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), - resource.TestCheckResourceAttr(singularDatasourceName, "is_app_defined_relation_discovery_enabled", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_app_defined_relation_discovery_enabled", "true"), resource.TestCheckResourceAttr(singularDatasourceName, "is_include_all_schemas", "true"), resource.TestCheckResourceAttr(singularDatasourceName, "is_include_all_sensitive_types", "true"), - resource.TestCheckResourceAttr(singularDatasourceName, "is_sample_data_collection_enabled", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_sample_data_collection_enabled", "true"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttr(singularDatasourceName, "tables_for_discovery.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "tables_for_discovery.0.schema_name", "ZX"), + resource.TestCheckResourceAttr(singularDatasourceName, "tables_for_discovery.0.table_names.#", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_finished"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_started"), resource.TestCheckResourceAttrSet(singularDatasourceName, "total_columns_scanned"), @@ -228,12 +233,13 @@ func TestDataSafeDiscoveryJobResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularDatasourceName, "total_schemas_scanned"), ), }, + // verify resource import { Config: config + targetIdVariableStr + DataSafeDiscoveryJobRequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{}, + ImportStateVerifyIgnore: []string{`state`}, ResourceName: resourceName, }, }) diff --git a/internal/integrationtest/data_safe_report_test.go b/internal/integrationtest/data_safe_report_test.go index 1384d71ea79..9c7ad9bbf50 100644 --- a/internal/integrationtest/data_safe_report_test.go +++ b/internal/integrationtest/data_safe_report_test.go @@ -30,7 +30,11 @@ var ( "type": acctest.Representation{RepType: acctest.Optional, Create: `GENERATED`}, } - DataSafeReportResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_report_definition", "test_report_definition", acctest.Required, acctest.Create, reportDefinitionRepresentation) + DataSafeReportRepresentation = map[string]interface{}{ + "report_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_report.test_report.id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + } ) // issue-routing-tag: data_safe/default @@ -61,7 +65,7 @@ func TestDataSafeReportResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_reports", "test_reports", acctest.Required, acctest.Create, DataSafereportDataSourceRepresentation) + - compartmentIdVariableStr + DataSafeReportResourceConfig + reportDefIdVariableStr + reportIdentifierStr, + compartmentIdVariableStr + reportDefIdVariableStr + reportIdentifierStr, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttrSet(datasourceName, "report_collection.#"), @@ -71,7 +75,7 @@ func TestDataSafeReportResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_report", "test_report", acctest.Required, acctest.Create, DataSafereportSingularDataSourceRepresentation) + - compartmentIdVariableStr + DataSafeReportResourceConfig + reportDefIdVariableStr + reportIdentifierStr, + compartmentIdVariableStr + reportDefIdVariableStr + reportIdentifierStr, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "report_id"), diff --git a/internal/integrationtest/data_safe_security_assessment_finding_test.go b/internal/integrationtest/data_safe_security_assessment_finding_test.go index 6cd2c97fab1..1767c2e2cf0 100644 --- a/internal/integrationtest/data_safe_security_assessment_finding_test.go +++ b/internal/integrationtest/data_safe_security_assessment_finding_test.go @@ -17,17 +17,17 @@ import ( var ( DataSafesecurityAssessmentFindingDataSourceRepresentation = map[string]interface{}{ - "security_assessment_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_security_assessment.test_security_assessment_findings.id}`}, + "compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`}, + "security_assessment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.security_assessment_id}`}, "access_level": acctest.Representation{RepType: acctest.Optional, Create: `ACCESSIBLE`}, "compartment_id_in_subtree": acctest.Representation{RepType: acctest.Optional, Create: `true`}, "finding_key": acctest.Representation{RepType: acctest.Optional, Create: `findingKey`}, "severity": acctest.Representation{RepType: acctest.Optional, Create: `HIGH`}, "state": acctest.Representation{RepType: acctest.Optional, Create: `AVAILABLE`}, + "target_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.target_id}`}, "is_top_finding": acctest.Representation{RepType: acctest.Optional, Create: `false`}, } DataSafeSecurityAssessmentFindingReferencesDataSourceRepresentation = DefinedTagsDependencies - - DataSafeSecurityAssessmentFindingResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_security_assessment", "test_security_assessment_findings", acctest.Required, acctest.Create, securityAssessmentRepresentation) ) // issue-routing-tag: data_safe/default @@ -43,6 +43,8 @@ func TestDataSafeSecurityAssessmentFindingResource_basic(t *testing.T) { targetId := utils.GetEnvSettingWithBlankDefault("data_safe_target_ocid") targetIdVariableStr := fmt.Sprintf("variable \"target_id\" { default = \"%s\" }\n", targetId) + assessmentId := utils.GetEnvSettingWithBlankDefault("data_safe_security_assessment_id") + securityAssessmentIdVariableStr := fmt.Sprintf("variable \"security_assessment_id\" { default = \"%s\" }\n", assessmentId) datasourceName := "data.oci_data_safe_security_assessment_findings.test_security_assessment_findings" acctest.SaveConfigContent("", "", "", t) @@ -52,9 +54,11 @@ func TestDataSafeSecurityAssessmentFindingResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_security_assessment_findings", "test_security_assessment_findings", acctest.Required, acctest.Create, DataSafesecurityAssessmentFindingDataSourceRepresentation) + - compartmentIdVariableStr + DataSafeSecurityAssessmentFindingResourceConfig + targetIdVariableStr, + compartmentIdVariableStr + targetIdVariableStr + securityAssessmentIdVariableStr, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(datasourceName, "security_assessment_id"), + resource.TestCheckResourceAttr(datasourceName, "severity", "HIGH"), + resource.TestCheckResourceAttrSet(datasourceName, "target_id"), resource.TestCheckResourceAttrSet(datasourceName, "findings.#"), resource.TestCheckResourceAttrSet(datasourceName, "findings.0.has_target_db_risk_level_changed"), resource.TestCheckResourceAttrSet(datasourceName, "findings.0.is_risk_modified"), diff --git a/internal/integrationtest/data_safe_security_assessment_test.go b/internal/integrationtest/data_safe_security_assessment_test.go index d946633daaa..ac683549e6b 100644 --- a/internal/integrationtest/data_safe_security_assessment_test.go +++ b/internal/integrationtest/data_safe_security_assessment_test.go @@ -129,6 +129,7 @@ func TestDataSafeSecurityAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "display_name", "EBS assessment"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_assessment_scheduled", "false"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -160,6 +161,7 @@ func TestDataSafeSecurityAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "display_name", "EBS assessment"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -183,6 +185,7 @@ func TestDataSafeSecurityAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -236,13 +239,13 @@ func TestDataSafeSecurityAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(singularDatasourceName, "is_baseline"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttr(singularDatasourceName, "statistics.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "statistics.0.pass.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "statistics.0.deferred.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "target_ids.#", "1"), - // resource.TestCheckResourceAttrSet(singularDatasourceName, "target_version"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_last_assessed"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), diff --git a/internal/integrationtest/data_safe_sensitive_data_model_sensitive_type_test.go b/internal/integrationtest/data_safe_sensitive_data_model_sensitive_type_test.go new file mode 100644 index 00000000000..4fb65326f7d --- /dev/null +++ b/internal/integrationtest/data_safe_sensitive_data_model_sensitive_type_test.go @@ -0,0 +1,54 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package integrationtest + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + + "github.com/oracle/terraform-provider-oci/httpreplay" + "github.com/oracle/terraform-provider-oci/internal/acctest" + + "github.com/oracle/terraform-provider-oci/internal/utils" +) + +var ( + DataSafeSensitiveDataModelSensitiveTypeDataSourceRepresentation = map[string]interface{}{ + "sensitive_data_model_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_sensitive_data_model.test_sensitive_data_model.id}`}, + "sensitive_type_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_data_safe_sensitive_type.test_sensitive_type.id}`}, + } +) + +// issue-routing-tag: data_safe/default +func TestDataSafeSensitiveDataModelSensitiveTypeResource_basic(t *testing.T) { + httpreplay.SetScenario("TestDataSafeSensitiveDataModelSensitiveTypeResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + datasourceName := "data.oci_data_safe_sensitive_data_model_sensitive_types.test_sensitive_data_model_sensitive_types" + + acctest.SaveConfigContent("", "", "", t) + + acctest.ResourceTest(t, nil, []resource.TestStep{ + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_sensitive_data_model_sensitive_types", "test_sensitive_data_model_sensitive_types", acctest.Required, acctest.Create, DataSafeSensitiveDataModelSensitiveTypeDataSourceRepresentation) + + compartmentIdVariableStr, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(datasourceName, "sensitive_data_model_id"), + resource.TestCheckResourceAttrSet(datasourceName, "sensitive_type_id"), + + resource.TestCheckResourceAttrSet(datasourceName, "sensitive_data_model_sensitive_type_collection.#"), + resource.TestCheckResourceAttr(datasourceName, "sensitive_data_model_sensitive_type_collection.0.items.#", "1"), + ), + }, + }) +} diff --git a/internal/integrationtest/data_safe_sensitive_data_model_test.go b/internal/integrationtest/data_safe_sensitive_data_model_test.go index aacd587025d..0df8425b8d1 100644 --- a/internal/integrationtest/data_safe_sensitive_data_model_test.go +++ b/internal/integrationtest/data_safe_sensitive_data_model_test.go @@ -6,12 +6,9 @@ package integrationtest import ( "context" "fmt" - "strconv" "testing" "time" - "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" - "github.com/oracle/terraform-provider-oci/internal/acctest" "github.com/oracle/terraform-provider-oci/internal/client" tf_client "github.com/oracle/terraform-provider-oci/internal/client" @@ -28,11 +25,9 @@ import ( ) var ( - DataSafeSensitiveDataModelRequiredOnlyResource = DataSafeSensitiveDataModelResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Required, acctest.Create, sensitiveDataModelRepresentation) + DataSafeSensitiveDataModelRequiredOnlyResource = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Required, acctest.Create, sensitiveDataModelRepresentation) - DataSafeSensitiveDataModelResourceConfig = DataSafeSensitiveDataModelResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Optional, acctest.Update, sensitiveDataModelRepresentation) + DataSafeSensitiveDataModelResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Optional, acctest.Update, sensitiveDataModelRepresentation) DataSafesensitiveDataModelSingularDataSourceRepresentation = map[string]interface{}{ "sensitive_data_model_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_sensitive_data_model.test_sensitive_data_model.id}`}, @@ -43,12 +38,7 @@ var ( "access_level": acctest.Representation{RepType: acctest.Optional, Create: `ACCESSIBLE`}, "compartment_id_in_subtree": acctest.Representation{RepType: acctest.Optional, Create: `true`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, - "sensitive_data_model_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_data_safe_sensitive_data_model.test_sensitive_data_model.id}`}, "time_created_less_than": acctest.Representation{RepType: acctest.Optional, Create: `2038-01-01T00:00:00.000Z`}, - "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: sensitiveDataModelDataSourceFilterRepresentation}} - sensitiveDataModelDataSourceFilterRepresentation = map[string]interface{}{ - "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, - "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_data_safe_sensitive_data_model.test_sensitive_data_model.id}`}}, } sensitiveDataModelRepresentation = map[string]interface{}{ @@ -60,11 +50,9 @@ var ( "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, "is_app_defined_relation_discovery_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, "is_sample_data_collection_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, - "schemas_for_discovery": acctest.Representation{RepType: acctest.Optional, Create: []string{"HCM"}, Update: []string{}}, + "schemas_for_discovery": acctest.Representation{RepType: acctest.Optional, Create: []string{"AD_MONITOR"}, Update: []string{}}, "sensitive_type_ids_for_discovery": acctest.Representation{RepType: acctest.Optional, Create: []string{`${var.sensitive_type_id}`}, Update: []string{`${var.sensitive_type_id}`}}, } - - DataSafeSensitiveDataModelResourceDependencies = DefinedTagsDependencies ) // issue-routing-tag: data_safe/default @@ -92,13 +80,13 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { var resId, resId2 string // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. - acctest.SaveConfigContent(config+compartmentIdVariableStr+targetIdVariableStr+DataSafeSensitiveDataModelResourceDependencies+ + acctest.SaveConfigContent(config+compartmentIdVariableStr+targetIdVariableStr+ acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Optional, acctest.Create, sensitiveDataModelRepresentation), "datasafe", "sensitiveDataModel", t) acctest.ResourceTest(t, testAccCheckDataSafeSensitiveDataModelDestroy, []resource.TestStep{ // verify Create { - Config: config + compartmentIdVariableStr + DataSafeSensitiveDataModelResourceDependencies + targetIdVariableStr + sensitiveTypeIdVariableStr + + Config: config + compartmentIdVariableStr + targetIdVariableStr + sensitiveTypeIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Required, acctest.Create, sensitiveDataModelRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), @@ -113,11 +101,11 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { // delete before next Create { - Config: config + compartmentIdVariableStr + DataSafeSensitiveDataModelResourceDependencies + targetIdVariableStr + sensitiveTypeIdVariableStr, + Config: config + compartmentIdVariableStr + targetIdVariableStr + sensitiveTypeIdVariableStr, }, // verify Create with optionals { - Config: config + compartmentIdVariableStr + DataSafeSensitiveDataModelResourceDependencies + targetIdVariableStr + sensitiveTypeIdVariableStr + + Config: config + compartmentIdVariableStr + targetIdVariableStr + sensitiveTypeIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Optional, acctest.Create, sensitiveDataModelRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "app_suite_name", "appSuiteName"), @@ -131,15 +119,11 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schemas_for_discovery.#", "1"), resource.TestCheckResourceAttr(resourceName, "sensitive_type_ids_for_discovery.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "tables_for_discovery.#", "0"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") - if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { - if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { - return errExport - } - } return err }, ), @@ -147,7 +131,7 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { // verify Update to the compartment (the compartment will be switched back in the next step) { - Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DataSafeSensitiveDataModelResourceDependencies + targetIdVariableStr + sensitiveTypeIdVariableStr + + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + targetIdVariableStr + sensitiveTypeIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithNewProperties(sensitiveDataModelRepresentation, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, @@ -164,6 +148,7 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schemas_for_discovery.#", "1"), resource.TestCheckResourceAttr(resourceName, "sensitive_type_ids_for_discovery.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "tables_for_discovery.#", "0"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), resource.TestCheckResourceAttrSet(resourceName, "time_updated"), @@ -178,9 +163,9 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { ), }, - // verify updates to updatable parameters + //verify updates to updatable parameters { - Config: config + compartmentIdVariableStr + DataSafeSensitiveDataModelResourceDependencies + targetIdVariableStr + sensitiveTypeIdVariableStr + + Config: config + compartmentIdVariableStr + targetIdVariableStr + sensitiveTypeIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Optional, acctest.Update, sensitiveDataModelRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "app_suite_name", "appSuiteName2"), @@ -193,6 +178,7 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "schemas_for_discovery.#", "0"), resource.TestCheckResourceAttr(resourceName, "sensitive_type_ids_for_discovery.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "tables_for_discovery.#", "0"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), resource.TestCheckResourceAttrSet(resourceName, "time_updated"), @@ -208,19 +194,11 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { }, // verify datasource { - Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_sensitive_data_models", "test_sensitive_data_models", acctest.Optional, acctest.Update, DataSafesensitiveDataModelDataSourceRepresentation) + - compartmentIdVariableStr + targetIdVariableStr + DataSafeSensitiveDataModelResourceDependencies + sensitiveTypeIdVariableStr + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_sensitive_data_model", "test_sensitive_data_model", acctest.Optional, acctest.Update, sensitiveDataModelRepresentation), + Config: config + compartmentIdVariableStr + targetIdVariableStr + sensitiveTypeIdVariableStr + + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_sensitive_data_models", "test_sensitive_data_models", acctest.Required, acctest.Create, DataSafesensitiveDataModelDataSourceRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttr(datasourceName, "access_level", "ACCESSIBLE"), resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(datasourceName, "compartment_id_in_subtree", "true"), - resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttrSet(datasourceName, "sensitive_data_model_id"), - resource.TestCheckResourceAttrSet(datasourceName, "time_created_less_than"), resource.TestCheckResourceAttr(datasourceName, "sensitive_data_model_collection.#", "1"), - resource.TestCheckResourceAttr(datasourceName, "sensitive_data_model_collection.0.items.#", "1"), ), }, // verify singular datasource @@ -242,6 +220,7 @@ func TestDataSafeSensitiveDataModelResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "schemas_for_discovery.#", "0"), resource.TestCheckResourceAttr(singularDatasourceName, "sensitive_type_ids_for_discovery.#", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttr(singularDatasourceName, "tables_for_discovery.#", "0"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), ), diff --git a/internal/integrationtest/data_safe_unset_security_assessment_baseline_test.go b/internal/integrationtest/data_safe_unset_security_assessment_baseline_test.go index e62c3269f68..e3fdf75a0c6 100644 --- a/internal/integrationtest/data_safe_unset_security_assessment_baseline_test.go +++ b/internal/integrationtest/data_safe_unset_security_assessment_baseline_test.go @@ -7,12 +7,12 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/oracle/terraform-provider-oci/internal/acctest" "github.com/oracle/terraform-provider-oci/internal/utils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/oracle/terraform-provider-oci/httpreplay" ) @@ -20,6 +20,13 @@ var ( UnsetSecurityAssessmentBaselineRepresentation = map[string]interface{}{ "security_assessment_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_security_assessment.test_security_assessment1.id}`}, } + DataSafeUnsetSecurityAssessmentBaselineRequiredOnlyResource = DataSafeUnsetSecurityAssessmentBaselineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_security_assessment_baseline", "test_unset_security_assessment_baseline", acctest.Required, acctest.Create, DataSafeUnsetSecurityAssessmentBaselineRepresentation) + + DataSafeUnsetSecurityAssessmentBaselineRepresentation = map[string]interface{}{ + "security_assessment_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_security_assessment.test_security_assessment.id}`}, + "target_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`targetIds`}}, + } DataSafeUnsetSecurityAssessmentBaselineResourceDependencies = DataSafeSetSecurityAssessmentBaselineResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_set_security_assessment_baseline", "test_set_security_assessment_baseline", acctest.Required, acctest.Create, setSecurityAssessmentBaselineRepresentation) @@ -38,20 +45,37 @@ func TestDataSafeUnsetSecurityAssessmentBaselineResource_basic(t *testing.T) { targetId := utils.GetEnvSettingWithBlankDefault("data_safe_target_ocid") targetIdVariableStr := fmt.Sprintf("variable \"target_id\" { default = \"%s\" }\n", targetId) - // Save TF content to Create resource with only required properties. This has to be exactly the same as the config part in the Create step in the test. + resourceName := "oci_data_safe_unset_security_assessment_baseline.test_unset_security_assessment_baseline" + acctest.SaveConfigContent(config+compartmentIdVariableStr+DataSafeUnsetSecurityAssessmentBaselineResourceDependencies+targetIdVariableStr+ acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_security_assessment_baseline", "test_unset_security_assessment_baseline", acctest.Required, acctest.Create, UnsetSecurityAssessmentBaselineRepresentation), "datasafe", "unsetSecurityAssessmentBaseline", t) acctest.ResourceTest(t, nil, []resource.TestStep{ - // verify Create + // verify create with optionals { - Config: config + compartmentIdVariableStr + DataSafeUnsetSecurityAssessmentBaselineResourceDependencies + targetIdVariableStr + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_security_assessment_baseline", "test_unset_security_assessment_baseline", acctest.Required, acctest.Create, UnsetSecurityAssessmentBaselineRepresentation), + Config: config + compartmentIdVariableStr + DataSafeUnsetSecurityAssessmentBaselineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_security_assessment_baseline", "test_unset_security_assessment_baseline", acctest.Optional, acctest.Create, DataSafeUnsetSecurityAssessmentBaselineRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "security_assessment_id"), + resource.TestCheckResourceAttr(resourceName, "target_ids.#", "1"), + func(s *terraform.State) (err error) { return nil }, ), }, + // verify Create + { + Config: config + compartmentIdVariableStr + DataSafeUnsetSecurityAssessmentBaselineResourceDependencies + targetIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_security_assessment_baseline", "test_unset_security_assessment_baseline", acctest.Required, acctest.Create, UnsetSecurityAssessmentBaselineRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "security_assessment_id"), + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + DataSafeUnsetSecurityAssessmentBaselineResourceDependencies, + }, }) } diff --git a/internal/integrationtest/data_safe_unset_user_assessment_baseline_test.go b/internal/integrationtest/data_safe_unset_user_assessment_baseline_test.go index 6d7d94aad44..09bf3b13300 100644 --- a/internal/integrationtest/data_safe_unset_user_assessment_baseline_test.go +++ b/internal/integrationtest/data_safe_unset_user_assessment_baseline_test.go @@ -7,21 +7,22 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/oracle/terraform-provider-oci/internal/acctest" "github.com/oracle/terraform-provider-oci/internal/utils" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/oracle/terraform-provider-oci/httpreplay" ) var ( - unsetUserAssessmentBaselineRepresentation = map[string]interface{}{ - "user_assessment_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_user_assessment.test_user_assessment.id}`}, + DataSafeUnsetUserAssessmentBaselineRepresentation = map[string]interface{}{ + "user_assessment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.user_assessment_id}`}, + "target_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`${var.target_id}`}}, } - DataSafeUnsetUserAssessmentBaselineResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Required, acctest.Create, userAssessmentRepresentation) + DataSafeUnsetUserAssessmentBaselineResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Required, acctest.Create, DataSafeUnsetUserAssessmentBaselineRepresentation) ) // issue-routing-tag: data_safe/default @@ -37,16 +38,21 @@ func TestDataSafeUnsetUserAssessmentBaselineResource_basic(t *testing.T) { targetId := utils.GetEnvSettingWithBlankDefault("data_safe_target_ocid") targetIdVariableStr := fmt.Sprintf("variable \"target_id\" { default = \"%s\" }\n", targetId) - // Save TF content to Create resource with only required properties. This has to be exactly the same as the config part in the Create step in the test. + userAssessmentId := utils.GetEnvSettingWithBlankDefault("data_safe_user_assessment_id") + userAssessmentIdVariableStr := fmt.Sprintf("variable \"user_assessment_id\" { default = \"%s\" }\n", userAssessmentId) //var resId string + resourceName := "oci_data_safe_unset_user_assessment_baseline.test_unset_user_assessment_baseline" acctest.SaveConfigContent(config+compartmentIdVariableStr+DataSafeUnsetUserAssessmentBaselineResourceDependencies+targetIdVariableStr+ - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_user_assessment_baseline", "test_unset_user_assessment_baseline", acctest.Required, acctest.Create, unsetUserAssessmentBaselineRepresentation), "datasafe", "unsetUserAssessmentBaseline", t) + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_user_assessment_baseline", "test_unset_user_assessment_baseline", acctest.Required, acctest.Create, DataSafeUnsetUserAssessmentBaselineRepresentation), "datasafe", "unsetUserAssessmentBaseline", t) acctest.ResourceTest(t, nil, []resource.TestStep{ - // verify Create + // verify Create with optionals { - Config: config + compartmentIdVariableStr + DataSafeUnsetUserAssessmentBaselineResourceDependencies + targetIdVariableStr + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_user_assessment_baseline", "test_unset_user_assessment_baseline", acctest.Required, acctest.Create, unsetUserAssessmentBaselineRepresentation), + Config: config + compartmentIdVariableStr + targetIdVariableStr + userAssessmentIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_unset_user_assessment_baseline", "test_unset_user_assessment_baseline", acctest.Optional, acctest.Create, DataSafeUnsetUserAssessmentBaselineRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "target_ids.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "user_assessment_id"), + func(s *terraform.State) (err error) { return nil }, diff --git a/internal/integrationtest/data_safe_user_assessment_test.go b/internal/integrationtest/data_safe_user_assessment_test.go index fc9f3c8cf66..05ff1399a2f 100644 --- a/internal/integrationtest/data_safe_user_assessment_test.go +++ b/internal/integrationtest/data_safe_user_assessment_test.go @@ -6,12 +6,10 @@ package integrationtest import ( "context" "fmt" - "strconv" "testing" "github.com/oracle/terraform-provider-oci/internal/acctest" tf_client "github.com/oracle/terraform-provider-oci/internal/client" - "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" "github.com/oracle/terraform-provider-oci/internal/tfresource" "github.com/oracle/terraform-provider-oci/internal/utils" @@ -25,11 +23,9 @@ import ( ) var ( - DataSafeUserAssessmentRequiredOnlyResource = DataSafeUserAssessmentResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Required, acctest.Create, userAssessmentRepresentation) + DataSafeUserAssessmentRequiredOnlyResource = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Required, acctest.Create, userAssessmentRepresentation) - DataSafeUserAssessmentResourceConfig = DataSafeUserAssessmentResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Optional, acctest.Update, userAssessmentRepresentation) + DataSafeUserAssessmentResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Optional, acctest.Update, userAssessmentRepresentation) DataSafeuserAssessmentSingularDataSourceRepresentation = map[string]interface{}{ "user_assessment_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_data_safe_user_assessment.test_user_assessment.id}`}, @@ -48,7 +44,6 @@ var ( userAssessmentRepresentation = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "target_id": acctest.Representation{RepType: acctest.Required, Create: `${var.target_id}`}, - "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, @@ -58,7 +53,6 @@ var ( userAssessmentChangeCompartmentRepresentation = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "target_id": acctest.Representation{RepType: acctest.Required, Create: `${var.target_id}`}, - "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, @@ -69,8 +63,6 @@ var ( ignoreChangesUserAssessmentRepresentation = map[string]interface{}{ "ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`}}, } - - DataSafeUserAssessmentResourceDependencies = DefinedTagsDependencies ) // issue-routing-tag: data_safe/default @@ -95,13 +87,13 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { var resId, resId2 string // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "Create with optionals" step in the test. - acctest.SaveConfigContent(config+compartmentIdVariableStr+DataSafeUserAssessmentResourceDependencies+ + acctest.SaveConfigContent(config+compartmentIdVariableStr+ acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Optional, acctest.Create, userAssessmentRepresentation), "datasafe", "userassessment", t) acctest.ResourceTest(t, testAccCheckDataSafeUserAssessmentDestroy, []resource.TestStep{ // verify Create { - Config: config + compartmentIdVariableStr + DataSafeUserAssessmentResourceDependencies + targetIdVariableStr + + Config: config + compartmentIdVariableStr + targetIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Required, acctest.Create, userAssessmentRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), @@ -116,11 +108,11 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { // delete before next Create { - Config: config + compartmentIdVariableStr + DataSafeUserAssessmentResourceDependencies + targetIdVariableStr, + Config: config + compartmentIdVariableStr + targetIdVariableStr, }, // verify Create with optionals { - Config: config + compartmentIdVariableStr + DataSafeUserAssessmentResourceDependencies + targetIdVariableStr + + Config: config + compartmentIdVariableStr + targetIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Optional, acctest.Create, userAssessmentRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), @@ -128,6 +120,7 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -136,11 +129,6 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") - if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { - if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { - return errExport - } - } return err }, ), @@ -148,7 +136,7 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { // verify Update to the compartment (the compartment will be switched back in the next step) { - Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DataSafeUserAssessmentResourceDependencies + targetIdVariableStr + + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + targetIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithNewProperties(userAssessmentRepresentation, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, @@ -159,6 +147,7 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -176,12 +165,13 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { // verify updates to updatable parameters { - Config: config + compartmentIdVariableStr + DataSafeUserAssessmentResourceDependencies + targetIdVariableStr + + Config: config + compartmentIdVariableStr + targetIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Required, acctest.Update, userAssessmentChangeCompartmentRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -201,7 +191,7 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_data_safe_user_assessments", "test_user_assessments", acctest.Optional, acctest.Update, DataSafeuserAssessmentDataSourceRepresentation) + - compartmentIdVariableStr + DataSafeUserAssessmentResourceDependencies + targetIdVariableStr + + compartmentIdVariableStr + targetIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_data_safe_user_assessment", "test_user_assessment", acctest.Optional, acctest.Update, userAssessmentRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), @@ -213,6 +203,7 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "user_assessments.0.freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(datasourceName, "user_assessments.0.id"), + resource.TestCheckResourceAttr(datasourceName, "user_assessments.0.is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(datasourceName, "user_assessments.0.is_baseline"), resource.TestCheckResourceAttrSet(datasourceName, "user_assessments.0.state"), resource.TestCheckResourceAttrSet(datasourceName, "user_assessments.0.time_created"), @@ -235,6 +226,7 @@ func TestDataSafeUserAssessmentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_assessment_scheduled", "true"), resource.TestCheckResourceAttrSet(singularDatasourceName, "is_baseline"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttr(singularDatasourceName, "target_ids.#", "1"), diff --git a/internal/integrationtest/database_autonomous_database_test.go b/internal/integrationtest/database_autonomous_database_test.go index d8b2247800c..00b5ffc7a48 100644 --- a/internal/integrationtest/database_autonomous_database_test.go +++ b/internal/integrationtest/database_autonomous_database_test.go @@ -365,6 +365,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { acctest.RepresentationCopyWithRemovedProperties(acctest.RepresentationCopyWithNewProperties(DatabaseAutonomousDatabaseRepresentation, map[string]interface{}{ "secret_id": acctest.Representation{RepType: acctest.Required, Create: `${var.okv_secret}`}, "secret_version_number": acctest.Representation{RepType: acctest.Required, Create: `1`}, + "subscription_id": acctest.Representation{RepType: acctest.Required, Create: `subscriptionId1`}, }), []string{"admin_password"})), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), @@ -374,6 +375,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "db_name", adbName), // verify computed field db_workload to be defaulted to OLTP resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "subscription_id", "subscriptionId1"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -381,7 +383,24 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, - //3. Verify Update with secretId and secretVersionNumber + + //3. update subscription id + { + Config: config + compartmentIdVariableStr + OkvSecretVariableStr + DatabaseAutonomousDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Required, acctest.Update, + acctest.RepresentationCopyWithRemovedProperties(acctest.RepresentationCopyWithNewProperties(DatabaseAutonomousDatabaseRepresentation, map[string]interface{}{ + "subscription_id": acctest.Representation{RepType: acctest.Required, Create: `subscriptionId1`, Update: `subscriptionId2`}, + }), []string{"admin_password", "cpu_core_count", "display_name"})), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "subscription_id", "subscriptionId2"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + //4. Verify Update with secretId and secretVersionNumber { Config: config + compartmentIdVariableStr + OkvSecretVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Required, acctest.Update, @@ -405,7 +424,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { ), }, - //4. Verify update to ECPU from OCPU + //5. Verify update to ECPU from OCPU { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Required, acctest.Update, @@ -429,12 +448,12 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { ), }, - //5. Delete before next Create + //6. Delete before next Create { Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies, }, - //6. Create ECPU Database with db tools + //7. Create ECPU Database with db tools { Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, autonomousDatabaseRepresentationECPU), @@ -486,7 +505,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { ), }, - //7. Verify updates to ECPU db tools + //8. Verify updates to ECPU db tools { Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Update, @@ -540,7 +559,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { ), }, - //8. Verify update to backup retention in days + //9. Verify update to backup retention in days { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -560,11 +579,11 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { ), }, - //9. Delete before next Create + //10. Delete before next Create { Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies, }, - //10. Verify Create with optionals and long dbName + //11. Verify Create with optionals and long dbName { Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -572,6 +591,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { "open_mode": acctest.Representation{RepType: acctest.Optional, Create: `READ_ONLY`, Update: `READ_ONLY`}, "permission_level": acctest.Representation{RepType: acctest.Optional, Create: `RESTRICTED`, Update: `RESTRICTED`}, "database_edition": acctest.Representation{RepType: acctest.Optional, Create: `STANDARD_EDITION`, Update: `STANDARD_EDITION`}, + "byol_compute_count_limit": acctest.Representation{RepType: acctest.Optional, Create: `10`, Update: `10`}, "db_name": acctest.Representation{RepType: acctest.Required, Create: adbName}, "is_local_data_guard_enabled": acctest.Representation{RepType: acctest.Required, Create: `true`}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: lifecycleGroupWithMultipleIgnoreChanges}, @@ -581,6 +601,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#11"), resource.TestCheckResourceAttr(resourceName, "autonomous_maintenance_schedule_type", "REGULAR"), + resource.TestCheckResourceAttr(resourceName, "byol_compute_count_limit", "10"), resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "1"), @@ -636,7 +657,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), resource.TestCheckResourceAttr(resourceName, "license_model", "BRING_YOUR_OWN_LICENSE"), resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), - resource.TestCheckResourceAttrSet(resourceName, "vault_id"), + //resource.TestCheckResourceAttrSet(resourceName, "vault_id"), resource.TestCheckResourceAttr(resourceName, "state", "AVAILABLE"), resource.TestCheckResourceAttr(resourceName, "whitelisted_ips.#", "1"), resource.TestCheckResourceAttr(resourceName, "open_mode", "READ_ONLY"), @@ -649,7 +670,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, - //11. Verify DBMS status + //12. Verify DBMS status { Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -682,7 +703,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "is_preview_version_with_service_terms_accepted", "false"), resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), resource.TestCheckResourceAttr(resourceName, "license_model", "BRING_YOUR_OWN_LICENSE"), - resource.TestCheckResourceAttrSet(resourceName, "vault_id"), + //resource.TestCheckResourceAttrSet(resourceName, "vault_id"), resource.TestCheckResourceAttr(resourceName, "state", "AVAILABLE"), resource.TestCheckResourceAttr(resourceName, "whitelisted_ips.#", "1"), resource.TestCheckResourceAttr(resourceName, "database_management_status", "ENABLED"), @@ -696,7 +717,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, - //12. Verify Update to the compartment (the compartment will be switched back in the next step) + //13. Verify Update to the compartment (the compartment will be switched back in the next step) { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -765,7 +786,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), resource.TestCheckResourceAttr(resourceName, "license_model", "BRING_YOUR_OWN_LICENSE"), resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), - resource.TestCheckResourceAttrSet(resourceName, "vault_id"), + //resource.TestCheckResourceAttrSet(resourceName, "vault_id"), resource.TestCheckResourceAttr(resourceName, "state", "AVAILABLE"), resource.TestCheckResourceAttr(resourceName, "whitelisted_ips.#", "1"), resource.TestCheckResourceAttr(resourceName, "open_mode", "READ_WRITE"), @@ -780,7 +801,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, - //13. update auto failover data loss limit + //14. update auto failover data loss limit { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -801,7 +822,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, - //14. disable local adg + //15. disable local adg { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -821,7 +842,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, - //15. Verify rename-database to longer dbName + //16. Verify rename-database to longer dbName { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -844,7 +865,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, - //16. Verify rename-database to smaller dbName + //17. Verify rename-database to smaller dbName { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, @@ -925,6 +946,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Update, acctest.RepresentationCopyWithRemovedProperties(acctest.RepresentationCopyWithNewProperties(autonomousDatabaseRepresentationBYOL, map[string]interface{}{ + "byol_compute_count_limit": acctest.Representation{RepType: acctest.Optional, Create: `11`, Update: `11`}, "database_management_status": acctest.Representation{RepType: acctest.Optional, Create: `NOT_ENABLED`, Update: `NOT_ENABLED`}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: lifecycleGroupWithDefinedTagsIgnoreChanges}, "is_mtls_connection_required": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, @@ -932,6 +954,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#12"), resource.TestCheckResourceAttr(resourceName, "autonomous_maintenance_schedule_type", "REGULAR"), + resource.TestCheckResourceAttr(resourceName, "byol_compute_count_limit", "11"), resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "1"), @@ -1122,7 +1145,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "vault_id"), + //resource.TestCheckResourceAttrSet(resourceName, "vault_id"), resource.TestCheckResourceAttr(resourceName, "whitelisted_ips.#", "0"), func(s *terraform.State) (err error) { @@ -1160,7 +1183,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "vault_id"), + //resource.TestCheckResourceAttrSet(resourceName, "vault_id"), resource.TestCheckResourceAttr(resourceName, "whitelisted_ips.#", "0"), func(s *terraform.State) (err error) { @@ -1296,7 +1319,7 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.time_maintenance_begin"), resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.time_maintenance_end"), resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.used_data_storage_size_in_gbs"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.vault_id"), + //resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.vault_id"), resource.TestCheckResourceAttr(resourceName, "local_standby_db.#", "0"), ), }, diff --git a/internal/integrationtest/database_cloud_exadata_infrastructure_test.go b/internal/integrationtest/database_cloud_exadata_infrastructure_test.go index 4612df44d42..35502c4950c 100644 --- a/internal/integrationtest/database_cloud_exadata_infrastructure_test.go +++ b/internal/integrationtest/database_cloud_exadata_infrastructure_test.go @@ -188,6 +188,7 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "shape", "Exadata.X8M"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttr(resourceName, "storage_count", "3"), + resource.TestCheckNoResourceAttr(resourceName, "subscription_id"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -234,6 +235,7 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "shape", "Exadata.X8M"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttr(resourceName, "storage_count", "3"), + resource.TestCheckNoResourceAttr(resourceName, "subscription_id"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -275,6 +277,7 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "shape", "Exadata.X8M"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttr(resourceName, "storage_count", "3"), + resource.TestCheckNoResourceAttr(resourceName, "subscription_id"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -330,6 +333,7 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.shape", "Exadata.X8M"), resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.state"), resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.storage_count", "3"), + resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.subscription_id", ""), //resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.storage_server_version"), resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.time_created"), resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.total_storage_size_in_gbs"), @@ -375,6 +379,7 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttr(singularDatasourceName, "storage_count", "3"), //resource.TestCheckResourceAttrSet(singularDatasourceName, "storage_server_version"), + resource.TestCheckNoResourceAttr(singularDatasourceName, "subscription_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttrSet(singularDatasourceName, "total_storage_size_in_gbs"), ), diff --git a/internal/integrationtest/database_cloud_vm_cluster_test.go b/internal/integrationtest/database_cloud_vm_cluster_test.go index 9e058cef2ea..cd4a082ceb4 100644 --- a/internal/integrationtest/database_cloud_vm_cluster_test.go +++ b/internal/integrationtest/database_cloud_vm_cluster_test.go @@ -431,6 +431,7 @@ func TestDatabaseCloudVmClusterResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "ssh_public_keys.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckNoResourceAttr(resourceName, "subscription_id"), resource.TestCheckResourceAttrSet(resourceName, "private_zone_id"), resource.TestCheckResourceAttr(resourceName, "time_zone", "US/Pacific"), @@ -486,6 +487,7 @@ func TestDatabaseCloudVmClusterResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "ssh_public_keys.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckNoResourceAttr(resourceName, "subscription_id"), resource.TestCheckResourceAttrSet(resourceName, "private_zone_id"), resource.TestCheckResourceAttr(resourceName, "time_zone", "US/Pacific"), @@ -537,6 +539,7 @@ func TestDatabaseCloudVmClusterResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "ssh_public_keys.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckNoResourceAttr(resourceName, "subscription_id"), resource.TestCheckResourceAttrSet(resourceName, "private_zone_id"), resource.TestCheckResourceAttr(resourceName, "time_zone", "US/Pacific"), //resource.TestCheckResourceAttr(resourceName, "node_count", "3"), // Assertion Failing, needs to be reviewed @@ -601,6 +604,7 @@ func TestDatabaseCloudVmClusterResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(datasourceName, "cloud_vm_clusters.0.state"), resource.TestCheckResourceAttrSet(datasourceName, "cloud_vm_clusters.0.storage_size_in_gbs"), resource.TestCheckResourceAttrSet(datasourceName, "cloud_vm_clusters.0.subnet_id"), + resource.TestCheckResourceAttr(datasourceName, "cloud_vm_clusters.0.subscription_id", ""), resource.TestCheckResourceAttrSet(datasourceName, "cloud_vm_clusters.0.time_created"), resource.TestCheckResourceAttr(datasourceName, "cloud_vm_clusters.0.time_zone", "US/Pacific"), resource.TestCheckResourceAttrSet(datasourceName, "cloud_vm_clusters.0.zone_id"), @@ -651,6 +655,7 @@ func TestDatabaseCloudVmClusterResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularDatasourceName, "storage_size_in_gbs"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttr(singularDatasourceName, "time_zone", "US/Pacific"), + resource.TestCheckNoResourceAttr(singularDatasourceName, "subscription_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "zone_id"), ), }, diff --git a/internal/integrationtest/database_database_resource_test.go b/internal/integrationtest/database_database_resource_test.go index 8e1fafb79cb..6559449bd00 100644 --- a/internal/integrationtest/database_database_resource_test.go +++ b/internal/integrationtest/database_database_resource_test.go @@ -18,10 +18,11 @@ var ( acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Update, DatabaseExaccDatabaseRepresentation) DatabaseExaccDatabaseRepresentation = map[string]interface{}{ - "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseDatabaseRepresentation}, - "db_home_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_home.test_db_home_vm_cluster.id}`}, - "source": acctest.Representation{RepType: acctest.Required, Create: `NONE`}, - "db_version": acctest.Representation{RepType: acctest.Optional, Create: `12.1.0.2`}, + "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseDatabaseRepresentation}, + "db_home_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_home.test_db_home_vm_cluster.id}`}, + "source": acctest.Representation{RepType: acctest.Required, Create: `NONE`}, + "db_version": acctest.Representation{RepType: acctest.Optional, Create: `19.0.0.0`}, + "key_store_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_key_store.test_key_store.id}`}, } databaseExaccRepresentationMigration = map[string]interface{}{ @@ -43,20 +44,10 @@ var ( "vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, } - dbHomeExaccRepresentationSourceNone = acctest.RepresentationCopyWithNewProperties(DatabaseExaccDbHomeRepresentationBase, map[string]interface{}{ - "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: dbHomeDatabaseRepresentationSourceNone}, - "db_system_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, - "vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, - "db_version": acctest.Representation{RepType: acctest.Required, Create: `12.1.0.2`}, - "source": acctest.Representation{RepType: acctest.Optional, Create: `NONE`}, - "display_name": acctest.Representation{RepType: acctest.Optional, Create: `createdDbHomeNone`}, - "key_store_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_key_store.test_key_store.id}`}, - }) - DatabaseExaccDatabaseResourceDependencies = DatabaseVmClusterResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_vm_cluster", "test_vm_cluster", acctest.Required, acctest.Create, DatabaseVmClusterRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_database_key_store", "test_key_store", acctest.Optional, acctest.Create, DatabaseKeyStoreRepresentation) + KmsVaultIdVariableStr + OkvSecretVariableStr + - acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_db_home_vm_cluster", acctest.Required, acctest.Create, dbHomeExaccRepresentationSourceNone) + acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_db_home_vm_cluster", acctest.Required, acctest.Create, dbHomeRepresentationSourceVmClusterExacc) ) func TestDatabaseExaccDatabaseResource(t *testing.T) { @@ -112,6 +103,24 @@ func TestDatabaseExaccDatabaseResource(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "source", "NONE"), ), }, + // delete + { + Config: config + compartmentIdVariableStr + DatabaseExaccDatabaseResourceDependencies, + }, + // verify create optional + { + Config: config + compartmentIdVariableStr + DatabaseExaccDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_backup_destination", "test_backup_destination", acctest.Optional, acctest.Create, backupDestinationNFSRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Create, DatabaseExaccDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "database.#", "1"), + resource.TestCheckResourceAttr(resourceName, "database.0.admin_password", "BEstrO0ng_#11"), + resource.TestCheckResourceAttr(resourceName, "database.0.db_name", "myTestDb"), + resource.TestCheckResourceAttrSet(resourceName, "db_home_id"), + resource.TestCheckResourceAttrSet(resourceName, "key_store_id"), + resource.TestCheckResourceAttr(resourceName, "source", "NONE"), + ), + }, // verify resource import { Config: config + DatabaseExaccRequiredOnlyResource, @@ -122,6 +131,7 @@ func TestDatabaseExaccDatabaseResource(t *testing.T) { "db_version", "kms_key_rotation", "source", + "key_store_id", }, ResourceName: resourceName, }, diff --git a/internal/integrationtest/database_database_test.go b/internal/integrationtest/database_database_test.go index baa77507db9..17fb3ffdc03 100644 --- a/internal/integrationtest/database_database_test.go +++ b/internal/integrationtest/database_database_test.go @@ -208,7 +208,8 @@ var ( "db_home_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_home.test_db_home.id}`}, "source": acctest.Representation{RepType: acctest.Required, Create: `NONE`}, "db_version": acctest.Representation{RepType: acctest.Optional, Create: `19.20.0.0`}, - "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${lookup(data.oci_kms_keys.test_keys_dependency.keys[0], "id")}`}, + "key_store_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_key_store.test_key_store.id}`}, + "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.kms_key_id}`}, "kms_key_rotation": acctest.Representation{RepType: acctest.Optional, Update: `1`}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseIgnoreDefinedTagsRepresentation}, } @@ -218,7 +219,7 @@ var ( "db_home_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_home.test_db_home.id}`, Update: `${oci_database_db_home.test_db_home_dbrs.id}`}, "source": acctest.Representation{RepType: acctest.Required, Create: `NONE`}, "db_version": acctest.Representation{RepType: acctest.Optional, Create: `19.20.0.0`}, - "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${lookup(data.oci_kms_keys.test_keys_dependency.keys[0], "id")}`}, + "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.kms_key_id}`}, "kms_key_rotation": acctest.Representation{RepType: acctest.Optional, Update: `1`}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseIgnoreDefinedTagsRepresentation}, } @@ -302,14 +303,14 @@ var ( "db_home_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_home.test_db_home.id}`}, "source": acctest.Representation{RepType: acctest.Required, Create: `NONE`}, "kms_key_migration": acctest.Representation{RepType: acctest.Required, Create: `true`}, - "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${lookup(data.oci_kms_keys.test_keys_dependency.keys[0], "id")}`}, + "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${var.kms_key_id}`}, } databaseDatabaseRepresentation = map[string]interface{}{ "admin_password": acctest.Representation{RepType: acctest.Required, Create: `BEstrO0ng_#11`}, "db_name": acctest.Representation{RepType: acctest.Required, Create: `myTestDb`}, "character_set": acctest.Representation{RepType: acctest.Required, Create: `AL32UTF8`}, - "db_backup_config": acctest.RepresentationGroup{RepType: acctest.Optional, Group: databaseDatabaseDbBackupConfigRepresentation}, + "db_backup_config": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseDatabaseDatabaseDbBackupConfigRepresentation}, "db_unique_name": acctest.Representation{RepType: acctest.Optional, Create: `myTestDb_46`}, "db_workload": acctest.Representation{RepType: acctest.Optional, Create: `OLTP`}, "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, @@ -507,7 +508,6 @@ func TestDatabaseDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "database.0.db_name", "myTestDb"), resource.TestCheckResourceAttrSet(resourceName, "database.0.db_unique_name"), resource.TestCheckResourceAttr(resourceName, "database.0.db_workload", "OLTP"), - //resource.TestCheckResourceAttr(resourceName, "database.0.freeform_tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "database.0.ncharacter_set", "AL16UTF16"), resource.TestCheckResourceAttr(resourceName, "database.0.pdb_name", "pdbName"), @@ -567,6 +567,7 @@ func TestDatabaseDatabaseResource_basic(t *testing.T) { // verify datasource { Config: config + + acctest.GenerateResourceFromRepresentationMap("oci_database_key_store", "test_key_store", acctest.Optional, acctest.Create, DatabaseKeyStoreRepresentation) + OkvSecretVariableStr + acctest.GenerateDataSourceFromRepresentationMap("oci_database_databases", "test_databases", acctest.Optional, acctest.Update, DatabaseDatabaseDatabaseDataSourceRepresentation) + compartmentIdVariableStr + DatabaseDatabaseResourceDependencies + kmsKeyIdVariableStr + vaultIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Update, @@ -601,6 +602,7 @@ func TestDatabaseDatabaseResource_basic(t *testing.T) { // verify singular datasource { Config: config + compartmentIdVariableStr + DatabaseDatabaseResourceDependencies + kmsKeyIdVariableStr + vaultIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_key_store", "test_key_store", acctest.Optional, acctest.Create, DatabaseKeyStoreRepresentation) + OkvSecretVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Update, acctest.RepresentationCopyWithNewProperties(acctest.RepresentationCopyWithRemovedNestedProperties("database", DatabaseDatabaseRepresentation), map[string]interface{}{ "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseDatabaseRepresentation4}, @@ -635,6 +637,7 @@ func TestDatabaseDatabaseResource_basic(t *testing.T) { "kms_key_migration", "kms_key_rotation", "kms_key_version_id", + "key_store_id", "source", }, ResourceName: resourceName, diff --git a/internal/integrationtest/database_db_home_test.go b/internal/integrationtest/database_db_home_test.go index a5fde7e91ac..dc2276d8b2c 100644 --- a/internal/integrationtest/database_db_home_test.go +++ b/internal/integrationtest/database_db_home_test.go @@ -35,7 +35,7 @@ var ( DatabaseDatabaseDbHomeDataSourceRepresentation = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, - "db_system_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_system.test_db_system.id}`}, + "vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_cloud_vm_cluster.test_cloud_vm_cluster.id}`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `createdDbHomeNone`}, "state": acctest.Representation{RepType: acctest.Optional, Create: `AVAILABLE`}, "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: DatabaseDbHomeDataSourceFilterRepresentation}} @@ -115,19 +115,21 @@ var ( } dbHomeRepresentationSourceVmClusterNew = map[string]interface{}{ - "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: dbHomeDatabaseRepresentationSourceVmClusterNew}, - "display_name": acctest.Representation{RepType: acctest.Optional, Create: `createdDbHomeVm`}, - "source": acctest.Representation{RepType: acctest.Required, Create: `VM_CLUSTER_NEW`}, - "db_version": acctest.Representation{RepType: acctest.Required, Create: `12.1.0.2`}, - "vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, - "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, - "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: dbHomeDatabaseRepresentationSourceVmClusterNew}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `createdDbHomeVm`}, + "source": acctest.Representation{RepType: acctest.Required, Create: `VM_CLUSTER_NEW`}, + "db_version": acctest.Representation{RepType: acctest.Required, Create: `19.0.0.0`}, + "vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, + "is_unified_auditing_enabled": acctest.Representation{RepType: acctest.Optional, Create: `true`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, } dbHomeDatabaseRepresentationSourceVmClusterNew = map[string]interface{}{ "admin_password": acctest.Representation{RepType: acctest.Required, Create: `BEstrO0ng_#11`}, "character_set": acctest.Representation{RepType: acctest.Optional, Create: `AL32UTF8`}, "db_backup_config": acctest.RepresentationGroup{RepType: acctest.Optional, Group: dbHomeDatabaseDbBackupConfigVmClusterNewRepresentation}, "db_name": acctest.Representation{RepType: acctest.Required, Create: `dbVMClus`}, + "key_store_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_key_store.test_key_store.id}`}, "db_workload": acctest.Representation{RepType: acctest.Optional, Create: `OLTP`}, "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"freeformTags": "freeformTags"}, Update: map[string]string{"freeformTags2": "freeformTags2"}}, @@ -178,6 +180,15 @@ var ( "pdb_name": acctest.Representation{RepType: acctest.Optional, Create: `pdbName`}, } + dbHomeRepresentationSourceVmClusterExacc = map[string]interface{}{ + "vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, + "source": acctest.Representation{RepType: acctest.Required, Create: `VM_CLUSTER_NEW`}, + "db_version": acctest.Representation{RepType: acctest.Required, Create: `19.0.0.0`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `TFTestDbHome1`}, + "is_unified_auditing_enabled": acctest.Representation{RepType: acctest.Optional, Create: `true`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Update: map[string]string{"freeformTags": "freeformTags"}}, + } + dbHomeRepresentationSourceVmCluster = map[string]interface{}{ "vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_cloud_vm_cluster.test_cloud_vm_cluster.id}`}, "source": acctest.Representation{RepType: acctest.Required, Create: `VM_CLUSTER_NEW`}, @@ -215,6 +226,7 @@ var ( acctest.GenerateResourceFromRepresentationMap("oci_database_exadata_infrastructure", "test_exadata_infrastructure", acctest.Optional, acctest.Update, acctest.RepresentationCopyWithNewProperties(exadataInfrastructureActivateRepresentation, map[string]interface{}{"activation_file": acctest.Representation{RepType: acctest.Optional, Update: activationFilePath}})) + acctest.GenerateDataSourceFromRepresentationMap("oci_database_db_servers", "test_db_servers", acctest.Required, acctest.Create, DatabaseDatabaseDbServerDataSourceRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_key_store", "test_key_store", acctest.Optional, acctest.Create, DatabaseKeyStoreRepresentation) + OkvSecretVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_vm_cluster", "test_vm_cluster", acctest.Required, acctest.Create, DatabaseVmClusterRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_database_vm_cluster_network", "test_vm_cluster_network", acctest.Optional, acctest.Update, vmClusterNetworkValidateRepresentation) @@ -391,7 +403,7 @@ func TestDatabaseDbHomeResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "database.#", "1"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "database.0.admin_password", "BEstrO0ng_#11"), resource.TestCheckResourceAttrSet(resourceName+"_source_vm_cluster_new", "vm_cluster_id"), - resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "db_version", "12.1.0.2"), + resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "db_version", "19.0.0.0"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "source", "VM_CLUSTER_NEW"), resource.TestCheckResourceAttr(resourceName+"_source_database", "database.#", "1"), @@ -478,12 +490,13 @@ func TestDatabaseDbHomeResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "database.0.ncharacter_set", "AL16UTF16"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "database.0.pdb_name", "pdbName"), resource.TestCheckResourceAttrSet(resourceName+"_source_vm_cluster_new", "vm_cluster_id"), - resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "db_version", "12.1.0.2"), + resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "db_version", "19.0.0.0"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "display_name", "createdDbHomeVm"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName+"_source_vm_cluster_new", "id"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "source", "VM_CLUSTER_NEW"), resource.TestCheckResourceAttrSet(resourceName+"_source_vm_cluster_new", "state"), + resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "is_unified_auditing_enabled", "true"), resource.TestCheckResourceAttrSet(resourceName+"_source_database", "compartment_id"), resource.TestCheckResourceAttr(resourceName+"_source_database", "database.#", "1"), @@ -570,12 +583,13 @@ func TestDatabaseDbHomeResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "database.0.ncharacter_set", "AL16UTF16"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "database.0.pdb_name", "pdbName"), resource.TestCheckResourceAttrSet(resourceName+"_source_vm_cluster_new", "vm_cluster_id"), - resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "db_version", "12.1.0.2"), + resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "db_version", "19.0.0.0"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "display_name", "createdDbHomeVm"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName+"_source_vm_cluster_new", "id"), resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "source", "VM_CLUSTER_NEW"), resource.TestCheckResourceAttrSet(resourceName+"_source_vm_cluster_new", "state"), + resource.TestCheckResourceAttr(resourceName+"_source_vm_cluster_new", "is_unified_auditing_enabled", "true"), resource.TestCheckResourceAttrSet(resourceName+"_source_database", "compartment_id"), resource.TestCheckResourceAttr(resourceName+"_source_database", "database.#", "1"), @@ -603,13 +617,13 @@ func TestDatabaseDbHomeResource_basic(t *testing.T) { acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_db_home_source_database", acctest.Optional, acctest.Update, dbHomeRepresentationSourceDatabase), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttrSet(datasourceName, "db_system_id"), + resource.TestCheckResourceAttrSet(datasourceName, "vm_cluster_id"), resource.TestCheckResourceAttr(datasourceName, "display_name", "createdDbHomeNone"), resource.TestCheckResourceAttr(datasourceName, "state", "AVAILABLE"), resource.TestCheckResourceAttr(datasourceName, "db_homes.#", "1"), resource.TestCheckResourceAttrSet(datasourceName, "db_homes.0.compartment_id"), - resource.TestCheckResourceAttrSet(datasourceName, "db_homes.0.db_system_id"), + resource.TestCheckResourceAttrSet(datasourceName, "db_homes.0.vm_cluster_id"), resource.TestCheckResourceAttr(datasourceName, "db_homes.0.db_version", "12.1.0.2"), resource.TestCheckResourceAttr(datasourceName, "db_homes.0.display_name", "createdDbHomeNone"), resource.TestCheckResourceAttrSet(datasourceName, "db_homes.0.id"), @@ -629,7 +643,7 @@ func TestDatabaseDbHomeResource_basic(t *testing.T) { acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_db_home_source_database", acctest.Optional, acctest.Update, dbHomeRepresentationSourceDatabase), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "db_home_id"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "db_system_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "vm_cluster_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "compartment_id"), resource.TestCheckResourceAttr(singularDatasourceName, "db_version", "12.1.0.2"), @@ -648,7 +662,7 @@ func TestDatabaseDbHomeResource_basic(t *testing.T) { "database", "is_desupported_version", "database.0.admin_password", - "kms_key_version_id", + "db_system_id", }, ResourceName: resourceName + "_source_none", }, @@ -701,7 +715,7 @@ func TestDatabaseDbHomeResource_exacs(t *testing.T) { resource.TestCheckResourceAttr(resourceName+"_vm_cluster_no_db", "display_name", "TFTestDbHome1"), resource.TestCheckResourceAttrSet(resourceName+"_vm_cluster_no_db", "vm_cluster_id"), resource.TestCheckResourceAttr(resourceName+"_vm_cluster_no_db", "db_version", "12.1.0.2"), - resource.TestCheckNoResourceAttr(resourceName+"_vm_cluster_no_db", "database"), + resource.TestCheckResourceAttr(resourceName+"_vm_cluster_no_db", "database.#", "0"), ), }, @@ -753,7 +767,7 @@ func TestDatabaseDbHomeResource_exacs(t *testing.T) { resource.TestCheckResourceAttr(resourceName+"_vm_cluster_no_db", "display_name", "TFTestDbHome1"), resource.TestCheckResourceAttrSet(resourceName+"_vm_cluster_no_db", "vm_cluster_id"), resource.TestCheckResourceAttr(resourceName+"_vm_cluster_no_db", "db_version", "12.1.0.2"), - resource.TestCheckNoResourceAttr(resourceName+"_vm_cluster_no_db", "database"), + resource.TestCheckResourceAttr(resourceName+"_vm_cluster_no_db", "database.#", "0"), ), }, /* diff --git a/internal/integrationtest/globally_distributed_database_private_endpoint_test.go b/internal/integrationtest/globally_distributed_database_private_endpoint_test.go new file mode 100644 index 00000000000..b9f37e75a96 --- /dev/null +++ b/internal/integrationtest/globally_distributed_database_private_endpoint_test.go @@ -0,0 +1,373 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package integrationtest + +import ( + "context" + "fmt" + "strconv" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/oracle/oci-go-sdk/v65/common" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/httpreplay" + "github.com/oracle/terraform-provider-oci/internal/acctest" + tf_client "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" + "github.com/oracle/terraform-provider-oci/internal/tfresource" + "github.com/oracle/terraform-provider-oci/internal/utils" +) + +var ( + GloballyDistributedDatabasePrivateEndpointRequiredOnlyResource = GloballyDistributedDatabasePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Required, acctest.Create, GloballyDistributedDatabasePrivateEndpointRepresentation) + + GloballyDistributedDatabasePrivateEndpointResourceConfig = GloballyDistributedDatabasePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Optional, acctest.Update, GloballyDistributedDatabasePrivateEndpointRepresentation) + + GloballyDistributedDatabasePrivateEndpointSingularDataSourceRepresentation = map[string]interface{}{ + "private_endpoint_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_globally_distributed_database_private_endpoint.test_private_endpoint.id}`}, + } + + GloballyDistributedDatabasePrivateEndpointDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `pe0001`, Update: `displayName2`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabasePrivateEndpointDataSourceFilterRepresentation}} + GloballyDistributedDatabasePrivateEndpointDataSourceFilterRepresentation = map[string]interface{}{ + "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, + "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_globally_distributed_database_private_endpoint.test_private_endpoint.id}`}}, + } + + GloballyDistributedDatabasePrivateEndpointRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `pe0001`, Update: `displayName2`}, + "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, + //"vcn_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vcn_id}`}, + //"nsg1_ids": acctest.Representation{RepType: acctest.Required, Create: `${var.nsg1_ids}`}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + //"nsg_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`nsgIds`}, Update: []string{`nsgIds2`}}, + } + + GloballyDistributedDatabasePrivateEndpointResourceDependencies = "" /*acctest.GenerateResourceFromRepresentationMap("oci_core_network_security_group", "test_network_security_group", acctest.Required, acctest.Create, CoreNetworkSecurityGroupRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) +*/ + /*DefinedTagsDependencies*/ +) + +// issue-routing-tag: globally_distributed_database/default +func TestGloballyDistributedDatabasePrivateEndpointResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGloballyDistributedDatabasePrivateEndpointResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + vcnId := utils.GetEnvSettingWithBlankDefault("vcn_ocid") + vcnIdVariableStr := fmt.Sprintf("variable \"vcn_id\" { default = \"%s\" }\n", vcnId) + + subnetId := utils.GetEnvSettingWithBlankDefault("subnet_ocid") + subnetIdVariableStr := fmt.Sprintf("variable \"subnet_id\" { default = \"%s\" }\n", subnetId) + + nsgIds := "null" + nsgIdsVariableStr := fmt.Sprintf("variable \"nsg1_ids\" { default = %s }\n", nsgIds) + + compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_update", compartmentId) + compartmentIdUVariableStr := fmt.Sprintf("variable \"compartment_id_for_update\" { default = \"%s\" }\n", compartmentIdU) + + resourceName := "oci_globally_distributed_database_private_endpoint.test_private_endpoint" + datasourceName := "data.oci_globally_distributed_database_private_endpoints.test_private_endpoints" + singularDatasourceName := "data.oci_globally_distributed_database_private_endpoint.test_private_endpoint" + + var resId, resId2 string + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+subnetIdVariableStr+nsgIdsVariableStr+vcnIdVariableStr+GloballyDistributedDatabasePrivateEndpointResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Optional, acctest.Create, GloballyDistributedDatabasePrivateEndpointRepresentation), "globallydistributeddatabase", "privateEndpoint", t) + + acctest.ResourceTest(t, testAccCheckGloballyDistributedDatabasePrivateEndpointDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + vcnIdVariableStr + subnetIdVariableStr + nsgIdsVariableStr + GloballyDistributedDatabasePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Required, acctest.Create, GloballyDistributedDatabasePrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "pe0001"), + resource.TestCheckResourceAttr(resourceName, "subnet_id", subnetId), + //resource.TestCheckResourceAttr(resourceName, "nsg_ids", nsgIds), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + nsgIdsVariableStr + vcnIdVariableStr + GloballyDistributedDatabasePrivateEndpointResourceDependencies, + }, + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + nsgIdsVariableStr + vcnIdVariableStr + GloballyDistributedDatabasePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Optional, acctest.Create, GloballyDistributedDatabasePrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "pe0001"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "subnet_id", subnetId), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + //resource.TestCheckResourceAttr(resourceName, "nsg_ids", nsgIds), + resource.TestCheckResourceAttr(resourceName, "vcn_id", vcnId), + //resource.TestCheckResourceAttrSet(resourceName, "vcn_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify Update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + nsgIdsVariableStr + vcnIdVariableStr + compartmentIdUVariableStr + GloballyDistributedDatabasePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(GloballyDistributedDatabasePrivateEndpointRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "pe0001"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "subnet_id", subnetId), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + ////resource.TestCheckResourceAttr(resourceName, "nsg_ids", nsgIds), + resource.TestCheckResourceAttr(resourceName, "vcn_id", vcnId), + //resource.TestCheckResourceAttrSet(resourceName, "vcn_id"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + nsgIdsVariableStr + vcnIdVariableStr + GloballyDistributedDatabasePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Optional, acctest.Update, GloballyDistributedDatabasePrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "subnet_id", subnetId), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + //resource.TestCheckResourceAttr(resourceName, "nsg_ids", nsgIds), + resource.TestCheckResourceAttr(resourceName, "vcn_id", vcnId), + //resource.TestCheckResourceAttrSet(resourceName, "vcn_id"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_globally_distributed_database_private_endpoints", "test_private_endpoints", acctest.Optional, acctest.Update, GloballyDistributedDatabasePrivateEndpointDataSourceRepresentation) + + compartmentIdVariableStr + subnetIdVariableStr + nsgIdsVariableStr + vcnIdVariableStr + GloballyDistributedDatabasePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Optional, acctest.Update, GloballyDistributedDatabasePrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), + + resource.TestCheckResourceAttr(datasourceName, "private_endpoint_collection.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "private_endpoint_collection.0.items.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_globally_distributed_database_private_endpoint", "test_private_endpoint", acctest.Required, acctest.Create, GloballyDistributedDatabasePrivateEndpointSingularDataSourceRepresentation) + + compartmentIdVariableStr + subnetIdVariableStr + nsgIdsVariableStr + vcnIdVariableStr + GloballyDistributedDatabasePrivateEndpointResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "description", "description2"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "private_ip"), + resource.TestCheckResourceAttr(singularDatasourceName, "sharded_databases.#", "0"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "vcn_id"), + ), + }, + // verify resource import + { + Config: config + GloballyDistributedDatabasePrivateEndpointRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{}, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckGloballyDistributedDatabasePrivateEndpointDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).ShardedDatabaseServiceClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_globally_distributed_database_private_endpoint" { + noResourceFound = false + request := oci_globally_distributed_database.GetPrivateEndpointRequest{} + + tmp := rs.Primary.ID + request.PrivateEndpointId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "globally_distributed_database") + + response, err := client.GetPrivateEndpoint(context.Background(), request) + + if err == nil { + deletedLifecycleStates := map[string]bool{ + string(oci_globally_distributed_database.PrivateEndpointLifecycleStateDeleted): true, + } + if _, ok := deletedLifecycleStates[string(response.LifecycleState)]; !ok { + //resource lifecycle state is not in expected deleted lifecycle states. + return fmt.Errorf("resource lifecycle state: %s is not in expected deleted lifecycle states", response.LifecycleState) + } + //resource lifecycle state is in expected deleted lifecycle states. continue with next one. + continue + } + + //Verify that exception is for '404 not found'. + if failure, isServiceError := common.IsServiceError(err); !isServiceError || failure.GetHTTPStatusCode() != 404 { + return err + } + } + } + if noResourceFound { + return fmt.Errorf("at least one resource was expected from the state file, but could not be found") + } + + return nil +} + +func init() { + if acctest.DependencyGraph == nil { + acctest.InitDependencyGraph() + } + if !acctest.InSweeperExcludeList("GloballyDistributedDatabasePrivateEndpoint") { + resource.AddTestSweepers("GloballyDistributedDatabasePrivateEndpoint", &resource.Sweeper{ + Name: "GloballyDistributedDatabasePrivateEndpoint", + Dependencies: acctest.DependencyGraph["privateEndpoint"], + F: sweepGloballyDistributedDatabasePrivateEndpointResource, + }) + } +} + +func sweepGloballyDistributedDatabasePrivateEndpointResource(compartment string) error { + shardedDatabaseServiceClient := acctest.GetTestClients(&schema.ResourceData{}).ShardedDatabaseServiceClient() + privateEndpointIds, err := getGloballyDistributedDatabasePrivateEndpointIds(compartment) + if err != nil { + return err + } + for _, privateEndpointId := range privateEndpointIds { + if ok := acctest.SweeperDefaultResourceId[privateEndpointId]; !ok { + deletePrivateEndpointRequest := oci_globally_distributed_database.DeletePrivateEndpointRequest{} + + deletePrivateEndpointRequest.PrivateEndpointId = &privateEndpointId + + deletePrivateEndpointRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "globally_distributed_database") + _, error := shardedDatabaseServiceClient.DeletePrivateEndpoint(context.Background(), deletePrivateEndpointRequest) + if error != nil { + fmt.Printf("Error deleting PrivateEndpoint %s %s, It is possible that the resource is already deleted. Please verify manually \n", privateEndpointId, error) + continue + } + acctest.WaitTillCondition(acctest.TestAccProvider, &privateEndpointId, GloballyDistributedDatabasePrivateEndpointSweepWaitCondition, time.Duration(3*time.Minute), + GloballyDistributedDatabasePrivateEndpointSweepResponseFetchOperation, "globally_distributed_database", true) + } + } + return nil +} + +func getGloballyDistributedDatabasePrivateEndpointIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "PrivateEndpointId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + shardedDatabaseServiceClient := acctest.GetTestClients(&schema.ResourceData{}).ShardedDatabaseServiceClient() + + listPrivateEndpointsRequest := oci_globally_distributed_database.ListPrivateEndpointsRequest{} + listPrivateEndpointsRequest.CompartmentId = &compartmentId + listPrivateEndpointsRequest.LifecycleState = oci_globally_distributed_database.PrivateEndpointLifecycleStateActive + listPrivateEndpointsResponse, err := shardedDatabaseServiceClient.ListPrivateEndpoints(context.Background(), listPrivateEndpointsRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting PrivateEndpoint list for compartment id : %s , %s \n", compartmentId, err) + } + for _, privateEndpoint := range listPrivateEndpointsResponse.Items { + id := *privateEndpoint.Id + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "PrivateEndpointId", id) + } + return resourceIds, nil +} + +func GloballyDistributedDatabasePrivateEndpointSweepWaitCondition(response common.OCIOperationResponse) bool { + // Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required. + if privateEndpointResponse, ok := response.Response.(oci_globally_distributed_database.GetPrivateEndpointResponse); ok { + return privateEndpointResponse.LifecycleState != oci_globally_distributed_database.PrivateEndpointLifecycleStateDeleted + } + return false +} + +func GloballyDistributedDatabasePrivateEndpointSweepResponseFetchOperation(client *tf_client.OracleClients, resourceId *string, retryPolicy *common.RetryPolicy) error { + _, err := client.ShardedDatabaseServiceClient().GetPrivateEndpoint(context.Background(), oci_globally_distributed_database.GetPrivateEndpointRequest{ + PrivateEndpointId: resourceId, + RequestMetadata: common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + return err +} diff --git a/internal/integrationtest/globally_distributed_database_sharded_database_test.go b/internal/integrationtest/globally_distributed_database_sharded_database_test.go new file mode 100644 index 00000000000..cc825f47a8c --- /dev/null +++ b/internal/integrationtest/globally_distributed_database_sharded_database_test.go @@ -0,0 +1,635 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2 + +package integrationtest + +import ( + "context" + "fmt" + "strconv" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/oracle/oci-go-sdk/v65/common" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/httpreplay" + "github.com/oracle/terraform-provider-oci/internal/acctest" + tf_client "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" + "github.com/oracle/terraform-provider-oci/internal/tfresource" + "github.com/oracle/terraform-provider-oci/internal/utils" +) + +var ( + GloballyDistributedDatabaseShardedDatabaseRequiredOnlyResource = GloballyDistributedDatabaseShardedDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Required, acctest.Create, GloballyDistributedDatabaseShardedDatabaseRepresentation) + + GloballyDistributedDatabaseShardedDatabaseResourceConfig = GloballyDistributedDatabaseShardedDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabaseRepresentation) + + GloballyDistributedDatabaseShardedDatabaseSingularDataSourceRepresentation = map[string]interface{}{ + "sharded_database_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_globally_distributed_database_sharded_database.test_sharded_database.id}`}, + "metadata": acctest.Representation{RepType: acctest.Optional, Create: `{}`}, + } + + GloballyDistributedDatabaseShardedDatabaseDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `Sdb0001`, Update: `displayName2`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `INACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabaseDataSourceFilterRepresentation}} + GloballyDistributedDatabaseShardedDatabaseDataSourceFilterRepresentation = map[string]interface{}{ + "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, + "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_globally_distributed_database_sharded_database.test_sharded_database.id}`}}, + } + + GloballyDistributedDatabaseShardedDatabaseRepresentation = map[string]interface{}{ + "catalog_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabaseCatalogDetailsRepresentation}, + "character_set": acctest.Representation{RepType: acctest.Required, Create: `AL32UTF8`}, + "sharding_method": acctest.Representation{RepType: acctest.Required, Create: `USER`}, + "cluster_certificate_common_name": acctest.Representation{RepType: acctest.Required, Create: `gdad_cert`}, + "chunks": acctest.Representation{RepType: acctest.Optional, Create: `120`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "db_deployment_type": acctest.Representation{RepType: acctest.Required, Create: `DEDICATED`}, + "db_version": acctest.Representation{RepType: acctest.Required, Create: `19c`}, + "db_workload": acctest.Representation{RepType: acctest.Required, Create: `OLTP`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `Sdb0001`, Update: `displayName2`}, + "listener_port": acctest.Representation{RepType: acctest.Required, Create: `40001`}, + "listener_port_tls": acctest.Representation{RepType: acctest.Required, Create: `40002`}, + "ncharacter_set": acctest.Representation{RepType: acctest.Required, Create: `AL16UTF16`}, + "ons_port_local": acctest.Representation{RepType: acctest.Required, Create: `40003`}, + "ons_port_remote": acctest.Representation{RepType: acctest.Required, Create: `40004`}, + "prefix": acctest.Representation{RepType: acctest.Required, Create: `s01`}, + "shard_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabaseShardDetailsRepresentation}, + //"sharded_database_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_globally_distributed_database_sharded_database.test_sharded_database.id}`}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + //"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + /*"patch_operations": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabasePatchOperationsRepresentation}, + "configure_gsms_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "configure_sharding_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "download_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "generate_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "get_connection_string_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "start_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "stop_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "upload_signed_certificate_and_generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + "validate_network_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`},*/ + } + GloballyDistributedDatabaseShardedDatabaseCatalogDetailsRepresentation = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `WElcomeHome1234##`}, + "cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + "compute_count": acctest.Representation{RepType: acctest.Required, Create: `2`}, + "data_storage_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `32`}, + "is_auto_scaling_enabled": acctest.Representation{RepType: acctest.Required, Create: `false`}, + "encryption_key_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabaseCatalogDetailsEncryptionKeyDetailsRepresentation}, + //"peer_cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + } + GloballyDistributedDatabaseShardedDatabaseShardDetailsRepresentation = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `WElcomeHome1234##`}, + "cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + "compute_count": acctest.Representation{RepType: acctest.Required, Create: `2`}, + "data_storage_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `32`}, + "is_auto_scaling_enabled": acctest.Representation{RepType: acctest.Required, Create: `false`}, + "encryption_key_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabaseShardDetailsEncryptionKeyDetailsRepresentation}, + //"peer_cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + "shard_space": acctest.Representation{RepType: acctest.Required, Create: `xyz`}, + } + /*GloballyDistributedDatabaseShardedDatabasePatchOperationsRepresentation = map[string]interface{}{ + "operation": acctest.Representation{RepType: acctest.Required, Create: `{}`}, + "selection": acctest.Representation{RepType: acctest.Required, Create: `{}`}, + "value": acctest.Representation{RepType: acctest.Optional, Create: `{}`}, + }*/ + GloballyDistributedDatabaseShardedDatabaseCatalogDetailsEncryptionKeyDetailsRepresentation = map[string]interface{}{ + "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${var.kms_key_id}`}, + "vault_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vault_id}`}, + //"kms_key_version_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_kms_key_version.test_key_version.id}`}, + } + GloballyDistributedDatabaseShardedDatabaseShardDetailsEncryptionKeyDetailsRepresentation = map[string]interface{}{ + "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${var.kms_key_id}`}, + "vault_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vault_id}`}, + //"kms_key_version_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_kms_key_version.test_key_version.id}`}, + } + + GloballyDistributedDatabaseShardedDatabaseResourceDependencies = "" /*acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_cloud_autonomous_vm_cluster", "test_cloud_autonomous_vm_cluster", acctest.Required, acctest.Create, DatabaseCloudAutonomousVmClusterRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_cloud_exadata_infrastructure", "test_cloud_exadata_infrastructure", acctest.Required, acctest.Create, DatabaseCloudExadataInfrastructureRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_dataflow_private_endpoint", "test_private_endpoint", acctest.Required, acctest.Create, DataflowPrivateEndpointRepresentation) + + AvailabilityDomainConfig +*/ + /*DefinedTagsDependencies*/ /*+ + acctest.GenerateResourceFromRepresentationMap("oci_kms_key_version", "test_key_version", acctest.Required, acctest.Create, KmsKeyVersionRepresentation) + + KeyResourceDependencyConfig + + acctest.GenerateResourceFromRepresentationMap("oci_kms_vault", "test_vault", acctest.Required, acctest.Create, KmsVaultRepresentation)*/ +) + +// issue-routing-tag: globally_distributed_database/default +func TestGloballyDistributedDatabaseShardedDatabaseResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGloballyDistributedDatabaseShardedDatabaseResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_update", compartmentId) + compartmentIdUVariableStr := fmt.Sprintf("variable \"compartment_id_for_update\" { default = \"%s\" }\n", compartmentIdU) + + /*vcnId := utils.GetEnvSettingWithBlankDefault("vcn_ocid") + vcnIdVariableStr := fmt.Sprintf("variable \"vcn_id\" { default = \"%s\" }\n", vcnId)*/ + + /*subnetId := utils.GetEnvSettingWithBlankDefault("subnet_ocid") + subnetIdVariableStr := fmt.Sprintf("variable \"subnet_id\" { default = \"%s\" }\n", subnetId)*/ + + cloudAutonomousVmClusterId := utils.GetEnvSettingWithBlankDefault("cloud_autonomous_vm_cluster_id") + cloudAutonomousVmClusterIdVariableStr := fmt.Sprintf("variable \"cloud_autonomous_vm_cluster_id\" { default = \"%s\" }\n", cloudAutonomousVmClusterId) + + kmsKeyId := utils.GetEnvSettingWithBlankDefault("kms_key_id") + kmsKeyIdVariableStr := fmt.Sprintf("variable \"kms_key_id\" { default = \"%s\" }\n", kmsKeyId) + + vaultId := utils.GetEnvSettingWithBlankDefault("vault_id") + vaultIdVariableStr := fmt.Sprintf("variable \"vault_id\" { default = \"%s\" }\n", vaultId) + + resourceName := "oci_globally_distributed_database_sharded_database.test_sharded_database" + datasourceName := "data.oci_globally_distributed_database_sharded_databases.test_sharded_databases" + singularDatasourceName := "data.oci_globally_distributed_database_sharded_database.test_sharded_database" + + var resId, resId2 string + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+compartmentIdUVariableStr+cloudAutonomousVmClusterIdVariableStr+kmsKeyIdVariableStr+vaultIdVariableStr+GloballyDistributedDatabaseShardedDatabaseResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Create, GloballyDistributedDatabaseShardedDatabaseRepresentation), "globallydistributeddatabase", "shardedDatabase", t) + + acctest.ResourceTest(t, testAccCheckGloballyDistributedDatabaseShardedDatabaseDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Required, acctest.Create, GloballyDistributedDatabaseShardedDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "19c"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "Sdb0001"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabaseResourceDependencies, + }, + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Create, GloballyDistributedDatabaseShardedDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "chunks", "120"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "19c"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "Sdb0001"), + //resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify Update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(GloballyDistributedDatabaseShardedDatabaseRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "chunks", "120"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "19c"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "Sdb0001"), + //resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "chunks", "120"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "19c"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + //resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_globally_distributed_database_sharded_databases", "test_sharded_databases", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabaseDataSourceRepresentation) + + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "state", "INACTIVE"), + + //resource.TestCheckResourceAttr(datasourceName, "sharded_database_collection.#", "1"), + //resource.TestCheckResourceAttr(datasourceName, "sharded_database_collection.0.items.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Required, acctest.Create, GloballyDistributedDatabaseShardedDatabaseSingularDataSourceRepresentation) + + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabaseResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + //resource.TestCheckResourceAttr(singularDatasourceName, "metadata", "metadata"), + + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.container_database_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.container_database_parent_id"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.supporting_resource_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.time_created"), + //resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.time_ssl_certificate_expires"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(singularDatasourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(singularDatasourceName, "chunks", "120"), + resource.TestCheckResourceAttr(singularDatasourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "connection_strings.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_version", "19c"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + //resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "gsms.#", "3"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(singularDatasourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(singularDatasourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(singularDatasourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(singularDatasourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(singularDatasourceName, "prefix", "s01"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.container_database_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.container_database_parent_id"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.supporting_resource_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.time_created"), + //resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.time_ssl_certificate_expires"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(singularDatasourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_zone"), + ), + }, + // verify resource import + { + Config: config + GloballyDistributedDatabaseShardedDatabaseRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "patch_operations", "catalog_details.0.admin_password", "shard_details.0.admin_password", + }, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckGloballyDistributedDatabaseShardedDatabaseDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).ShardedDatabaseServiceClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_globally_distributed_database_sharded_database" { + noResourceFound = false + request := oci_globally_distributed_database.GetShardedDatabaseRequest{} + + if value, ok := rs.Primary.Attributes["metadata"]; ok { + request.Metadata = &value + } + + tmp := rs.Primary.ID + request.ShardedDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "globally_distributed_database") + + response, err := client.GetShardedDatabase(context.Background(), request) + + if err == nil { + deletedLifecycleStates := map[string]bool{ + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateDeleted): true, + } + if _, ok := deletedLifecycleStates[string(response.GetLifecycleState())]; !ok { + //resource lifecycle state is not in expected deleted lifecycle states. + return fmt.Errorf("resource lifecycle state: %s is not in expected deleted lifecycle states", response.GetLifecycleState()) + } + //resource lifecycle state is in expected deleted lifecycle states. continue with next one. + continue + } + + //Verify that exception is for '404 not found'. + if failure, isServiceError := common.IsServiceError(err); !isServiceError || failure.GetHTTPStatusCode() != 404 { + return err + } + } + } + if noResourceFound { + return fmt.Errorf("at least one resource was expected from the state file, but could not be found") + } + + return nil +} + +func init() { + if acctest.DependencyGraph == nil { + acctest.InitDependencyGraph() + } + if !acctest.InSweeperExcludeList("GloballyDistributedDatabaseShardedDatabase") { + resource.AddTestSweepers("GloballyDistributedDatabaseShardedDatabase", &resource.Sweeper{ + Name: "GloballyDistributedDatabaseShardedDatabase", + Dependencies: acctest.DependencyGraph["shardedDatabase"], + F: sweepGloballyDistributedDatabaseShardedDatabaseResource, + }) + } +} + +func sweepGloballyDistributedDatabaseShardedDatabaseResource(compartment string) error { + shardedDatabaseServiceClient := acctest.GetTestClients(&schema.ResourceData{}).ShardedDatabaseServiceClient() + shardedDatabaseIds, err := getGloballyDistributedDatabaseShardedDatabaseIds(compartment) + if err != nil { + return err + } + for _, shardedDatabaseId := range shardedDatabaseIds { + if ok := acctest.SweeperDefaultResourceId[shardedDatabaseId]; !ok { + deleteShardedDatabaseRequest := oci_globally_distributed_database.DeleteShardedDatabaseRequest{} + + deleteShardedDatabaseRequest.ShardedDatabaseId = &shardedDatabaseId + + deleteShardedDatabaseRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "globally_distributed_database") + _, error := shardedDatabaseServiceClient.DeleteShardedDatabase(context.Background(), deleteShardedDatabaseRequest) + if error != nil { + fmt.Printf("Error deleting ShardedDatabase %s %s, It is possible that the resource is already deleted. Please verify manually \n", shardedDatabaseId, error) + continue + } + acctest.WaitTillCondition(acctest.TestAccProvider, &shardedDatabaseId, GloballyDistributedDatabaseShardedDatabaseSweepWaitCondition, time.Duration(3*time.Minute), + GloballyDistributedDatabaseShardedDatabaseSweepResponseFetchOperation, "globally_distributed_database", true) + } + } + return nil +} + +func getGloballyDistributedDatabaseShardedDatabaseIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "ShardedDatabaseId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + shardedDatabaseServiceClient := acctest.GetTestClients(&schema.ResourceData{}).ShardedDatabaseServiceClient() + + listShardedDatabasesRequest := oci_globally_distributed_database.ListShardedDatabasesRequest{} + listShardedDatabasesRequest.CompartmentId = &compartmentId + listShardedDatabasesRequest.LifecycleState = oci_globally_distributed_database.ShardedDatabaseLifecycleStateNeedsAttention + listShardedDatabasesResponse, err := shardedDatabaseServiceClient.ListShardedDatabases(context.Background(), listShardedDatabasesRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting ShardedDatabase list for compartment id : %s , %s \n", compartmentId, err) + } + for _, shardedDatabase := range listShardedDatabasesResponse.Items { + id := *shardedDatabase.GetId() + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "ShardedDatabaseId", id) + } + return resourceIds, nil +} + +func GloballyDistributedDatabaseShardedDatabaseSweepWaitCondition(response common.OCIOperationResponse) bool { + // Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required. + if shardedDatabaseResponse, ok := response.Response.(oci_globally_distributed_database.GetShardedDatabaseResponse); ok { + return shardedDatabaseResponse.GetLifecycleState() != oci_globally_distributed_database.ShardedDatabaseLifecycleStateDeleted + } + return false +} + +func GloballyDistributedDatabaseShardedDatabaseSweepResponseFetchOperation(client *tf_client.OracleClients, resourceId *string, retryPolicy *common.RetryPolicy) error { + _, err := client.ShardedDatabaseServiceClient().GetShardedDatabase(context.Background(), oci_globally_distributed_database.GetShardedDatabaseRequest{ + ShardedDatabaseId: resourceId, + RequestMetadata: common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + return err +} diff --git a/internal/integrationtest/opsi_mds_mysql_database_insight_resource_test.go b/internal/integrationtest/opsi_mds_mysql_database_insight_resource_test.go new file mode 100644 index 00000000000..048b0b6b490 --- /dev/null +++ b/internal/integrationtest/opsi_mds_mysql_database_insight_resource_test.go @@ -0,0 +1,76 @@ +package integrationtest + +import ( + "fmt" + "testing" + + "github.com/oracle/terraform-provider-oci/internal/acctest" + "github.com/oracle/terraform-provider-oci/internal/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/oracle/terraform-provider-oci/httpreplay" +) + +var ( + mdsMySqlDatabaseInsightRequiredRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "database_id": acctest.Representation{RepType: acctest.Required, Create: `${var.mds_mysql_database_id}`}, + "database_resource_type": acctest.Representation{RepType: acctest.Required, Create: `mysqldbsystem`}, + "status": acctest.Representation{RepType: acctest.Required, Create: `DISABLED`}, + "entity_source": acctest.Representation{RepType: acctest.Required, Create: `MDS_MYSQL_DATABASE_SYSTEM`, Update: `MDS_MYSQL_DATABASE_SYSTEM`}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`}, + //"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ignoreChangesADIRepresentation}, + } + + ignoreChangesADIRepresentation = map[string]interface{}{ + "ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`}}, + } +) + +// issue-routing-tag: opsi/controlPlane +func TestOpsiResourceMdsMySqlDatabaseInsight(t *testing.T) { + httpreplay.SetScenario("TestOpsiResourceMdsMySqlDatabaseInsight") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + mdsMySqlDatabaseId := utils.GetEnvSettingWithBlankDefault("mds_mysql_database_id") + mdsMySqlDatabaseIdDatabaseIdVariableStr := fmt.Sprintf("variable \"mds_mysql_database_id\" { default = \"%s\" }\n", mdsMySqlDatabaseId) + + resourceName := "oci_opsi_database_insight.test_database_insight" + + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "Create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+mdsMySqlDatabaseIdDatabaseIdVariableStr+MdsMySqlDatabaseInsightResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, mdsMySqlDatabaseInsightRequiredRepresentation), "opsi", "databaseInsight", t) + + acctest.ResourceTest(t, testAccCheckOpsiDatabaseInsightDestroy, []resource.TestStep{ + // verify Create with Required + { + Config: config + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, mdsMySqlDatabaseInsightRequiredRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "status", "DISABLED"), + + func(s *terraform.State) (err error) { + _, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + // verify resource import + { + Config: config + MdsMySqlDatabaseInsightRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{}, + ResourceName: resourceName, + }, + }) +} diff --git a/internal/integrationtest/opsi_mds_mysql_database_insight_test.go b/internal/integrationtest/opsi_mds_mysql_database_insight_test.go new file mode 100644 index 00000000000..52bbb022c77 --- /dev/null +++ b/internal/integrationtest/opsi_mds_mysql_database_insight_test.go @@ -0,0 +1,372 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package integrationtest + +import ( + "context" + "fmt" + "strconv" + "testing" + "time" + + "github.com/oracle/terraform-provider-oci/internal/acctest" + tf_client "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" + "github.com/oracle/terraform-provider-oci/internal/tfresource" + "github.com/oracle/terraform-provider-oci/internal/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/oracle/oci-go-sdk/v65/common" + oci_opsi "github.com/oracle/oci-go-sdk/v65/opsi" + + "github.com/oracle/terraform-provider-oci/httpreplay" +) + +var ( + MdsMySqlDatabaseInsightRequiredOnlyResource = MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, mdsMySqlDatabaseInsightRepresentation) + + MdsMySqlDatabaseInsightResourceConfig = MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, mdsMySqlDatabaseInsightRepresentation) + + MdsMySqlDatabaseInsightSingularDataSourceRepresentation = map[string]interface{}{ + "database_insight_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_opsi_database_insight.test_database_insight.id}`}, + } + + mdsMySqlDatabaseInsightDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`}, + "compartment_id_in_subtree": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "database_type": acctest.Representation{RepType: acctest.Optional, Create: []string{`MDS-MYSQL`}}, + "fields": acctest.Representation{RepType: acctest.Optional, Create: []string{`databaseName`, `databaseType`, `compartmentId`, `databaseDisplayName`, `freeformTags`, `definedTags`}}, + "id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_opsi_database_insight.test_database_insight.id}`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: []string{`ACTIVE`}}, + "status": acctest.Representation{RepType: acctest.Optional, Create: []string{`ENABLED`}, Update: []string{`DISABLED`}}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: MdsMySqlDatabaseInsightDataSourceFilterRepresentation}, + } + + MdsMySqlDatabaseInsightDataSourceFilterRepresentation = map[string]interface{}{ + "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, + "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_opsi_database_insight.test_database_insight.id}`}}, + } + + mdsMySqlDatabaseInsightRepresentation = map[string]interface{}{ + "database_id": acctest.Representation{RepType: acctest.Required, Create: `${var.mds_mysql_database_id}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "entity_source": acctest.Representation{RepType: acctest.Required, Create: `MDS_MYSQL_DATABASE_SYSTEM`, Update: `MDS_MYSQL_DATABASE_SYSTEM`}, + "database_resource_type": acctest.Representation{RepType: acctest.Required, Create: `mysqldbsystem`}, + "status": acctest.Representation{RepType: acctest.Optional, Create: `ENABLED`, Update: `DISABLED`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + //"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreChangesMdsMySqlDatabaseInsightRepresentation}, + } + + ignoreChangesMdsMySqlDatabaseInsightRepresentation = map[string]interface{}{ + "ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`}}, + } + + MdsMySqlDatabaseInsightResourceDependencies = DefinedTagsDependencies +) + +// issue-routing-tag: opsi/controlPlane +func TestOpsiMdsMySqlDatabaseInsightResource_basic(t *testing.T) { + httpreplay.SetScenario("TestOpsiMdsMySqlDatabaseInsightResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_update", compartmentId) + compartmentIdUVariableStr := fmt.Sprintf("variable \"compartment_id_for_update\" { default = \"%s\" }\n", compartmentIdU) + + mdsMySqlDatabaseId := utils.GetEnvSettingWithBlankDefault("mds_mysql_database_id") + mdsMySqlDatabaseIdDatabaseIdVariableStr := fmt.Sprintf("variable \"mds_mysql_database_id\" { default = \"%s\" }\n", mdsMySqlDatabaseId) + + resourceName := "oci_opsi_database_insight.test_database_insight" + datasourceName := "data.oci_opsi_database_insights.test_database_insights" + singularDatasourceName := "data.oci_opsi_database_insight.test_database_insight" + + var resId, resId2 string + // Save TF content to create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+mdsMySqlDatabaseIdDatabaseIdVariableStr+MdsMySqlDatabaseInsightResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Create, mdsMySqlDatabaseInsightRepresentation), "opsi", "databaseInsight", t) + + acctest.ResourceTest(t, testAccCheckOpsiMdsMySqlDatabaseInsightDestroy, []resource.TestStep{ + // verify create with optionals + { + Config: config + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Create, mdsMySqlDatabaseInsightRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "database_id"), + resource.TestCheckResourceAttrSet(resourceName, "database_name"), + resource.TestCheckResourceAttr(resourceName, "database_resource_type", "mysqldbsystem"), + resource.TestCheckResourceAttr(resourceName, "entity_source", "MDS_MYSQL_DATABASE_SYSTEM"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "status"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + // verify update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + compartmentIdUVariableStr + MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(mdsMySqlDatabaseInsightRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttrSet(resourceName, "database_id"), + resource.TestCheckResourceAttrSet(resourceName, "database_name"), + resource.TestCheckResourceAttr(resourceName, "database_resource_type", "mysqldbsystem"), + resource.TestCheckResourceAttr(resourceName, "entity_source", "MDS_MYSQL_DATABASE_SYSTEM"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "status"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + // + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, mdsMySqlDatabaseInsightRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "database_id"), + resource.TestCheckResourceAttrSet(resourceName, "database_name"), + resource.TestCheckResourceAttr(resourceName, "database_resource_type", "mysqldbsystem"), + resource.TestCheckResourceAttr(resourceName, "entity_source", "MDS_MYSQL_DATABASE_SYSTEM"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "status"), + resource.TestCheckResourceAttr(resourceName, "status", "DISABLED"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + //// verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_opsi_database_insights", "test_database_insights", acctest.Optional, acctest.Update, mdsMySqlDatabaseInsightDataSourceRepresentation) + + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, mdsMySqlDatabaseInsightRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "compartment_id_in_subtree", "false"), + resource.TestCheckResourceAttr(datasourceName, "database_type.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "fields.#", "6"), + resource.TestCheckResourceAttr(datasourceName, "state.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "status.#", "1"), + + resource.TestCheckResourceAttr(datasourceName, "database_insights_collection.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "database_insights_collection.0.items.#", "1"), + ), + }, + //// verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, MdsMySqlDatabaseInsightSingularDataSourceRepresentation) + + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + MdsMySqlDatabaseInsightResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(singularDatasourceName, "database_display_name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "database_name"), + resource.TestCheckResourceAttr(singularDatasourceName, "database_resource_type", "mysqldbsystem"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "database_type"), + resource.TestCheckResourceAttr(singularDatasourceName, "entity_source", "MDS_MYSQL_DATABASE_SYSTEM"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "status"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + ), + }, + //// remove singular datasource from previous step so that it doesn't conflict with import tests + { + Config: config + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + MdsMySqlDatabaseInsightResourceConfig, + }, + // verify enable + { + Config: config + compartmentIdVariableStr + mdsMySqlDatabaseIdDatabaseIdVariableStr + MdsMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, + acctest.RepresentationCopyWithNewProperties(mdsMySqlDatabaseInsightRepresentation, map[string]interface{}{ + "status": acctest.Representation{RepType: acctest.Required, Update: `ENABLED`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "status", "ENABLED"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + // verify resource import + { + Config: config + MdsMySqlDatabaseInsightRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "entity_source", + }, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckOpsiMdsMySqlDatabaseInsightDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).OperationsInsightsClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_opsi_database_insight" { + noResourceFound = false + request := oci_opsi.GetDatabaseInsightRequest{} + + tmp := rs.Primary.ID + request.DatabaseInsightId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "opsi") + + response, err := client.GetDatabaseInsight(context.Background(), request) + + if err == nil { + deletedLifecycleStates := map[string]bool{ + string(oci_opsi.LifecycleStateDeleted): true, + } + if _, ok := deletedLifecycleStates[string(response.GetLifecycleState())]; !ok { + //resource lifecycle state is not in expected deleted lifecycle states. + return fmt.Errorf("resource lifecycle state: %s is not in expected deleted lifecycle states", response.GetLifecycleState()) + } + //resource lifecycle state is in expected deleted lifecycle states. continue with next one. + continue + } + + //Verify that exception is for '404 not found'. + if failure, isServiceError := common.IsServiceError(err); !isServiceError || failure.GetHTTPStatusCode() != 404 { + return err + } + } + } + if noResourceFound { + return fmt.Errorf("at least one resource was expected from the state file, but could not be found") + } + + return nil +} + +func init() { + if acctest.DependencyGraph == nil { + acctest.InitDependencyGraph() + } + if !acctest.InSweeperExcludeList("OpsiMdsMySqlDatabaseInsight") { + resource.AddTestSweepers("OpsiMdsMySqlDatabaseInsight", &resource.Sweeper{ + Name: "OpsiMdsMySqlDatabaseInsight", + Dependencies: acctest.DependencyGraph["databaseInsight"], + F: sweepOpsiMdsMySqlDatabaseInsightResource, + }) + } +} + +func sweepOpsiMdsMySqlDatabaseInsightResource(compartment string) error { + operationsInsightsClient := acctest.GetTestClients(&schema.ResourceData{}).OperationsInsightsClient() + databaseInsightIds, err := getMdsMySqlDatabaseInsightIds(compartment) + if err != nil { + return err + } + for _, databaseInsightId := range databaseInsightIds { + if ok := acctest.SweeperDefaultResourceId[databaseInsightId]; !ok { + deleteDatabaseInsightRequest := oci_opsi.DeleteDatabaseInsightRequest{} + + deleteDatabaseInsightRequest.DatabaseInsightId = &databaseInsightId + + deleteDatabaseInsightRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "opsi") + _, error := operationsInsightsClient.DeleteDatabaseInsight(context.Background(), deleteDatabaseInsightRequest) + if error != nil { + fmt.Printf("Error deleting DatabaseInsight %s %s, It is possible that the resource is already deleted. Please verify manually \n", databaseInsightId, error) + continue + } + acctest.WaitTillCondition(acctest.TestAccProvider, &databaseInsightId, OpsiMdsMySqlDatabaseInsightSweepWaitCondition, time.Duration(3*time.Minute), + OpsiMdsMySqlDatabaseInsightSweepResponseFetchOperation, "opsi", true) + } + } + return nil +} + +func getMdsMySqlDatabaseInsightIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "DatabaseInsightId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + operationsInsightsClient := acctest.GetTestClients(&schema.ResourceData{}).OperationsInsightsClient() + + listDatabaseInsightsRequest := oci_opsi.ListDatabaseInsightsRequest{} + listDatabaseInsightsRequest.CompartmentId = &compartmentId + listDatabaseInsightsRequest.LifecycleState = []oci_opsi.LifecycleStateEnum{oci_opsi.LifecycleStateActive} + listDatabaseInsightsResponse, err := operationsInsightsClient.ListDatabaseInsights(context.Background(), listDatabaseInsightsRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting DatabaseInsight list for compartment id : %s , %s \n", compartmentId, err) + } + for _, databaseInsight := range listDatabaseInsightsResponse.Items { + id := *databaseInsight.GetId() + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "DatabaseInsightId", id) + } + return resourceIds, nil +} + +func OpsiMdsMySqlDatabaseInsightSweepWaitCondition(response common.OCIOperationResponse) bool { + // Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required. + if databaseInsightResponse, ok := response.Response.(oci_opsi.GetDatabaseInsightResponse); ok { + return databaseInsightResponse.GetLifecycleState() != oci_opsi.LifecycleStateDeleted + } + return false +} + +func OpsiMdsMySqlDatabaseInsightSweepResponseFetchOperation(client *tf_client.OracleClients, resourceId *string, retryPolicy *common.RetryPolicy) error { + _, err := client.OperationsInsightsClient().GetDatabaseInsight(context.Background(), oci_opsi.GetDatabaseInsightRequest{ + DatabaseInsightId: resourceId, + RequestMetadata: common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + return err +} diff --git a/internal/provider/register_datasource.go b/internal/provider/register_datasource.go index ff40905a175..c807b3b2a15 100644 --- a/internal/provider/register_datasource.go +++ b/internal/provider/register_datasource.go @@ -58,6 +58,7 @@ import ( tf_fusion_apps "github.com/oracle/terraform-provider-oci/internal/service/fusion_apps" tf_generative_ai "github.com/oracle/terraform-provider-oci/internal/service/generative_ai" tf_generic_artifacts_content "github.com/oracle/terraform-provider-oci/internal/service/generic_artifacts_content" + tf_globally_distributed_database "github.com/oracle/terraform-provider-oci/internal/service/globally_distributed_database" tf_golden_gate "github.com/oracle/terraform-provider-oci/internal/service/golden_gate" tf_health_checks "github.com/oracle/terraform-provider-oci/internal/service/health_checks" tf_identity "github.com/oracle/terraform-provider-oci/internal/service/identity" @@ -285,6 +286,9 @@ func init() { if common.CheckForEnabledServices("genericartifactscontent") { tf_generic_artifacts_content.RegisterDatasource() } + if common.CheckForEnabledServices("globallydistributeddatabase") { + tf_globally_distributed_database.RegisterDatasource() + } if common.CheckForEnabledServices("goldengate") { tf_golden_gate.RegisterDatasource() } diff --git a/internal/provider/register_resource.go b/internal/provider/register_resource.go index cdb1688f852..f2d64089bf6 100644 --- a/internal/provider/register_resource.go +++ b/internal/provider/register_resource.go @@ -58,6 +58,7 @@ import ( tf_fusion_apps "github.com/oracle/terraform-provider-oci/internal/service/fusion_apps" tf_generative_ai "github.com/oracle/terraform-provider-oci/internal/service/generative_ai" tf_generic_artifacts_content "github.com/oracle/terraform-provider-oci/internal/service/generic_artifacts_content" + tf_globally_distributed_database "github.com/oracle/terraform-provider-oci/internal/service/globally_distributed_database" tf_golden_gate "github.com/oracle/terraform-provider-oci/internal/service/golden_gate" tf_health_checks "github.com/oracle/terraform-provider-oci/internal/service/health_checks" tf_identity "github.com/oracle/terraform-provider-oci/internal/service/identity" @@ -285,6 +286,9 @@ func init() { if common.CheckForEnabledServices("genericartifactscontent") { tf_generic_artifacts_content.RegisterResource() } + if common.CheckForEnabledServices("globallydistributeddatabase") { + tf_globally_distributed_database.RegisterResource() + } if common.CheckForEnabledServices("goldengate") { tf_golden_gate.RegisterResource() } diff --git a/internal/service/apm_synthetics/apm_synthetics_monitor_data_source.go b/internal/service/apm_synthetics/apm_synthetics_monitor_data_source.go index 37d227fb864..294af9ffb44 100644 --- a/internal/service/apm_synthetics/apm_synthetics_monitor_data_source.go +++ b/internal/service/apm_synthetics/apm_synthetics_monitor_data_source.go @@ -96,6 +96,10 @@ func (s *ApmSyntheticsMonitorDataSourceCrud) SetData() error { s.D.Set("configuration", nil) } + if s.Res.CreatedBy != nil { + s.D.Set("created_by", *s.Res.CreatedBy) + } + if s.Res.DefinedTags != nil { s.D.Set("defined_tags", tfresource.DefinedTagsToMap(s.Res.DefinedTags)) } @@ -106,6 +110,10 @@ func (s *ApmSyntheticsMonitorDataSourceCrud) SetData() error { s.D.Set("freeform_tags", s.Res.FreeformTags) + if s.Res.IsIPv6 != nil { + s.D.Set("is_ipv6", *s.Res.IsIPv6) + } + if s.Res.IsRunNow != nil { s.D.Set("is_run_now", *s.Res.IsRunNow) } @@ -114,6 +122,10 @@ func (s *ApmSyntheticsMonitorDataSourceCrud) SetData() error { s.D.Set("is_run_once", *s.Res.IsRunOnce) } + if s.Res.LastUpdatedBy != nil { + s.D.Set("last_updated_by", *s.Res.LastUpdatedBy) + } + if s.Res.MaintenanceWindowSchedule != nil { s.D.Set("maintenance_window_schedule", []interface{}{MaintenanceWindowScheduleToMap(s.Res.MaintenanceWindowSchedule)}) } else { diff --git a/internal/service/apm_synthetics/apm_synthetics_monitor_resource.go b/internal/service/apm_synthetics/apm_synthetics_monitor_resource.go index e23cfa5c3ed..e4b7c84b2af 100644 --- a/internal/service/apm_synthetics/apm_synthetics_monitor_resource.go +++ b/internal/service/apm_synthetics/apm_synthetics_monitor_resource.go @@ -5,7 +5,9 @@ package apm_synthetics import ( "context" + "encoding/base64" "fmt" + "io/ioutil" "log" "net/url" "regexp" @@ -70,6 +72,15 @@ func ApmSyntheticsMonitorResource() *schema.Resource { Computed: true, Optional: true, }, + + // Computed + "worker_list": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, }, }, }, @@ -195,12 +206,121 @@ func ApmSyntheticsMonitorResource() *schema.Resource { "DNSSEC_CONFIG", "DNS_SERVER_CONFIG", "DNS_TRACE_CONFIG", + "FTP_CONFIG", "NETWORK_CONFIG", "REST_CONFIG", "SCRIPTED_BROWSER_CONFIG", "SCRIPTED_REST_CONFIG", + "SQL_CONFIG", }, true), }, + "connection_string": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "database_authentication_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "password": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "password": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Sensitive: true, + DiffSuppressFunc: tfresource.MaskedPasswordSuppressDiff, + }, + "password_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Sensitive: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "IN_TEXT", + "VAULT_SECRET_ID", + }, true), + }, + "vault_secret_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "username": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "database_connection_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "database_role": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "database_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "database_wallet_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "database_wallet": { + Type: schema.TypeString, + Optional: true, + Computed: true, + DiffSuppressFunc: tfresource.WalletSuppressDiff, + }, + "service_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "dns_configuration": { Type: schema.TypeList, Optional: true, @@ -227,6 +347,86 @@ func ApmSyntheticsMonitorResource() *schema.Resource { }, }, }, + "download_size_limit_in_bytes": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "ftp_basic_authentication_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "password": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "password": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Sensitive: true, + DiffSuppressFunc: tfresource.MaskedPasswordSuppressDiff, + }, + "password_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Sensitive: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "IN_TEXT", + "VAULT_SECRET_ID", + }, true), + }, + "vault_secret_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "username": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "ftp_protocol": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "ftp_request_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "is_active_mode": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "is_certificate_validation_enabled": { Type: schema.TypeBool, Optional: true, @@ -303,6 +503,11 @@ func ApmSyntheticsMonitorResource() *schema.Resource { Optional: true, Computed: true, }, + "query": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "record_type": { Type: schema.TypeString, Optional: true, @@ -447,6 +652,11 @@ func ApmSyntheticsMonitorResource() *schema.Resource { }, }, }, + "upload_file_size_in_bytes": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, "verify_response_codes": { Type: schema.TypeList, Optional: true, @@ -498,6 +708,11 @@ func ApmSyntheticsMonitorResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "is_ipv6": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "is_run_now": { Type: schema.TypeBool, Optional: true, @@ -614,6 +829,14 @@ func ApmSyntheticsMonitorResource() *schema.Resource { }, // Computed + "created_by": { + Type: schema.TypeString, + Computed: true, + }, + "last_updated_by": { + Type: schema.TypeString, + Computed: true, + }, "script_name": { Type: schema.TypeString, Optional: true, @@ -731,6 +954,11 @@ func (s *ApmSyntheticsMonitorResourceCrud) Create() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isIPv6, ok := s.D.GetOkExists("is_ipv6"); ok { + tmp := isIPv6.(bool) + request.IsIPv6 = &tmp + } + if isRunNow, ok := s.D.GetOkExists("is_run_now"); ok { tmp := isRunNow.(bool) request.IsRunNow = &tmp @@ -910,6 +1138,11 @@ func (s *ApmSyntheticsMonitorResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isIPv6, ok := s.D.GetOkExists("is_ipv6"); ok { + tmp := isIPv6.(bool) + request.IsIPv6 = &tmp + } + if isRunNow, ok := s.D.GetOkExists("is_run_now"); ok { tmp := isRunNow.(bool) request.IsRunNow = &tmp @@ -1071,6 +1304,10 @@ func (s *ApmSyntheticsMonitorResourceCrud) SetData() error { s.D.Set("configuration", nil) } + if s.Res.CreatedBy != nil { + s.D.Set("created_by", *s.Res.CreatedBy) + } + if s.Res.DefinedTags != nil { s.D.Set("defined_tags", tfresource.DefinedTagsToMap(s.Res.DefinedTags)) } @@ -1081,6 +1318,10 @@ func (s *ApmSyntheticsMonitorResourceCrud) SetData() error { s.D.Set("freeform_tags", s.Res.FreeformTags) + if s.Res.IsIPv6 != nil { + s.D.Set("is_ipv6", *s.Res.IsIPv6) + } + if s.Res.IsRunNow != nil { s.D.Set("is_run_now", *s.Res.IsRunNow) } @@ -1089,6 +1330,10 @@ func (s *ApmSyntheticsMonitorResourceCrud) SetData() error { s.D.Set("is_run_once", *s.Res.IsRunOnce) } + if s.Res.LastUpdatedBy != nil { + s.D.Set("last_updated_by", *s.Res.LastUpdatedBy) + } + if s.Res.MaintenanceWindowSchedule != nil { s.D.Set("maintenance_window_schedule", []interface{}{MaintenanceWindowScheduleToMap(s.Res.MaintenanceWindowSchedule)}) } else { @@ -1199,6 +1444,46 @@ func AvailabilityConfigurationToMap(obj *oci_apm_synthetics.AvailabilityConfigur return result } +func (s *ApmSyntheticsMonitorResourceCrud) mapToBasicAuthenticationDetails(fieldKeyFormat string) (oci_apm_synthetics.BasicAuthenticationDetails, error) { + result := oci_apm_synthetics.BasicAuthenticationDetails{} + + if password, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "password")); ok { + if tmpList := password.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "password"), 0) + tmp, err := s.mapToPassword(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert password, encountered error: %v", err) + } + result.Password = tmp + } + } + + if username, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "username")); ok { + tmp := username.(string) + result.Username = &tmp + } + + return result, nil +} + +func BasicAuthenticationDetailsToMap(obj *oci_apm_synthetics.BasicAuthenticationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Password != nil { + passwordArray := []interface{}{} + if passwordMap := PasswordToMap(&obj.Password); passwordMap != nil { + passwordArray = append(passwordArray, passwordMap) + } + result["password"] = passwordArray + } + + if obj.Username != nil { + result["username"] = string(*obj.Username) + } + + return result +} + func (s *ApmSyntheticsMonitorResourceCrud) mapToClientCertificate(fieldKeyFormat string) (oci_apm_synthetics.ClientCertificate, error) { result := oci_apm_synthetics.ClientCertificate{} @@ -1271,6 +1556,45 @@ func ClientCertificateDetailsToMap(obj *oci_apm_synthetics.ClientCertificateDeta return result } +func (s *ApmSyntheticsMonitorResourceCrud) mapToDatabaseWalletDetails(fieldKeyFormat string) (oci_apm_synthetics.DatabaseWalletDetails, error) { + result := oci_apm_synthetics.DatabaseWalletDetails{} + + if databaseWallet, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "database_wallet")); ok { + tmp := databaseWallet.(string) + if !tfresource.IsBase64(tmp) { + contents, err := ioutil.ReadFile(tmp) + if err != nil { + return result, fmt.Errorf("the specified content file is not available: %q", err) + } + sEnc := base64.StdEncoding.EncodeToString([]byte(contents)) + result.DatabaseWallet = &sEnc + } else { + result.DatabaseWallet = &tmp + } + } + + if serviceName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "service_name")); ok { + tmp := serviceName.(string) + result.ServiceName = &tmp + } + + return result, nil +} + +func DatabaseWalletDetailsToMap(obj *oci_apm_synthetics.DatabaseWalletDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DatabaseWallet != nil { + result["database_wallet"] = string(*obj.DatabaseWallet) + } + + if obj.ServiceName != nil { + result["service_name"] = string(*obj.ServiceName) + } + + return result +} + func (s *ApmSyntheticsMonitorResourceCrud) mapToDnsConfiguration(fieldKeyFormat string) (oci_apm_synthetics.DnsConfiguration, error) { result := oci_apm_synthetics.DnsConfiguration{} @@ -1537,6 +1861,83 @@ func (s *ApmSyntheticsMonitorResourceCrud) mapToMonitorConfiguration(fieldKeyFor details.IsFailureRetried = &tmp } baseObject = details + case strings.ToLower("FTP_CONFIG"): + details := oci_apm_synthetics.FtpMonitorConfiguration{} + + if ftpBasicAuthenticationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "ftp_basic_authentication_details")); ok { + if tmpList := ftpBasicAuthenticationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "ftp_basic_authentication_details"), 0) + tmp, err := s.mapToBasicAuthenticationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert ftp_basic_authentication_details, encountered error: %v", err) + } + details.FtpBasicAuthenticationDetails = &tmp + } + } + if ftpProtocol, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "ftp_protocol")); ok { + details.FtpProtocol = oci_apm_synthetics.FtpProtocolEnum(ftpProtocol.(string)) + } + if ftpRequestType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "ftp_request_type")); ok { + details.FtpRequestType = oci_apm_synthetics.FtpRequestTypeEnum(ftpRequestType.(string)) + } + if isActiveMode, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_active_mode")); ok { + tmp := isActiveMode.(bool) + details.IsActiveMode = &tmp + } + if networkConfiguration, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "network_configuration")); ok { + if tmpList := networkConfiguration.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "network_configuration"), 0) + tmp, err := s.mapToNetworkConfiguration(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert network_configuration, encountered error: %v", err) + } + details.NetworkConfiguration = &tmp + } + } + + if verifyResponseCodes, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "verify_response_codes")); ok { + interfaces := verifyResponseCodes.([]interface{}) + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "verify_response_codes")) { + details.VerifyResponseCodes = tmp + } + } + if verifyResponseContent, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "verify_response_content")); ok { + tmp := verifyResponseContent.(string) + details.VerifyResponseContent = &tmp + } + if dnsConfiguration, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "dns_configuration")); ok { + if tmpList := dnsConfiguration.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "dns_configuration"), 0) + tmp, err := s.mapToDnsConfiguration(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert dns_configuration, encountered error: %v", err) + } + details.DnsConfiguration = &tmp + } + } + if isFailureRetried, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_failure_retried")); ok { + tmp := isFailureRetried.(bool) + details.IsFailureRetried = &tmp + } + switch strings.ToLower(string(details.FtpRequestType)) { + case strings.ToLower("DOWNLOAD"): + if downloadSizeLimitInBytes, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "download_size_limit_in_bytes")); ok { + tmp := downloadSizeLimitInBytes.(int) + details.DownloadSizeLimitInBytes = &tmp + } + case strings.ToLower("UPLOAD"): + if uploadFileSizeInBytes, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "upload_file_size_in_bytes")); ok { + tmp := uploadFileSizeInBytes.(int) + details.UploadFileSizeInBytes = &tmp + } + } + baseObject = details case strings.ToLower("NETWORK_CONFIG"): details := oci_apm_synthetics.NetworkMonitorConfiguration{} if networkConfiguration, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "network_configuration")); ok { @@ -1754,6 +2155,61 @@ func (s *ApmSyntheticsMonitorResourceCrud) mapToMonitorConfiguration(fieldKeyFor details.IsFailureRetried = &tmp } baseObject = details + case strings.ToLower("SQL_CONFIG"): + details := oci_apm_synthetics.SqlMonitorConfiguration{} + if connectionString, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "connection_string")); ok { + tmp := connectionString.(string) + details.ConnectionString = &tmp + } + if databaseAuthenticationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "database_authentication_details")); ok { + if tmpList := databaseAuthenticationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "database_authentication_details"), 0) + tmp, err := s.mapToBasicAuthenticationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert database_authentication_details, encountered error: %v", err) + } + details.DatabaseAuthenticationDetails = &tmp + } + } + if databaseConnectionType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "database_connection_type")); ok { + details.DatabaseConnectionType = oci_apm_synthetics.DatabaseConnectionTypeEnum(databaseConnectionType.(string)) + } + if databaseRole, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "database_role")); ok { + tmp := databaseRole.(string) + details.DatabaseRole = &tmp + } + if databaseType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "database_type")); ok { + details.DatabaseType = oci_apm_synthetics.DatabaseTypeEnum(databaseType.(string)) + } + if databaseWalletDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "database_wallet_details")); ok { + if tmpList := databaseWalletDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "database_wallet_details"), 0) + tmp, err := s.mapToDatabaseWalletDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert database_wallet_details, encountered error: %v", err) + } + details.DatabaseWalletDetails = &tmp + } + } + if query, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "query")); ok { + tmp := query.(string) + details.Query = &tmp + } + if dnsConfiguration, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "dns_configuration")); ok { + if tmpList := dnsConfiguration.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "dns_configuration"), 0) + tmp, err := s.mapToDnsConfiguration(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert dns_configuration, encountered error: %v", err) + } + details.DnsConfiguration = &tmp + } + } + if isFailureRetried, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_failure_retried")); ok { + tmp := isFailureRetried.(bool) + details.IsFailureRetried = &tmp + } + baseObject = details default: return nil, fmt.Errorf("unknown config_type '%v' was specified", configType) } @@ -1855,6 +2311,46 @@ func MonitorConfigurationToMap(obj *oci_apm_synthetics.MonitorConfiguration) map result["dns_configuration"] = []interface{}{DnsConfigurationToMap(v.DnsConfiguration)} } + if v.IsFailureRetried != nil { + result["is_failure_retried"] = bool(*v.IsFailureRetried) + } + case oci_apm_synthetics.FtpMonitorConfiguration: + result["config_type"] = "FTP_CONFIG" + + if v.DownloadSizeLimitInBytes != nil { + result["download_size_limit_in_bytes"] = int(*v.DownloadSizeLimitInBytes) + } + + if v.FtpBasicAuthenticationDetails != nil { + result["ftp_basic_authentication_details"] = []interface{}{BasicAuthenticationDetailsToMap(v.FtpBasicAuthenticationDetails)} + } + + result["ftp_protocol"] = string(v.FtpProtocol) + + result["ftp_request_type"] = string(v.FtpRequestType) + + if v.IsActiveMode != nil { + result["is_active_mode"] = bool(*v.IsActiveMode) + } + + if v.NetworkConfiguration != nil { + result["network_configuration"] = []interface{}{NetworkConfigurationToMap(v.NetworkConfiguration)} + } + + if v.UploadFileSizeInBytes != nil { + result["upload_file_size_in_bytes"] = int(*v.UploadFileSizeInBytes) + } + + result["verify_response_codes"] = v.VerifyResponseCodes + + if v.VerifyResponseContent != nil { + result["verify_response_content"] = string(*v.VerifyResponseContent) + } + + if v.DnsConfiguration != nil { + result["dns_configuration"] = []interface{}{DnsConfigurationToMap(v.DnsConfiguration)} + } + if v.IsFailureRetried != nil { result["is_failure_retried"] = bool(*v.IsFailureRetried) } @@ -1966,6 +2462,40 @@ func MonitorConfigurationToMap(obj *oci_apm_synthetics.MonitorConfiguration) map result["dns_configuration"] = []interface{}{DnsConfigurationToMap(v.DnsConfiguration)} } + if v.IsFailureRetried != nil { + result["is_failure_retried"] = bool(*v.IsFailureRetried) + } + case oci_apm_synthetics.SqlMonitorConfiguration: + result["config_type"] = "SQL_CONFIG" + + if v.ConnectionString != nil { + result["connection_string"] = string(*v.ConnectionString) + } + + if v.DatabaseAuthenticationDetails != nil { + result["database_authentication_details"] = []interface{}{BasicAuthenticationDetailsToMap(v.DatabaseAuthenticationDetails)} + } + + result["database_connection_type"] = string(v.DatabaseConnectionType) + + if v.DatabaseRole != nil { + result["database_role"] = string(*v.DatabaseRole) + } + + result["database_type"] = string(v.DatabaseType) + + if v.DatabaseWalletDetails != nil { + result["database_wallet_details"] = []interface{}{DatabaseWalletDetailsToMap(v.DatabaseWalletDetails)} + } + + if v.Query != nil { + result["query"] = string(*v.Query) + } + + if v.DnsConfiguration != nil { + result["dns_configuration"] = []interface{}{DnsConfigurationToMap(v.DnsConfiguration)} + } + if v.IsFailureRetried != nil { result["is_failure_retried"] = bool(*v.IsFailureRetried) } @@ -2006,6 +2536,10 @@ func MonitorSummaryToMap(obj oci_apm_synthetics.MonitorSummary) map[string]inter result["configuration"] = configurationArray } + if obj.CreatedBy != nil { + result["created_by"] = string(*obj.CreatedBy) + } + if obj.DefinedTags != nil { result["defined_tags"] = tfresource.DefinedTagsToMap(obj.DefinedTags) } @@ -2020,6 +2554,10 @@ func MonitorSummaryToMap(obj oci_apm_synthetics.MonitorSummary) map[string]inter result["id"] = string(*obj.Id) } + if obj.IsIPv6 != nil { + result["is_ipv6"] = bool(*obj.IsIPv6) + } + if obj.IsRunNow != nil { result["is_run_now"] = bool(*obj.IsRunNow) } @@ -2028,6 +2566,10 @@ func MonitorSummaryToMap(obj oci_apm_synthetics.MonitorSummary) map[string]inter result["is_run_once"] = bool(*obj.IsRunOnce) } + if obj.LastUpdatedBy != nil { + result["last_updated_by"] = string(*obj.LastUpdatedBy) + } + if obj.MaintenanceWindowSchedule != nil { result["maintenance_window_schedule"] = []interface{}{MaintenanceWindowScheduleToMap(obj.MaintenanceWindowSchedule)} } @@ -2130,6 +2672,60 @@ func NetworkConfigurationToMap(obj *oci_apm_synthetics.NetworkConfiguration) map return result } +func (s *ApmSyntheticsMonitorResourceCrud) mapToPassword(fieldKeyFormat string) (oci_apm_synthetics.Password, error) { + var baseObject oci_apm_synthetics.Password + //discriminator + passwordTypeRaw, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "password_type")) + var passwordType string + if ok { + passwordType = passwordTypeRaw.(string) + } else { + passwordType = "" // default value + } + switch strings.ToLower(passwordType) { + case strings.ToLower("IN_TEXT"): + details := oci_apm_synthetics.PasswordInText{} + if password, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "password")); ok { + tmp := password.(string) + details.Password = &tmp + } + baseObject = details + case strings.ToLower("VAULT_SECRET_ID"): + details := oci_apm_synthetics.PasswordInVault{} + if vaultSecretId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_secret_id")); ok { + tmp := vaultSecretId.(string) + details.VaultSecretId = &tmp + } + baseObject = details + default: + return nil, fmt.Errorf("unknown password_type '%v' was specified", passwordType) + } + return baseObject, nil +} + +func PasswordToMap(obj *oci_apm_synthetics.Password) map[string]interface{} { + result := map[string]interface{}{} + switch v := (*obj).(type) { + case oci_apm_synthetics.PasswordInText: + result["password_type"] = "IN_TEXT" + + if v.Password != nil { + result["password"] = string(*v.Password) + } + case oci_apm_synthetics.PasswordInVault: + result["password_type"] = "VAULT_SECRET_ID" + + if v.VaultSecretId != nil { + result["vault_secret_id"] = string(*v.VaultSecretId) + } + default: + log.Printf("[WARN] Received 'password_type' of unknown type %v", *obj) + return nil + } + + return result +} + func (s *ApmSyntheticsMonitorResourceCrud) mapToPrivateKey(fieldKeyFormat string) (oci_apm_synthetics.PrivateKey, error) { result := oci_apm_synthetics.PrivateKey{} @@ -2293,6 +2889,8 @@ func VantagePointInfoToMap(obj oci_apm_synthetics.VantagePointInfo) map[string]i result["name"] = string(*obj.Name) } + result["worker_list"] = obj.WorkerList + return result } diff --git a/internal/service/data_safe/data_safe_alerts_data_source.go b/internal/service/data_safe/data_safe_alerts_data_source.go index 1fe1f50fe94..585dcfaaa48 100644 --- a/internal/service/data_safe/data_safe_alerts_data_source.go +++ b/internal/service/data_safe/data_safe_alerts_data_source.go @@ -103,7 +103,7 @@ func (s *DataSafeAlertsDataSourceCrud) Get() error { tmp := make([]oci_data_safe.ListAlertsFieldEnum, len(interfaces)) for i := range interfaces { if interfaces[i] != nil { - tmp[i] = interfaces[i].(oci_data_safe.ListAlertsFieldEnum) + tmp[i] = oci_data_safe.ListAlertsFieldEnum(interfaces[i].(string)) } } if len(tmp) != 0 || s.D.HasChange("field") { diff --git a/internal/service/data_safe/data_safe_audit_archive_retrieval_resource.go b/internal/service/data_safe/data_safe_audit_archive_retrieval_resource.go index 562719a7251..2ae2644141d 100644 --- a/internal/service/data_safe/data_safe_audit_archive_retrieval_resource.go +++ b/internal/service/data_safe/data_safe_audit_archive_retrieval_resource.go @@ -257,7 +257,7 @@ func (s *DataSafeAuditArchiveRetrievalResourceCrud) getAuditArchiveRetrievalFrom actionTypeEnum oci_data_safe.WorkRequestResourceActionTypeEnum, timeout time.Duration) error { // Wait until it finishes - auditArchiveRetrievalId, err := auditArchiveRetrievalWaitForWorkRequest(workId, "data_safe", + auditArchiveRetrievalId, err := auditArchiveRetrievalWaitForWorkRequest(workId, "auditarchiveretrievals", actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) if err != nil { @@ -448,7 +448,7 @@ func (s *DataSafeAuditArchiveRetrievalResourceCrud) Delete() error { workId := response.OpcWorkRequestId // Wait until it finishes - _, delWorkRequestErr := auditArchiveRetrievalWaitForWorkRequest(workId, "data_safe", + _, delWorkRequestErr := auditArchiveRetrievalWaitForWorkRequest(workId, "auditarchiveretrievals", oci_data_safe.WorkRequestResourceActionTypeDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries, s.Client) return delWorkRequestErr } diff --git a/internal/service/data_safe/data_safe_audit_event_analytic_data_source.go b/internal/service/data_safe/data_safe_audit_event_analytic_data_source.go index 0c39c374f4c..2b28f26c84f 100644 --- a/internal/service/data_safe/data_safe_audit_event_analytic_data_source.go +++ b/internal/service/data_safe/data_safe_audit_event_analytic_data_source.go @@ -231,7 +231,7 @@ func (s *DataSafeAuditEventAnalyticDataSourceCrud) Get() error { tmp := make([]oci_data_safe.ListAuditEventAnalyticsGroupByEnum, len(interfaces)) for i := range interfaces { if interfaces[i] != nil { - tmp[i] = interfaces[i].(oci_data_safe.ListAuditEventAnalyticsGroupByEnum) + tmp[i] = oci_data_safe.ListAuditEventAnalyticsGroupByEnum(interfaces[i].(string)) } } if len(tmp) != 0 || s.D.HasChange("group_by") { @@ -254,7 +254,7 @@ func (s *DataSafeAuditEventAnalyticDataSourceCrud) Get() error { tmp := make([]oci_data_safe.ListAuditEventAnalyticsSummaryFieldEnum, len(interfaces)) for i := range interfaces { if interfaces[i] != nil { - tmp[i] = interfaces[i].(oci_data_safe.ListAuditEventAnalyticsSummaryFieldEnum) + tmp[i] = oci_data_safe.ListAuditEventAnalyticsSummaryFieldEnum(interfaces[i].(string)) } } if len(tmp) != 0 || s.D.HasChange("summary_field") { diff --git a/internal/service/data_safe/data_safe_audit_events_data_source.go b/internal/service/data_safe/data_safe_audit_events_data_source.go index 7ce583e7971..827bd06276e 100644 --- a/internal/service/data_safe/data_safe_audit_events_data_source.go +++ b/internal/service/data_safe/data_safe_audit_events_data_source.go @@ -53,6 +53,10 @@ func DataSafeAuditEventsDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "application_contexts": { + Type: schema.TypeString, + Computed: true, + }, "audit_event_time": { Type: schema.TypeString, Computed: true, @@ -134,6 +138,10 @@ func DataSafeAuditEventsDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "fga_policy_name": { + Type: schema.TypeString, + Computed: true, + }, "freeform_tags": { Type: schema.TypeMap, Computed: true, @@ -308,6 +316,10 @@ func AuditEventsSummaryToMap(obj oci_data_safe.AuditEventSummary) map[string]int result["action_taken"] = string(*obj.ActionTaken) } + if obj.ApplicationContexts != nil { + result["application_contexts"] = string(*obj.ApplicationContexts) + } + if obj.AuditEventTime != nil { result["audit_event_time"] = obj.AuditEventTime.String() } @@ -382,6 +394,10 @@ func AuditEventsSummaryToMap(obj oci_data_safe.AuditEventSummary) map[string]int result["extended_event_attributes"] = string(*obj.ExtendedEventAttributes) } + if obj.FgaPolicyName != nil { + result["fga_policy_name"] = string(*obj.FgaPolicyName) + } + result["freeform_tags"] = obj.FreeformTags if obj.Id != nil { diff --git a/internal/service/data_safe/data_safe_audit_profile_analytic_data_source.go b/internal/service/data_safe/data_safe_audit_profile_analytic_data_source.go index 35b2db49065..904477e484f 100644 --- a/internal/service/data_safe/data_safe_audit_profile_analytic_data_source.go +++ b/internal/service/data_safe/data_safe_audit_profile_analytic_data_source.go @@ -116,7 +116,7 @@ func (s *DataSafeAuditProfileAnalyticDataSourceCrud) Get() error { tmp := make([]oci_data_safe.ListAuditProfileAnalyticsGroupByEnum, len(interfaces)) for i := range interfaces { if interfaces[i] != nil { - tmp[i] = interfaces[i].(oci_data_safe.ListAuditProfileAnalyticsGroupByEnum) + tmp[i] = oci_data_safe.ListAuditProfileAnalyticsGroupByEnum(interfaces[i].(string)) } } if len(tmp) != 0 || s.D.HasChange("group_by") { diff --git a/internal/service/data_safe/data_safe_audit_trail_analytic_data_source.go b/internal/service/data_safe/data_safe_audit_trail_analytic_data_source.go index ada976a0c5e..665937d788d 100644 --- a/internal/service/data_safe/data_safe_audit_trail_analytic_data_source.go +++ b/internal/service/data_safe/data_safe_audit_trail_analytic_data_source.go @@ -133,7 +133,7 @@ func (s *DataSafeAuditTrailAnalyticDataSourceCrud) Get() error { tmp := make([]oci_data_safe.ListAuditTrailAnalyticsGroupByEnum, len(interfaces)) for i := range interfaces { if interfaces[i] != nil { - tmp[i] = interfaces[i].(oci_data_safe.ListAuditTrailAnalyticsGroupByEnum) + tmp[i] = oci_data_safe.ListAuditTrailAnalyticsGroupByEnum(interfaces[i].(string)) } } if len(tmp) != 0 || s.D.HasChange("group_by") { diff --git a/internal/service/data_safe/data_safe_audit_trail_management_resource.go b/internal/service/data_safe/data_safe_audit_trail_management_resource.go index 3ceef6a699d..dc33032c358 100644 --- a/internal/service/data_safe/data_safe_audit_trail_management_resource.go +++ b/internal/service/data_safe/data_safe_audit_trail_management_resource.go @@ -164,23 +164,29 @@ func updateDataSafeAuditTrailManagement(d *schema.ResourceData, m interface{}) e sync.D = d sync.Client = m.(*client.OracleClients).DataSafeClient() - if _, ok := sync.D.GetOkExists("start_trigger"); ok { - if err := sync.StartAuditTrail(); err != nil { - return err + if startTrigger, ok := sync.D.GetOkExists("start_trigger"); ok { + if startTrigger == true { + if err := sync.StartAuditTrail(); err != nil { + return err + } + sync.D.Set("state", oci_data_safe.AuditTrailLifecycleStateActive) } - sync.D.Set("state", oci_data_safe.AuditTrailLifecycleStateActive) } - if _, ok := sync.D.GetOkExists("resume_trigger"); ok { - err := sync.ResumeAuditTrail() - if err != nil { - return err + if resumeTrigger, ok := sync.D.GetOkExists("resume_trigger"); ok { + if resumeTrigger == true { + err := sync.ResumeAuditTrail() + if err != nil { + return err + } } } - if _, ok := sync.D.GetOkExists("stop_trigger"); ok { - if err := sync.StopAuditTrail(); err != nil { - return err + if stopTrigger, ok := sync.D.GetOkExists("stop_trigger"); ok { + if stopTrigger == true { + if err := sync.StopAuditTrail(); err != nil { + return err + } + sync.D.Set("state", oci_data_safe.AuditTrailLifecycleStateInactive) } - sync.D.Set("state", oci_data_safe.AuditTrailLifecycleStateInactive) } if err := tfresource.UpdateResource(d, sync); err != nil { diff --git a/internal/service/data_safe/data_safe_discovery_job_data_source.go b/internal/service/data_safe/data_safe_discovery_job_data_source.go index 1cc63526979..87758643c1d 100644 --- a/internal/service/data_safe/data_safe_discovery_job_data_source.go +++ b/internal/service/data_safe/data_safe_discovery_job_data_source.go @@ -113,6 +113,12 @@ func (s *DataSafeDiscoveryJobDataSourceCrud) SetData() error { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } + tablesForDiscovery := []interface{}{} + for _, item := range s.Res.TablesForDiscovery { + tablesForDiscovery = append(tablesForDiscovery, TablesForDiscoveryToMap(item)) + } + s.D.Set("tables_for_discovery", tablesForDiscovery) + if s.Res.TargetId != nil { s.D.Set("target_id", *s.Res.TargetId) } diff --git a/internal/service/data_safe/data_safe_discovery_job_resource.go b/internal/service/data_safe/data_safe_discovery_job_resource.go index 7ae98bca815..7c4700f589b 100644 --- a/internal/service/data_safe/data_safe_discovery_job_resource.go +++ b/internal/service/data_safe/data_safe_discovery_job_resource.go @@ -113,6 +113,35 @@ func DataSafeDiscoveryJobResource() *schema.Resource { Type: schema.TypeString, }, }, + "tables_for_discovery": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "schema_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "table_names": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + // Computed + }, + }, + }, // Computed "state": { @@ -312,6 +341,23 @@ func (s *DataSafeDiscoveryJobResourceCrud) Create() error { } } + if tablesForDiscovery, ok := s.D.GetOkExists("tables_for_discovery"); ok { + interfaces := tablesForDiscovery.([]interface{}) + tmp := make([]oci_data_safe.TablesForDiscovery, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "tables_for_discovery", stateDataIndex) + converted, err := s.mapToTablesForDiscovery(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("tables_for_discovery") { + request.TablesForDiscovery = tmp + } + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "data_safe") response, err := s.Client.CreateDiscoveryJob(context.Background(), request) @@ -553,6 +599,12 @@ func (s *DataSafeDiscoveryJobResourceCrud) SetData() error { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } + tablesForDiscovery := []interface{}{} + for _, item := range s.Res.TablesForDiscovery { + tablesForDiscovery = append(tablesForDiscovery, TablesForDiscoveryToMap(item)) + } + s.D.Set("tables_for_discovery", tablesForDiscovery) + if s.Res.TargetId != nil { s.D.Set("target_id", *s.Res.TargetId) } @@ -636,6 +688,30 @@ func DiscoveryJobSummaryToMap(obj oci_data_safe.DiscoveryJobSummary) map[string] return result } +func (s *DataSafeDiscoveryJobResourceCrud) mapToTablesForDiscovery(fieldKeyFormat string) (oci_data_safe.TablesForDiscovery, error) { + result := oci_data_safe.TablesForDiscovery{} + + if schemaName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "schema_name")); ok { + tmp := schemaName.(string) + result.SchemaName = &tmp + } + + if tableNames, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "table_names")); ok { + interfaces := tableNames.([]interface{}) + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "table_names")) { + result.TableNames = tmp + } + } + + return result, nil +} + func (s *DataSafeDiscoveryJobResourceCrud) updateCompartment(compartment interface{}) error { changeCompartmentRequest := oci_data_safe.ChangeDiscoveryJobCompartmentRequest{} diff --git a/internal/service/data_safe/data_safe_export.go b/internal/service/data_safe/data_safe_export.go index 20a18e25d5c..fe0b41f1e3b 100644 --- a/internal/service/data_safe/data_safe_export.go +++ b/internal/service/data_safe/data_safe_export.go @@ -93,10 +93,11 @@ var exportDataSafeTargetDatabaseHints = &tf_export.TerraformResourceHints{ } var exportDataSafeSecurityAssessmentHints = &tf_export.TerraformResourceHints{ - ResourceClass: "oci_data_safe_security_assessment", - DatasourceClass: "oci_data_safe_security_assessments", - DatasourceItemsAttr: "security_assessments", - ResourceAbbreviation: "security_assessment", + ResourceClass: "oci_data_safe_security_assessment", + DatasourceClass: "oci_data_safe_security_assessments", + DatasourceItemsAttr: "security_assessments", + ResourceAbbreviation: "security_assessment", + RequireResourceRefresh: true, DiscoverableLifecycleStates: []string{ string(oci_data_safe.SecurityAssessmentLifecycleStateSucceeded), }, diff --git a/internal/service/data_safe/data_safe_report_definition_resource.go b/internal/service/data_safe/data_safe_report_definition_resource.go index 3945c73a8b4..aa6ffca1716 100644 --- a/internal/service/data_safe/data_safe_report_definition_resource.go +++ b/internal/service/data_safe/data_safe_report_definition_resource.go @@ -1078,7 +1078,9 @@ func (s *DataSafeReportDefinitionResourceCrud) mapTosummary(fieldKeyFormat strin if scimFilter, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "scim_filter")); ok { tmp := scimFilter.(string) - result.ScimFilter = &tmp + if tmp != "" { + result.ScimFilter = &tmp + } } return result, nil @@ -1107,7 +1109,7 @@ func summaryToMap(obj oci_data_safe.Summary) map[string]interface{} { result["name"] = string(*obj.Name) } - if obj.ScimFilter != nil { + if obj.ScimFilter != nil && *obj.ScimFilter != "" { result["scim_filter"] = string(*obj.ScimFilter) } diff --git a/internal/service/data_safe/data_safe_reports_data_source.go b/internal/service/data_safe/data_safe_reports_data_source.go index 8d038fc6c5e..f50a250868d 100644 --- a/internal/service/data_safe/data_safe_reports_data_source.go +++ b/internal/service/data_safe/data_safe_reports_data_source.go @@ -5,8 +5,10 @@ package data_safe import ( "context" + "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_common "github.com/oracle/oci-go-sdk/v65/common" oci_data_safe "github.com/oracle/oci-go-sdk/v65/datasafe" "github.com/oracle/terraform-provider-oci/internal/client" @@ -42,6 +44,14 @@ func DataSafeReportsDataSource() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "time_generated_greater_than_or_equal_to": { + Type: schema.TypeString, + Optional: true, + }, + "time_generated_less_than": { + Type: schema.TypeString, + Optional: true, + }, "type": { Type: schema.TypeString, Optional: true, @@ -113,6 +123,22 @@ func (s *DataSafeReportsDataSourceCrud) Get() error { request.LifecycleState = oci_data_safe.ListReportsLifecycleStateEnum(state.(string)) } + if timeGeneratedGreaterThanOrEqualTo, ok := s.D.GetOkExists("time_generated_greater_than_or_equal_to"); ok { + tmp, err := time.Parse(time.RFC3339, timeGeneratedGreaterThanOrEqualTo.(string)) + if err != nil { + return err + } + request.TimeGeneratedGreaterThanOrEqualTo = &oci_common.SDKTime{Time: tmp} + } + + if timeGeneratedLessThan, ok := s.D.GetOkExists("time_generated_less_than"); ok { + tmp, err := time.Parse(time.RFC3339, timeGeneratedLessThan.(string)) + if err != nil { + return err + } + request.TimeGeneratedLessThan = &oci_common.SDKTime{Time: tmp} + } + if type_, ok := s.D.GetOkExists("type"); ok { request.Type = oci_data_safe.ListReportsTypeEnum(type_.(string)) } diff --git a/internal/service/data_safe/data_safe_security_assessment_comparison_data_source.go b/internal/service/data_safe/data_safe_security_assessment_comparison_data_source.go index a188a6ba325..1ecda0b3d4a 100644 --- a/internal/service/data_safe/data_safe_security_assessment_comparison_data_source.go +++ b/internal/service/data_safe/data_safe_security_assessment_comparison_data_source.go @@ -124,6 +124,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -229,6 +233,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -372,6 +380,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -477,6 +489,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -628,6 +644,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -733,6 +753,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -876,6 +900,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -981,6 +1009,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -1124,6 +1156,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -1229,6 +1265,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -1372,6 +1412,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -1477,6 +1521,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -1620,6 +1668,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -1725,6 +1777,10 @@ func DataSafeSecurityAssessmentComparisonDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -1968,6 +2024,10 @@ func ReferencesToMap(obj *oci_data_safe.References) map[string]interface{} { result["gdpr"] = string(*obj.Gdpr) } + if obj.Obp != nil { + result["obp"] = string(*obj.Obp) + } + if obj.Stig != nil { result["stig"] = string(*obj.Stig) } diff --git a/internal/service/data_safe/data_safe_security_assessment_data_source.go b/internal/service/data_safe/data_safe_security_assessment_data_source.go index 3753692a970..a1867755ef1 100644 --- a/internal/service/data_safe/data_safe_security_assessment_data_source.go +++ b/internal/service/data_safe/data_safe_security_assessment_data_source.go @@ -96,6 +96,10 @@ func (s *DataSafeSecurityAssessmentDataSourceCrud) SetData() error { } s.D.Set("ignored_targets", ignoredTargets) + if s.Res.IsAssessmentScheduled != nil { + s.D.Set("is_assessment_scheduled", *s.Res.IsAssessmentScheduled) + } + if s.Res.IsBaseline != nil { s.D.Set("is_baseline", *s.Res.IsBaseline) } diff --git a/internal/service/data_safe/data_safe_security_assessment_findings_data_source.go b/internal/service/data_safe/data_safe_security_assessment_findings_data_source.go index 4a8e2e36708..64a4b4fbe10 100644 --- a/internal/service/data_safe/data_safe_security_assessment_findings_data_source.go +++ b/internal/service/data_safe/data_safe_security_assessment_findings_data_source.go @@ -50,6 +50,10 @@ func DataSafeSecurityAssessmentFindingsDataSource() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "target_id": { + Type: schema.TypeString, + Optional: true, + }, "findings": { Type: schema.TypeList, Computed: true, @@ -95,6 +99,10 @@ func DataSafeSecurityAssessmentFindingsDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "oneline": { + Type: schema.TypeString, + Computed: true, + }, "oracle_defined_severity": { Type: schema.TypeString, Computed: true, @@ -117,6 +125,10 @@ func DataSafeSecurityAssessmentFindingsDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "obp": { + Type: schema.TypeString, + Computed: true, + }, "stig": { Type: schema.TypeString, Computed: true, @@ -220,6 +232,11 @@ func (s *DataSafeSecurityAssessmentFindingsDataSourceCrud) Get() error { request.LifecycleState = oci_data_safe.ListFindingsLifecycleStateEnum(state.(string)) } + if targetId, ok := s.D.GetOkExists("target_id"); ok { + tmp := targetId.(string) + request.TargetId = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "data_safe") response, err := s.Client.ListFindings(context.Background(), request) @@ -288,6 +305,10 @@ func (s *DataSafeSecurityAssessmentFindingsDataSourceCrud) SetData() error { securityAssessmentFinding["lifecycle_details"] = *r.LifecycleDetails } + if r.Oneline != nil { + securityAssessmentFinding["oneline"] = *r.Oneline + } + securityAssessmentFinding["oracle_defined_severity"] = r.OracleDefinedSeverity if r.References != nil { @@ -349,6 +370,10 @@ func FindingsReferencesToMap(obj *oci_data_safe.References) map[string]interface result["gdpr"] = string(*obj.Gdpr) } + if obj.Obp != nil { + result["obp"] = string(*obj.Obp) + } + if obj.Stig != nil { result["stig"] = string(*obj.Stig) } diff --git a/internal/service/data_safe/data_safe_security_assessment_resource.go b/internal/service/data_safe/data_safe_security_assessment_resource.go index 8046955a634..ef301516d2a 100644 --- a/internal/service/data_safe/data_safe_security_assessment_resource.go +++ b/internal/service/data_safe/data_safe_security_assessment_resource.go @@ -69,6 +69,11 @@ func DataSafeSecurityAssessmentResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "is_assessment_scheduled": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "schedule": { Type: schema.TypeString, Optional: true, @@ -588,6 +593,11 @@ func (s *DataSafeSecurityAssessmentResourceCrud) Create() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isAssessmentScheduled, ok := s.D.GetOkExists("is_assessment_scheduled"); ok { + tmp := isAssessmentScheduled.(bool) + request.IsAssessmentScheduled = &tmp + } + if schedule, ok := s.D.GetOkExists("schedule"); ok { tmp := schedule.(string) request.Schedule = &tmp @@ -778,6 +788,11 @@ func (s *DataSafeSecurityAssessmentResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isAssessmentScheduled, ok := s.D.GetOkExists("is_assessment_scheduled"); ok { + tmp := isAssessmentScheduled.(bool) + request.IsAssessmentScheduled = &tmp + } + if schedule, ok := s.D.GetOkExists("schedule"); ok { tmp := schedule.(string) request.Schedule = &tmp @@ -848,6 +863,10 @@ func (s *DataSafeSecurityAssessmentResourceCrud) SetData() error { } s.D.Set("ignored_targets", ignoredTargets) + if s.Res.IsAssessmentScheduled != nil { + s.D.Set("is_assessment_scheduled", *s.Res.IsAssessmentScheduled) + } + if s.Res.IsBaseline != nil { s.D.Set("is_baseline", *s.Res.IsBaseline) } diff --git a/internal/service/data_safe/data_safe_sensitive_data_model_data_source.go b/internal/service/data_safe/data_safe_sensitive_data_model_data_source.go index 70cbc5fb94d..7879b8de892 100644 --- a/internal/service/data_safe/data_safe_sensitive_data_model_data_source.go +++ b/internal/service/data_safe/data_safe_sensitive_data_model_data_source.go @@ -114,6 +114,12 @@ func (s *DataSafeSensitiveDataModelDataSourceCrud) SetData() error { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } + tablesForDiscovery := []interface{}{} + for _, item := range s.Res.TablesForDiscovery { + tablesForDiscovery = append(tablesForDiscovery, TablesForDiscoveryToMap(item)) + } + s.D.Set("tables_for_discovery", tablesForDiscovery) + if s.Res.TargetId != nil { s.D.Set("target_id", *s.Res.TargetId) } diff --git a/internal/service/data_safe/data_safe_sensitive_data_model_resource.go b/internal/service/data_safe/data_safe_sensitive_data_model_resource.go index 8f9dc16d19a..516ab0abdaf 100644 --- a/internal/service/data_safe/data_safe_sensitive_data_model_resource.go +++ b/internal/service/data_safe/data_safe_sensitive_data_model_resource.go @@ -108,6 +108,32 @@ func DataSafeSensitiveDataModelResource() *schema.Resource { Type: schema.TypeString, }, }, + "tables_for_discovery": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "schema_name": { + Type: schema.TypeString, + Required: true, + }, + + // Optional + "table_names": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + // Computed + }, + }, + }, // Computed "state": { @@ -280,6 +306,23 @@ func (s *DataSafeSensitiveDataModelResourceCrud) Create() error { } } + if tablesForDiscovery, ok := s.D.GetOkExists("tables_for_discovery"); ok { + interfaces := tablesForDiscovery.([]interface{}) + tmp := make([]oci_data_safe.TablesForDiscovery, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "tables_for_discovery", stateDataIndex) + converted, err := s.mapToTablesForDiscovery(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("tables_for_discovery") { + request.TablesForDiscovery = tmp + } + } + if targetId, ok := s.D.GetOkExists("target_id"); ok { tmp := targetId.(string) request.TargetId = &tmp @@ -522,6 +565,23 @@ func (s *DataSafeSensitiveDataModelResourceCrud) Update() error { } } + if tablesForDiscovery, ok := s.D.GetOkExists("tables_for_discovery"); ok { + interfaces := tablesForDiscovery.([]interface{}) + tmp := make([]oci_data_safe.TablesForDiscovery, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "tables_for_discovery", stateDataIndex) + converted, err := s.mapToTablesForDiscovery(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("tables_for_discovery") { + request.TablesForDiscovery = tmp + } + } + if targetId, ok := s.D.GetOkExists("target_id"); ok { tmp := targetId.(string) request.TargetId = &tmp @@ -607,6 +667,12 @@ func (s *DataSafeSensitiveDataModelResourceCrud) SetData() error { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } + tablesForDiscovery := []interface{}{} + for _, item := range s.Res.TablesForDiscovery { + tablesForDiscovery = append(tablesForDiscovery, TablesForDiscoveryToMap(item)) + } + s.D.Set("tables_for_discovery", tablesForDiscovery) + if s.Res.TargetId != nil { s.D.Set("target_id", *s.Res.TargetId) } @@ -668,6 +734,42 @@ func SensitiveDataModelSummaryToMap(obj oci_data_safe.SensitiveDataModelSummary) return result } +func (s *DataSafeSensitiveDataModelResourceCrud) mapToTablesForDiscovery(fieldKeyFormat string) (oci_data_safe.TablesForDiscovery, error) { + result := oci_data_safe.TablesForDiscovery{} + + if schemaName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "schema_name")); ok { + tmp := schemaName.(string) + result.SchemaName = &tmp + } + + if tableNames, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "table_names")); ok { + interfaces := tableNames.([]interface{}) + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "table_names")) { + result.TableNames = tmp + } + } + + return result, nil +} + +func TablesForDiscoveryToMap(obj oci_data_safe.TablesForDiscovery) map[string]interface{} { + result := map[string]interface{}{} + + if obj.SchemaName != nil { + result["schema_name"] = string(*obj.SchemaName) + } + + result["table_names"] = obj.TableNames + + return result +} + func (s *DataSafeSensitiveDataModelResourceCrud) updateCompartment(compartment interface{}) error { changeCompartmentRequest := oci_data_safe.ChangeSensitiveDataModelCompartmentRequest{} diff --git a/internal/service/data_safe/data_safe_sensitive_data_model_sensitive_types_data_source.go b/internal/service/data_safe/data_safe_sensitive_data_model_sensitive_types_data_source.go new file mode 100644 index 00000000000..5e924d045be --- /dev/null +++ b/internal/service/data_safe/data_safe_sensitive_data_model_sensitive_types_data_source.go @@ -0,0 +1,162 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package data_safe + +import ( + "context" + "strconv" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_data_safe "github.com/oracle/oci-go-sdk/v65/datasafe" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DataSafeSensitiveDataModelSensitiveTypesDataSource() *schema.Resource { + return &schema.Resource{ + Read: readDataSafeSensitiveDataModelSensitiveTypes, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "sensitive_data_model_id": { + Type: schema.TypeString, + Required: true, + }, + "sensitive_type_id": { + Type: schema.TypeString, + Optional: true, + }, + "sensitive_data_model_sensitive_type_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "items": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "sensitive_data_model_sensitive_type_count": { + Type: schema.TypeString, + Computed: true, + }, + "sensitive_type_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func readDataSafeSensitiveDataModelSensitiveTypes(d *schema.ResourceData, m interface{}) error { + sync := &DataSafeSensitiveDataModelSensitiveTypesDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DataSafeClient() + + return tfresource.ReadResource(sync) +} + +type DataSafeSensitiveDataModelSensitiveTypesDataSourceCrud struct { + D *schema.ResourceData + Client *oci_data_safe.DataSafeClient + Res *oci_data_safe.ListSensitiveDataModelSensitiveTypesResponse +} + +func (s *DataSafeSensitiveDataModelSensitiveTypesDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *DataSafeSensitiveDataModelSensitiveTypesDataSourceCrud) Get() error { + request := oci_data_safe.ListSensitiveDataModelSensitiveTypesRequest{} + + if sensitiveDataModelId, ok := s.D.GetOkExists("sensitive_data_model_id"); ok { + tmp := sensitiveDataModelId.(string) + request.SensitiveDataModelId = &tmp + } + + if sensitiveTypeId, ok := s.D.GetOkExists("sensitive_type_id"); ok { + tmp := sensitiveTypeId.(string) + request.SensitiveTypeId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "data_safe") + + response, err := s.Client.ListSensitiveDataModelSensitiveTypes(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListSensitiveDataModelSensitiveTypes(context.Background(), request) + if err != nil { + return err + } + + s.Res.Items = append(s.Res.Items, listResponse.Items...) + request.Page = listResponse.OpcNextPage + } + + return nil +} + +func (s *DataSafeSensitiveDataModelSensitiveTypesDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("DataSafeSensitiveDataModelSensitiveTypesDataSource-", DataSafeSensitiveDataModelSensitiveTypesDataSource(), s.D)) + resources := []map[string]interface{}{} + sensitiveDataModelSensitiveType := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, SensitiveDataModelSensitiveTypeSummaryToMap(item)) + } + sensitiveDataModelSensitiveType["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, DataSafeSensitiveDataModelSensitiveTypesDataSource().Schema["sensitive_data_model_sensitive_type_collection"].Elem.(*schema.Resource).Schema) + sensitiveDataModelSensitiveType["items"] = items + } + + resources = append(resources, sensitiveDataModelSensitiveType) + if err := s.D.Set("sensitive_data_model_sensitive_type_collection", resources); err != nil { + return err + } + + return nil +} + +func SensitiveDataModelSensitiveTypeSummaryToMap(obj oci_data_safe.SensitiveDataModelSensitiveTypeSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Count != nil { + result["sensitive_data_model_sensitive_type_count"] = strconv.FormatInt(*obj.Count, 10) + } + + if obj.SensitiveTypeId != nil { + result["sensitive_type_id"] = string(*obj.SensitiveTypeId) + } + + return result +} diff --git a/internal/service/data_safe/data_safe_sql_firewall_allowed_sql_analytics_data_source.go b/internal/service/data_safe/data_safe_sql_firewall_allowed_sql_analytics_data_source.go index 599ff18f546..6c3106acf07 100644 --- a/internal/service/data_safe/data_safe_sql_firewall_allowed_sql_analytics_data_source.go +++ b/internal/service/data_safe/data_safe_sql_firewall_allowed_sql_analytics_data_source.go @@ -145,7 +145,7 @@ func (s *DataSafeSqlFirewallAllowedSqlAnalyticsDataSourceCrud) Get() error { tmp := make([]oci_data_safe.ListSqlFirewallAllowedSqlAnalyticsGroupByEnum, len(interfaces)) for i := range interfaces { if interfaces[i] != nil { - tmp[i] = interfaces[i].(oci_data_safe.ListSqlFirewallAllowedSqlAnalyticsGroupByEnum) + tmp[i] = oci_data_safe.ListSqlFirewallAllowedSqlAnalyticsGroupByEnum(interfaces[i].(string)) } } if len(tmp) != 0 || s.D.HasChange("group_by") { diff --git a/internal/service/data_safe/data_safe_sql_firewall_policy_analytics_data_source.go b/internal/service/data_safe/data_safe_sql_firewall_policy_analytics_data_source.go index 7af6d810a73..6ee18e1479c 100644 --- a/internal/service/data_safe/data_safe_sql_firewall_policy_analytics_data_source.go +++ b/internal/service/data_safe/data_safe_sql_firewall_policy_analytics_data_source.go @@ -159,7 +159,7 @@ func (s *DataSafeSqlFirewallPolicyAnalyticsDataSourceCrud) Get() error { tmp := make([]oci_data_safe.ListSqlFirewallPolicyAnalyticsGroupByEnum, len(interfaces)) for i := range interfaces { if interfaces[i] != nil { - tmp[i] = interfaces[i].(oci_data_safe.ListSqlFirewallPolicyAnalyticsGroupByEnum) + tmp[i] = oci_data_safe.ListSqlFirewallPolicyAnalyticsGroupByEnum(interfaces[i].(string)) } } if len(tmp) != 0 || s.D.HasChange("group_by") { diff --git a/internal/service/data_safe/data_safe_unset_security_assessment_baseline_resource.go b/internal/service/data_safe/data_safe_unset_security_assessment_baseline_resource.go index 77e9e8bf770..010c5289cbc 100644 --- a/internal/service/data_safe/data_safe_unset_security_assessment_baseline_resource.go +++ b/internal/service/data_safe/data_safe_unset_security_assessment_baseline_resource.go @@ -37,6 +37,15 @@ func DataSafeUnsetSecurityAssessmentBaselineResource() *schema.Resource { }, // Optional + "target_ids": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, // Computed }, @@ -98,6 +107,19 @@ func (s *DataSafeUnsetSecurityAssessmentBaselineResourceCrud) Create() error { request.SecurityAssessmentId = &tmp } + if targetIds, ok := s.D.GetOkExists("target_ids"); ok { + interfaces := targetIds.([]interface{}) + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange("target_ids") { + request.TargetIds = tmp + } + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "data_safe") response, err := s.Client.UnsetSecurityAssessmentBaseline(context.Background(), request) diff --git a/internal/service/data_safe/data_safe_unset_user_assessment_baseline_resource.go b/internal/service/data_safe/data_safe_unset_user_assessment_baseline_resource.go index db28e3ba902..748b83e265b 100644 --- a/internal/service/data_safe/data_safe_unset_user_assessment_baseline_resource.go +++ b/internal/service/data_safe/data_safe_unset_user_assessment_baseline_resource.go @@ -37,6 +37,15 @@ func DataSafeUnsetUserAssessmentBaselineResource() *schema.Resource { }, // Optional + "target_ids": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, // Computed }, @@ -93,6 +102,19 @@ func (s *DataSafeUnsetUserAssessmentBaselineResourceCrud) Get() error { func (s *DataSafeUnsetUserAssessmentBaselineResourceCrud) Create() error { request := oci_data_safe.UnsetUserAssessmentBaselineRequest{} + if targetIds, ok := s.D.GetOkExists("target_ids"); ok { + interfaces := targetIds.([]interface{}) + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange("target_ids") { + request.TargetIds = tmp + } + } + if userAssessmentId, ok := s.D.GetOkExists("user_assessment_id"); ok { tmp := userAssessmentId.(string) request.UserAssessmentId = &tmp diff --git a/internal/service/data_safe/data_safe_user_assessment_data_source.go b/internal/service/data_safe/data_safe_user_assessment_data_source.go index 69768adc6f6..0d7ccd08986 100644 --- a/internal/service/data_safe/data_safe_user_assessment_data_source.go +++ b/internal/service/data_safe/data_safe_user_assessment_data_source.go @@ -98,6 +98,10 @@ func (s *DataSafeUserAssessmentDataSourceCrud) SetData() error { } s.D.Set("ignored_targets", ignoredTargets) + if s.Res.IsAssessmentScheduled != nil { + s.D.Set("is_assessment_scheduled", *s.Res.IsAssessmentScheduled) + } + if s.Res.IsBaseline != nil { s.D.Set("is_baseline", *s.Res.IsBaseline) } diff --git a/internal/service/data_safe/data_safe_user_assessment_resource.go b/internal/service/data_safe/data_safe_user_assessment_resource.go index cca748e3252..af78e1f9958 100644 --- a/internal/service/data_safe/data_safe_user_assessment_resource.go +++ b/internal/service/data_safe/data_safe_user_assessment_resource.go @@ -70,6 +70,11 @@ func DataSafeUserAssessmentResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "is_assessment_scheduled": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "schedule": { Type: schema.TypeString, Optional: true, @@ -266,6 +271,11 @@ func (s *DataSafeUserAssessmentResourceCrud) Create() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isAssessmentScheduled, ok := s.D.GetOkExists("is_assessment_scheduled"); ok { + tmp := isAssessmentScheduled.(bool) + request.IsAssessmentScheduled = &tmp + } + if schedule, ok := s.D.GetOkExists("schedule"); ok { tmp := schedule.(string) request.Schedule = &tmp @@ -456,6 +466,11 @@ func (s *DataSafeUserAssessmentResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isAssessmentScheduled, ok := s.D.GetOkExists("is_assessment_scheduled"); ok { + tmp := isAssessmentScheduled.(bool) + request.IsAssessmentScheduled = &tmp + } + if schedule, ok := s.D.GetOkExists("schedule"); ok { tmp := schedule.(string) request.Schedule = &tmp @@ -526,6 +541,10 @@ func (s *DataSafeUserAssessmentResourceCrud) SetData() error { } s.D.Set("ignored_targets", ignoredTargets) + if s.Res.IsAssessmentScheduled != nil { + s.D.Set("is_assessment_scheduled", *s.Res.IsAssessmentScheduled) + } + if s.Res.IsBaseline != nil { s.D.Set("is_baseline", *s.Res.IsBaseline) } diff --git a/internal/service/data_safe/data_safe_user_assessments_data_source.go b/internal/service/data_safe/data_safe_user_assessments_data_source.go index 55ad4a05799..8fb8c25bbf5 100644 --- a/internal/service/data_safe/data_safe_user_assessments_data_source.go +++ b/internal/service/data_safe/data_safe_user_assessments_data_source.go @@ -279,6 +279,10 @@ func (s *DataSafeUserAssessmentsDataSourceCrud) SetData() error { } userAssessment["ignored_targets"] = ignoredTargets + if r.IsAssessmentScheduled != nil { + userAssessment["is_assessment_scheduled"] = *r.IsAssessmentScheduled + } + if r.IsBaseline != nil { userAssessment["is_baseline"] = *r.IsBaseline } diff --git a/internal/service/data_safe/register_datasource.go b/internal/service/data_safe/register_datasource.go index 7d3dd36ac1e..b7f5e18c05a 100644 --- a/internal/service/data_safe/register_datasource.go +++ b/internal/service/data_safe/register_datasource.go @@ -95,6 +95,7 @@ func RegisterDatasource() { tfresource.RegisterDatasource("oci_data_safe_sensitive_data_model", DataSafeSensitiveDataModelDataSource()) tfresource.RegisterDatasource("oci_data_safe_sensitive_data_model_sensitive_objects", DataSafeSensitiveDataModelSensitiveObjectsDataSource()) tfresource.RegisterDatasource("oci_data_safe_sensitive_data_model_sensitive_schemas", DataSafeSensitiveDataModelSensitiveSchemasDataSource()) + tfresource.RegisterDatasource("oci_data_safe_sensitive_data_model_sensitive_types", DataSafeSensitiveDataModelSensitiveTypesDataSource()) tfresource.RegisterDatasource("oci_data_safe_sensitive_data_models", DataSafeSensitiveDataModelsDataSource()) tfresource.RegisterDatasource("oci_data_safe_sensitive_data_models_sensitive_column", DataSafeSensitiveDataModelsSensitiveColumnDataSource()) tfresource.RegisterDatasource("oci_data_safe_sensitive_data_models_sensitive_columns", DataSafeSensitiveDataModelsSensitiveColumnsDataSource()) diff --git a/internal/service/database/database_autonomous_database_data_source.go b/internal/service/database/database_autonomous_database_data_source.go index 5eedaea342c..74f1e8f7236 100644 --- a/internal/service/database/database_autonomous_database_data_source.go +++ b/internal/service/database/database_autonomous_database_data_source.go @@ -111,6 +111,10 @@ func (s *DatabaseAutonomousDatabaseDataSourceCrud) SetData() error { s.D.Set("backup_retention_period_in_days", *s.Res.BackupRetentionPeriodInDays) } + if s.Res.ByolComputeCountLimit != nil { + s.D.Set("byol_compute_count_limit", *s.Res.ByolComputeCountLimit) + } + if s.Res.CharacterSet != nil { s.D.Set("character_set", *s.Res.CharacterSet) } @@ -417,6 +421,10 @@ func (s *DatabaseAutonomousDatabaseDataSourceCrud) SetData() error { s.D.Set("subnet_id", *s.Res.SubnetId) } + if s.Res.SubscriptionId != nil { + s.D.Set("subscription_id", *s.Res.SubscriptionId) + } + s.D.Set("supported_regions_to_clone_to", s.Res.SupportedRegionsToCloneTo) if s.Res.SystemTags != nil { diff --git a/internal/service/database/database_autonomous_database_resource.go b/internal/service/database/database_autonomous_database_resource.go index b2e3a1d2bd5..56975f44233 100644 --- a/internal/service/database/database_autonomous_database_resource.go +++ b/internal/service/database/database_autonomous_database_resource.go @@ -104,6 +104,11 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { Optional: true, Computed: true, }, + "byol_compute_count_limit": { + Type: schema.TypeFloat, + Optional: true, + Computed: true, + }, "character_set": { Type: schema.TypeString, Optional: true, @@ -494,6 +499,11 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { Optional: true, Computed: true, }, + "subscription_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "time_of_auto_refresh_start": { Type: schema.TypeString, Optional: true, @@ -1517,6 +1527,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error { } } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok && s.D.HasChange("subscription_id") { + oldRaw, newRaw := s.D.GetChange("subscription_id") + if newRaw != "" && oldRaw != "" { + err := s.updateSubscription(subscriptionId.(string)) + if err != nil { + return err + } + } + } + if dataSafeStatus, ok := s.D.GetOkExists("data_safe_status"); ok && s.D.HasChange("data_safe_status") { oldRaw, newRaw := s.D.GetChange("data_safe_status") if newRaw != "" && oldRaw != "" { @@ -1606,6 +1626,11 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error { tmp := s.D.Id() request.AutonomousDatabaseId = &tmp + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok && s.D.HasChange("byol_compute_count_limit") { + tmp := float32(byolComputeCountLimit.(float64)) + request.ByolComputeCountLimit = &tmp + } + if computeCount, ok := s.D.GetOkExists("compute_count"); ok && s.D.HasChange("compute_count") { tmp := float32(computeCount.(float64)) request.ComputeCount = &tmp @@ -2186,6 +2211,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) SetData() error { s.D.Set("license_model", s.Res.LicenseModel) + if s.Res.ByolComputeCountLimit != nil { + s.D.Set("byol_compute_count_limit", s.Res.ByolComputeCountLimit) + } + if s.Res.LifecycleDetails != nil { s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) } @@ -2316,6 +2345,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) SetData() error { s.D.Set("subnet_id", *s.Res.SubnetId) } + if s.Res.SubscriptionId != nil { + s.D.Set("subscription_id", *s.Res.SubscriptionId) + } + s.D.Set("supported_regions_to_clone_to", s.Res.SupportedRegionsToCloneTo) if s.Res.SystemTags != nil { @@ -2830,6 +2863,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := backupRetentionPeriodInDays.(int) details.BackupRetentionPeriodInDays = &tmp } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if characterSet, ok := s.D.GetOkExists("character_set"); ok { tmp := characterSet.(string) details.CharacterSet = &tmp @@ -3052,6 +3089,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if vaultId, ok := s.D.GetOkExists("vault_id"); ok { tmp := vaultId.(string) details.VaultId = &tmp @@ -3109,6 +3150,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := backupRetentionPeriodInDays.(int) details.BackupRetentionPeriodInDays = &tmp } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if characterSet, ok := s.D.GetOkExists("character_set"); ok { tmp := characterSet.(string) details.CharacterSet = &tmp @@ -3329,6 +3374,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if vaultId, ok := s.D.GetOkExists("vault_id"); ok { tmp := vaultId.(string) details.VaultId = &tmp @@ -3383,6 +3432,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := backupRetentionPeriodInDays.(int) details.BackupRetentionPeriodInDays = &tmp } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if characterSet, ok := s.D.GetOkExists("character_set"); ok { tmp := characterSet.(string) details.CharacterSet = &tmp @@ -3606,6 +3659,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if timeOfAutoRefreshStart, ok := s.D.GetOkExists("time_of_auto_refresh_start"); ok { tmp, err := time.Parse(time.RFC3339, timeOfAutoRefreshStart.(string)) if err != nil { @@ -3656,6 +3713,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := backupRetentionPeriodInDays.(int) details.BackupRetentionPeriodInDays = &tmp } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { tmp := compartmentId.(string) details.CompartmentId = &tmp @@ -3864,6 +3925,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if vaultId, ok := s.D.GetOkExists("vault_id"); ok { tmp := vaultId.(string) details.VaultId = &tmp @@ -3910,6 +3975,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea if autonomousMaintenanceScheduleType, ok := s.D.GetOkExists("autonomous_maintenance_schedule_type"); ok { details.AutonomousMaintenanceScheduleType = oci_database.CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum(autonomousMaintenanceScheduleType.(string)) } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if characterSet, ok := s.D.GetOkExists("character_set"); ok { tmp := characterSet.(string) details.CharacterSet = &tmp @@ -4106,6 +4175,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if vaultId, ok := s.D.GetOkExists("vault_id"); ok { tmp := vaultId.(string) details.VaultId = &tmp @@ -4152,6 +4225,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := backupRetentionPeriodInDays.(int) details.BackupRetentionPeriodInDays = &tmp } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if characterSet, ok := s.D.GetOkExists("character_set"); ok { tmp := characterSet.(string) details.CharacterSet = &tmp @@ -4348,6 +4425,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if vaultId, ok := s.D.GetOkExists("vault_id"); ok { tmp := vaultId.(string) details.VaultId = &tmp @@ -4394,6 +4475,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := backupRetentionPeriodInDays.(int) details.BackupRetentionPeriodInDays = &tmp } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if characterSet, ok := s.D.GetOkExists("character_set"); ok { tmp := characterSet.(string) details.CharacterSet = &tmp @@ -4618,6 +4703,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if vaultId, ok := s.D.GetOkExists("vault_id"); ok { tmp := vaultId.(string) details.VaultId = &tmp @@ -4655,6 +4744,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := backupRetentionPeriodInDays.(int) details.BackupRetentionPeriodInDays = &tmp } + if byolComputeCountLimit, ok := s.D.GetOkExists("byol_compute_count_limit"); ok { + tmp := float32(byolComputeCountLimit.(float64)) + details.ByolComputeCountLimit = &tmp + } if characterSet, ok := s.D.GetOkExists("character_set"); ok { tmp := characterSet.(string) details.CharacterSet = &tmp @@ -4878,6 +4971,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := subnetId.(string) details.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + details.SubscriptionId = &tmp + } if vaultId, ok := s.D.GetOkExists("vault_id"); ok { tmp := vaultId.(string) details.VaultId = &tmp @@ -4924,7 +5021,24 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) updateCompartment(compartment i return nil } +func (s *DatabaseAutonomousDatabaseResourceCrud) updateSubscription(subscriptionId string) error { + changeSubscriptionRequest := oci_database.ChangeAutonomousDatabaseSubscriptionRequest{} + + idTmp := s.D.Id() + changeSubscriptionRequest.AutonomousDatabaseId = &idTmp + subscriptionTmp := subscriptionId + changeSubscriptionRequest.SubscriptionId = &subscriptionTmp + + changeSubscriptionRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") + + _, err := s.Client.ChangeAutonomousDatabaseSubscription(context.Background(), changeSubscriptionRequest) + if err != nil { + return err + } + + return nil +} func (s *DatabaseAutonomousDatabaseResourceCrud) updateDataSafeStatus(autonomousDatabaseId string, dataSafeStatus oci_database.AutonomousDatabaseDataSafeStatusEnum) error { switch dataSafeStatus { case oci_database.AutonomousDatabaseDataSafeStatusRegistered: diff --git a/internal/service/database/database_autonomous_databases_clones_data_source.go b/internal/service/database/database_autonomous_databases_clones_data_source.go index cda3ddf8712..dff435fcee3 100644 --- a/internal/service/database/database_autonomous_databases_clones_data_source.go +++ b/internal/service/database/database_autonomous_databases_clones_data_source.go @@ -130,6 +130,10 @@ func DatabaseAutonomousDatabasesClonesDataSource() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "byol_compute_count_limit": { + Type: schema.TypeFloat, + Computed: true, + }, "character_set": { Type: schema.TypeString, Computed: true, @@ -847,6 +851,10 @@ func DatabaseAutonomousDatabasesClonesDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "subscription_id": { + Type: schema.TypeString, + Computed: true, + }, "supported_regions_to_clone_to": { Type: schema.TypeList, Computed: true, @@ -1077,6 +1085,10 @@ func (s *DatabaseAutonomousDatabasesClonesDataSourceCrud) SetData() error { autonomousDatabasesClone["backup_retention_period_in_days"] = *r.BackupRetentionPeriodInDays } + if r.ByolComputeCountLimit != nil { + autonomousDatabasesClone["byol_compute_count_limit"] = *r.ByolComputeCountLimit + } + if r.CharacterSet != nil { autonomousDatabasesClone["character_set"] = *r.CharacterSet } @@ -1371,6 +1383,10 @@ func (s *DatabaseAutonomousDatabasesClonesDataSourceCrud) SetData() error { autonomousDatabasesClone["subnet_id"] = *r.SubnetId } + if r.SubscriptionId != nil { + autonomousDatabasesClone["subscription_id"] = *r.SubscriptionId + } + autonomousDatabasesClone["supported_regions_to_clone_to"] = r.SupportedRegionsToCloneTo if r.SystemTags != nil { diff --git a/internal/service/database/database_autonomous_databases_data_source.go b/internal/service/database/database_autonomous_databases_data_source.go index d7245ac8e21..89dcc4611ec 100644 --- a/internal/service/database/database_autonomous_databases_data_source.go +++ b/internal/service/database/database_autonomous_databases_data_source.go @@ -234,6 +234,10 @@ func (s *DatabaseAutonomousDatabasesDataSourceCrud) SetData() error { autonomousDatabase["backup_retention_period_in_days"] = *r.BackupRetentionPeriodInDays } + if r.ByolComputeCountLimit != nil { + autonomousDatabase["byol_compute_count_limit"] = *r.ByolComputeCountLimit + } + if r.CharacterSet != nil { autonomousDatabase["character_set"] = *r.CharacterSet } @@ -532,6 +536,10 @@ func (s *DatabaseAutonomousDatabasesDataSourceCrud) SetData() error { autonomousDatabase["subnet_id"] = *r.SubnetId } + if r.SubscriptionId != nil { + autonomousDatabase["subscription_id"] = *r.SubscriptionId + } + autonomousDatabase["supported_regions_to_clone_to"] = r.SupportedRegionsToCloneTo if r.SystemTags != nil { diff --git a/internal/service/database/database_cloud_exadata_infrastructure_data_source.go b/internal/service/database/database_cloud_exadata_infrastructure_data_source.go index 38eb78cd2d8..81a6613cd58 100644 --- a/internal/service/database/database_cloud_exadata_infrastructure_data_source.go +++ b/internal/service/database/database_cloud_exadata_infrastructure_data_source.go @@ -192,6 +192,10 @@ func (s *DatabaseCloudExadataInfrastructureDataSourceCrud) SetData() error { s.D.Set("storage_server_version", *s.Res.StorageServerVersion) } + if s.Res.SubscriptionId != nil { + s.D.Set("subscription_id", *s.Res.SubscriptionId) + } + if s.Res.SystemTags != nil { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } diff --git a/internal/service/database/database_cloud_exadata_infrastructure_resource.go b/internal/service/database/database_cloud_exadata_infrastructure_resource.go index b1aecd3e5a2..7887bb95739 100644 --- a/internal/service/database/database_cloud_exadata_infrastructure_resource.go +++ b/internal/service/database/database_cloud_exadata_infrastructure_resource.go @@ -212,6 +212,12 @@ func DatabaseCloudExadataInfrastructureResource() *schema.Resource { Optional: true, Computed: true, }, + "subscription_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, // Computed "activated_storage_count": { @@ -498,6 +504,11 @@ func (s *DatabaseCloudExadataInfrastructureResourceCrud) Create() error { request.StorageCount = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + request.SubscriptionId = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") response, err := s.Client.CreateCloudExadataInfrastructure(context.Background(), request) @@ -790,6 +801,10 @@ func (s *DatabaseCloudExadataInfrastructureResourceCrud) SetData() error { s.D.Set("storage_server_version", *s.Res.StorageServerVersion) } + if s.Res.SubscriptionId != nil { + s.D.Set("subscription_id", *s.Res.SubscriptionId) + } + if s.Res.SystemTags != nil { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } diff --git a/internal/service/database/database_cloud_exadata_infrastructures_data_source.go b/internal/service/database/database_cloud_exadata_infrastructures_data_source.go index ac8bef6f497..07c87bfe1b8 100644 --- a/internal/service/database/database_cloud_exadata_infrastructures_data_source.go +++ b/internal/service/database/database_cloud_exadata_infrastructures_data_source.go @@ -245,6 +245,10 @@ func (s *DatabaseCloudExadataInfrastructuresDataSourceCrud) SetData() error { cloudExadataInfrastructure["storage_server_version"] = *r.StorageServerVersion } + if r.SubscriptionId != nil { + cloudExadataInfrastructure["subscription_id"] = *r.SubscriptionId + } + if r.SystemTags != nil { cloudExadataInfrastructure["system_tags"] = tfresource.SystemTagsToMap(r.SystemTags) } diff --git a/internal/service/database/database_cloud_vm_cluster_data_source.go b/internal/service/database/database_cloud_vm_cluster_data_source.go index 5911200ca7f..150e5ed2e55 100644 --- a/internal/service/database/database_cloud_vm_cluster_data_source.go +++ b/internal/service/database/database_cloud_vm_cluster_data_source.go @@ -219,6 +219,10 @@ func (s *DatabaseCloudVmClusterDataSourceCrud) SetData() error { s.D.Set("subnet_id", *s.Res.SubnetId) } + if s.Res.SubscriptionId != nil { + s.D.Set("subscription_id", *s.Res.SubscriptionId) + } + if s.Res.SystemTags != nil { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } diff --git a/internal/service/database/database_cloud_vm_cluster_resource.go b/internal/service/database/database_cloud_vm_cluster_resource.go index cc667caa076..37efa03c968 100644 --- a/internal/service/database/database_cloud_vm_cluster_resource.go +++ b/internal/service/database/database_cloud_vm_cluster_resource.go @@ -256,6 +256,12 @@ func DatabaseCloudVmClusterResource() *schema.Resource { Computed: true, ForceNew: true, }, + "subscription_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, "system_version": { Type: schema.TypeString, Optional: true, @@ -692,6 +698,11 @@ func (s *DatabaseCloudVmClusterResourceCrud) Create() error { request.SubnetId = &tmp } + if subscriptionId, ok := s.D.GetOkExists("subscription_id"); ok { + tmp := subscriptionId.(string) + request.SubscriptionId = &tmp + } + if systemVersion, ok := s.D.GetOkExists("system_version"); ok { tmp := systemVersion.(string) request.SystemVersion = &tmp @@ -1099,6 +1110,10 @@ func (s *DatabaseCloudVmClusterResourceCrud) SetData() error { s.D.Set("subnet_id", *s.Res.SubnetId) } + if s.Res.SubscriptionId != nil { + s.D.Set("subscription_id", *s.Res.SubscriptionId) + } + if s.Res.SystemTags != nil { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } diff --git a/internal/service/database/database_cloud_vm_clusters_data_source.go b/internal/service/database/database_cloud_vm_clusters_data_source.go index ab77497f6ac..8cb3f2a747e 100644 --- a/internal/service/database/database_cloud_vm_clusters_data_source.go +++ b/internal/service/database/database_cloud_vm_clusters_data_source.go @@ -266,6 +266,10 @@ func (s *DatabaseCloudVmClustersDataSourceCrud) SetData() error { cloudVmCluster["subnet_id"] = *r.SubnetId } + if r.SubscriptionId != nil { + cloudVmCluster["subscription_id"] = *r.SubscriptionId + } + if r.SystemTags != nil { cloudVmCluster["system_tags"] = tfresource.SystemTagsToMap(r.SystemTags) } diff --git a/internal/service/database/database_database_resource.go b/internal/service/database/database_database_resource.go index f2fee135ffb..4da8fc8f964 100644 --- a/internal/service/database/database_database_resource.go +++ b/internal/service/database/database_database_resource.go @@ -528,14 +528,7 @@ func createDatabaseDatabase(d *schema.ResourceData, m interface{}) error { sync.Client = m.(*client.OracleClients).DatabaseClient() sync.WorkRequestClient = m.(*client.OracleClients).WorkRequestClient - if err := tfresource.CreateResource(d, sync); err != nil { - return err - } - err := sync.ChangeKeyStoreType() - if err != nil { - return err - } - return nil + return tfresource.CreateResource(d, sync) } func readDatabaseDatabase(d *schema.ResourceData, m interface{}) error { @@ -954,6 +947,11 @@ func (s *DatabaseDatabaseResourceCrud) mapToCreateDatabaseDetails(fieldKeyFormat result.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if keyStoreId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "key_store_id")); ok { + tmp := keyStoreId.(string) + result.KeyStoreId = &tmp + } + if kmsKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "kms_key_id")); ok { tmp := kmsKeyId.(string) result.KmsKeyId = &tmp @@ -1210,9 +1208,20 @@ func (s *DatabaseDatabaseResourceCrud) Update() error { return err } - errExaCC := s.ChangeKeyStoreType() - if errExaCC != nil { - return errExaCC + if s.D.HasChange("key_store_id") { + oldVal, confVal := s.D.GetChange("key_store_id") + if oldVal.(string) != "" && confVal.(string) != "" { + return fmt.Errorf("[ERROR] no support for oldVal = '%s', confVal = '%s' now", oldVal.(string), confVal.(string)) + } + if oldVal.(string) == "" { + errExaCC := s.ChangeKeyStoreType() + if errExaCC != nil { + return errExaCC + } + } + if confVal.(string) == "" && oldVal.(string) != "" { + return fmt.Errorf("[ERROR] no support for migrate to Oracle now") + } } if database, ok := s.D.GetOkExists("database"); ok { diff --git a/internal/service/database/database_db_home_resource.go b/internal/service/database/database_db_home_resource.go index ee752af46ef..1e7e9016ad1 100644 --- a/internal/service/database/database_db_home_resource.go +++ b/internal/service/database/database_db_home_resource.go @@ -199,6 +199,11 @@ func DatabaseDbHomeResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "key_store_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "kms_key_id": { Type: schema.TypeString, Optional: true, @@ -611,6 +616,23 @@ func (s *DatabaseDbHomeResourceCrud) Update() error { } } } + + if s.D.HasChange("key_store_id") { + oldVal, confVal := s.D.GetChange("key_store_id") + if oldVal.(string) != "" && confVal.(string) != "" { + return fmt.Errorf("[ERROR] no support for oldVal = '%s', confVal = '%s' now", oldVal.(string), confVal.(string)) + } + if oldVal.(string) == "" { + errExaCC := s.ChangeKeyStoreType() + if errExaCC != nil { + return errExaCC + } + } + if confVal.(string) == "" && oldVal.(string) != "" { + return fmt.Errorf("[ERROR] no support for migrate to Oracle now") + } + } + response, err := s.Client.UpdateDbHome(context.Background(), updateDbHomeRequest) if err != nil { return err @@ -768,6 +790,43 @@ func (s *DatabaseDbHomeResourceCrud) getDatabaseId(fieldKeyFormat string) (strin } func (s *DatabaseDbHomeResourceCrud) Delete() error { + oldRaw, _ := s.D.GetChange("database") + oldList := oldRaw.([]interface{}) + + if len(oldList) > 0 { + request := oci_database.DeleteDatabaseRequest{} + + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "database", 0) + dbId, err := s.getDatabaseId(fieldKeyFormat) + if err != nil { + return err + } + + request.DatabaseId = &dbId + + if performFinalBackup, ok := s.D.GetOkExists("perform_final_backup"); ok { + tmp := performFinalBackup.(bool) + request.PerformFinalBackup = &tmp + } + + deleteDatabaseRetryDurationFn := getdatabaseRetryDurationFunction(s.D.Timeout(schema.TimeoutDelete)) + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database", deleteDatabaseRetryDurationFn) + + response, err := s.Client.DeleteDatabase(context.Background(), request) + + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + if workId != nil { + _, err = tfresource.WaitForWorkRequestWithErrorHandling(s.WorkRequestClient, workId, "database", oci_work_requests.WorkRequestResourceActionTypeDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries) + if err != nil { + return err + } + } + } + request := oci_database.DeleteDbHomeRequest{} tmp := s.D.Id() @@ -863,6 +922,34 @@ func (s *DatabaseDbHomeResourceCrud) SetData() error { return nil } +func (s *DatabaseDbHomeResourceCrud) ChangeKeyStoreType() error { + if _, ok := s.D.GetOkExists("key_store_id"); ok && s.D.HasChange("key_store_id") { + request := oci_database.ChangeKeyStoreTypeRequest{} + + idTmp := s.D.Id() + request.DatabaseId = &idTmp + + if keyStoreId, ok := s.D.GetOkExists("key_store_id"); ok { + tmp := keyStoreId.(string) + request.KeyStoreId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") + + _, err := s.Client.ChangeKeyStoreType(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + return nil + } + return nil +} + func (s *DatabaseDbHomeResourceCrud) mapToBackupDestinationDetails(fieldKeyFormat string) (oci_database.BackupDestinationDetails, error) { result := oci_database.BackupDestinationDetails{} @@ -964,6 +1051,11 @@ func (s *DatabaseDbHomeResourceCrud) mapToCreateDatabaseDetails(fieldKeyFormat s result.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if keyStoreId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "key_store_id")); ok { + tmp := keyStoreId.(string) + result.KeyStoreId = &tmp + } + if kmsKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "kms_key_id")); ok { tmp := kmsKeyId.(string) result.KmsKeyId = &tmp @@ -1536,6 +1628,10 @@ func (s *DatabaseDbHomeResourceCrud) DatabaseToMap(obj *oci_database.Database) m result["admin_password"] = adminPassword.(string) } + if obj.KeyStoreId != nil { + result["key_store_id"] = string(*obj.KeyStoreId) + } + if kmsKeyId, ok := s.D.GetOkExists("db_home.0.database.0.kms_key_id"); ok && kmsKeyId != nil { result["kms_key_id"] = kmsKeyId.(string) } diff --git a/internal/service/database/database_key_store_resource.go b/internal/service/database/database_key_store_resource.go index a5a7f10b027..cbe0fee4c4f 100644 --- a/internal/service/database/database_key_store_resource.go +++ b/internal/service/database/database_key_store_resource.go @@ -97,6 +97,10 @@ func DatabaseKeyStoreResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "confirm_details_trigger": { + Type: schema.TypeInt, + Optional: true, + }, // Computed "associated_databases": { @@ -265,6 +269,27 @@ func (s *DatabaseKeyStoreResourceCrud) Get() error { } func (s *DatabaseKeyStoreResourceCrud) Update() error { + if _, ok := s.D.GetOkExists("confirm_details_trigger"); ok { + + request := oci_database.GetKeyStoreRequest{} + tmp := s.D.Id() + request.KeyStoreId = &tmp + + response, err := s.Client.GetKeyStore(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.KeyStore + + if s.Res.LifecycleState == oci_database.KeyStoreLifecycleStateNeedsAttention { + error := s.ConfirmKeyStoreDetailsAreCorrect() + if error != nil { + return error + } + } + } + if compartment, ok := s.D.GetOkExists("compartment_id"); ok && s.D.HasChange("compartment_id") { oldRaw, newRaw := s.D.GetChange("compartment_id") if newRaw != "" && oldRaw != "" { @@ -369,6 +394,26 @@ func (s *DatabaseKeyStoreResourceCrud) SetData() error { return nil } +func (s *DatabaseKeyStoreResourceCrud) ConfirmKeyStoreDetailsAreCorrect() error { + request := oci_database.ConfirmKeyStoreDetailsAreCorrectRequest{} + + idTmp := s.D.Id() + request.KeyStoreId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") + + _, err := s.Client.ConfirmKeyStoreDetailsAreCorrect(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + return nil +} + func KeyStoreAssociatedDatabaseDetailsToMap(obj oci_database.KeyStoreAssociatedDatabaseDetails) map[string]interface{} { result := map[string]interface{}{} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_export.go b/internal/service/globally_distributed_database/globally_distributed_database_export.go new file mode 100644 index 00000000000..4475aad3aaf --- /dev/null +++ b/internal/service/globally_distributed_database/globally_distributed_database_export.go @@ -0,0 +1,47 @@ +package globally_distributed_database + +import ( + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + tf_export "github.com/oracle/terraform-provider-oci/internal/commonexport" +) + +func init() { + tf_export.RegisterCompartmentGraphs("globally_distributed_database", globallyDistributedDatabaseResourceGraph) +} + +// Custom overrides for generating composite IDs within the resource discovery framework + +// Hints for discovering and exporting this resource to configuration and state files +var exportGloballyDistributedDatabaseShardedDatabaseHints = &tf_export.TerraformResourceHints{ + ResourceClass: "oci_globally_distributed_database_sharded_database", + DatasourceClass: "oci_globally_distributed_database_sharded_databases", + DatasourceItemsAttr: "sharded_database_collection", + IsDatasourceCollection: true, + ResourceAbbreviation: "sharded_database", + RequireResourceRefresh: true, + DiscoverableLifecycleStates: []string{ + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateActive), + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateInactive), + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateNeedsAttention), + }, +} + +var exportGloballyDistributedDatabasePrivateEndpointHints = &tf_export.TerraformResourceHints{ + ResourceClass: "oci_globally_distributed_database_private_endpoint", + DatasourceClass: "oci_globally_distributed_database_private_endpoints", + DatasourceItemsAttr: "private_endpoint_collection", + IsDatasourceCollection: true, + ResourceAbbreviation: "private_endpoint", + RequireResourceRefresh: true, + DiscoverableLifecycleStates: []string{ + string(oci_globally_distributed_database.PrivateEndpointLifecycleStateActive), + }, +} + +var globallyDistributedDatabaseResourceGraph = tf_export.TerraformResourceGraph{ + "oci_identity_compartment": { + {TerraformResourceHints: exportGloballyDistributedDatabaseShardedDatabaseHints}, + {TerraformResourceHints: exportGloballyDistributedDatabasePrivateEndpointHints}, + }, +} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_data_source.go b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_data_source.go new file mode 100644 index 00000000000..144f71ed5de --- /dev/null +++ b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_data_source.go @@ -0,0 +1,122 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package globally_distributed_database + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GloballyDistributedDatabasePrivateEndpointDataSource() *schema.Resource { + fieldMap := make(map[string]*schema.Schema) + fieldMap["private_endpoint_id"] = &schema.Schema{ + Type: schema.TypeString, + Required: true, + } + return tfresource.GetSingularDataSourceItemSchema(GloballyDistributedDatabasePrivateEndpointResource(), fieldMap, readSingularGloballyDistributedDatabasePrivateEndpoint) +} + +func readSingularGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabasePrivateEndpointDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.ReadResource(sync) +} + +type GloballyDistributedDatabasePrivateEndpointDataSourceCrud struct { + D *schema.ResourceData + Client *oci_globally_distributed_database.ShardedDatabaseServiceClient + Res *oci_globally_distributed_database.GetPrivateEndpointResponse +} + +func (s *GloballyDistributedDatabasePrivateEndpointDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GloballyDistributedDatabasePrivateEndpointDataSourceCrud) Get() error { + request := oci_globally_distributed_database.GetPrivateEndpointRequest{} + + if privateEndpointId, ok := s.D.GetOkExists("private_endpoint_id"); ok { + tmp := privateEndpointId.(string) + request.PrivateEndpointId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "globally_distributed_database") + + response, err := s.Client.GetPrivateEndpoint(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + return nil +} + +func (s *GloballyDistributedDatabasePrivateEndpointDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(*s.Res.Id) + + if s.Res.CompartmentId != nil { + s.D.Set("compartment_id", *s.Res.CompartmentId) + } + + if s.Res.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(s.Res.DefinedTags)) + } + + if s.Res.Description != nil { + s.D.Set("description", *s.Res.Description) + } + + if s.Res.DisplayName != nil { + s.D.Set("display_name", *s.Res.DisplayName) + } + + s.D.Set("freeform_tags", s.Res.FreeformTags) + + if s.Res.LifecycleStateDetails != nil { + s.D.Set("lifecycle_state_details", *s.Res.LifecycleStateDetails) + } + + s.D.Set("nsg_ids", s.Res.NsgIds) + + if s.Res.PrivateIp != nil { + s.D.Set("private_ip", *s.Res.PrivateIp) + } + + s.D.Set("sharded_databases", s.Res.ShardedDatabases) + + s.D.Set("state", s.Res.LifecycleState) + + if s.Res.SubnetId != nil { + s.D.Set("subnet_id", *s.Res.SubnetId) + } + + if s.Res.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) + } + + if s.Res.TimeCreated != nil { + s.D.Set("time_created", s.Res.TimeCreated.String()) + } + + if s.Res.TimeUpdated != nil { + s.D.Set("time_updated", s.Res.TimeUpdated.String()) + } + + if s.Res.VcnId != nil { + s.D.Set("vcn_id", *s.Res.VcnId) + } + + return nil +} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_resource.go b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_resource.go new file mode 100644 index 00000000000..fada9a84f55 --- /dev/null +++ b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_resource.go @@ -0,0 +1,610 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package globally_distributed_database + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + + oci_common "github.com/oracle/oci-go-sdk/v65/common" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GloballyDistributedDatabasePrivateEndpointResource() *schema.Resource { + return &schema.Resource{ + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: tfresource.GetTimeoutDuration("1h"), + Update: tfresource.GetTimeoutDuration("1h"), + Delete: tfresource.GetTimeoutDuration("1h"), + }, + Create: createGloballyDistributedDatabasePrivateEndpoint, + Read: readGloballyDistributedDatabasePrivateEndpoint, + Update: updateGloballyDistributedDatabasePrivateEndpoint, + Delete: deleteGloballyDistributedDatabasePrivateEndpoint, + Schema: map[string]*schema.Schema{ + // Required + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Required: true, + }, + "subnet_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "defined_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + DiffSuppressFunc: tfresource.DefinedTagsDiffSuppressFunction, + Elem: schema.TypeString, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "freeform_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + Elem: schema.TypeString, + }, + "nsg_ids": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Set: tfresource.LiteralTypeHashCodeForSets, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + // Computed + "lifecycle_state_details": { + Type: schema.TypeString, + Computed: true, + }, + "private_ip": { + Type: schema.TypeString, + Computed: true, + }, + "sharded_databases": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "system_tags": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + "vcn_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func createGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabasePrivateEndpointResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.CreateResource(d, sync) +} + +func readGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabasePrivateEndpointResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.ReadResource(sync) +} + +func updateGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabasePrivateEndpointResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.UpdateResource(d, sync) +} + +func deleteGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabasePrivateEndpointResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + sync.DisableNotFoundRetries = true + + return tfresource.DeleteResource(d, sync) +} + +type GloballyDistributedDatabasePrivateEndpointResourceCrud struct { + tfresource.BaseCrud + Client *oci_globally_distributed_database.ShardedDatabaseServiceClient + Res *oci_globally_distributed_database.PrivateEndpoint + DisableNotFoundRetries bool +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) ID() string { + return *s.Res.Id +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) CreatedPending() []string { + return []string{ + string(oci_globally_distributed_database.PrivateEndpointLifecycleStateCreating), + } +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) CreatedTarget() []string { + return []string{ + string(oci_globally_distributed_database.PrivateEndpointLifecycleStateActive), + } +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) DeletedPending() []string { + return []string{ + string(oci_globally_distributed_database.PrivateEndpointLifecycleStateDeleting), + } +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) DeletedTarget() []string { + return []string{ + string(oci_globally_distributed_database.PrivateEndpointLifecycleStateDeleted), + } +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) Create() error { + request := oci_globally_distributed_database.CreatePrivateEndpointRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { + convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) + if err != nil { + return err + } + request.DefinedTags = convertedDefinedTags + } + + if description, ok := s.D.GetOkExists("description"); ok { + tmp := description.(string) + request.Description = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + + if nsgIds, ok := s.D.GetOkExists("nsg_ids"); ok { + set := nsgIds.(*schema.Set) + interfaces := set.List() + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange("nsg_ids") { + request.NsgIds = tmp + } + } + + if subnetId, ok := s.D.GetOkExists("subnet_id"); ok { + tmp := subnetId.(string) + request.SubnetId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.CreatePrivateEndpoint(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + var identifier *string + identifier = response.Id + if identifier != nil { + s.D.SetId(*identifier) + } + return s.getPrivateEndpointFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database"), oci_globally_distributed_database.ActionTypeCreated, s.D.Timeout(schema.TimeoutCreate)) +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) getPrivateEndpointFromWorkRequest(workId *string, retryPolicy *oci_common.RetryPolicy, + actionTypeEnum oci_globally_distributed_database.ActionTypeEnum, timeout time.Duration) error { + + // Wait until it finishes + privateEndpointId, err := privateEndpointWaitForWorkRequest(workId, "privateendpoint", + actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) + + if err != nil { + return err + } + s.D.SetId(*privateEndpointId) + + return s.Get() +} + +func privateEndpointWorkRequestShouldRetryFunc(timeout time.Duration) func(response oci_common.OCIOperationResponse) bool { + startTime := time.Now() + stopTime := startTime.Add(timeout) + return func(response oci_common.OCIOperationResponse) bool { + + // Stop after timeout has elapsed + if time.Now().After(stopTime) { + return false + } + + // Make sure we stop on default rules + if tfresource.ShouldRetry(response, false, "globally_distributed_database", startTime) { + return true + } + + // Only stop if the time Finished is set + if workRequestResponse, ok := response.Response.(oci_globally_distributed_database.GetWorkRequestResponse); ok { + return workRequestResponse.TimeFinished == nil + } + return false + } +} + +func privateEndpointWaitForWorkRequest(wId *string, entityType string, action oci_globally_distributed_database.ActionTypeEnum, + timeout time.Duration, disableFoundRetries bool, client *oci_globally_distributed_database.ShardedDatabaseServiceClient) (*string, error) { + retryPolicy := tfresource.GetRetryPolicy(disableFoundRetries, "globally_distributed_database") + retryPolicy.ShouldRetryOperation = privateEndpointWorkRequestShouldRetryFunc(timeout) + + response := oci_globally_distributed_database.GetWorkRequestResponse{} + stateConf := &resource.StateChangeConf{ + Pending: []string{ + string(oci_globally_distributed_database.OperationStatusInProgress), + string(oci_globally_distributed_database.OperationStatusAccepted), + string(oci_globally_distributed_database.OperationStatusCanceling), + }, + Target: []string{ + string(oci_globally_distributed_database.OperationStatusSucceeded), + string(oci_globally_distributed_database.OperationStatusFailed), + string(oci_globally_distributed_database.OperationStatusCanceled), + }, + Refresh: func() (interface{}, string, error) { + var err error + response, err = client.GetWorkRequest(context.Background(), + oci_globally_distributed_database.GetWorkRequestRequest{ + WorkRequestId: wId, + RequestMetadata: oci_common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + wr := &response.WorkRequest + return wr, string(wr.Status), err + }, + Timeout: timeout, + } + if _, e := stateConf.WaitForState(); e != nil { + return nil, e + } + + var identifier *string + // The work request response contains an array of objects that finished the operation + // Removing check on EntityType + for _, res := range response.Resources { + if res.ActionType == action { + identifier = res.Identifier + break + } + } + + // The workrequest may have failed, check for errors if identifier is not found or work failed or got cancelled + if identifier == nil || response.Status == oci_globally_distributed_database.OperationStatusFailed || response.Status == oci_globally_distributed_database.OperationStatusCanceled { + return nil, getErrorFromGloballyDistributedDatabasePrivateEndpointWorkRequest(client, wId, retryPolicy, entityType, action) + } + + return identifier, nil +} + +func getErrorFromGloballyDistributedDatabasePrivateEndpointWorkRequest(client *oci_globally_distributed_database.ShardedDatabaseServiceClient, workId *string, retryPolicy *oci_common.RetryPolicy, entityType string, action oci_globally_distributed_database.ActionTypeEnum) error { + response, err := client.ListWorkRequestErrors(context.Background(), + oci_globally_distributed_database.ListWorkRequestErrorsRequest{ + WorkRequestId: workId, + RequestMetadata: oci_common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + if err != nil { + return err + } + + allErrs := make([]string, 0) + for _, wrkErr := range response.Items { + allErrs = append(allErrs, *wrkErr.Message) + } + errorMessage := strings.Join(allErrs, "\n") + + workRequestErr := fmt.Errorf("work request did not succeed, workId: %s, entity: %s, action: %s. Message: %s", *workId, entityType, action, errorMessage) + + return workRequestErr +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) Get() error { + request := oci_globally_distributed_database.GetPrivateEndpointRequest{} + + tmp := s.D.Id() + request.PrivateEndpointId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.GetPrivateEndpoint(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.PrivateEndpoint + return nil +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) Update() error { + if compartment, ok := s.D.GetOkExists("compartment_id"); ok && s.D.HasChange("compartment_id") { + oldRaw, newRaw := s.D.GetChange("compartment_id") + if newRaw != "" && oldRaw != "" { + err := s.updateCompartment(compartment) + if err != nil { + return err + } + } + } + request := oci_globally_distributed_database.UpdatePrivateEndpointRequest{} + + if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { + convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) + if err != nil { + return err + } + request.DefinedTags = convertedDefinedTags + } + + if description, ok := s.D.GetOkExists("description"); ok { + tmp := description.(string) + request.Description = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + + if nsgIds, ok := s.D.GetOkExists("nsg_ids"); ok { + set := nsgIds.(*schema.Set) + interfaces := set.List() + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange("nsg_ids") { + request.NsgIds = tmp + } + } + + tmp := s.D.Id() + request.PrivateEndpointId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.UpdatePrivateEndpoint(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.PrivateEndpoint + return nil +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) Delete() error { + request := oci_globally_distributed_database.DeletePrivateEndpointRequest{} + + tmp := s.D.Id() + request.PrivateEndpointId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.DeletePrivateEndpoint(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, delWorkRequestErr := privateEndpointWaitForWorkRequest(workId, "privateendpoint", + oci_globally_distributed_database.ActionTypeDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries, s.Client) + return delWorkRequestErr +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) SetData() error { + if s.Res.CompartmentId != nil { + s.D.Set("compartment_id", *s.Res.CompartmentId) + } + + if s.Res.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(s.Res.DefinedTags)) + } + + if s.Res.Description != nil { + s.D.Set("description", *s.Res.Description) + } + + if s.Res.DisplayName != nil { + s.D.Set("display_name", *s.Res.DisplayName) + } + + s.D.Set("freeform_tags", s.Res.FreeformTags) + + if s.Res.LifecycleStateDetails != nil { + s.D.Set("lifecycle_state_details", *s.Res.LifecycleStateDetails) + } + + nsgIds := []interface{}{} + for _, item := range s.Res.NsgIds { + nsgIds = append(nsgIds, item) + } + s.D.Set("nsg_ids", schema.NewSet(tfresource.LiteralTypeHashCodeForSets, nsgIds)) + + if s.Res.PrivateIp != nil { + s.D.Set("private_ip", *s.Res.PrivateIp) + } + + s.D.Set("sharded_databases", s.Res.ShardedDatabases) + + s.D.Set("state", s.Res.LifecycleState) + + if s.Res.SubnetId != nil { + s.D.Set("subnet_id", *s.Res.SubnetId) + } + + if s.Res.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) + } + + if s.Res.TimeCreated != nil { + s.D.Set("time_created", s.Res.TimeCreated.String()) + } + + if s.Res.TimeUpdated != nil { + s.D.Set("time_updated", s.Res.TimeUpdated.String()) + } + + if s.Res.VcnId != nil { + s.D.Set("vcn_id", *s.Res.VcnId) + } + + return nil +} + +func PrivateEndpointSummaryToMap(obj oci_globally_distributed_database.PrivateEndpointSummary, datasource bool) map[string]interface{} { + result := map[string]interface{}{} + + if obj.CompartmentId != nil { + result["compartment_id"] = string(*obj.CompartmentId) + } + + if obj.DefinedTags != nil { + result["defined_tags"] = tfresource.DefinedTagsToMap(obj.DefinedTags) + } + + if obj.Description != nil { + result["description"] = string(*obj.Description) + } + + if obj.DisplayName != nil { + result["display_name"] = string(*obj.DisplayName) + } + + result["freeform_tags"] = obj.FreeformTags + + if obj.Id != nil { + result["id"] = string(*obj.Id) + } + + if obj.LifecycleStateDetails != nil { + result["lifecycle_state_details"] = string(*obj.LifecycleStateDetails) + } + + nsgIds := []interface{}{} + for _, item := range obj.NsgIds { + nsgIds = append(nsgIds, item) + } + if datasource { + result["nsg_ids"] = nsgIds + } else { + result["nsg_ids"] = schema.NewSet(tfresource.LiteralTypeHashCodeForSets, nsgIds) + } + + result["state"] = string(obj.LifecycleState) + + if obj.SubnetId != nil { + result["subnet_id"] = string(*obj.SubnetId) + } + + if obj.SystemTags != nil { + result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.String() + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.String() + } + + if obj.VcnId != nil { + result["vcn_id"] = string(*obj.VcnId) + } + + return result +} + +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) updateCompartment(compartment interface{}) error { + changeCompartmentRequest := oci_globally_distributed_database.ChangePrivateEndpointCompartmentRequest{} + + compartmentTmp := compartment.(string) + changeCompartmentRequest.CompartmentId = &compartmentTmp + + idTmp := s.D.Id() + changeCompartmentRequest.PrivateEndpointId = &idTmp + + changeCompartmentRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.ChangePrivateEndpointCompartment(context.Background(), changeCompartmentRequest) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getPrivateEndpointFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database"), oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_private_endpoints_data_source.go b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoints_data_source.go new file mode 100644 index 00000000000..8b9745d5f36 --- /dev/null +++ b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoints_data_source.go @@ -0,0 +1,135 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package globally_distributed_database + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GloballyDistributedDatabasePrivateEndpointsDataSource() *schema.Resource { + return &schema.Resource{ + Read: readGloballyDistributedDatabasePrivateEndpoints, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Optional: true, + }, + "state": { + Type: schema.TypeString, + Optional: true, + }, + "private_endpoint_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + + "items": { + Type: schema.TypeList, + Computed: true, + Elem: tfresource.GetDataSourceItemSchema(GloballyDistributedDatabasePrivateEndpointResource()), + }, + }, + }, + }, + }, + } +} + +func readGloballyDistributedDatabasePrivateEndpoints(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabasePrivateEndpointsDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.ReadResource(sync) +} + +type GloballyDistributedDatabasePrivateEndpointsDataSourceCrud struct { + D *schema.ResourceData + Client *oci_globally_distributed_database.ShardedDatabaseServiceClient + Res *oci_globally_distributed_database.ListPrivateEndpointsResponse +} + +func (s *GloballyDistributedDatabasePrivateEndpointsDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GloballyDistributedDatabasePrivateEndpointsDataSourceCrud) Get() error { + request := oci_globally_distributed_database.ListPrivateEndpointsRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if state, ok := s.D.GetOkExists("state"); ok { + request.LifecycleState = oci_globally_distributed_database.PrivateEndpointLifecycleStateEnum(state.(string)) + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "globally_distributed_database") + + response, err := s.Client.ListPrivateEndpoints(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListPrivateEndpoints(context.Background(), request) + if err != nil { + return err + } + + s.Res.Items = append(s.Res.Items, listResponse.Items...) + request.Page = listResponse.OpcNextPage + } + + return nil +} + +func (s *GloballyDistributedDatabasePrivateEndpointsDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("GloballyDistributedDatabasePrivateEndpointsDataSource-", GloballyDistributedDatabasePrivateEndpointsDataSource(), s.D)) + resources := []map[string]interface{}{} + privateEndpoint := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, PrivateEndpointSummaryToMap(item, true)) + } + privateEndpoint["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, GloballyDistributedDatabasePrivateEndpointsDataSource().Schema["private_endpoint_collection"].Elem.(*schema.Resource).Schema) + privateEndpoint["items"] = items + } + + resources = append(resources, privateEndpoint) + if err := s.D.Set("private_endpoint_collection", resources); err != nil { + return err + } + + return nil +} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_data_source.go b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_data_source.go new file mode 100644 index 00000000000..1df2a61b100 --- /dev/null +++ b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_data_source.go @@ -0,0 +1,195 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package globally_distributed_database + +import ( + "context" + "log" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GloballyDistributedDatabaseShardedDatabaseDataSource() *schema.Resource { + fieldMap := make(map[string]*schema.Schema) + fieldMap["metadata"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + } + fieldMap["sharded_database_id"] = &schema.Schema{ + Type: schema.TypeString, + Required: true, + } + return tfresource.GetSingularDataSourceItemSchema(GloballyDistributedDatabaseShardedDatabaseResource(), fieldMap, readSingularGloballyDistributedDatabaseShardedDatabase) +} + +func readSingularGloballyDistributedDatabaseShardedDatabase(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabaseShardedDatabaseDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.ReadResource(sync) +} + +type GloballyDistributedDatabaseShardedDatabaseDataSourceCrud struct { + D *schema.ResourceData + Client *oci_globally_distributed_database.ShardedDatabaseServiceClient + Res *oci_globally_distributed_database.GetShardedDatabaseResponse +} + +func (s *GloballyDistributedDatabaseShardedDatabaseDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GloballyDistributedDatabaseShardedDatabaseDataSourceCrud) Get() error { + request := oci_globally_distributed_database.GetShardedDatabaseRequest{} + + if metadata, ok := s.D.GetOkExists("metadata"); ok { + tmp := metadata.(string) + request.Metadata = &tmp + } + + if shardedDatabaseId, ok := s.D.GetOkExists("sharded_database_id"); ok { + tmp := shardedDatabaseId.(string) + request.ShardedDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "globally_distributed_database") + + response, err := s.Client.GetShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(*s.Res.GetId()) + switch v := (s.Res.ShardedDatabase).(type) { + case oci_globally_distributed_database.DedicatedShardedDatabase: + s.D.Set("db_deployment_type", "DEDICATED") + + catalogDetails := []interface{}{} + for _, item := range v.CatalogDetails { + catalogDetails = append(catalogDetails, DedicatedCatalogDetailsToMap(item)) + } + s.D.Set("catalog_details", catalogDetails) + + if v.CharacterSet != nil { + s.D.Set("character_set", *v.CharacterSet) + } + + if v.Chunks != nil { + s.D.Set("chunks", *v.Chunks) + } + + if v.ClusterCertificateCommonName != nil { + s.D.Set("cluster_certificate_common_name", *v.ClusterCertificateCommonName) + } + + if v.ConnectionStrings != nil { + s.D.Set("connection_strings", []interface{}{ConnectionStringToMap(v.ConnectionStrings)}) + } else { + s.D.Set("connection_strings", nil) + } + + if v.DbVersion != nil { + s.D.Set("db_version", *v.DbVersion) + } + + s.D.Set("db_workload", v.DbWorkload) + + gsms := []interface{}{} + for _, item := range v.Gsms { + gsms = append(gsms, GsmDetailsToMap(item)) + } + s.D.Set("gsms", gsms) + + if v.ListenerPort != nil { + s.D.Set("listener_port", *v.ListenerPort) + } + + if v.ListenerPortTls != nil { + s.D.Set("listener_port_tls", *v.ListenerPortTls) + } + + if v.NcharacterSet != nil { + s.D.Set("ncharacter_set", *v.NcharacterSet) + } + + if v.OnsPortLocal != nil { + s.D.Set("ons_port_local", *v.OnsPortLocal) + } + + if v.OnsPortRemote != nil { + s.D.Set("ons_port_remote", *v.OnsPortRemote) + } + + if v.Prefix != nil { + s.D.Set("prefix", *v.Prefix) + } + + if v.PrivateEndpoint != nil { + s.D.Set("private_endpoint", *v.PrivateEndpoint) + } + + shardDetails := []interface{}{} + for _, item := range v.ShardDetails { + shardDetails = append(shardDetails, DedicatedShardDetailsToMap(item)) + } + s.D.Set("shard_details", shardDetails) + + s.D.Set("sharding_method", v.ShardingMethod) + + if v.TimeZone != nil { + s.D.Set("time_zone", *v.TimeZone) + } + + if v.CompartmentId != nil { + s.D.Set("compartment_id", *v.CompartmentId) + } + + if v.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(v.DefinedTags)) + } + + if v.DisplayName != nil { + s.D.Set("display_name", *v.DisplayName) + } + + s.D.Set("freeform_tags", v.FreeformTags) + + if v.LifecycleStateDetails != nil { + s.D.Set("lifecycle_state_details", *v.LifecycleStateDetails) + } + + s.D.Set("state", v.LifecycleState) + + if v.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(v.SystemTags)) + } + + if v.TimeCreated != nil { + s.D.Set("time_created", v.TimeCreated.String()) + } + + if v.TimeUpdated != nil { + s.D.Set("time_updated", v.TimeUpdated.String()) + } + default: + log.Printf("[WARN] Received 'db_deployment_type' of unknown type %v", s.Res.ShardedDatabase) + return nil + } + + return nil +} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_resource.go b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_resource.go new file mode 100644 index 00000000000..d455fa92fb2 --- /dev/null +++ b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_resource.go @@ -0,0 +1,2794 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 frf + +package globally_distributed_database + +import ( + "context" + "fmt" + "log" + "strings" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + oci_common "github.com/oracle/oci-go-sdk/v65/common" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GloballyDistributedDatabaseShardedDatabaseResource() *schema.Resource { + return &schema.Resource{ + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: tfresource.GetTimeoutDuration("12h"), + Update: tfresource.GetTimeoutDuration("12h"), + Delete: tfresource.GetTimeoutDuration("12h"), + }, + Create: createGloballyDistributedDatabaseShardedDatabase, + Read: readGloballyDistributedDatabaseShardedDatabase, + Update: updateGloballyDistributedDatabaseShardedDatabase, + Delete: deleteGloballyDistributedDatabaseShardedDatabase, + Schema: map[string]*schema.Schema{ + // Required + "catalog_details": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "admin_password": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "cloud_autonomous_vm_cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "compute_count": { + Type: schema.TypeFloat, + Required: true, + ForceNew: true, + }, + "data_storage_size_in_gbs": { + Type: schema.TypeFloat, + Required: true, + ForceNew: true, + }, + "is_auto_scaling_enabled": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + + // Optional + "encryption_key_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "kms_key_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vault_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "kms_key_version_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // Computed + }, + }, + }, + "peer_cloud_autonomous_vm_cluster_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // Computed + "container_database_id": { + Type: schema.TypeString, + Computed: true, + }, + "container_database_parent_id": { + Type: schema.TypeString, + Computed: true, + }, + "metadata": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "shard_group": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "supporting_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_ssl_certificate_expires": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "character_set": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "db_deployment_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "DEDICATED", + }, true), + }, + "db_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "db_workload": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "display_name": { + Type: schema.TypeString, + Required: true, + }, + "listener_port": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "listener_port_tls": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "ncharacter_set": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ons_port_local": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "ons_port_remote": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "prefix": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "shard_details": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "admin_password": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "cloud_autonomous_vm_cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "compute_count": { + Type: schema.TypeFloat, + Required: true, + ForceNew: true, + }, + "data_storage_size_in_gbs": { + Type: schema.TypeFloat, + Required: true, + ForceNew: true, + }, + "is_auto_scaling_enabled": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + + // Optional + "encryption_key_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "kms_key_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vault_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "kms_key_version_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // Computed + }, + }, + }, + "peer_cloud_autonomous_vm_cluster_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "shard_space": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // Computed + "container_database_id": { + Type: schema.TypeString, + Computed: true, + }, + "container_database_parent_id": { + Type: schema.TypeString, + Computed: true, + }, + "metadata": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "shard_group": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "supporting_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_ssl_certificate_expires": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "sharded_database_id": { + Type: schema.TypeString, + Computed: true, + }, + "sharding_method": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "chunks": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + "cluster_certificate_common_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "defined_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + DiffSuppressFunc: tfresource.DefinedTagsDiffSuppressFunction, + Elem: schema.TypeString, + }, + "freeform_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + Elem: schema.TypeString, + }, + "patch_operations": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "operation": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "INSERT", + "MERGE", + "REMOVE", + }, true), + }, + "selection": { + Type: schema.TypeString, + Required: true, + }, + "value": { + //Type: schema.TypeMap, + Type: schema.TypeString, + Required: true, + //DiffSuppressFunc: tfresource.JsonStringDiffSuppressFunction, + }, + + // Optional + + // Computed + }, + }, + }, + "configure_gsms_trigger": { + Type: schema.TypeInt, + Computed: true, + }, + "configure_sharding_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + "download_gsm_certificate_signing_request_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + "generate_gsm_certificate_signing_request_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + "generate_wallet_trigger": { + Type: schema.TypeInt, + Computed: true, + }, + "get_connection_string_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + /*"fetched_all_connection_strings": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + },*/ + "start_database_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + "stop_database_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + "upload_signed_certificate_and_generate_wallet_trigger": { + Type: schema.TypeInt, + Computed: true, + }, + "validate_network_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + + // Computed + "connection_strings": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "all_connection_strings": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + }, + }, + }, + "gsms": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "compute_count": { + Type: schema.TypeFloat, + Computed: true, + }, + "data_storage_size_in_gbs": { + Type: schema.TypeFloat, + Computed: true, + }, + "metadata": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "supporting_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_ssl_certificate_expires": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "lifecycle_state_details": { + Type: schema.TypeString, + Computed: true, + }, + "private_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "lifecycle_state": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "system_tags": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + "time_zone": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func createGloballyDistributedDatabaseShardedDatabase(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabaseShardedDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + if e := tfresource.CreateResource(d, sync); e != nil { + return e + } + + if _, ok := sync.D.GetOkExists("configure_gsms_trigger"); ok { + err := sync.ConfigureShardedDatabaseGsms() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("configure_sharding_trigger"); ok { + err := sync.ConfigureSharding() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("download_gsm_certificate_signing_request_trigger"); ok { + err := sync.DownloadGsmCertificateSigningRequest() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("generate_gsm_certificate_signing_request_trigger"); ok { + err := sync.GenerateGsmCertificateSigningRequest() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("generate_wallet_trigger"); ok { + err := sync.GenerateWallet() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("get_connection_string_trigger"); ok { + err := sync.FetchConnectionString() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("start_database_trigger"); ok { + err := sync.StartShardedDatabase() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("stop_database_trigger"); ok { + err := sync.StopShardedDatabase() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("upload_signed_certificate_and_generate_wallet_trigger"); ok { + err := sync.UploadSignedCertificateAndGenerateWallet() + if err != nil { + return err + } + } + + if _, ok := sync.D.GetOkExists("validate_network_trigger"); ok { + err := sync.ValidateNetwork() + if err != nil { + return err + } + } + return nil + +} + +func readGloballyDistributedDatabaseShardedDatabase(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabaseShardedDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.ReadResource(sync) +} + +func updateGloballyDistributedDatabaseShardedDatabase(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabaseShardedDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + if _, ok := sync.D.GetOkExists("configure_gsms_trigger"); ok && sync.D.HasChange("configure_gsms_trigger") { + oldRaw, newRaw := sync.D.GetChange("configure_gsms_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.ConfigureShardedDatabaseGsms() + + if err != nil { + return err + } + } else { + sync.D.Set("configure_gsms_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("configure_sharding_trigger"); ok && sync.D.HasChange("configure_sharding_trigger") { + oldRaw, newRaw := sync.D.GetChange("configure_sharding_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.ConfigureSharding() + + if err != nil { + return err + } + } else { + sync.D.Set("configure_sharding_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("download_gsm_certificate_signing_request_trigger"); ok && sync.D.HasChange("download_gsm_certificate_signing_request_trigger") { + oldRaw, newRaw := sync.D.GetChange("download_gsm_certificate_signing_request_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.DownloadGsmCertificateSigningRequest() + + if err != nil { + return err + } + } else { + sync.D.Set("download_gsm_certificate_signing_request_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("generate_gsm_certificate_signing_request_trigger"); ok && sync.D.HasChange("generate_gsm_certificate_signing_request_trigger") { + oldRaw, newRaw := sync.D.GetChange("generate_gsm_certificate_signing_request_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.GenerateGsmCertificateSigningRequest() + + if err != nil { + return err + } + } else { + sync.D.Set("generate_gsm_certificate_signing_request_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("generate_wallet_trigger"); ok && sync.D.HasChange("generate_wallet_trigger") { + oldRaw, newRaw := sync.D.GetChange("generate_wallet_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.GenerateWallet() + + if err != nil { + return err + } + } else { + sync.D.Set("generate_wallet_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("get_connection_string_trigger"); ok && sync.D.HasChange("get_connection_string_trigger") { + oldRaw, newRaw := sync.D.GetChange("get_connection_string_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.FetchConnectionString() + + if err != nil { + return err + } + } else { + sync.D.Set("get_connection_string_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("start_database_trigger"); ok && sync.D.HasChange("start_database_trigger") { + oldRaw, newRaw := sync.D.GetChange("start_database_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.StartShardedDatabase() + + if err != nil { + return err + } + } else { + sync.D.Set("start_database_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("stop_database_trigger"); ok && sync.D.HasChange("stop_database_trigger") { + oldRaw, newRaw := sync.D.GetChange("stop_database_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.StopShardedDatabase() + + if err != nil { + return err + } + } else { + sync.D.Set("stop_database_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("upload_signed_certificate_and_generate_wallet_trigger"); ok && sync.D.HasChange("upload_signed_certificate_and_generate_wallet_trigger") { + oldRaw, newRaw := sync.D.GetChange("upload_signed_certificate_and_generate_wallet_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.UploadSignedCertificateAndGenerateWallet() + + if err != nil { + return err + } + } else { + sync.D.Set("upload_signed_certificate_and_generate_wallet_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if _, ok := sync.D.GetOkExists("validate_network_trigger"); ok && sync.D.HasChange("validate_network_trigger") { + oldRaw, newRaw := sync.D.GetChange("validate_network_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.ValidateNetwork() + + if err != nil { + return err + } + } else { + sync.D.Set("validate_network_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if err := tfresource.UpdateResource(d, sync); err != nil { + return err + } + + return nil +} + +func deleteGloballyDistributedDatabaseShardedDatabase(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabaseShardedDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + sync.DisableNotFoundRetries = true + + return tfresource.DeleteResource(d, sync) +} + +type GloballyDistributedDatabaseShardedDatabaseResourceCrud struct { + tfresource.BaseCrud + Client *oci_globally_distributed_database.ShardedDatabaseServiceClient + Res *oci_globally_distributed_database.ShardedDatabase + PatchResponse *oci_globally_distributed_database.ShardedDatabase + DisableNotFoundRetries bool +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) ID() string { + shardedDatabase := *s.Res + return *shardedDatabase.GetId() +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) CreatedPending() []string { + return []string{ + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateCreating), + } +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) CreatedTarget() []string { + return []string{ + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateActive), + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateNeedsAttention), + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateInactive), + } +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) DeletedPending() []string { + return []string{ + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateDeleting), + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateUnavailable), + } +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) DeletedTarget() []string { + return []string{ + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateDeleted), + } +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) Create() error { + request := oci_globally_distributed_database.CreateShardedDatabaseRequest{} + err := s.populateTopLevelPolymorphicCreateShardedDatabaseRequest(&request) + if err != nil { + return err + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.CreateShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + var identifier *string + identifier = response.GetId() + //identifier = response.id + if identifier != nil { + s.D.SetId(*identifier) + } + + err = s.getShardedDatabaseFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database"), oci_globally_distributed_database.ActionTypeCreated, s.D.Timeout(schema.TimeoutCreate)) + if err != nil { + return err + } + + err = s.Patch() + if err != nil { + log.Printf("[ERROR] Failed to execute Patch operation: %v", err) + return err + } + return nil +} +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) Patch() error { + request := oci_globally_distributed_database.PatchShardedDatabaseRequest{} + + if patchOperations, ok := s.D.GetOkExists("patch_operations"); ok { + interfaces := patchOperations.([]interface{}) + tmp := make([]oci_globally_distributed_database.PatchInstruction, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "patch_operations", stateDataIndex) + converted, err := s.mapToPatchInstruction(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("patch_operations") { + request.Items = tmp + } + tmpId := s.D.Id() + if tmpId != "" { + request.ShardedDatabaseId = &tmpId + } + + if shardedDatabaseId, ok := s.D.GetOkExists("id"); ok { + tmp := shardedDatabaseId.(string) + request.ShardedDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + response, err := s.Client.PatchShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getShardedDatabaseFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database"), oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutCreate)) + } + + return nil + +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) getShardedDatabaseFromWorkRequest(workId *string, retryPolicy *oci_common.RetryPolicy, + actionTypeEnum oci_globally_distributed_database.ActionTypeEnum, timeout time.Duration) error { + + // Wait until it finishes + shardedDatabaseId, err := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) + + if err != nil { + return err + } + s.D.SetId(*shardedDatabaseId) + + return s.Get() +} + +func shardedDatabaseWorkRequestShouldRetryFunc(timeout time.Duration) func(response oci_common.OCIOperationResponse) bool { + startTime := time.Now() + stopTime := startTime.Add(timeout) + return func(response oci_common.OCIOperationResponse) bool { + + // Stop after timeout has elapsed + if time.Now().After(stopTime) { + return false + } + + // Make sure we stop on default rules + if tfresource.ShouldRetry(response, false, "globally_distributed_database", startTime) { + return true + } + + // Only stop if the time Finished is set + if workRequestResponse, ok := response.Response.(oci_globally_distributed_database.GetWorkRequestResponse); ok { + return workRequestResponse.TimeFinished == nil + } + return false + } +} + +func shardedDatabaseWaitForWorkRequest(wId *string, entityType string, action oci_globally_distributed_database.ActionTypeEnum, + timeout time.Duration, disableFoundRetries bool, client *oci_globally_distributed_database.ShardedDatabaseServiceClient) (*string, error) { + retryPolicy := tfresource.GetRetryPolicy(disableFoundRetries, "globally_distributed_database") + retryPolicy.ShouldRetryOperation = shardedDatabaseWorkRequestShouldRetryFunc(timeout) + + response := oci_globally_distributed_database.GetWorkRequestResponse{} + stateConf := &resource.StateChangeConf{ + Pending: []string{ + string(oci_globally_distributed_database.OperationStatusInProgress), + string(oci_globally_distributed_database.OperationStatusAccepted), + string(oci_globally_distributed_database.OperationStatusCanceling), + }, + Target: []string{ + string(oci_globally_distributed_database.OperationStatusSucceeded), + string(oci_globally_distributed_database.OperationStatusFailed), + string(oci_globally_distributed_database.OperationStatusCanceled), + }, + Refresh: func() (interface{}, string, error) { + var err error + response, err = client.GetWorkRequest(context.Background(), + oci_globally_distributed_database.GetWorkRequestRequest{ + WorkRequestId: wId, + RequestMetadata: oci_common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + wr := &response.WorkRequest + return wr, string(wr.Status), err + }, + Timeout: timeout, + } + if _, e := stateConf.WaitForState(); e != nil { + return nil, e + } + + var identifier *string + // The work request response contains an array of objects that finished the operation + for _, res := range response.Resources { + if strings.Contains(strings.ToLower(*res.EntityType), entityType) { + if res.ActionType == action { + identifier = res.Identifier + break + } + } + } + + // The workrequest may have failed, check for errors if identifier is not found or work failed or got cancelled + if identifier == nil || response.Status == oci_globally_distributed_database.OperationStatusFailed || response.Status == oci_globally_distributed_database.OperationStatusCanceled { + return nil, getErrorFromGloballyDistributedDatabaseShardedDatabaseWorkRequest(client, wId, retryPolicy, entityType, action) + } + + return identifier, nil +} + +func getErrorFromGloballyDistributedDatabaseShardedDatabaseWorkRequest(client *oci_globally_distributed_database.ShardedDatabaseServiceClient, workId *string, retryPolicy *oci_common.RetryPolicy, entityType string, action oci_globally_distributed_database.ActionTypeEnum) error { + response, err := client.ListWorkRequestErrors(context.Background(), + oci_globally_distributed_database.ListWorkRequestErrorsRequest{ + WorkRequestId: workId, + RequestMetadata: oci_common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + if err != nil { + return err + } + + allErrs := make([]string, 0) + for _, wrkErr := range response.Items { + allErrs = append(allErrs, *wrkErr.Message) + } + errorMessage := strings.Join(allErrs, "\n") + + workRequestErr := fmt.Errorf("work request did not succeed, workId: %s, entity: %s, action: %s. Message: %s", *workId, entityType, action, errorMessage) + + return workRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) Get() error { + request := oci_globally_distributed_database.GetShardedDatabaseRequest{} + + if metadata, ok := s.D.GetOkExists("metadata"); ok { + tmp := metadata.(string) + request.Metadata = &tmp + } + + tmp := s.D.Id() + request.ShardedDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.GetShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.ShardedDatabase + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) Update() error { + if compartment, ok := s.D.GetOkExists("compartment_id"); ok && s.D.HasChange("compartment_id") { + oldRaw, newRaw := s.D.GetChange("compartment_id") + if newRaw != "" && oldRaw != "" { + err := s.updateCompartment(compartment) + if err != nil { + return err + } + } + } + request := oci_globally_distributed_database.UpdateShardedDatabaseRequest{} + + if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { + convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) + if err != nil { + return err + } + request.DefinedTags = convertedDefinedTags + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + + tmp := s.D.Id() + request.ShardedDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.UpdateShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.ShardedDatabase + + if patchOperations, ok := s.D.GetOkExists("patch_operations"); ok { + if tmpList := patchOperations.([]interface{}); len(tmpList) > 0 { + err = s.Patch() + if err != nil { + log.Printf("[ERROR] Failed to execute Patch operation: %v", err) + return err + } + } + } + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) Delete() error { + request := oci_globally_distributed_database.DeleteShardedDatabaseRequest{} + + tmp := s.D.Id() + request.ShardedDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.DeleteShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, delWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries, s.Client) + return delWorkRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) SetData() error { + switch v := (*s.Res).(type) { + case oci_globally_distributed_database.DedicatedShardedDatabase: + s.D.Set("db_deployment_type", "DEDICATED") + + catalogDetails := []interface{}{} + shardDetails := []interface{}{} + tmpId := s.D.Id() + + if tmpId != "" { + tmpReq := oci_globally_distributed_database.GetShardedDatabaseRequest{ + ShardedDatabaseId: &tmpId, + } + tmpResp, _ := s.Client.GetShardedDatabase(context.Background(), tmpReq) + tmpShardedDb := tmpResp.ShardedDatabase + dedicateShardedDb := tmpShardedDb.(oci_globally_distributed_database.DedicatedShardedDatabase) + cDAdminPassword := "" + + for _, item := range dedicateShardedDb.CatalogDetails { + if createCatalogDetails, ok := s.D.GetOkExists("catalog_details"); ok { + interfaces := createCatalogDetails.([]interface{}) + tmp := make([]oci_globally_distributed_database.CreateDedicatedCatalogDetail, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "catalog_details", stateDataIndex) + converted, err := s.mapToCreateDedicatedCatalogDetail(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + if *tmp[i].CloudAutonomousVmClusterId == *item.CloudAutonomousVmClusterId { + cDAdminPassword = *tmp[i].AdminPassword + } + } + } + catalogDetails = append(catalogDetails, DedicatedCatalogDetailsToMapForResource(item, cDAdminPassword)) + } + + sDAdminPassword := "" + for _, item := range dedicateShardedDb.ShardDetails { + if createShardDetails, ok := s.D.GetOkExists("shard_details"); ok { + interfaces := createShardDetails.([]interface{}) + tmp := make([]oci_globally_distributed_database.CreateDedicatedShardDetail, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "shard_details", stateDataIndex) + converted, err := s.mapToCreateDedicatedShardDetail(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + if *tmp[i].CloudAutonomousVmClusterId == *item.CloudAutonomousVmClusterId { + sDAdminPassword = *tmp[i].AdminPassword + } + } + } + shardDetails = append(shardDetails, DedicatedShardDetailsToMapForResource(item, sDAdminPassword)) + } + } + + s.D.Set("catalog_details", catalogDetails) + + s.D.Set("shard_details", shardDetails) + + if v.CharacterSet != nil { + s.D.Set("character_set", *v.CharacterSet) + } + + if v.Chunks != nil { + s.D.Set("chunks", *v.Chunks) + } + + if v.ClusterCertificateCommonName != nil { + s.D.Set("cluster_certificate_common_name", *v.ClusterCertificateCommonName) + } + + if v.ConnectionStrings != nil { + s.D.Set("connection_strings", []interface{}{ConnectionStringToMap(v.ConnectionStrings)}) + } else { + s.D.Set("connection_strings", nil) + } + + if v.DbVersion != nil { + s.D.Set("db_version", *v.DbVersion) + } + + s.D.Set("db_workload", v.DbWorkload) + + gsms := []interface{}{} + for _, item := range v.Gsms { + gsms = append(gsms, GsmDetailsToMap(item)) + } + s.D.Set("gsms", gsms) + + if v.ListenerPort != nil { + s.D.Set("listener_port", *v.ListenerPort) + } + + if v.ListenerPortTls != nil { + s.D.Set("listener_port_tls", *v.ListenerPortTls) + } + + if v.NcharacterSet != nil { + s.D.Set("ncharacter_set", *v.NcharacterSet) + } + + if v.OnsPortLocal != nil { + s.D.Set("ons_port_local", *v.OnsPortLocal) + } + + if v.OnsPortRemote != nil { + s.D.Set("ons_port_remote", *v.OnsPortRemote) + } + + if v.Prefix != nil { + s.D.Set("prefix", *v.Prefix) + } + + if v.PrivateEndpoint != nil { + s.D.Set("private_endpoint", *v.PrivateEndpoint) + } + + s.D.Set("sharding_method", v.ShardingMethod) + + if v.TimeZone != nil { + s.D.Set("time_zone", *v.TimeZone) + } + + if v.CompartmentId != nil { + s.D.Set("compartment_id", *v.CompartmentId) + } + + if v.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(v.DefinedTags)) + } + + if v.DisplayName != nil { + s.D.Set("display_name", *v.DisplayName) + } + + s.D.Set("freeform_tags", v.FreeformTags) + + /*if v.Id != nil { + s.D.Set("id", *v.Id) + }*/ + + if v.LifecycleStateDetails != nil { + s.D.Set("lifecycle_state_details", *v.LifecycleStateDetails) + } + + s.D.Set("lifecycle_state", v.LifecycleState) + + s.D.Set("state", v.LifecycleState) + + if v.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(v.SystemTags)) + } + + if v.TimeCreated != nil { + s.D.Set("time_created", v.TimeCreated.String()) + } + + if v.TimeUpdated != nil { + s.D.Set("time_updated", v.TimeUpdated.String()) + } + default: + log.Printf("[WARN] Received 'db_deployment_type' of unknown type %v", *s.Res) + return nil + } + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) ConfigureShardedDatabaseGsms() error { + request := oci_globally_distributed_database.ConfigureShardedDatabaseGsmsRequest{} + + if isLatestGsmImage, ok := s.D.GetOkExists("configure_gsms_trigger_is_latest_gsm_image"); ok { + tmp := isLatestGsmImage.(bool) + request.IsLatestGsmImage = &tmp + } + + if oldGsmNames, ok := s.D.GetOkExists("configure_gsms_trigger_old_gsm_names"); ok { + interfaces := oldGsmNames.([]interface{}) + tmp := make([]string, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = interfaces[i].(string) + } + } + if len(tmp) != 0 || s.D.HasChange("configure_gsms_trigger_old_gsm_names") { + request.OldGsmNames = tmp + } + } + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.ConfigureShardedDatabaseGsms(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("configure_gsms_trigger") + s.D.Set("configure_gsms_trigger", val) + + workId := response.OpcWorkRequestId + + _, configureShardedDatabaseGsmsWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries, s.Client) + + //s.Res = &response.ShardedDatabase + return configureShardedDatabaseGsmsWorkRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) ConfigureSharding() error { + request := oci_globally_distributed_database.ConfigureShardingRequest{} + + if isRebalanceRequired, ok := s.D.GetOkExists("is_rebalance_required"); ok { + tmp := isRebalanceRequired.(bool) + request.IsRebalanceRequired = &tmp + } + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.ConfigureSharding(context.Background(), request) + + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("configure_sharding_trigger") + s.D.Set("configure_sharding_trigger", val) + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, configureShardingWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries, s.Client) + + //s.Res = &response.ShardedDatabase + return configureShardingWorkRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) DownloadGsmCertificateSigningRequest() error { + request := oci_globally_distributed_database.DownloadGsmCertificateSigningRequestRequest{} + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + _, err := s.Client.DownloadGsmCertificateSigningRequest(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("download_gsm_certificate_signing_request_trigger") + s.D.Set("download_gsm_certificate_signing_request_trigger", val) + + //s.Res = &response.ShardedDatabase + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) GenerateGsmCertificateSigningRequest() error { + request := oci_globally_distributed_database.GenerateGsmCertificateSigningRequestRequest{} + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.GenerateGsmCertificateSigningRequest(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("generate_gsm_certificate_signing_request_trigger") + s.D.Set("generate_gsm_certificate_signing_request_trigger", val) + + workId := response.OpcWorkRequestId + + _, generateGsmCertificateSigningRequesWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries, s.Client) + + //s.Res = &response.ShardedDatabase + return generateGsmCertificateSigningRequesWorkRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) GenerateWallet() error { + request := oci_globally_distributed_database.GenerateWalletRequest{} + + /*if password, ok := s.D.GetOkExists("password"); ok { + tmp := password.(string) + request.Password = &tmp + }*/ + + if password, ok := s.D.GetOkExists("generate_wallet_password"); ok { + tmp := password.(string) + request.Password = &tmp + } + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + _, err := s.Client.GenerateWallet(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("generate_wallet_trigger") + s.D.Set("generate_wallet_trigger", val) + + //s.Res = &response.ShardedDatabase + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) FetchConnectionString() error { + request := oci_globally_distributed_database.FetchConnectionStringRequest{} + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.FetchConnectionString(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("get_connection_string_trigger") + s.D.Set("get_connection_string_trigger", val) + + s.D.Set("connection_strings", response.AllConnectionStrings) + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) StartShardedDatabase() error { + request := oci_globally_distributed_database.StartShardedDatabaseRequest{} + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.StartShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("start_database_trigger") + s.D.Set("start_database_trigger", val) + + workId := response.OpcWorkRequestId + + _, startShardedDatabaseWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries, s.Client) + + //s.Res = &response.ShardedDatabase + return startShardedDatabaseWorkRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) StopShardedDatabase() error { + request := oci_globally_distributed_database.StopShardedDatabaseRequest{} + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.StopShardedDatabase(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("stop_database_trigger") + s.D.Set("stop_database_trigger", val) + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, stopShardedDatabaseWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries, s.Client) + + //s.Res = &response.ShardedDatabase + return stopShardedDatabaseWorkRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) UploadSignedCertificateAndGenerateWallet() error { + request := oci_globally_distributed_database.UploadSignedCertificateAndGenerateWalletRequest{} + + if caSignedCertificate, ok := s.D.GetOkExists("ca_signed_certificate"); ok { + tmp := caSignedCertificate.(string) + request.CaSignedCertificate = &tmp + } + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.UploadSignedCertificateAndGenerateWallet(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("upload_signed_certificate_and_generate_wallet_trigger") + s.D.Set("upload_signed_certificate_and_generate_wallet_trigger", val) + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, uploadSignedCertificateAndGenerateWalletWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries, s.Client) + + //s.Res = &response.ShardedDatabase + return uploadSignedCertificateAndGenerateWalletWorkRequestErr +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) ValidateNetwork() error { + request := oci_globally_distributed_database.ValidateNetworkRequest{} + + if isPrimary, ok := s.D.GetOkExists("is_primary"); ok { + tmp := isPrimary.(bool) + request.IsPrimary = &tmp + } + + if isSurrogate, ok := s.D.GetOkExists("is_surrogate"); ok { + tmp := isSurrogate.(bool) + request.IsSurrogate = &tmp + } + + if resourceName, ok := s.D.GetOkExists("resource_name"); ok { + tmp := resourceName.(string) + request.ResourceName = &tmp + } + + idTmp := s.D.Id() + request.ShardedDatabaseId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.ValidateNetwork(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("validate_network_trigger") + s.D.Set("validate_network_trigger", val) + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, validateNetworkWorkRequestErr := shardedDatabaseWaitForWorkRequest(workId, "shardeddatabase", + oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries, s.Client) + + //s.Res = &response.ShardedDatabase + return validateNetworkWorkRequestErr + +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToConnectionString(fieldKeyFormat string) (oci_globally_distributed_database.ConnectionString, error) { + result := oci_globally_distributed_database.ConnectionString{} + + if allConnectionStrings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "all_connection_strings")); ok { + result.AllConnectionStrings = tfresource.ObjectMapToStringMap(allConnectionStrings.(map[string]interface{})) + } + + return result, nil +} + +func ConnectionStringToMap(obj *oci_globally_distributed_database.ConnectionString) map[string]interface{} { + result := map[string]interface{}{} + + result["all_connection_strings"] = obj.AllConnectionStrings + + return result +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToCreateDedicatedCatalogDetail(fieldKeyFormat string) (oci_globally_distributed_database.CreateDedicatedCatalogDetail, error) { + result := oci_globally_distributed_database.CreateDedicatedCatalogDetail{} + + if adminPassword, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "admin_password")); ok { + tmp := adminPassword.(string) + result.AdminPassword = &tmp + } + + if cloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "cloud_autonomous_vm_cluster_id")); ok { + tmp := cloudAutonomousVmClusterId.(string) + result.CloudAutonomousVmClusterId = &tmp + } + + if computeCount, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "compute_count")); ok { + //tmp := computeCount.(float32) + tmp := float32(computeCount.(float64)) + result.ComputeCount = &tmp + } + + if dataStorageSizeInGbs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "data_storage_size_in_gbs")); ok { + tmp := dataStorageSizeInGbs.(float64) + result.DataStorageSizeInGbs = &tmp + } + + if encryptionKeyDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_details")); ok { + if tmpList := encryptionKeyDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_details"), 0) + tmp, err := s.mapToDedicatedShardOrCatalogEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert encryption_key_details, encountered error: %v", err) + } + result.EncryptionKeyDetails = &tmp + } + } + + if isAutoScalingEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_auto_scaling_enabled")); ok { + tmp := isAutoScalingEnabled.(bool) + result.IsAutoScalingEnabled = &tmp + } + + if peerCloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "peer_cloud_autonomous_vm_cluster_id")); ok { + tmp := peerCloudAutonomousVmClusterId.(string) + result.PeerCloudAutonomousVmClusterId = &tmp + } + + return result, nil +} + +func CreateDedicatedCatalogDetailToMap(obj oci_globally_distributed_database.CreateDedicatedCatalogDetail) map[string]interface{} { + result := map[string]interface{}{} + + if obj.AdminPassword != nil { + result["admin_password"] = string(*obj.AdminPassword) + } + + if obj.CloudAutonomousVmClusterId != nil { + result["cloud_autonomous_vm_cluster_id"] = string(*obj.CloudAutonomousVmClusterId) + } + + if obj.ComputeCount != nil { + result["compute_count"] = float32(*obj.ComputeCount) + } + + if obj.DataStorageSizeInGbs != nil { + result["data_storage_size_in_gbs"] = float64(*obj.DataStorageSizeInGbs) + } + + if obj.EncryptionKeyDetails != nil { + result["encryption_key_details"] = []interface{}{DedicatedShardOrCatalogEncryptionKeyDetailsToMap(obj.EncryptionKeyDetails)} + } + + if obj.IsAutoScalingEnabled != nil { + result["is_auto_scaling_enabled"] = bool(*obj.IsAutoScalingEnabled) + } + + if obj.PeerCloudAutonomousVmClusterId != nil { + result["peer_cloud_autonomous_vm_cluster_id"] = string(*obj.PeerCloudAutonomousVmClusterId) + } + + return result +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToCreateDedicatedShardDetail(fieldKeyFormat string) (oci_globally_distributed_database.CreateDedicatedShardDetail, error) { + result := oci_globally_distributed_database.CreateDedicatedShardDetail{} + + if adminPassword, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "admin_password")); ok { + tmp := adminPassword.(string) + result.AdminPassword = &tmp + } + + if cloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "cloud_autonomous_vm_cluster_id")); ok { + tmp := cloudAutonomousVmClusterId.(string) + result.CloudAutonomousVmClusterId = &tmp + } + + if computeCount, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "compute_count")); ok { + //tmp := computeCount.(float32) + tmp := float32(computeCount.(float64)) + result.ComputeCount = &tmp + } + + if dataStorageSizeInGbs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "data_storage_size_in_gbs")); ok { + tmp := dataStorageSizeInGbs.(float64) + result.DataStorageSizeInGbs = &tmp + } + + if encryptionKeyDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_details")); ok { + if tmpList := encryptionKeyDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_details"), 0) + tmp, err := s.mapToDedicatedShardOrCatalogEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert encryption_key_details, encountered error: %v", err) + } + result.EncryptionKeyDetails = &tmp + } + } + + if isAutoScalingEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_auto_scaling_enabled")); ok { + tmp := isAutoScalingEnabled.(bool) + result.IsAutoScalingEnabled = &tmp + } + + if peerCloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "peer_cloud_autonomous_vm_cluster_id")); ok { + tmp := peerCloudAutonomousVmClusterId.(string) + result.PeerCloudAutonomousVmClusterId = &tmp + } + + if shardSpace, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "shard_space")); ok { + tmp := shardSpace.(string) + result.ShardSpace = &tmp + } + + return result, nil +} + +func CreateDedicatedShardDetailToMap(obj oci_globally_distributed_database.CreateDedicatedShardDetail) map[string]interface{} { + result := map[string]interface{}{} + + if obj.AdminPassword != nil { + result["admin_password"] = string(*obj.AdminPassword) + } + + if obj.CloudAutonomousVmClusterId != nil { + result["cloud_autonomous_vm_cluster_id"] = string(*obj.CloudAutonomousVmClusterId) + } + + if obj.ComputeCount != nil { + result["compute_count"] = float32(*obj.ComputeCount) + } + + if obj.DataStorageSizeInGbs != nil { + result["data_storage_size_in_gbs"] = float64(*obj.DataStorageSizeInGbs) + } + + if obj.EncryptionKeyDetails != nil { + result["encryption_key_details"] = []interface{}{DedicatedShardOrCatalogEncryptionKeyDetailsToMap(obj.EncryptionKeyDetails)} + } + + if obj.IsAutoScalingEnabled != nil { + result["is_auto_scaling_enabled"] = bool(*obj.IsAutoScalingEnabled) + } + + if obj.PeerCloudAutonomousVmClusterId != nil { + result["peer_cloud_autonomous_vm_cluster_id"] = string(*obj.PeerCloudAutonomousVmClusterId) + } + + if obj.ShardSpace != nil { + result["shard_space"] = string(*obj.ShardSpace) + } + + return result +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToDedicatedCatalogDetails(fieldKeyFormat string) (oci_globally_distributed_database.DedicatedCatalogDetails, error) { + result := oci_globally_distributed_database.DedicatedCatalogDetails{} + + if cloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "cloud_autonomous_vm_cluster_id")); ok { + tmp := cloudAutonomousVmClusterId.(string) + result.CloudAutonomousVmClusterId = &tmp + } + + if computeCount, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "compute_count")); ok { + //tmp := computeCount.(float32) + tmp := float32(computeCount.(float64)) + result.ComputeCount = &tmp + } + + if containerDatabaseId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "container_database_id")); ok { + tmp := containerDatabaseId.(string) + result.ContainerDatabaseId = &tmp + } + + if containerDatabaseParentId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "container_database_parent_id")); ok { + tmp := containerDatabaseParentId.(string) + result.ContainerDatabaseParentId = &tmp + } + + if dataStorageSizeInGbs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "data_storage_size_in_gbs")); ok { + tmp := dataStorageSizeInGbs.(float64) + result.DataStorageSizeInGbs = &tmp + } + + if encryptionKeyDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_details")); ok { + if tmpList := encryptionKeyDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_details"), 0) + tmp, err := s.mapToDedicatedShardOrCatalogEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert encryption_key_details, encountered error: %v", err) + } + result.EncryptionKeyDetails = &tmp + } + } + + if isAutoScalingEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_auto_scaling_enabled")); ok { + tmp := isAutoScalingEnabled.(bool) + result.IsAutoScalingEnabled = &tmp + } + + if metadata, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "metadata")); ok { + result.Metadata = metadata.(map[string]interface{}) + } + + if name, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "name")); ok { + tmp := name.(string) + result.Name = &tmp + } + + if peerCloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "peer_cloud_autonomous_vm_cluster_id")); ok { + tmp := peerCloudAutonomousVmClusterId.(string) + result.PeerCloudAutonomousVmClusterId = &tmp + } + + if shardGroup, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "shard_group")); ok { + tmp := shardGroup.(string) + result.ShardGroup = &tmp + } + + if status, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "status")); ok { + result.Status = oci_globally_distributed_database.DedicatedCatalogDetailsStatusEnum(status.(string)) + } + + if supportingResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "supporting_resource_id")); ok { + tmp := supportingResourceId.(string) + result.SupportingResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if timeSslCertificateExpires, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_ssl_certificate_expires")); ok { + tmp, err := time.Parse(time.RFC3339, timeSslCertificateExpires.(string)) + if err != nil { + return result, err + } + result.TimeSslCertificateExpires = &oci_common.SDKTime{Time: tmp} + } + + if timeUpdated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_updated")); ok { + tmp, err := time.Parse(time.RFC3339, timeUpdated.(string)) + if err != nil { + return result, err + } + result.TimeUpdated = &oci_common.SDKTime{Time: tmp} + } + + return result, nil +} + +func DedicatedCatalogDetailsToMap(obj oci_globally_distributed_database.DedicatedCatalogDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.CloudAutonomousVmClusterId != nil { + result["cloud_autonomous_vm_cluster_id"] = string(*obj.CloudAutonomousVmClusterId) + } + + if obj.ComputeCount != nil { + result["compute_count"] = float32(*obj.ComputeCount) + } + + if obj.ContainerDatabaseId != nil { + result["container_database_id"] = string(*obj.ContainerDatabaseId) + } + + if obj.ContainerDatabaseParentId != nil { + result["container_database_parent_id"] = string(*obj.ContainerDatabaseParentId) + } + + if obj.DataStorageSizeInGbs != nil { + result["data_storage_size_in_gbs"] = float64(*obj.DataStorageSizeInGbs) + } + + if obj.EncryptionKeyDetails != nil { + result["encryption_key_details"] = []interface{}{DedicatedShardOrCatalogEncryptionKeyDetailsToMap(obj.EncryptionKeyDetails)} + } + + if obj.IsAutoScalingEnabled != nil { + result["is_auto_scaling_enabled"] = bool(*obj.IsAutoScalingEnabled) + } + + result["metadata"] = obj.Metadata + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + if obj.PeerCloudAutonomousVmClusterId != nil { + result["peer_cloud_autonomous_vm_cluster_id"] = string(*obj.PeerCloudAutonomousVmClusterId) + } + + if obj.ShardGroup != nil { + result["shard_group"] = string(*obj.ShardGroup) + } + + result["status"] = string(obj.Status) + + if obj.SupportingResourceId != nil { + result["supporting_resource_id"] = string(*obj.SupportingResourceId) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.Format(time.RFC3339Nano) + } + + if obj.TimeSslCertificateExpires != nil { + result["time_ssl_certificate_expires"] = obj.TimeSslCertificateExpires.Format(time.RFC3339Nano) + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.Format(time.RFC3339Nano) + } + + return result +} + +func DedicatedCatalogDetailsToMapForResource(obj oci_globally_distributed_database.DedicatedCatalogDetails, adminPassword string) map[string]interface{} { + result := map[string]interface{}{} + + result["admin_password"] = adminPassword + + if obj.CloudAutonomousVmClusterId != nil { + result["cloud_autonomous_vm_cluster_id"] = string(*obj.CloudAutonomousVmClusterId) + } + + if obj.ComputeCount != nil { + result["compute_count"] = float32(*obj.ComputeCount) + } + + if obj.ContainerDatabaseId != nil { + result["container_database_id"] = string(*obj.ContainerDatabaseId) + } + + if obj.ContainerDatabaseParentId != nil { + result["container_database_parent_id"] = string(*obj.ContainerDatabaseParentId) + } + + if obj.DataStorageSizeInGbs != nil { + result["data_storage_size_in_gbs"] = float64(*obj.DataStorageSizeInGbs) + } + + if obj.EncryptionKeyDetails != nil { + result["encryption_key_details"] = []interface{}{DedicatedShardOrCatalogEncryptionKeyDetailsToMap(obj.EncryptionKeyDetails)} + } + + if obj.IsAutoScalingEnabled != nil { + result["is_auto_scaling_enabled"] = bool(*obj.IsAutoScalingEnabled) + } + + result["metadata"] = obj.Metadata + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + if obj.PeerCloudAutonomousVmClusterId != nil { + result["peer_cloud_autonomous_vm_cluster_id"] = string(*obj.PeerCloudAutonomousVmClusterId) + } + + if obj.ShardGroup != nil { + result["shard_group"] = string(*obj.ShardGroup) + } + + result["status"] = string(obj.Status) + + if obj.SupportingResourceId != nil { + result["supporting_resource_id"] = string(*obj.SupportingResourceId) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.Format(time.RFC3339Nano) + } + + if obj.TimeSslCertificateExpires != nil { + result["time_ssl_certificate_expires"] = obj.TimeSslCertificateExpires.Format(time.RFC3339Nano) + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.Format(time.RFC3339Nano) + } + + return result +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToDedicatedShardDetails(fieldKeyFormat string) (oci_globally_distributed_database.DedicatedShardDetails, error) { + result := oci_globally_distributed_database.DedicatedShardDetails{} + + if cloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "cloud_autonomous_vm_cluster_id")); ok { + tmp := cloudAutonomousVmClusterId.(string) + result.CloudAutonomousVmClusterId = &tmp + } + + if computeCount, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "compute_count")); ok { + //tmp := computeCount.(float32) + tmp := float32(computeCount.(float64)) + result.ComputeCount = &tmp + } + + if containerDatabaseId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "container_database_id")); ok { + tmp := containerDatabaseId.(string) + result.ContainerDatabaseId = &tmp + } + + if containerDatabaseParentId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "container_database_parent_id")); ok { + tmp := containerDatabaseParentId.(string) + result.ContainerDatabaseParentId = &tmp + } + + if dataStorageSizeInGbs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "data_storage_size_in_gbs")); ok { + tmp := dataStorageSizeInGbs.(float64) + result.DataStorageSizeInGbs = &tmp + } + + if encryptionKeyDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_details")); ok { + if tmpList := encryptionKeyDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_details"), 0) + tmp, err := s.mapToDedicatedShardOrCatalogEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert encryption_key_details, encountered error: %v", err) + } + result.EncryptionKeyDetails = &tmp + } + } + + if isAutoScalingEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_auto_scaling_enabled")); ok { + tmp := isAutoScalingEnabled.(bool) + result.IsAutoScalingEnabled = &tmp + } + + if metadata, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "metadata")); ok { + result.Metadata = metadata.(map[string]interface{}) + } + + if name, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "name")); ok { + tmp := name.(string) + result.Name = &tmp + } + + if peerCloudAutonomousVmClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "peer_cloud_autonomous_vm_cluster_id")); ok { + tmp := peerCloudAutonomousVmClusterId.(string) + result.PeerCloudAutonomousVmClusterId = &tmp + } + + if shardGroup, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "shard_group")); ok { + tmp := shardGroup.(string) + result.ShardGroup = &tmp + } + + if shardSpace, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "shard_space")); ok { + tmp := shardSpace.(string) + result.ShardSpace = &tmp + } + + if status, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "status")); ok { + result.Status = oci_globally_distributed_database.DedicatedShardDetailsStatusEnum(status.(string)) + } + + if supportingResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "supporting_resource_id")); ok { + tmp := supportingResourceId.(string) + result.SupportingResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if timeSslCertificateExpires, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_ssl_certificate_expires")); ok { + tmp, err := time.Parse(time.RFC3339, timeSslCertificateExpires.(string)) + if err != nil { + return result, err + } + result.TimeSslCertificateExpires = &oci_common.SDKTime{Time: tmp} + } + + if timeUpdated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_updated")); ok { + tmp, err := time.Parse(time.RFC3339, timeUpdated.(string)) + if err != nil { + return result, err + } + result.TimeUpdated = &oci_common.SDKTime{Time: tmp} + } + + return result, nil +} + +func DedicatedShardDetailsToMap(obj oci_globally_distributed_database.DedicatedShardDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.CloudAutonomousVmClusterId != nil { + result["cloud_autonomous_vm_cluster_id"] = string(*obj.CloudAutonomousVmClusterId) + } + + if obj.ComputeCount != nil { + result["compute_count"] = float32(*obj.ComputeCount) + } + + if obj.ContainerDatabaseId != nil { + result["container_database_id"] = string(*obj.ContainerDatabaseId) + } + + if obj.ContainerDatabaseParentId != nil { + result["container_database_parent_id"] = string(*obj.ContainerDatabaseParentId) + } + + if obj.DataStorageSizeInGbs != nil { + result["data_storage_size_in_gbs"] = float64(*obj.DataStorageSizeInGbs) + } + + if obj.EncryptionKeyDetails != nil { + result["encryption_key_details"] = []interface{}{DedicatedShardOrCatalogEncryptionKeyDetailsToMap(obj.EncryptionKeyDetails)} + } + + if obj.IsAutoScalingEnabled != nil { + result["is_auto_scaling_enabled"] = bool(*obj.IsAutoScalingEnabled) + } + + result["metadata"] = obj.Metadata + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + if obj.PeerCloudAutonomousVmClusterId != nil { + result["peer_cloud_autonomous_vm_cluster_id"] = string(*obj.PeerCloudAutonomousVmClusterId) + } + + if obj.ShardGroup != nil { + result["shard_group"] = string(*obj.ShardGroup) + } + + if obj.ShardSpace != nil { + result["shard_space"] = string(*obj.ShardSpace) + } + + result["status"] = string(obj.Status) + + if obj.SupportingResourceId != nil { + result["supporting_resource_id"] = string(*obj.SupportingResourceId) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.Format(time.RFC3339Nano) + } + + if obj.TimeSslCertificateExpires != nil { + result["time_ssl_certificate_expires"] = obj.TimeSslCertificateExpires.Format(time.RFC3339Nano) + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.Format(time.RFC3339Nano) + } + + return result +} + +func DedicatedShardDetailsToMapForResource(obj oci_globally_distributed_database.DedicatedShardDetails, adminPassword string) map[string]interface{} { + result := map[string]interface{}{} + + result["admin_password"] = adminPassword + + if obj.CloudAutonomousVmClusterId != nil { + result["cloud_autonomous_vm_cluster_id"] = string(*obj.CloudAutonomousVmClusterId) + } + + if obj.ComputeCount != nil { + result["compute_count"] = float32(*obj.ComputeCount) + } + + if obj.ContainerDatabaseId != nil { + result["container_database_id"] = string(*obj.ContainerDatabaseId) + } + + if obj.ContainerDatabaseParentId != nil { + result["container_database_parent_id"] = string(*obj.ContainerDatabaseParentId) + } + + if obj.DataStorageSizeInGbs != nil { + result["data_storage_size_in_gbs"] = float64(*obj.DataStorageSizeInGbs) + } + + if obj.EncryptionKeyDetails != nil { + result["encryption_key_details"] = []interface{}{DedicatedShardOrCatalogEncryptionKeyDetailsToMap(obj.EncryptionKeyDetails)} + } + + if obj.IsAutoScalingEnabled != nil { + result["is_auto_scaling_enabled"] = bool(*obj.IsAutoScalingEnabled) + } + + result["metadata"] = obj.Metadata + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + if obj.PeerCloudAutonomousVmClusterId != nil { + result["peer_cloud_autonomous_vm_cluster_id"] = string(*obj.PeerCloudAutonomousVmClusterId) + } + + if obj.ShardGroup != nil { + result["shard_group"] = string(*obj.ShardGroup) + } + + if obj.ShardSpace != nil { + result["shard_space"] = string(*obj.ShardSpace) + } + + result["status"] = string(obj.Status) + + if obj.SupportingResourceId != nil { + result["supporting_resource_id"] = string(*obj.SupportingResourceId) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.Format(time.RFC3339Nano) + } + + if obj.TimeSslCertificateExpires != nil { + result["time_ssl_certificate_expires"] = obj.TimeSslCertificateExpires.Format(time.RFC3339Nano) + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.Format(time.RFC3339Nano) + } + + return result +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToDedicatedShardOrCatalogEncryptionKeyDetails(fieldKeyFormat string) (oci_globally_distributed_database.DedicatedShardOrCatalogEncryptionKeyDetails, error) { + result := oci_globally_distributed_database.DedicatedShardOrCatalogEncryptionKeyDetails{} + + if kmsKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "kms_key_id")); ok { + tmp := kmsKeyId.(string) + result.KmsKeyId = &tmp + } + + if kmsKeyVersionId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "kms_key_version_id")); ok { + tmp := kmsKeyVersionId.(string) + result.KmsKeyVersionId = &tmp + } + + if vaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_id")); ok { + tmp := vaultId.(string) + result.VaultId = &tmp + } + + return result, nil +} + +func DedicatedShardOrCatalogEncryptionKeyDetailsToMap(obj *oci_globally_distributed_database.DedicatedShardOrCatalogEncryptionKeyDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.KmsKeyId != nil { + result["kms_key_id"] = string(*obj.KmsKeyId) + } + + if obj.KmsKeyVersionId != nil { + result["kms_key_version_id"] = string(*obj.KmsKeyVersionId) + } + + if obj.VaultId != nil { + result["vault_id"] = string(*obj.VaultId) + } + + return result +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToGsmDetails(fieldKeyFormat string) (oci_globally_distributed_database.GsmDetails, error) { + result := oci_globally_distributed_database.GsmDetails{} + + if computeCount, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "compute_count")); ok { + //tmp := computeCount.(float32) + tmp := float32(computeCount.(float64)) + result.ComputeCount = &tmp + } + + if dataStorageSizeInGbs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "data_storage_size_in_gbs")); ok { + tmp := dataStorageSizeInGbs.(float64) + result.DataStorageSizeInGbs = &tmp + } + + if metadata, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "metadata")); ok { + result.Metadata = metadata.(map[string]interface{}) + } + + if name, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "name")); ok { + tmp := name.(string) + result.Name = &tmp + } + + if status, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "status")); ok { + result.Status = oci_globally_distributed_database.GsmDetailsStatusEnum(status.(string)) + } + + if supportingResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "supporting_resource_id")); ok { + tmp := supportingResourceId.(string) + result.SupportingResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if timeSslCertificateExpires, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_ssl_certificate_expires")); ok { + tmp, err := time.Parse(time.RFC3339, timeSslCertificateExpires.(string)) + if err != nil { + return result, err + } + result.TimeSslCertificateExpires = &oci_common.SDKTime{Time: tmp} + } + + if timeUpdated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_updated")); ok { + tmp, err := time.Parse(time.RFC3339, timeUpdated.(string)) + if err != nil { + return result, err + } + result.TimeUpdated = &oci_common.SDKTime{Time: tmp} + } + + return result, nil +} + +func GsmDetailsToMap(obj oci_globally_distributed_database.GsmDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.ComputeCount != nil { + result["compute_count"] = float32(*obj.ComputeCount) + } + + if obj.DataStorageSizeInGbs != nil { + result["data_storage_size_in_gbs"] = float64(*obj.DataStorageSizeInGbs) + } + + result["metadata"] = obj.Metadata + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + result["status"] = string(obj.Status) + + if obj.SupportingResourceId != nil { + result["supporting_resource_id"] = string(*obj.SupportingResourceId) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.Format(time.RFC3339Nano) + } + + if obj.TimeSslCertificateExpires != nil { + result["time_ssl_certificate_expires"] = obj.TimeSslCertificateExpires.Format(time.RFC3339Nano) + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.Format(time.RFC3339Nano) + } + + return result +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToPatchInstruction(fieldKeyFormat string) (oci_globally_distributed_database.PatchInstruction, error) { + var baseObject oci_globally_distributed_database.PatchInstruction + //discriminator + operationRaw, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "operation")) + var operation string + if ok { + operation = operationRaw.(string) + } else { + operation = "" // default value + } + switch strings.ToLower(operation) { + case strings.ToLower("INSERT"): + details := oci_globally_distributed_database.PatchInsertInstruction{} + if value, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "value")); ok { + details.Value = &value + } + if selection, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "selection")); ok { + tmp := selection.(string) + details.Selection = &tmp + } + baseObject = details + case strings.ToLower("MERGE"): + details := oci_globally_distributed_database.PatchMergeInstruction{} + if value, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "value")); ok { + details.Value = &value + } + if selection, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "selection")); ok { + tmp := selection.(string) + details.Selection = &tmp + } + baseObject = details + case strings.ToLower("REMOVE"): + details := oci_globally_distributed_database.PatchRemoveInstruction{} + if selection, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "selection")); ok { + tmp := selection.(string) + details.Selection = &tmp + } + baseObject = details + default: + return nil, fmt.Errorf("unknown operation '%v' was specified", operation) + } + return baseObject, nil +} + +func PatchInstructionToMap(obj oci_globally_distributed_database.PatchInstruction) map[string]interface{} { + result := map[string]interface{}{} + switch v := (obj).(type) { + case oci_globally_distributed_database.PatchInsertInstruction: + result["operation"] = "INSERT" + + if v.Value != nil { + //result["value"] = []interface{}{objectToMap(v.Value)} + result["value"] = []interface{}{v.Value} + } + case oci_globally_distributed_database.PatchMergeInstruction: + result["operation"] = "MERGE" + + if v.Value != nil { + result["value"] = []interface{}{v.Value} + } + case oci_globally_distributed_database.PatchRemoveInstruction: + result["operation"] = "REMOVE" + default: + log.Printf("[WARN] Received 'operation' of unknown type %v", obj) + return nil + } + + return result +} + +func ShardedDatabaseSummaryToMap(obj oci_globally_distributed_database.ShardedDatabaseSummary) map[string]interface{} { + result := map[string]interface{}{} + switch v := (obj).(type) { + case oci_globally_distributed_database.DedicatedShardedDatabaseSummary: + result["db_deployment_type"] = "DEDICATED" + + if v.CompartmentId != nil { + result["compartment_id"] = string(*v.CompartmentId) + } + + if v.DefinedTags != nil { + result["defined_tags"] = tfresource.DefinedTagsToMap(v.DefinedTags) + } + + if v.DisplayName != nil { + result["display_name"] = string(*v.DisplayName) + } + + if v.FreeformTags != nil { + result["freeform_tags"] = v.FreeformTags + } + + if v.Id != nil { + result["id"] = v.Id + } + + result["state"] = v.LifecycleState + + result["lifecycle_state"] = v.LifecycleState + + result["lifecycle_state_details"] = v.LifecycleStateDetails + + if v.SystemTags != nil { + result["system_tags"] = tfresource.SystemTagsToMap(v.SystemTags) + } + + if v.TimeCreated != nil { + result["time_created"] = v.TimeCreated.String() + } + + if v.TimeUpdated != nil { + result["time_created"] = v.TimeUpdated.String() + } + + if v.CharacterSet != nil { + result["character_set"] = string(*v.CharacterSet) + } + + if v.Chunks != nil { + result["chunks"] = int(*v.Chunks) + } + + if v.ClusterCertificateCommonName != nil { + result["cluster_certificate_common_name"] = string(*v.ClusterCertificateCommonName) + } + + if v.DbVersion != nil { + result["db_version"] = string(*v.DbVersion) + } + + result["db_workload"] = string(v.DbWorkload) + + if v.ListenerPort != nil { + result["listener_port"] = int(*v.ListenerPort) + } + + if v.ListenerPortTls != nil { + result["listener_port_tls"] = int(*v.ListenerPortTls) + } + + if v.NcharacterSet != nil { + result["ncharacter_set"] = string(*v.NcharacterSet) + } + + if v.OnsPortLocal != nil { + result["ons_port_local"] = int(*v.OnsPortLocal) + } + + if v.OnsPortRemote != nil { + result["ons_port_remote"] = int(*v.OnsPortRemote) + } + + if v.Prefix != nil { + result["prefix"] = string(*v.Prefix) + } + + result["sharding_method"] = string(v.ShardingMethod) + + if v.TotalCpuCount != nil { + result["total_cpu_count"] = int(*v.TotalCpuCount) + } + + if v.TotalDataStorageSizeInGbs != nil { + result["total_data_storage_size_in_gbs"] = float64(*v.TotalDataStorageSizeInGbs) + } + default: + log.Printf("[WARN] Received 'db_deployment_type' of unknown type %v", obj) + return nil + } + + return result +} + +/* +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) mapToobject(fieldKeyFormat string) (oci_globally_distributed_database.Object, error) { + result := oci_globally_distributed_database.Object{} + + return result, nil +} + +func objectToMap(obj *oci_globally_distributed_database.Object) map[string]interface{} { + result := map[string]interface{}{} + + return result +} +*/ + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) populateTopLevelPolymorphicCreateShardedDatabaseRequest(request *oci_globally_distributed_database.CreateShardedDatabaseRequest) error { + //discriminator + dbDeploymentTypeRaw, ok := s.D.GetOkExists("db_deployment_type") + var dbDeploymentType string + if ok { + dbDeploymentType = dbDeploymentTypeRaw.(string) + } else { + dbDeploymentType = "" // default value + } + switch strings.ToLower(dbDeploymentType) { + case strings.ToLower("DEDICATED"): + details := oci_globally_distributed_database.CreateDedicatedShardedDatabase{} + if catalogDetails, ok := s.D.GetOkExists("catalog_details"); ok { + interfaces := catalogDetails.([]interface{}) + tmp := make([]oci_globally_distributed_database.CreateDedicatedCatalogDetail, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "catalog_details", stateDataIndex) + converted, err := s.mapToCreateDedicatedCatalogDetail(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("catalog_details") { + details.CatalogDetails = tmp + } + } + if characterSet, ok := s.D.GetOkExists("character_set"); ok { + tmp := characterSet.(string) + details.CharacterSet = &tmp + } + if chunks, ok := s.D.GetOkExists("chunks"); ok { + tmp := chunks.(int) + details.Chunks = &tmp + } + if clusterCertificateCommonName, ok := s.D.GetOkExists("cluster_certificate_common_name"); ok { + tmp := clusterCertificateCommonName.(string) + details.ClusterCertificateCommonName = &tmp + } + if dbVersion, ok := s.D.GetOkExists("db_version"); ok { + tmp := dbVersion.(string) + details.DbVersion = &tmp + } + if dbWorkload, ok := s.D.GetOkExists("db_workload"); ok { + details.DbWorkload = oci_globally_distributed_database.CreateDedicatedShardedDatabaseDbWorkloadEnum(dbWorkload.(string)) + } + if listenerPort, ok := s.D.GetOkExists("listener_port"); ok { + tmp := listenerPort.(int) + details.ListenerPort = &tmp + } + if listenerPortTls, ok := s.D.GetOkExists("listener_port_tls"); ok { + tmp := listenerPortTls.(int) + details.ListenerPortTls = &tmp + } + if ncharacterSet, ok := s.D.GetOkExists("ncharacter_set"); ok { + tmp := ncharacterSet.(string) + details.NcharacterSet = &tmp + } + if onsPortLocal, ok := s.D.GetOkExists("ons_port_local"); ok { + tmp := onsPortLocal.(int) + details.OnsPortLocal = &tmp + } + if onsPortRemote, ok := s.D.GetOkExists("ons_port_remote"); ok { + tmp := onsPortRemote.(int) + details.OnsPortRemote = &tmp + } + if prefix, ok := s.D.GetOkExists("prefix"); ok { + tmp := prefix.(string) + details.Prefix = &tmp + } + if shardDetails, ok := s.D.GetOkExists("shard_details"); ok { + interfaces := shardDetails.([]interface{}) + tmp := make([]oci_globally_distributed_database.CreateDedicatedShardDetail, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "shard_details", stateDataIndex) + converted, err := s.mapToCreateDedicatedShardDetail(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("shard_details") { + details.ShardDetails = tmp + } + } + if shardingMethod, ok := s.D.GetOkExists("sharding_method"); ok { + details.ShardingMethod = oci_globally_distributed_database.CreateDedicatedShardedDatabaseShardingMethodEnum(shardingMethod.(string)) + } + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + details.CompartmentId = &tmp + } + if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { + convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) + if err != nil { + return err + } + details.DefinedTags = convertedDefinedTags + } + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + details.DisplayName = &tmp + } + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + request.CreateShardedDatabaseDetails = details + default: + return fmt.Errorf("unknown db_deployment_type '%v' was specified", dbDeploymentType) + } + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) updateCompartment(compartment interface{}) error { + changeCompartmentRequest := oci_globally_distributed_database.ChangeShardedDatabaseCompartmentRequest{} + + compartmentTmp := compartment.(string) + changeCompartmentRequest.CompartmentId = &compartmentTmp + + idTmp := s.D.Id() + changeCompartmentRequest.ShardedDatabaseId = &idTmp + + changeCompartmentRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + response, err := s.Client.ChangeShardedDatabaseCompartment(context.Background(), changeCompartmentRequest) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getShardedDatabaseFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database"), oci_globally_distributed_database.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_sharded_databases_data_source.go b/internal/service/globally_distributed_database/globally_distributed_database_sharded_databases_data_source.go new file mode 100644 index 00000000000..8e36ce1bac6 --- /dev/null +++ b/internal/service/globally_distributed_database/globally_distributed_database_sharded_databases_data_source.go @@ -0,0 +1,264 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package globally_distributed_database + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GloballyDistributedDatabaseShardedDatabaseSummaryResource() *schema.Resource { + return &schema.Resource{ + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + // Required + "compartment_id": { + Type: schema.TypeString, + Computed: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "db_deployment_type": { + Type: schema.TypeString, + Computed: true, + }, + "defined_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + DiffSuppressFunc: tfresource.DefinedTagsDiffSuppressFunction, + Elem: schema.TypeString, + }, + "display_name": { + Type: schema.TypeString, + Computed: true, + }, + "freeform_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + Elem: schema.TypeString, + }, + "lifecycle_state": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "lifecycle_state_details": { + Type: schema.TypeString, + Computed: true, + }, + "system_tags": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + "character_set": { + Type: schema.TypeString, + Computed: true, + }, + "chunks": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "cluster_certificate_common_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "db_version": { + Type: schema.TypeString, + ForceNew: true, + }, + "db_workload": { + Type: schema.TypeString, + ForceNew: true, + }, + "listener_port": { + Type: schema.TypeInt, + ForceNew: true, + }, + "listener_port_tls": { + Type: schema.TypeInt, + ForceNew: true, + }, + "ncharacter_set": { + Type: schema.TypeString, + Required: true, + }, + "ons_port_local": { + Type: schema.TypeInt, + ForceNew: true, + }, + "ons_port_remote": { + Type: schema.TypeInt, + ForceNew: true, + }, + "prefix": { + Type: schema.TypeString, + ForceNew: true, + }, + "sharding_method": { + Type: schema.TypeString, + ForceNew: true, + }, + "total_cpu_count": { + Type: schema.TypeFloat, + ForceNew: true, + }, + "total_data_storage_size_in_gbs": { + Type: schema.TypeFloat, + ForceNew: true, + }, + }, + } +} + +func GloballyDistributedDatabaseShardedDatabasesDataSource() *schema.Resource { + return &schema.Resource{ + Read: readGloballyDistributedDatabaseShardedDatabases, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Optional: true, + }, + "state": { + Type: schema.TypeString, + Optional: true, + }, + /*"lifecycle_state": { + Type: schema.TypeString, + Optional: true, + },*/ + "sharded_database_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + + "items": { + Type: schema.TypeList, + Computed: true, + Elem: tfresource.GetDataSourceItemSchema(GloballyDistributedDatabaseShardedDatabaseSummaryResource()), + //Elem: tfresource.GetDataSourceItemSchema(GloballyDistributedDatabaseShardedDatabaseResource()), + }, + }, + }, + }, + }, + } +} + +func readGloballyDistributedDatabaseShardedDatabases(d *schema.ResourceData, m interface{}) error { + sync := &GloballyDistributedDatabaseShardedDatabasesDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() + + return tfresource.ReadResource(sync) +} + +type GloballyDistributedDatabaseShardedDatabasesDataSourceCrud struct { + D *schema.ResourceData + Client *oci_globally_distributed_database.ShardedDatabaseServiceClient + Res *oci_globally_distributed_database.ListShardedDatabasesResponse +} + +func (s *GloballyDistributedDatabaseShardedDatabasesDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GloballyDistributedDatabaseShardedDatabasesDataSourceCrud) Get() error { + request := oci_globally_distributed_database.ListShardedDatabasesRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if state, ok := s.D.GetOkExists("state"); ok { + request.LifecycleState = oci_globally_distributed_database.ShardedDatabaseLifecycleStateEnum(state.(string)) + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "globally_distributed_database") + + response, err := s.Client.ListShardedDatabases(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListShardedDatabases(context.Background(), request) + if err != nil { + return err + } + + s.Res.Items = append(s.Res.Items, listResponse.Items...) + request.Page = listResponse.OpcNextPage + } + + return nil +} + +func (s *GloballyDistributedDatabaseShardedDatabasesDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("GloballyDistributedDatabaseShardedDatabasesDataSource-", GloballyDistributedDatabaseShardedDatabasesDataSource(), s.D)) + resources := []map[string]interface{}{} + shardedDatabase := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, ShardedDatabaseSummaryToMap(item)) + } + shardedDatabase["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, GloballyDistributedDatabaseShardedDatabasesDataSource().Schema["sharded_database_collection"].Elem.(*schema.Resource).Schema) + shardedDatabase["items"] = items + } + + resources = append(resources, shardedDatabase) + if err := s.D.Set("sharded_database_collection", resources); err != nil { + return err + } + + return nil +} diff --git a/internal/service/globally_distributed_database/register_datasource.go b/internal/service/globally_distributed_database/register_datasource.go new file mode 100644 index 00000000000..d5f69fac9cb --- /dev/null +++ b/internal/service/globally_distributed_database/register_datasource.go @@ -0,0 +1,13 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package globally_distributed_database + +import "github.com/oracle/terraform-provider-oci/internal/tfresource" + +func RegisterDatasource() { + tfresource.RegisterDatasource("oci_globally_distributed_database_private_endpoint", GloballyDistributedDatabasePrivateEndpointDataSource()) + tfresource.RegisterDatasource("oci_globally_distributed_database_private_endpoints", GloballyDistributedDatabasePrivateEndpointsDataSource()) + tfresource.RegisterDatasource("oci_globally_distributed_database_sharded_database", GloballyDistributedDatabaseShardedDatabaseDataSource()) + tfresource.RegisterDatasource("oci_globally_distributed_database_sharded_databases", GloballyDistributedDatabaseShardedDatabasesDataSource()) +} diff --git a/internal/service/globally_distributed_database/register_resource.go b/internal/service/globally_distributed_database/register_resource.go new file mode 100644 index 00000000000..9f7a7185b68 --- /dev/null +++ b/internal/service/globally_distributed_database/register_resource.go @@ -0,0 +1,11 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package globally_distributed_database + +import "github.com/oracle/terraform-provider-oci/internal/tfresource" + +func RegisterResource() { + tfresource.RegisterResource("oci_globally_distributed_database_private_endpoint", GloballyDistributedDatabasePrivateEndpointResource()) + tfresource.RegisterResource("oci_globally_distributed_database_sharded_database", GloballyDistributedDatabaseShardedDatabaseResource()) +} diff --git a/internal/service/opsi/opsi_database_insight_data_source.go b/internal/service/opsi/opsi_database_insight_data_source.go index 925afd8bf0c..d62b3e0bb21 100644 --- a/internal/service/opsi/opsi_database_insight_data_source.go +++ b/internal/service/opsi/opsi_database_insight_data_source.go @@ -136,6 +136,78 @@ func (s *OpsiDatabaseInsightDataSourceCrud) SetData() error { s.D.Set("time_created", v.TimeCreated.String()) } + if v.TimeUpdated != nil { + s.D.Set("time_updated", v.TimeUpdated.String()) + } + case oci_opsi.MdsMySqlDatabaseInsight: + s.D.Set("entity_source", "MDS_MYSQL_DATABASE_SYSTEM") + + if v.DatabaseDisplayName != nil { + s.D.Set("database_display_name", *v.DatabaseDisplayName) + } + + if v.DatabaseId != nil { + s.D.Set("database_id", *v.DatabaseId) + } + + if v.DatabaseName != nil { + s.D.Set("database_name", *v.DatabaseName) + } + + if v.DatabaseResourceType != nil { + s.D.Set("database_resource_type", *v.DatabaseResourceType) + } + + if v.IsHeatWaveClusterAttached != nil { + s.D.Set("is_heat_wave_cluster_attached", *v.IsHeatWaveClusterAttached) + } + + if v.IsHighlyAvailable != nil { + s.D.Set("is_highly_available", *v.IsHighlyAvailable) + } + + if v.CompartmentId != nil { + s.D.Set("compartment_id", *v.CompartmentId) + } + + if v.DatabaseConnectionStatusDetails != nil { + s.D.Set("database_connection_status_details", *v.DatabaseConnectionStatusDetails) + } + + if v.DatabaseType != nil { + s.D.Set("database_type", *v.DatabaseType) + } + + if v.DatabaseVersion != nil { + s.D.Set("database_version", *v.DatabaseVersion) + } + + if v.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(v.DefinedTags)) + } + + s.D.Set("freeform_tags", v.FreeformTags) + + if v.LifecycleDetails != nil { + s.D.Set("lifecycle_details", *v.LifecycleDetails) + } + + //if v.ProcessorCount != nil { + // s.D.Set("processor_count", *v.ProcessorCount) + //} + + s.D.Set("state", v.LifecycleState) + + s.D.Set("status", v.Status) + + if v.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(v.SystemTags)) + } + + if v.TimeCreated != nil { + s.D.Set("time_created", v.TimeCreated.String()) + } + if v.TimeUpdated != nil { s.D.Set("time_updated", v.TimeUpdated.String()) } diff --git a/internal/service/opsi/opsi_database_insight_resource.go b/internal/service/opsi/opsi_database_insight_resource.go index 1e0a1c6056d..0d4d0f8c389 100644 --- a/internal/service/opsi/opsi_database_insight_resource.go +++ b/internal/service/opsi/opsi_database_insight_resource.go @@ -43,6 +43,7 @@ func OpsiDatabaseInsightResource() *schema.Resource { DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, ValidateFunc: validation.StringInSlice([]string{ "EM_MANAGED_EXTERNAL_DATABASE", + "MDS_MYSQL_DATABASE_SYSTEM", "PE_COMANAGED_DATABASE", }, true), }, @@ -313,6 +314,14 @@ func OpsiDatabaseInsightResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "is_heat_wave_cluster_attached": { + Type: schema.TypeBool, + Computed: true, + }, + "is_highly_available": { + Type: schema.TypeBool, + Computed: true, + }, "lifecycle_details": { Type: schema.TypeString, Computed: true, @@ -822,6 +831,78 @@ func (s *OpsiDatabaseInsightResourceCrud) SetData() error { s.D.Set("time_created", v.TimeCreated.String()) } + if v.TimeUpdated != nil { + s.D.Set("time_updated", v.TimeUpdated.String()) + } + case oci_opsi.MdsMySqlDatabaseInsight: + s.D.Set("entity_source", "MDS_MYSQL_DATABASE_SYSTEM") + + if v.DatabaseDisplayName != nil { + s.D.Set("database_display_name", *v.DatabaseDisplayName) + } + + if v.DatabaseId != nil { + s.D.Set("database_id", *v.DatabaseId) + } + + if v.DatabaseName != nil { + s.D.Set("database_name", *v.DatabaseName) + } + + if v.DatabaseResourceType != nil { + s.D.Set("database_resource_type", *v.DatabaseResourceType) + } + + if v.IsHeatWaveClusterAttached != nil { + s.D.Set("is_heat_wave_cluster_attached", *v.IsHeatWaveClusterAttached) + } + + if v.IsHighlyAvailable != nil { + s.D.Set("is_highly_available", *v.IsHighlyAvailable) + } + + if v.CompartmentId != nil { + s.D.Set("compartment_id", *v.CompartmentId) + } + + if v.DatabaseConnectionStatusDetails != nil { + s.D.Set("database_connection_status_details", *v.DatabaseConnectionStatusDetails) + } + + if v.DatabaseType != nil { + s.D.Set("database_type", *v.DatabaseType) + } + + if v.DatabaseVersion != nil { + s.D.Set("database_version", *v.DatabaseVersion) + } + + if v.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(v.DefinedTags)) + } + + s.D.Set("freeform_tags", v.FreeformTags) + + if v.LifecycleDetails != nil { + s.D.Set("lifecycle_details", *v.LifecycleDetails) + } + + if v.ProcessorCount != nil { + s.D.Set("processor_count", *v.ProcessorCount) + } + + s.D.Set("state", v.LifecycleState) + + s.D.Set("status", v.Status) + + if v.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(v.SystemTags)) + } + + if v.TimeCreated != nil { + s.D.Set("time_created", v.TimeCreated.String()) + } + if v.TimeUpdated != nil { s.D.Set("time_updated", v.TimeUpdated.String()) } @@ -1194,22 +1275,79 @@ func DatabaseInsightSummaryToMap(obj oci_opsi.DatabaseInsightSummary) map[string if v.DefinedTags != nil { result["defined_tags"] = tfresource.DefinedTagsToMap(v.DefinedTags) } + case oci_opsi.MdsMySqlDatabaseInsightSummary: + result["entity_source"] = "MDS_MYSQL_DATABASE_SYSTEM" - if v.DatabaseResourceType != nil { - result["database_resource_type"] = string(*v.DatabaseResourceType) + if v.Id != nil { + result["id"] = string(*v.Id) } - if v.OpsiPrivateEndpointId != nil { - result["opsi_private_endpoint_id"] = string(*v.OpsiPrivateEndpointId) + if v.DatabaseId != nil { + result["database_id"] = string(*v.DatabaseId) } - if v.ParentId != nil { - result["parent_id"] = string(*v.ParentId) + if v.CompartmentId != nil { + result["compartment_id"] = string(*v.CompartmentId) } - if v.RootId != nil { - result["root_id"] = string(*v.RootId) + if v.DatabaseName != nil { + result["database_name"] = string(*v.DatabaseName) } + + if v.DatabaseDisplayName != nil { + result["database_display_name"] = string(*v.DatabaseDisplayName) + } + + if v.DatabaseType != nil { + result["database_type"] = string(*v.DatabaseType) + } + + if v.DatabaseVersion != nil { + result["database_version"] = string(*v.DatabaseVersion) + } + + if v.DatabaseHostNames != nil { + result["database_host_names"] = v.DatabaseHostNames + } + + if v.LifecycleDetails != nil { + result["lifecycle_details"] = string(*v.LifecycleDetails) + } + + //if v.ProcessorCount != nil { + // result["processor_count"] = fmt.Sprint(*v.ProcessorCount) + //} + + result["state"] = string(v.LifecycleState) + + result["status"] = string(v.Status) + + if v.TimeCreated != nil { + result["time_created"] = v.TimeCreated.String() + } + + if v.TimeUpdated != nil { + result["time_updated"] = v.TimeUpdated.String() + } + + if v.SystemTags != nil { + result["system_tags"] = tfresource.SystemTagsToMap(v.SystemTags) + } + + result["freeform_tags"] = v.FreeformTags + + if v.DefinedTags != nil { + result["defined_tags"] = tfresource.DefinedTagsToMap(v.DefinedTags) + } + + if v.DatabaseConnectionStatusDetails != nil { + result["database_connection_status_details"] = string(*v.DatabaseConnectionStatusDetails) + } + + if v.DatabaseResourceType != nil { + result["database_resource_type"] = string(*v.DatabaseResourceType) + } + default: log.Printf("[WARN] Received 'entity_source' of unknown type %v", obj) } @@ -1368,6 +1506,27 @@ func (s *OpsiDatabaseInsightResourceCrud) populateTopLevelPolymorphicCreateDatab details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } request.CreateDatabaseInsightDetails = details + case strings.ToLower("MDS_MYSQL_DATABASE_SYSTEM"): + details := oci_opsi.CreateMdsMySqlDatabaseInsightDetails{} + if databaseId, ok := s.D.GetOkExists("database_id"); ok { + tmp := databaseId.(string) + details.DatabaseId = &tmp + } + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + details.CompartmentId = &tmp + } + if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { + convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) + if err != nil { + return err + } + details.DefinedTags = convertedDefinedTags + } + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + request.CreateDatabaseInsightDetails = details case strings.ToLower("PE_COMANAGED_DATABASE"): details := oci_opsi.CreatePeComanagedDatabaseInsightDetails{} @@ -1483,6 +1642,21 @@ func (s *OpsiDatabaseInsightResourceCrud) populateTopLevelPolymorphicUpdateDatab details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } request.UpdateDatabaseInsightDetails = details + case strings.ToLower("MDS_MYSQL_DATABASE_SYSTEM"): + details := oci_opsi.UpdateMdsMySqlDatabaseInsight{} + tmp := s.D.Id() + request.DatabaseInsightId = &tmp + if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { + convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) + if err != nil { + return err + } + details.DefinedTags = convertedDefinedTags + } + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + request.UpdateDatabaseInsightDetails = details default: return fmt.Errorf("unknown entity_source '%v' was specified", entitySource) } @@ -1548,6 +1722,9 @@ func (s *OpsiDatabaseInsightResourceCrud) populateTopLevelPolymorphicEnableDatab details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } request.EnableDatabaseInsightDetails = details + case strings.ToLower("MDS_MYSQL_DATABASE_SYSTEM"): + details := oci_opsi.EnableMdsMySqlDatabaseInsightDetails{} + request.EnableDatabaseInsightDetails = details default: return fmt.Errorf("unknown entity_source '%v' was specified", entitySource) } diff --git a/internal/tfresource/crud_helpers.go b/internal/tfresource/crud_helpers.go index 905bec85a6f..9a85164734b 100644 --- a/internal/tfresource/crud_helpers.go +++ b/internal/tfresource/crud_helpers.go @@ -12,10 +12,12 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "log" "math" "os" "reflect" + "regexp" "sort" "strconv" "strings" @@ -608,6 +610,46 @@ func listOfMapEqualIgnoreOrderSuppressDiff(key string, d schemaResourceData) boo return true } +func MaskedPasswordSuppressDiff(k, old, new string, d *schema.ResourceData) bool { + // Check if the value is a masked password + if strings.Contains(old, "****") { + // Suppress the difference + return true + } + // Otherwise, allow the difference to be displayed + return false +} + +func WalletSuppressDiff(k, old, new string, d *schema.ResourceData) bool { + + if new != "" && !IsBase64(new) { + contents, err := ioutil.ReadFile(new) + if err == nil { + sEnc := base64.StdEncoding.EncodeToString([]byte(contents)) + + if sEnc == old { + // Suppress the difference + return true + } + } + } + // Otherwise, allow the difference to be displayed + return false +} + +const ( + Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" +) + +var ( + rxBase64 = regexp.MustCompile(Base64) +) + +// IsBase64 check if a string is base64 encoded. +func IsBase64(str string) bool { + return rxBase64.MatchString(str) +} + func FieldDeprecatedAndAvoidReferences(deprecatedFieldName string) string { return fmt.Sprintf("The '%s' field has been deprecated and may be removed in a future version. Do not use this field.", deprecatedFieldName) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/basic_authentication_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/basic_authentication_details.go new file mode 100644 index 00000000000..61a38a6b040 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/basic_authentication_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BasicAuthenticationDetails Details for basic authentication. +type BasicAuthenticationDetails struct { + + // Username for authentication. + Username *string `mandatory:"true" json:"username"` + + Password Password `mandatory:"true" json:"password"` +} + +func (m BasicAuthenticationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BasicAuthenticationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *BasicAuthenticationDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Username *string `json:"username"` + Password password `json:"password"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Username = model.Username + + nn, e = model.Password.UnmarshalPolymorphicJSON(model.Password.JsonData) + if e != nil { + return + } + if nn != nil { + m.Password = nn.(Password) + } else { + m.Password = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/create_monitor_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/create_monitor_details.go index b521f938135..d84181d0749 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/create_monitor_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/create_monitor_details.go @@ -50,10 +50,10 @@ type CreateMonitorDetails struct { TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` // Specify the endpoint on which to run the monitor. - // For BROWSER, REST and NETWORK monitor types, target is mandatory. + // For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. Target *string `mandatory:"false" json:"target"` // List of script parameters in the monitor. @@ -83,6 +83,9 @@ type CreateMonitorDetails struct { // Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN). BatchIntervalInSeconds *int `mandatory:"false" json:"batchIntervalInSeconds"` + + // If enabled, domain name will resolve to an IPv6 address. + IsIPv6 *bool `mandatory:"false" json:"isIPv6"` } func (m CreateMonitorDetails) String() string { @@ -127,6 +130,7 @@ func (m *CreateMonitorDetails) UnmarshalJSON(data []byte) (e error) { IsRunNow *bool `json:"isRunNow"` SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` + IsIPv6 *bool `json:"isIPv6"` DisplayName *string `json:"displayName"` MonitorType MonitorTypesEnum `json:"monitorType"` VantagePoints []string `json:"vantagePoints"` @@ -174,6 +178,8 @@ func (m *CreateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.BatchIntervalInSeconds = model.BatchIntervalInSeconds + m.IsIPv6 = model.IsIPv6 + m.DisplayName = model.DisplayName m.MonitorType = model.MonitorType diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_connection_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_connection_type.go new file mode 100644 index 00000000000..90977ad3331 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_connection_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "strings" +) + +// DatabaseConnectionTypeEnum Enum with underlying type: string +type DatabaseConnectionTypeEnum string + +// Set of constants representing the allowable values for DatabaseConnectionTypeEnum +const ( + DatabaseConnectionTypeCloudWallet DatabaseConnectionTypeEnum = "CLOUD_WALLET" + DatabaseConnectionTypeCustomJdbc DatabaseConnectionTypeEnum = "CUSTOM_JDBC" +) + +var mappingDatabaseConnectionTypeEnum = map[string]DatabaseConnectionTypeEnum{ + "CLOUD_WALLET": DatabaseConnectionTypeCloudWallet, + "CUSTOM_JDBC": DatabaseConnectionTypeCustomJdbc, +} + +var mappingDatabaseConnectionTypeEnumLowerCase = map[string]DatabaseConnectionTypeEnum{ + "cloud_wallet": DatabaseConnectionTypeCloudWallet, + "custom_jdbc": DatabaseConnectionTypeCustomJdbc, +} + +// GetDatabaseConnectionTypeEnumValues Enumerates the set of values for DatabaseConnectionTypeEnum +func GetDatabaseConnectionTypeEnumValues() []DatabaseConnectionTypeEnum { + values := make([]DatabaseConnectionTypeEnum, 0) + for _, v := range mappingDatabaseConnectionTypeEnum { + values = append(values, v) + } + return values +} + +// GetDatabaseConnectionTypeEnumStringValues Enumerates the set of values in String for DatabaseConnectionTypeEnum +func GetDatabaseConnectionTypeEnumStringValues() []string { + return []string{ + "CLOUD_WALLET", + "CUSTOM_JDBC", + } +} + +// GetMappingDatabaseConnectionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDatabaseConnectionTypeEnum(val string) (DatabaseConnectionTypeEnum, bool) { + enum, ok := mappingDatabaseConnectionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_type.go new file mode 100644 index 00000000000..0701e1cabad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "strings" +) + +// DatabaseTypeEnum Enum with underlying type: string +type DatabaseTypeEnum string + +// Set of constants representing the allowable values for DatabaseTypeEnum +const ( + DatabaseTypeOracle DatabaseTypeEnum = "ORACLE" + DatabaseTypeMysql DatabaseTypeEnum = "MYSQL" +) + +var mappingDatabaseTypeEnum = map[string]DatabaseTypeEnum{ + "ORACLE": DatabaseTypeOracle, + "MYSQL": DatabaseTypeMysql, +} + +var mappingDatabaseTypeEnumLowerCase = map[string]DatabaseTypeEnum{ + "oracle": DatabaseTypeOracle, + "mysql": DatabaseTypeMysql, +} + +// GetDatabaseTypeEnumValues Enumerates the set of values for DatabaseTypeEnum +func GetDatabaseTypeEnumValues() []DatabaseTypeEnum { + values := make([]DatabaseTypeEnum, 0) + for _, v := range mappingDatabaseTypeEnum { + values = append(values, v) + } + return values +} + +// GetDatabaseTypeEnumStringValues Enumerates the set of values in String for DatabaseTypeEnum +func GetDatabaseTypeEnumStringValues() []string { + return []string{ + "ORACLE", + "MYSQL", + } +} + +// GetMappingDatabaseTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDatabaseTypeEnum(val string) (DatabaseTypeEnum, bool) { + enum, ok := mappingDatabaseTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_wallet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_wallet_details.go new file mode 100644 index 00000000000..a9e8025b43e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/database_wallet_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseWalletDetails Details for database wallet. +type DatabaseWalletDetails struct { + + // The database wallet configuration zip file. + DatabaseWallet *string `mandatory:"true" json:"databaseWallet"` + + // Service name of the database. + ServiceName *string `mandatory:"true" json:"serviceName"` +} + +func (m DatabaseWalletDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DatabaseWalletDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_monitor_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_monitor_configuration.go new file mode 100644 index 00000000000..74870cd3503 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_monitor_configuration.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FtpMonitorConfiguration Request configuration details for the FTP monitor type. +type FtpMonitorConfiguration struct { + + // If isFailureRetried is enabled, then a failed call will be retried. + IsFailureRetried *bool `mandatory:"false" json:"isFailureRetried"` + + DnsConfiguration *DnsConfiguration `mandatory:"false" json:"dnsConfiguration"` + + // If enabled, Active mode will be used for the FTP connection. + IsActiveMode *bool `mandatory:"false" json:"isActiveMode"` + + FtpBasicAuthenticationDetails *BasicAuthenticationDetails `mandatory:"false" json:"ftpBasicAuthenticationDetails"` + + // Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + DownloadSizeLimitInBytes *int `mandatory:"false" json:"downloadSizeLimitInBytes"` + + // File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. + UploadFileSizeInBytes *int `mandatory:"false" json:"uploadFileSizeInBytes"` + + NetworkConfiguration *NetworkConfiguration `mandatory:"false" json:"networkConfiguration"` + + // Expected FTP response codes. For status code range, set values such as 2xx, 3xx. + VerifyResponseCodes []string `mandatory:"false" json:"verifyResponseCodes"` + + // Verify response content against regular expression based string. + // If response content does not match the verifyResponseContent value, then it will be considered a failure. + VerifyResponseContent *string `mandatory:"false" json:"verifyResponseContent"` + + // FTP protocol type. + FtpProtocol FtpProtocolEnum `mandatory:"false" json:"ftpProtocol,omitempty"` + + // FTP monitor request type. + FtpRequestType FtpRequestTypeEnum `mandatory:"false" json:"ftpRequestType,omitempty"` +} + +// GetIsFailureRetried returns IsFailureRetried +func (m FtpMonitorConfiguration) GetIsFailureRetried() *bool { + return m.IsFailureRetried +} + +// GetDnsConfiguration returns DnsConfiguration +func (m FtpMonitorConfiguration) GetDnsConfiguration() *DnsConfiguration { + return m.DnsConfiguration +} + +func (m FtpMonitorConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FtpMonitorConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingFtpProtocolEnum(string(m.FtpProtocol)); !ok && m.FtpProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FtpProtocol: %s. Supported values are: %s.", m.FtpProtocol, strings.Join(GetFtpProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingFtpRequestTypeEnum(string(m.FtpRequestType)); !ok && m.FtpRequestType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FtpRequestType: %s. Supported values are: %s.", m.FtpRequestType, strings.Join(GetFtpRequestTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m FtpMonitorConfiguration) MarshalJSON() (buff []byte, e error) { + type MarshalTypeFtpMonitorConfiguration FtpMonitorConfiguration + s := struct { + DiscriminatorParam string `json:"configType"` + MarshalTypeFtpMonitorConfiguration + }{ + "FTP_CONFIG", + (MarshalTypeFtpMonitorConfiguration)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_protocol.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_protocol.go new file mode 100644 index 00000000000..8ae8cc602cf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_protocol.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "strings" +) + +// FtpProtocolEnum Enum with underlying type: string +type FtpProtocolEnum string + +// Set of constants representing the allowable values for FtpProtocolEnum +const ( + FtpProtocolFtp FtpProtocolEnum = "FTP" + FtpProtocolFtps FtpProtocolEnum = "FTPS" + FtpProtocolSftp FtpProtocolEnum = "SFTP" +) + +var mappingFtpProtocolEnum = map[string]FtpProtocolEnum{ + "FTP": FtpProtocolFtp, + "FTPS": FtpProtocolFtps, + "SFTP": FtpProtocolSftp, +} + +var mappingFtpProtocolEnumLowerCase = map[string]FtpProtocolEnum{ + "ftp": FtpProtocolFtp, + "ftps": FtpProtocolFtps, + "sftp": FtpProtocolSftp, +} + +// GetFtpProtocolEnumValues Enumerates the set of values for FtpProtocolEnum +func GetFtpProtocolEnumValues() []FtpProtocolEnum { + values := make([]FtpProtocolEnum, 0) + for _, v := range mappingFtpProtocolEnum { + values = append(values, v) + } + return values +} + +// GetFtpProtocolEnumStringValues Enumerates the set of values in String for FtpProtocolEnum +func GetFtpProtocolEnumStringValues() []string { + return []string{ + "FTP", + "FTPS", + "SFTP", + } +} + +// GetMappingFtpProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFtpProtocolEnum(val string) (FtpProtocolEnum, bool) { + enum, ok := mappingFtpProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_request_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_request_type.go new file mode 100644 index 00000000000..6c72ad624ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/ftp_request_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "strings" +) + +// FtpRequestTypeEnum Enum with underlying type: string +type FtpRequestTypeEnum string + +// Set of constants representing the allowable values for FtpRequestTypeEnum +const ( + FtpRequestTypeList FtpRequestTypeEnum = "LIST" + FtpRequestTypeUpload FtpRequestTypeEnum = "UPLOAD" + FtpRequestTypeDownload FtpRequestTypeEnum = "DOWNLOAD" +) + +var mappingFtpRequestTypeEnum = map[string]FtpRequestTypeEnum{ + "LIST": FtpRequestTypeList, + "UPLOAD": FtpRequestTypeUpload, + "DOWNLOAD": FtpRequestTypeDownload, +} + +var mappingFtpRequestTypeEnumLowerCase = map[string]FtpRequestTypeEnum{ + "list": FtpRequestTypeList, + "upload": FtpRequestTypeUpload, + "download": FtpRequestTypeDownload, +} + +// GetFtpRequestTypeEnumValues Enumerates the set of values for FtpRequestTypeEnum +func GetFtpRequestTypeEnumValues() []FtpRequestTypeEnum { + values := make([]FtpRequestTypeEnum, 0) + for _, v := range mappingFtpRequestTypeEnum { + values = append(values, v) + } + return values +} + +// GetFtpRequestTypeEnumStringValues Enumerates the set of values in String for FtpRequestTypeEnum +func GetFtpRequestTypeEnumStringValues() []string { + return []string{ + "LIST", + "UPLOAD", + "DOWNLOAD", + } +} + +// GetMappingFtpRequestTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFtpRequestTypeEnum(val string) (FtpRequestTypeEnum, bool) { + enum, ok := mappingFtpRequestTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/list_monitors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/list_monitors_request_response.go index f9e4407cb65..de3d007254a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/list_monitors_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/list_monitors_request_response.go @@ -31,7 +31,7 @@ type ListMonitorsRequest struct { VantagePoint *string `mandatory:"false" contributesTo:"query" name:"vantagePoint"` // A filter to return only monitors that match the given monitor type. - // Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST and NETWORK. + // Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST, NETWORK, DNS, FTP and SQL. MonitorType *string `mandatory:"false" contributesTo:"query" name:"monitorType"` // A filter to return only monitors that match the status given. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor.go index a2f9b299475..07c4d04c723 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor.go @@ -28,7 +28,7 @@ type Monitor struct { // Type of monitor. MonitorType MonitorTypesEnum `mandatory:"true" json:"monitorType"` - // List of public and dedicated vantage points where the monitor is running. + // List of public, dedicated and onPremise vantage points where the monitor is running. VantagePoints []VantagePointInfo `mandatory:"true" json:"vantagePoints"` // Number of vantage points where monitor is running. @@ -67,10 +67,10 @@ type Monitor struct { BatchIntervalInSeconds *int `mandatory:"true" json:"batchIntervalInSeconds"` // Specify the endpoint on which to run the monitor. - // For BROWSER, REST and NETWORK monitor types, target is mandatory. + // For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. Target *string `mandatory:"false" json:"target"` // List of script parameters. Example: `[{"monitorScriptParameter": {"paramName": "userid", "paramValue":"testuser"}, "isSecret": false, "isOverwritten": false}]` @@ -99,6 +99,15 @@ type Monitor struct { // Defined tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // If enabled, domain name will resolve to an IPv6 address. + IsIPv6 *bool `mandatory:"false" json:"isIPv6"` + + // Name of the user that created the monitor. + CreatedBy *string `mandatory:"false" json:"createdBy"` + + // Name of the user that recently updated the monitor. + LastUpdatedBy *string `mandatory:"false" json:"lastUpdatedBy"` } func (m Monitor) String() string { @@ -138,6 +147,9 @@ func (m *Monitor) UnmarshalJSON(data []byte) (e error) { TimeUpdated *common.SDKTime `json:"timeUpdated"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` + IsIPv6 *bool `json:"isIPv6"` + CreatedBy *string `json:"createdBy"` + LastUpdatedBy *string `json:"lastUpdatedBy"` Id *string `json:"id"` DisplayName *string `json:"displayName"` MonitorType MonitorTypesEnum `json:"monitorType"` @@ -185,6 +197,12 @@ func (m *Monitor) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags + m.IsIPv6 = model.IsIPv6 + + m.CreatedBy = model.CreatedBy + + m.LastUpdatedBy = model.LastUpdatedBy + m.Id = model.Id m.DisplayName = model.DisplayName diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_configuration.go index 8e577dcc1bf..5444747359b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_configuration.go @@ -59,6 +59,10 @@ func (m *monitorconfiguration) UnmarshalPolymorphicJSON(data []byte) (interface{ var err error switch m.ConfigType { + case "FTP_CONFIG": + mm := FtpMonitorConfiguration{} + err = json.Unmarshal(data, &mm) + return mm, err case "DNSSEC_CONFIG": mm := DnsSecMonitorConfiguration{} err = json.Unmarshal(data, &mm) @@ -67,6 +71,10 @@ func (m *monitorconfiguration) UnmarshalPolymorphicJSON(data []byte) (interface{ mm := DnsTraceMonitorConfiguration{} err = json.Unmarshal(data, &mm) return mm, err + case "SQL_CONFIG": + mm := SqlMonitorConfiguration{} + err = json.Unmarshal(data, &mm) + return mm, err case "SCRIPTED_REST_CONFIG": mm := ScriptedRestMonitorConfiguration{} err = json.Unmarshal(data, &mm) @@ -136,6 +144,8 @@ const ( MonitorConfigurationConfigTypeDnsServerConfig MonitorConfigurationConfigTypeEnum = "DNS_SERVER_CONFIG" MonitorConfigurationConfigTypeDnsTraceConfig MonitorConfigurationConfigTypeEnum = "DNS_TRACE_CONFIG" MonitorConfigurationConfigTypeDnssecConfig MonitorConfigurationConfigTypeEnum = "DNSSEC_CONFIG" + MonitorConfigurationConfigTypeFtpConfig MonitorConfigurationConfigTypeEnum = "FTP_CONFIG" + MonitorConfigurationConfigTypeSqlConfig MonitorConfigurationConfigTypeEnum = "SQL_CONFIG" ) var mappingMonitorConfigurationConfigTypeEnum = map[string]MonitorConfigurationConfigTypeEnum{ @@ -147,6 +157,8 @@ var mappingMonitorConfigurationConfigTypeEnum = map[string]MonitorConfigurationC "DNS_SERVER_CONFIG": MonitorConfigurationConfigTypeDnsServerConfig, "DNS_TRACE_CONFIG": MonitorConfigurationConfigTypeDnsTraceConfig, "DNSSEC_CONFIG": MonitorConfigurationConfigTypeDnssecConfig, + "FTP_CONFIG": MonitorConfigurationConfigTypeFtpConfig, + "SQL_CONFIG": MonitorConfigurationConfigTypeSqlConfig, } var mappingMonitorConfigurationConfigTypeEnumLowerCase = map[string]MonitorConfigurationConfigTypeEnum{ @@ -158,6 +170,8 @@ var mappingMonitorConfigurationConfigTypeEnumLowerCase = map[string]MonitorConfi "dns_server_config": MonitorConfigurationConfigTypeDnsServerConfig, "dns_trace_config": MonitorConfigurationConfigTypeDnsTraceConfig, "dnssec_config": MonitorConfigurationConfigTypeDnssecConfig, + "ftp_config": MonitorConfigurationConfigTypeFtpConfig, + "sql_config": MonitorConfigurationConfigTypeSqlConfig, } // GetMonitorConfigurationConfigTypeEnumValues Enumerates the set of values for MonitorConfigurationConfigTypeEnum @@ -180,6 +194,8 @@ func GetMonitorConfigurationConfigTypeEnumStringValues() []string { "DNS_SERVER_CONFIG", "DNS_TRACE_CONFIG", "DNSSEC_CONFIG", + "FTP_CONFIG", + "SQL_CONFIG", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_summary.go index 905de956aa7..0dbc7fac2cf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_summary.go @@ -28,7 +28,7 @@ type MonitorSummary struct { // The type of monitor. MonitorType MonitorTypesEnum `mandatory:"true" json:"monitorType"` - // List of public and dedicated vantage points where the monitor is running. + // List of public, dedicated and onPremise vantage points where the monitor is running. VantagePoints []VantagePointInfo `mandatory:"true" json:"vantagePoints"` // Number of vantage points where monitor is running. @@ -67,10 +67,10 @@ type MonitorSummary struct { BatchIntervalInSeconds *int `mandatory:"true" json:"batchIntervalInSeconds"` // Specify the endpoint on which to run the monitor. - // For BROWSER, REST and NETWORK monitor types, target is mandatory. + // For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. Target *string `mandatory:"false" json:"target"` Configuration MonitorConfiguration `mandatory:"false" json:"configuration"` @@ -94,6 +94,15 @@ type MonitorSummary struct { // Defined tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // If enabled, domain name will resolve to an IPv6 address. + IsIPv6 *bool `mandatory:"false" json:"isIPv6"` + + // Name of the user that created the monitor. + CreatedBy *string `mandatory:"false" json:"createdBy"` + + // Name of the user that recently updated the monitor. + LastUpdatedBy *string `mandatory:"false" json:"lastUpdatedBy"` } func (m MonitorSummary) String() string { @@ -131,6 +140,9 @@ func (m *MonitorSummary) UnmarshalJSON(data []byte) (e error) { TimeUpdated *common.SDKTime `json:"timeUpdated"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` + IsIPv6 *bool `json:"isIPv6"` + CreatedBy *string `json:"createdBy"` + LastUpdatedBy *string `json:"lastUpdatedBy"` Id *string `json:"id"` DisplayName *string `json:"displayName"` MonitorType MonitorTypesEnum `json:"monitorType"` @@ -174,6 +186,12 @@ func (m *MonitorSummary) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags + m.IsIPv6 = model.IsIPv6 + + m.CreatedBy = model.CreatedBy + + m.LastUpdatedBy = model.LastUpdatedBy + m.Id = model.Id m.DisplayName = model.DisplayName diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_types.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_types.go index 3bfcd7b4159..3ce51d56766 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_types.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/monitor_types.go @@ -24,6 +24,8 @@ const ( MonitorTypesRest MonitorTypesEnum = "REST" MonitorTypesNetwork MonitorTypesEnum = "NETWORK" MonitorTypesDns MonitorTypesEnum = "DNS" + MonitorTypesFtp MonitorTypesEnum = "FTP" + MonitorTypesSql MonitorTypesEnum = "SQL" ) var mappingMonitorTypesEnum = map[string]MonitorTypesEnum{ @@ -33,6 +35,8 @@ var mappingMonitorTypesEnum = map[string]MonitorTypesEnum{ "REST": MonitorTypesRest, "NETWORK": MonitorTypesNetwork, "DNS": MonitorTypesDns, + "FTP": MonitorTypesFtp, + "SQL": MonitorTypesSql, } var mappingMonitorTypesEnumLowerCase = map[string]MonitorTypesEnum{ @@ -42,6 +46,8 @@ var mappingMonitorTypesEnumLowerCase = map[string]MonitorTypesEnum{ "rest": MonitorTypesRest, "network": MonitorTypesNetwork, "dns": MonitorTypesDns, + "ftp": MonitorTypesFtp, + "sql": MonitorTypesSql, } // GetMonitorTypesEnumValues Enumerates the set of values for MonitorTypesEnum @@ -62,6 +68,8 @@ func GetMonitorTypesEnumStringValues() []string { "REST", "NETWORK", "DNS", + "FTP", + "SQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password.go new file mode 100644 index 00000000000..bd165f3ab32 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Password Password. +type Password interface { +} + +type password struct { + JsonData []byte + PasswordType string `json:"passwordType"` +} + +// UnmarshalJSON unmarshals json +func (m *password) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpassword password + s := struct { + Model Unmarshalerpassword + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.PasswordType = s.Model.PasswordType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *password) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.PasswordType { + case "IN_TEXT": + mm := PasswordInText{} + err = json.Unmarshal(data, &mm) + return mm, err + case "VAULT_SECRET_ID": + mm := PasswordInVault{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for Password: %s.", m.PasswordType) + return *m, nil + } +} + +func (m password) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m password) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PasswordPasswordTypeEnum Enum with underlying type: string +type PasswordPasswordTypeEnum string + +// Set of constants representing the allowable values for PasswordPasswordTypeEnum +const ( + PasswordPasswordTypeInText PasswordPasswordTypeEnum = "IN_TEXT" + PasswordPasswordTypeVaultSecretId PasswordPasswordTypeEnum = "VAULT_SECRET_ID" +) + +var mappingPasswordPasswordTypeEnum = map[string]PasswordPasswordTypeEnum{ + "IN_TEXT": PasswordPasswordTypeInText, + "VAULT_SECRET_ID": PasswordPasswordTypeVaultSecretId, +} + +var mappingPasswordPasswordTypeEnumLowerCase = map[string]PasswordPasswordTypeEnum{ + "in_text": PasswordPasswordTypeInText, + "vault_secret_id": PasswordPasswordTypeVaultSecretId, +} + +// GetPasswordPasswordTypeEnumValues Enumerates the set of values for PasswordPasswordTypeEnum +func GetPasswordPasswordTypeEnumValues() []PasswordPasswordTypeEnum { + values := make([]PasswordPasswordTypeEnum, 0) + for _, v := range mappingPasswordPasswordTypeEnum { + values = append(values, v) + } + return values +} + +// GetPasswordPasswordTypeEnumStringValues Enumerates the set of values in String for PasswordPasswordTypeEnum +func GetPasswordPasswordTypeEnumStringValues() []string { + return []string{ + "IN_TEXT", + "VAULT_SECRET_ID", + } +} + +// GetMappingPasswordPasswordTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPasswordPasswordTypeEnum(val string) (PasswordPasswordTypeEnum, bool) { + enum, ok := mappingPasswordPasswordTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password_in_text.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password_in_text.go new file mode 100644 index 00000000000..030237eb9ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password_in_text.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PasswordInText Password. +type PasswordInText struct { + + // Password. + Password *string `mandatory:"true" json:"password"` +} + +func (m PasswordInText) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PasswordInText) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PasswordInText) MarshalJSON() (buff []byte, e error) { + type MarshalTypePasswordInText PasswordInText + s := struct { + DiscriminatorParam string `json:"passwordType"` + MarshalTypePasswordInText + }{ + "IN_TEXT", + (MarshalTypePasswordInText)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password_in_vault.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password_in_vault.go new file mode 100644 index 00000000000..12bed8018f8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/password_in_vault.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PasswordInVault Vault secret OCID for password that can be used with monitor Resource Principal. +// Example, ocid1.vaultsecret.oc1.iad.amaaaaaagpihjxqadwyc4kjhpeis2bylhzmp5r2si6mz2h4eujevnmf3zoca. +type PasswordInVault struct { + + // Vault secret OCID. + VaultSecretId *string `mandatory:"true" json:"vaultSecretId"` +} + +func (m PasswordInVault) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PasswordInVault) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PasswordInVault) MarshalJSON() (buff []byte, e error) { + type MarshalTypePasswordInVault PasswordInVault + s := struct { + DiscriminatorParam string `json:"passwordType"` + MarshalTypePasswordInVault + }{ + "VAULT_SECRET_ID", + (MarshalTypePasswordInVault)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/sql_monitor_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/sql_monitor_configuration.go new file mode 100644 index 00000000000..bbefcf6707c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/sql_monitor_configuration.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SqlMonitorConfiguration Request configuration details for the SQL monitor type. +type SqlMonitorConfiguration struct { + + // If isFailureRetried is enabled, then a failed call will be retried. + IsFailureRetried *bool `mandatory:"false" json:"isFailureRetried"` + + DnsConfiguration *DnsConfiguration `mandatory:"false" json:"dnsConfiguration"` + + // SQL query to be executed. + Query *string `mandatory:"false" json:"query"` + + DatabaseAuthenticationDetails *BasicAuthenticationDetails `mandatory:"false" json:"databaseAuthenticationDetails"` + + // Database role. + DatabaseRole *string `mandatory:"false" json:"databaseRole"` + + // Database connection string. + ConnectionString *string `mandatory:"false" json:"connectionString"` + + DatabaseWalletDetails *DatabaseWalletDetails `mandatory:"false" json:"databaseWalletDetails"` + + // Database type. + DatabaseType DatabaseTypeEnum `mandatory:"false" json:"databaseType,omitempty"` + + // Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + DatabaseConnectionType DatabaseConnectionTypeEnum `mandatory:"false" json:"databaseConnectionType,omitempty"` +} + +// GetIsFailureRetried returns IsFailureRetried +func (m SqlMonitorConfiguration) GetIsFailureRetried() *bool { + return m.IsFailureRetried +} + +// GetDnsConfiguration returns DnsConfiguration +func (m SqlMonitorConfiguration) GetDnsConfiguration() *DnsConfiguration { + return m.DnsConfiguration +} + +func (m SqlMonitorConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SqlMonitorConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDatabaseTypeEnum(string(m.DatabaseType)); !ok && m.DatabaseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseType: %s. Supported values are: %s.", m.DatabaseType, strings.Join(GetDatabaseTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDatabaseConnectionTypeEnum(string(m.DatabaseConnectionType)); !ok && m.DatabaseConnectionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseConnectionType: %s. Supported values are: %s.", m.DatabaseConnectionType, strings.Join(GetDatabaseConnectionTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m SqlMonitorConfiguration) MarshalJSON() (buff []byte, e error) { + type MarshalTypeSqlMonitorConfiguration SqlMonitorConfiguration + s := struct { + DiscriminatorParam string `json:"configType"` + MarshalTypeSqlMonitorConfiguration + }{ + "SQL_CONFIG", + (MarshalTypeSqlMonitorConfiguration)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/update_monitor_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/update_monitor_details.go index 35cb66fe3c7..6175da95e96 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/update_monitor_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/update_monitor_details.go @@ -47,10 +47,10 @@ type UpdateMonitorDetails struct { TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` // Specify the endpoint on which to run the monitor. - // For BROWSER, REST and NETWORK monitor types, target is mandatory. + // For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. - // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. Target *string `mandatory:"false" json:"target"` // List of script parameters in the monitor. @@ -80,6 +80,9 @@ type UpdateMonitorDetails struct { // Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN). BatchIntervalInSeconds *int `mandatory:"false" json:"batchIntervalInSeconds"` + + // If enabled, domain name will resolve to an IPv6 address. + IsIPv6 *bool `mandatory:"false" json:"isIPv6"` } func (m UpdateMonitorDetails) String() string { @@ -124,6 +127,7 @@ func (m *UpdateMonitorDetails) UnmarshalJSON(data []byte) (e error) { IsRunNow *bool `json:"isRunNow"` SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` + IsIPv6 *bool `json:"isIPv6"` }{} e = json.Unmarshal(data, &model) @@ -173,5 +177,7 @@ func (m *UpdateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.BatchIntervalInSeconds = model.BatchIntervalInSeconds + m.IsIPv6 = model.IsIPv6 + return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/vantage_point_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/vantage_point_info.go index 3fc8764e23c..7cf5a31bff7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/vantage_point_info.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/apmsynthetics/vantage_point_info.go @@ -23,6 +23,9 @@ type VantagePointInfo struct { // Unique name that can be edited. The name should not contain any confidential information. DisplayName *string `mandatory:"true" json:"displayName"` + + // List of workers running the assigned monitor. + WorkerList []string `mandatory:"false" json:"workerList"` } func (m VantagePointInfo) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go index 4499e2e8503..e6ea0f97801 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go @@ -13,7 +13,7 @@ import ( const ( major = "65" minor = "69" - patch = "2" + patch = "3" tag = "" ) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go index ca32f86b055..30d3c1483c7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go @@ -36,6 +36,9 @@ type AutonomousDatabase struct { // - To get the exact value of data storage size without rounding error, please see `dataStorageSizeInGBs` of Autonomous Database. DataStorageSizeInTBs *int `mandatory:"true" json:"dataStorageSizeInTBs"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // Information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` @@ -164,6 +167,9 @@ type AutonomousDatabase struct { // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel AutonomousDatabaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. UsedDataStorageSizeInTBs *int `mandatory:"false" json:"usedDataStorageSizeInTBs"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go index 1e4ff9956a9..c1346958698 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go @@ -38,6 +38,9 @@ type AutonomousDatabaseSummary struct { // - To get the exact value of data storage size without rounding error, please see `dataStorageSizeInGBs` of Autonomous Database. DataStorageSizeInTBs *int `mandatory:"true" json:"dataStorageSizeInTBs"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // Information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` @@ -166,6 +169,9 @@ type AutonomousDatabaseSummary struct { // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel AutonomousDatabaseSummaryLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // The amount of storage that has been used for Autonomous Databases in dedicated infrastructure, in terabytes. UsedDataStorageSizeInTBs *int `mandatory:"false" json:"usedDataStorageSizeInTBs"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/change_autonomous_database_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_autonomous_database_subscription_details.go new file mode 100644 index 00000000000..bdc157baf70 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_autonomous_database_subscription_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeAutonomousDatabaseSubscriptionDetails The configuration details for associating the Autonomous Database with a different subscription. +type ChangeAutonomousDatabaseSubscriptionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + + // Indicates if the subscription is UCM or not. + IsDefault *bool `mandatory:"false" json:"isDefault"` +} + +func (m ChangeAutonomousDatabaseSubscriptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeAutonomousDatabaseSubscriptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/change_autonomous_database_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_autonomous_database_subscription_request_response.go new file mode 100644 index 00000000000..1d2a3f1613d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_autonomous_database_subscription_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeAutonomousDatabaseSubscriptionRequest wrapper for the ChangeAutonomousDatabaseSubscription operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ChangeAutonomousDatabaseSubscription.go.html to see an example of how to use ChangeAutonomousDatabaseSubscriptionRequest. +type ChangeAutonomousDatabaseSubscriptionRequest struct { + + // Associate an Autonomous Database with a different subscription. + ChangeAutonomousDatabaseSubscriptionDetails `contributesTo:"body"` + + // The database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + AutonomousDatabaseId *string `mandatory:"true" contributesTo:"path" name:"autonomousDatabaseId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeAutonomousDatabaseSubscriptionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeAutonomousDatabaseSubscriptionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeAutonomousDatabaseSubscriptionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeAutonomousDatabaseSubscriptionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeAutonomousDatabaseSubscriptionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeAutonomousDatabaseSubscriptionResponse wrapper for the ChangeAutonomousDatabaseSubscription operation +type ChangeAutonomousDatabaseSubscriptionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeAutonomousDatabaseSubscriptionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeAutonomousDatabaseSubscriptionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_exadata_infrastructure_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_exadata_infrastructure_subscription_details.go new file mode 100644 index 00000000000..b4971466ad3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_exadata_infrastructure_subscription_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeCloudExadataInfrastructureSubscriptionDetails The configuration details for associating the cloud Exadata infrastructure resource with a different subscription. +type ChangeCloudExadataInfrastructureSubscriptionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + + // Indicates if the subscription is UCM or not. + IsDefault *bool `mandatory:"false" json:"isDefault"` +} + +func (m ChangeCloudExadataInfrastructureSubscriptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeCloudExadataInfrastructureSubscriptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_exadata_infrastructure_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_exadata_infrastructure_subscription_request_response.go new file mode 100644 index 00000000000..52f2ebc07cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_exadata_infrastructure_subscription_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeCloudExadataInfrastructureSubscriptionRequest wrapper for the ChangeCloudExadataInfrastructureSubscription operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ChangeCloudExadataInfrastructureSubscription.go.html to see an example of how to use ChangeCloudExadataInfrastructureSubscriptionRequest. +type ChangeCloudExadataInfrastructureSubscriptionRequest struct { + + // Associate a cloud Exadata infrastructure with a different subscription. + ChangeCloudExadataInfrastructureSubscriptionDetails `contributesTo:"body"` + + // The cloud Exadata infrastructure OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CloudExadataInfrastructureId *string `mandatory:"true" contributesTo:"path" name:"cloudExadataInfrastructureId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeCloudExadataInfrastructureSubscriptionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeCloudExadataInfrastructureSubscriptionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeCloudExadataInfrastructureSubscriptionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeCloudExadataInfrastructureSubscriptionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeCloudExadataInfrastructureSubscriptionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeCloudExadataInfrastructureSubscriptionResponse wrapper for the ChangeCloudExadataInfrastructureSubscription operation +type ChangeCloudExadataInfrastructureSubscriptionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeCloudExadataInfrastructureSubscriptionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeCloudExadataInfrastructureSubscriptionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_vm_cluster_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_vm_cluster_subscription_details.go new file mode 100644 index 00000000000..06919bf765a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_vm_cluster_subscription_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeCloudVmClusterSubscriptionDetails The configuration details for associating the cloud VM cluster resource with a different subscription. +type ChangeCloudVmClusterSubscriptionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + + // Indicates if the subscription is UCM or not. + IsDefault *bool `mandatory:"false" json:"isDefault"` +} + +func (m ChangeCloudVmClusterSubscriptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeCloudVmClusterSubscriptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_vm_cluster_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_vm_cluster_subscription_request_response.go new file mode 100644 index 00000000000..6e731259afb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_cloud_vm_cluster_subscription_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeCloudVmClusterSubscriptionRequest wrapper for the ChangeCloudVmClusterSubscription operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ChangeCloudVmClusterSubscription.go.html to see an example of how to use ChangeCloudVmClusterSubscriptionRequest. +type ChangeCloudVmClusterSubscriptionRequest struct { + + // Associate a cloud VM cluster with a different subscription. + ChangeCloudVmClusterSubscriptionDetails `contributesTo:"body"` + + // The cloud VM cluster OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CloudVmClusterId *string `mandatory:"true" contributesTo:"path" name:"cloudVmClusterId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeCloudVmClusterSubscriptionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeCloudVmClusterSubscriptionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeCloudVmClusterSubscriptionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeCloudVmClusterSubscriptionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeCloudVmClusterSubscriptionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeCloudVmClusterSubscriptionResponse wrapper for the ChangeCloudVmClusterSubscription operation +type ChangeCloudVmClusterSubscriptionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeCloudVmClusterSubscriptionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeCloudVmClusterSubscriptionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/change_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_subscription_details.go new file mode 100644 index 00000000000..946349d07ff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/change_subscription_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeSubscriptionDetails The configuration details for associating the resource with a different subscription. +type ChangeSubscriptionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + + // Indicates if the subscription is UCM or not. + IsDefault *bool `mandatory:"false" json:"isDefault"` +} + +func (m ChangeSubscriptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeSubscriptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure.go index 46a177125c0..6bc2ba4f093 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure.go @@ -39,6 +39,9 @@ type CloudExadataInfrastructure struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The number of compute servers for the cloud Exadata infrastructure. ComputeCount *int `mandatory:"false" json:"computeCount"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure_summary.go index e631fe5229c..24d50d33446 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_exadata_infrastructure_summary.go @@ -39,6 +39,9 @@ type CloudExadataInfrastructureSummary struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The number of compute servers for the cloud Exadata infrastructure. ComputeCount *int `mandatory:"false" json:"computeCount"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster.go index b5d4dd1e7fa..07c1207fcdb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster.go @@ -59,6 +59,9 @@ type CloudVmCluster struct { // The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the cloud VM cluster. // **Subnet Restriction:** See the subnet restrictions information for **subnetId**. BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster_summary.go index 239d4b02a31..847e1eed773 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/cloud_vm_cluster_summary.go @@ -59,6 +59,9 @@ type CloudVmClusterSummary struct { // The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup network subnet associated with the cloud VM cluster. // **Subnet Restriction:** See the subnet restrictions information for **subnetId**. BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go index c9188b3377d..dd435b50374 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go @@ -29,6 +29,9 @@ type CreateAutonomousDatabaseBase interface { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment of the Autonomous Database. GetCompartmentId() *string + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + GetSubscriptionId() *string + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -108,6 +111,9 @@ type CreateAutonomousDatabaseBase interface { // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. GetLicenseModel() CreateAutonomousDatabaseBaseLicenseModelEnum + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + GetByolComputeCountLimit() *float32 + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). GetIsPreviewVersionWithServiceTermsAccepted() *bool @@ -253,6 +259,7 @@ type CreateAutonomousDatabaseBase interface { type createautonomousdatabasebase struct { JsonData []byte + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` CharacterSet *string `mandatory:"false" json:"characterSet"` NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` DbName *string `mandatory:"false" json:"dbName"` @@ -270,6 +277,7 @@ type createautonomousdatabasebase struct { AdminPassword *string `mandatory:"false" json:"adminPassword"` DisplayName *string `mandatory:"false" json:"displayName"` LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` IsAutoScalingEnabled *bool `mandatory:"false" json:"isAutoScalingEnabled"` IsDevTier *bool `mandatory:"false" json:"isDevTier"` @@ -316,6 +324,7 @@ func (m *createautonomousdatabasebase) UnmarshalJSON(data []byte) error { return err } m.CompartmentId = s.Model.CompartmentId + m.SubscriptionId = s.Model.SubscriptionId m.CharacterSet = s.Model.CharacterSet m.NcharacterSet = s.Model.NcharacterSet m.DbName = s.Model.DbName @@ -333,6 +342,7 @@ func (m *createautonomousdatabasebase) UnmarshalJSON(data []byte) error { m.AdminPassword = s.Model.AdminPassword m.DisplayName = s.Model.DisplayName m.LicenseModel = s.Model.LicenseModel + m.ByolComputeCountLimit = s.Model.ByolComputeCountLimit m.IsPreviewVersionWithServiceTermsAccepted = s.Model.IsPreviewVersionWithServiceTermsAccepted m.IsAutoScalingEnabled = s.Model.IsAutoScalingEnabled m.IsDevTier = s.Model.IsDevTier @@ -415,6 +425,11 @@ func (m *createautonomousdatabasebase) UnmarshalPolymorphicJSON(data []byte) (in } } +// GetSubscriptionId returns SubscriptionId +func (m createautonomousdatabasebase) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCharacterSet returns CharacterSet func (m createautonomousdatabasebase) GetCharacterSet() *string { return m.CharacterSet @@ -500,6 +515,11 @@ func (m createautonomousdatabasebase) GetLicenseModel() CreateAutonomousDatabase return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m createautonomousdatabasebase) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m createautonomousdatabasebase) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go index 1fc2553a370..f3889bd9d5b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go @@ -25,6 +25,9 @@ type CreateAutonomousDatabaseCloneDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that you will clone to create a new Autonomous Database. SourceId *string `mandatory:"true" json:"sourceId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -86,6 +89,9 @@ type CreateAutonomousDatabaseCloneDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -250,6 +256,11 @@ type CreateAutonomousDatabaseCloneDetails struct { AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateAutonomousDatabaseCloneDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateAutonomousDatabaseCloneDetails) GetCompartmentId() *string { return m.CompartmentId @@ -340,6 +351,11 @@ func (m CreateAutonomousDatabaseCloneDetails) GetLicenseModel() CreateAutonomous return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateAutonomousDatabaseCloneDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateAutonomousDatabaseCloneDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go index 340650d094d..5c89f800abf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go @@ -22,6 +22,9 @@ type CreateAutonomousDatabaseDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment of the Autonomous Database. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -83,6 +86,9 @@ type CreateAutonomousDatabaseDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -244,6 +250,11 @@ type CreateAutonomousDatabaseDetails struct { AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateAutonomousDatabaseDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateAutonomousDatabaseDetails) GetCompartmentId() *string { return m.CompartmentId @@ -334,6 +345,11 @@ func (m CreateAutonomousDatabaseDetails) GetLicenseModel() CreateAutonomousDatab return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateAutonomousDatabaseDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateAutonomousDatabaseDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go index 17cc8324edf..d51e8fc13d0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go @@ -25,6 +25,9 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database Backup that you will clone to create a new Autonomous Database. AutonomousDatabaseBackupId *string `mandatory:"true" json:"autonomousDatabaseBackupId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -86,6 +89,9 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -250,6 +256,11 @@ type CreateAutonomousDatabaseFromBackupDetails struct { AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateAutonomousDatabaseFromBackupDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateAutonomousDatabaseFromBackupDetails) GetCompartmentId() *string { return m.CompartmentId @@ -340,6 +351,11 @@ func (m CreateAutonomousDatabaseFromBackupDetails) GetLicenseModel() CreateAuton return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateAutonomousDatabaseFromBackupDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateAutonomousDatabaseFromBackupDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go index e23646f86d3..f577b638814 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go @@ -25,6 +25,9 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that you will clone to create a new Autonomous Database. AutonomousDatabaseId *string `mandatory:"true" json:"autonomousDatabaseId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -86,6 +89,9 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -256,6 +262,11 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetCompartmentId() *string { return m.CompartmentId @@ -346,6 +357,11 @@ func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetLicenseModel() Cr return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_exadata_infrastructure_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_exadata_infrastructure_details.go index b87bc069eb2..d8e6db7a574 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_exadata_infrastructure_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_exadata_infrastructure_details.go @@ -50,6 +50,9 @@ type CreateCloudExadataInfrastructureDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Exadata Infrastructure. ClusterPlacementGroupId *string `mandatory:"false" json:"clusterPlacementGroupId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // Customer contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_vm_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_vm_cluster_details.go index 2ce63d3ccd3..910e7d0e0f8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_vm_cluster_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cloud_vm_cluster_details.go @@ -56,6 +56,9 @@ type CreateCloudVmClusterDetails struct { // A valid Oracle Grid Infrastructure (GI) software version. GiVersion *string `mandatory:"true" json:"giVersion"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The number of OCPU cores to enable for a cloud VM cluster. Only 1 decimal place is allowed for the fractional part. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go index d3f8d7db801..d534ae95e2c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go @@ -44,6 +44,9 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that will be used to create a new peer database for the Data Guard association. SourceId *string `mandatory:"true" json:"sourceId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -105,6 +108,9 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -266,6 +272,11 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetCompartmentId() *string { return m.CompartmentId @@ -356,6 +367,11 @@ func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetLicenseModel() C return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go index bf426df2132..4f9f933b530 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go @@ -46,6 +46,9 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that will be used to create a new peer database for the DR association. SourceId *string `mandatory:"true" json:"sourceId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -107,6 +110,9 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -276,6 +282,11 @@ type CreateCrossRegionDisasterRecoveryDetails struct { RemoteDisasterRecoveryType DisasterRecoveryConfigurationDisasterRecoveryTypeEnum `mandatory:"true" json:"remoteDisasterRecoveryType"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateCrossRegionDisasterRecoveryDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateCrossRegionDisasterRecoveryDetails) GetCompartmentId() *string { return m.CompartmentId @@ -366,6 +377,11 @@ func (m CreateCrossRegionDisasterRecoveryDetails) GetLicenseModel() CreateAutono return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateCrossRegionDisasterRecoveryDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateCrossRegionDisasterRecoveryDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go index 5c6711647ec..0c24414695a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go @@ -47,6 +47,9 @@ type CreateCrossTenancyDisasterRecoveryDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that will be used to create a new peer database for the DR association. SourceId *string `mandatory:"true" json:"sourceId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -108,6 +111,9 @@ type CreateCrossTenancyDisasterRecoveryDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -277,6 +283,11 @@ type CreateCrossTenancyDisasterRecoveryDetails struct { DisasterRecoveryType DisasterRecoveryConfigurationDisasterRecoveryTypeEnum `mandatory:"true" json:"disasterRecoveryType"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateCrossTenancyDisasterRecoveryDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateCrossTenancyDisasterRecoveryDetails) GetCompartmentId() *string { return m.CompartmentId @@ -367,6 +378,11 @@ func (m CreateCrossTenancyDisasterRecoveryDetails) GetLicenseModel() CreateAuton return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateCrossTenancyDisasterRecoveryDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateCrossTenancyDisasterRecoveryDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go index f7a1903fae6..592040377e9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go @@ -25,6 +25,9 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that you will clone to create a new Autonomous Database. SourceId *string `mandatory:"true" json:"sourceId"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. + SubscriptionId *string `mandatory:"false" json:"subscriptionId"` + // The character set for the autonomous database. The default is AL32UTF8. Allowed values for an Autonomous Database Serverless instance as as returned by List Autonomous Database Character Sets (https://docs.oracle.com/iaas/autonomous-database-serverless/doc/autonomous-character-set-selection.html) // For an Autonomous Database on dedicated infrastructure, the allowed values are: // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSC5601, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P1, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS @@ -86,6 +89,9 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // The user-friendly name for the Autonomous Database. The name does not have to be unique. DisplayName *string `mandatory:"false" json:"displayName"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for Autonomous Database Serverless instances (https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/). IsPreviewVersionWithServiceTermsAccepted *bool `mandatory:"false" json:"isPreviewVersionWithServiceTermsAccepted"` @@ -263,6 +269,11 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` } +// GetSubscriptionId returns SubscriptionId +func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetSubscriptionId() *string { + return m.SubscriptionId +} + // GetCompartmentId returns CompartmentId func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetCompartmentId() *string { return m.CompartmentId @@ -353,6 +364,11 @@ func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetLicenseModel() Creat return m.LicenseModel } +// GetByolComputeCountLimit returns ByolComputeCountLimit +func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetByolComputeCountLimit() *float32 { + return m.ByolComputeCountLimit +} + // GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go index 0bc800c911d..442082ab1eb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go @@ -715,6 +715,68 @@ func (client DatabaseClient) changeAutonomousDatabaseSoftwareImageCompartment(ct return response, err } +// ChangeAutonomousDatabaseSubscription Associate an Autonomous Database with a different subscription. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ChangeAutonomousDatabaseSubscription.go.html to see an example of how to use ChangeAutonomousDatabaseSubscription API. +func (client DatabaseClient) ChangeAutonomousDatabaseSubscription(ctx context.Context, request ChangeAutonomousDatabaseSubscriptionRequest) (response ChangeAutonomousDatabaseSubscriptionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeAutonomousDatabaseSubscription, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeAutonomousDatabaseSubscriptionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeAutonomousDatabaseSubscriptionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeAutonomousDatabaseSubscriptionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeAutonomousDatabaseSubscriptionResponse") + } + return +} + +// changeAutonomousDatabaseSubscription implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) changeAutonomousDatabaseSubscription(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/autonomousDatabases/{autonomousDatabaseId}/actions/changeSubscription", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeAutonomousDatabaseSubscriptionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousDatabase/ChangeAutonomousDatabaseSubscription" + err = common.PostProcessServiceError(err, "Database", "ChangeAutonomousDatabaseSubscription", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeAutonomousExadataInfrastructureCompartment **Deprecated.** Use the ChangeCloudExadataInfrastructureCompartment operation to move an Exadata infrastructure resource to a different compartment and ChangeCloudAutonomousVmClusterCompartment operation to move an Autonomous Exadata VM cluster to a different compartment. // For more information, see // Moving Database Resources to a Different Compartment (https://docs.cloud.oracle.com/Content/Database/Concepts/databaseoverview.htm#moveRes). @@ -1029,6 +1091,68 @@ func (client DatabaseClient) changeCloudExadataInfrastructureCompartment(ctx con return response, err } +// ChangeCloudExadataInfrastructureSubscription Associate a cloud Exadata infrastructure with a different subscription. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ChangeCloudExadataInfrastructureSubscription.go.html to see an example of how to use ChangeCloudExadataInfrastructureSubscription API. +func (client DatabaseClient) ChangeCloudExadataInfrastructureSubscription(ctx context.Context, request ChangeCloudExadataInfrastructureSubscriptionRequest) (response ChangeCloudExadataInfrastructureSubscriptionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeCloudExadataInfrastructureSubscription, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeCloudExadataInfrastructureSubscriptionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeCloudExadataInfrastructureSubscriptionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeCloudExadataInfrastructureSubscriptionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeCloudExadataInfrastructureSubscriptionResponse") + } + return +} + +// changeCloudExadataInfrastructureSubscription implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) changeCloudExadataInfrastructureSubscription(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/cloudExadataInfrastructures/{cloudExadataInfrastructureId}/actions/changeSubscription", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeCloudExadataInfrastructureSubscriptionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/ChangeCloudExadataInfrastructureSubscription" + err = common.PostProcessServiceError(err, "Database", "ChangeCloudExadataInfrastructureSubscription", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeCloudVmClusterCompartment Moves a cloud VM cluster and its dependent resources to another compartment. Applies to Exadata Cloud Service instances and Autonomous Database on dedicated Exadata infrastructure only. // // # See also @@ -1091,6 +1215,68 @@ func (client DatabaseClient) changeCloudVmClusterCompartment(ctx context.Context return response, err } +// ChangeCloudVmClusterSubscription Associate a cloud VM cluster with a different subscription. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ChangeCloudVmClusterSubscription.go.html to see an example of how to use ChangeCloudVmClusterSubscription API. +func (client DatabaseClient) ChangeCloudVmClusterSubscription(ctx context.Context, request ChangeCloudVmClusterSubscriptionRequest) (response ChangeCloudVmClusterSubscriptionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeCloudVmClusterSubscription, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeCloudVmClusterSubscriptionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeCloudVmClusterSubscriptionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeCloudVmClusterSubscriptionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeCloudVmClusterSubscriptionResponse") + } + return +} + +// changeCloudVmClusterSubscription implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) changeCloudVmClusterSubscription(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/cloudVmClusters/{cloudVmClusterId}/actions/changeSubscription", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeCloudVmClusterSubscriptionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/CloudVmCluster/ChangeCloudVmClusterSubscription" + err = common.PostProcessServiceError(err, "Database", "ChangeCloudVmClusterSubscription", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeDatabaseSoftwareImageCompartment Move the Database Software Image and its dependent resources to the specified compartment. // For more information about moving Databse Software Images, see // Moving Database Resources to a Different Compartment (https://docs.cloud.oracle.com/Content/Database/Concepts/databaseoverview.htm#moveRes). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go index 8e7b312d429..57c05621ea5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go @@ -113,6 +113,9 @@ type UpdateAutonomousDatabaseDetails struct { // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel UpdateAutonomousDatabaseDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + // The maximum number of CPUs allowed with a Bring Your Own License (BYOL), including those used for auto-scaling, disaster recovery, tools, etc. Any CPU usage above this limit is considered as License Included and billed. + ByolComputeCountLimit *float32 `mandatory:"false" json:"byolComputeCountLimit"` + // Indicates if the database-level access control is enabled. // If disabled, database access is defined by the network security rules. // If enabled, database access is restricted to the IP addresses defined by the rules specified with the `whitelistedIps` property. While specifying `whitelistedIps` rules is optional, diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/audit_event_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/audit_event_summary.go index 5784be723bc..4c307452f94 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/audit_event_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/audit_event_summary.go @@ -126,6 +126,12 @@ type AuditEventSummary struct { // Unique name of the database associated to the peer target database. DatabaseUniqueName *string `mandatory:"false" json:"databaseUniqueName"` + // Semicolon-seperated list of application context namespace, attribute, value information in (APPCTX_NSPACE,APPCTX_ATTRIBUTE=) format. + ApplicationContexts *string `mandatory:"false" json:"applicationContexts"` + + // Fine-grained auditing (FGA) policy name that generated this audit record. + FgaPolicyName *string `mandatory:"false" json:"fgaPolicyName"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_discovery_job_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_discovery_job_details.go index 21b323d44b3..e27ec3a87c5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_discovery_job_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_discovery_job_details.go @@ -38,6 +38,10 @@ type CreateDiscoveryJobDetails struct { // data model is used to get the list of schemas. SchemasForDiscovery []string `mandatory:"false" json:"schemasForDiscovery"` + // The data discovery jobs will scan the tables specified here, including both schemas and tables. In the absence + // of explicit input, the list of tables is obtained from the tablesForDiscovery attribute of the sensitive data model. + TablesForDiscovery []TablesForDiscovery `mandatory:"false" json:"tablesForDiscovery"` + // The OCIDs of the sensitive types to be used by the discovery job. If not provided, the sensitiveTypeIdsForDiscovery // attribute of the sensitive data model is used to get the list of sensitive types. SensitiveTypeIdsForDiscovery []string `mandatory:"false" json:"sensitiveTypeIdsForDiscovery"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_security_assessment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_security_assessment_details.go index 1bbcf7e659c..51ef7a369e7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_security_assessment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_security_assessment_details.go @@ -30,6 +30,9 @@ type CreateSecurityAssessmentDetails struct { // Description of the security assessment. Description *string `mandatory:"false" json:"description"` + // Indicates whether the assessment is scheduled to run. + IsAssessmentScheduled *bool `mandatory:"false" json:"isAssessmentScheduled"` + // To schedule the assessment for running periodically, specify the schedule in this attribute. // Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. // Format - diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_sensitive_data_model_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_sensitive_data_model_details.go index eed1b9fd739..496e120c967 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_sensitive_data_model_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_sensitive_data_model_details.go @@ -43,6 +43,11 @@ type CreateSensitiveDataModelDetails struct { // The schemas to be scanned by data discovery jobs. SchemasForDiscovery []string `mandatory:"false" json:"schemasForDiscovery"` + // The data discovery jobs will scan the tables specified here, including both schemas and tables. + // For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + // "OE", tableName : ["T3", "T4"]}]. + TablesForDiscovery []TablesForDiscovery `mandatory:"false" json:"tablesForDiscovery"` + // The OCIDs of the sensitive types to be used by data discovery jobs. If OCID of a sensitive category is provided, // all its child sensitive types are used for data discovery. SensitiveTypeIdsForDiscovery []string `mandatory:"false" json:"sensitiveTypeIdsForDiscovery"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_user_assessment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_user_assessment_details.go index 4755ec2cf13..369c236e2f0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_user_assessment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/create_user_assessment_details.go @@ -30,6 +30,9 @@ type CreateUserAssessmentDetails struct { // The display name of the user assessment. DisplayName *string `mandatory:"false" json:"displayName"` + // Indicates whether the assessment is scheduled to run. + IsAssessmentScheduled *bool `mandatory:"false" json:"isAssessmentScheduled"` + // To schedule the assessment for saving periodically, specify the schedule in this attribute. // Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. // Format - diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/datasafe_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/datasafe_client.go index dd43dc10e8f..14007bb9ff2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/datasafe_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/datasafe_client.go @@ -9776,7 +9776,6 @@ func (client DataSafeClient) listDatabaseSecurityConfigs(ctx context.Context, re } // ListDatabaseTableAccessEntries Retrieves a list of all database table access entries in Data Safe. -// // The ListDatabaseTableAccessEntries operation returns only the database table access reports for the specified security policy report. // // # See also @@ -12075,6 +12074,64 @@ func (client DataSafeClient) listSensitiveColumns(ctx context.Context, request c return response, err } +// ListSensitiveDataModelSensitiveTypes Gets a list of sensitive type Ids present in the specified sensitive data model. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSensitiveDataModelSensitiveTypes.go.html to see an example of how to use ListSensitiveDataModelSensitiveTypes API. +// A default retry strategy applies to this operation ListSensitiveDataModelSensitiveTypes() +func (client DataSafeClient) ListSensitiveDataModelSensitiveTypes(ctx context.Context, request ListSensitiveDataModelSensitiveTypesRequest) (response ListSensitiveDataModelSensitiveTypesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSensitiveDataModelSensitiveTypes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSensitiveDataModelSensitiveTypesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSensitiveDataModelSensitiveTypesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSensitiveDataModelSensitiveTypesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSensitiveDataModelSensitiveTypesResponse") + } + return +} + +// listSensitiveDataModelSensitiveTypes implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listSensitiveDataModelSensitiveTypes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveTypes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSensitiveDataModelSensitiveTypesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveDataModelSensitiveTypeCollection/ListSensitiveDataModelSensitiveTypes" + err = common.PostProcessServiceError(err, "DataSafe", "ListSensitiveDataModelSensitiveTypes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListSensitiveDataModels Gets a list of sensitive data models based on the specified query parameters. // // # See also @@ -15163,7 +15220,8 @@ func (client DataSafeClient) suspendWorkRequest(ctx context.Context, request com return response, err } -// UnsetSecurityAssessmentBaseline Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. +// UnsetSecurityAssessmentBaseline Removes the baseline setting for the saved security assessment associated with the targetId passed via body. +// If no body or empty body is passed then the baseline settings of all the saved security assessments pertaining to the baseline assessment OCID provided in the path will be removed. // Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. // // # See also @@ -15227,7 +15285,8 @@ func (client DataSafeClient) unsetSecurityAssessmentBaseline(ctx context.Context return response, err } -// UnsetUserAssessmentBaseline Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. +// UnsetUserAssessmentBaseline Removes the baseline setting for the saved user assessment associated with the targetId passed via body. +// If no body or empty body is passed then the baseline settings of all the saved user assessments pertaining to the baseline assessment OCID provided in the path will be removed. // Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. // // # See also diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/discovery_job.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/discovery_job.go index b3caa02aa05..f97cd1475d7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/discovery_job.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/discovery_job.go @@ -92,6 +92,9 @@ type DiscoveryJob struct { // The schemas used for data discovery. SchemasForDiscovery []string `mandatory:"false" json:"schemasForDiscovery"` + // The data discovery jobs will scan the tables specified here, including both schemas and tables. + TablesForDiscovery []TablesForDiscovery `mandatory:"false" json:"tablesForDiscovery"` + // The OCIDs of the sensitive types used for data discovery. SensitiveTypeIdsForDiscovery []string `mandatory:"false" json:"sensitiveTypeIdsForDiscovery"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/finding_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/finding_summary.go index 6646cbb4a82..c7fed2a0775 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/finding_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/finding_summary.go @@ -45,6 +45,9 @@ type FindingSummary struct { // The brief summary of the finding. When the finding is informational, the summary typically reports only the number of data elements that were examined. Summary *string `mandatory:"false" json:"summary"` + // Provides a recommended approach to take to remediate the finding reported. + Oneline *string `mandatory:"false" json:"oneline"` + // Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, a STIG rule, or a GDPR Article/Recital. References *References `mandatory:"false" json:"references"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/generate_report_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/generate_report_details.go index da6021f9e25..9948ef0df1f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/generate_report_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/generate_report_details.go @@ -25,7 +25,7 @@ type GenerateReportDetails struct { // into which the resource should be moved. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Specifies the format of report to be .xls or .pdf + // Specifies the format of report to be .xls or .pdf or .json MimeType GenerateReportDetailsMimeTypeEnum `mandatory:"true" json:"mimeType"` // Array of database target OCIDs. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_event_analytics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_event_analytics_request_response.go index 2ed3f1a7f67..1cc2fdcaf14 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_event_analytics_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_event_analytics_request_response.go @@ -53,7 +53,7 @@ type ListAuditEventAnalyticsRequest struct { // at RFC3339 (https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, // text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. // (Numeric and boolean values should not be quoted.) - // **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + // **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") ScimQuery *string `mandatory:"false" contributesTo:"query" name:"scimQuery"` // Specifies a subset of summarized fields to be returned in the response. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_events_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_events_request_response.go index 10d0c84b53e..2666ccfdd30 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_events_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_audit_events_request_response.go @@ -46,7 +46,7 @@ type ListAuditEventsRequest struct { // at RFC3339 (https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, // text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. // (Numeric and boolean values should not be quoted.) - // **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + // **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") ScimQuery *string `mandatory:"false" contributesTo:"query" name:"scimQuery"` // The sort order to use, either ascending (ASC) or descending (DESC). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_findings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_findings_request_response.go index fe27f4e2e53..5545090e8ff 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_findings_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_findings_request_response.go @@ -52,6 +52,9 @@ type ListFindingsRequest struct { // resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. AccessLevel ListFindingsAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"accessLevel" omitEmpty:"true"` + // A filter to return only items related to a specific target OCID. + TargetId *string `mandatory:"false" contributesTo:"query" name:"targetId"` + // Each finding in security assessment has an associated key (think of key as a finding's name). // For a given finding, the key will be the same across targets. The user can use these keys to filter the findings. FindingKey *string `mandatory:"false" contributesTo:"query" name:"findingKey"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_reports_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_reports_request_response.go index e1a73a3ac6c..9cea0fc5dc0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_reports_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_reports_request_response.go @@ -49,6 +49,19 @@ type ListReportsRequest struct { // The ID of the report definition to filter the list of reports ReportDefinitionId *string `mandatory:"false" contributesTo:"query" name:"reportDefinitionId"` + // A filter to return only the resources that were generated after the specified date and time, as defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Using TimeGeneratedGreaterThanOrEqualToQueryParam parameter retrieves all resources generated after that date. + // **Example:** 2016-12-19T16:39:57.600Z + TimeGeneratedGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeGeneratedGreaterThanOrEqualTo"` + + // Search for resources that were generated before a specific date. + // Specifying this parameter corresponding `timeGeneratedLessThan` + // parameter will retrieve all resources generated before the + // specified generated date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as + // defined by RFC 3339. + // **Example:** 2016-12-19T16:39:57.600Z + TimeGeneratedLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeGeneratedLessThan"` + // Unique identifier for the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_sensitive_data_model_sensitive_types_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_sensitive_data_model_sensitive_types_request_response.go new file mode 100644 index 00000000000..aa6fde44a60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/list_sensitive_data_model_sensitive_types_request_response.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSensitiveDataModelSensitiveTypesRequest wrapper for the ListSensitiveDataModelSensitiveTypes operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSensitiveDataModelSensitiveTypes.go.html to see an example of how to use ListSensitiveDataModelSensitiveTypesRequest. +type ListSensitiveDataModelSensitiveTypesRequest struct { + + // The OCID of the sensitive data model. + SensitiveDataModelId *string `mandatory:"true" contributesTo:"path" name:"sensitiveDataModelId"` + + // A filter to return only items related to a specific sensitive type OCID. + SensitiveTypeId *string `mandatory:"false" contributesTo:"query" name:"sensitiveTypeId"` + + // - The field to sort by. You can specify only one sorting parameter (sortorder). + // The default order is descending. + SortBy ListSensitiveDataModelSensitiveTypesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListSensitiveDataModelSensitiveTypesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSensitiveDataModelSensitiveTypesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSensitiveDataModelSensitiveTypesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSensitiveDataModelSensitiveTypesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSensitiveDataModelSensitiveTypesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSensitiveDataModelSensitiveTypesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSensitiveDataModelSensitiveTypesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListSensitiveDataModelSensitiveTypesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListSensitiveDataModelSensitiveTypesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListSensitiveDataModelSensitiveTypesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSensitiveDataModelSensitiveTypesResponse wrapper for the ListSensitiveDataModelSensitiveTypes operation +type ListSensitiveDataModelSensitiveTypesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SensitiveDataModelSensitiveTypeCollection instances + SensitiveDataModelSensitiveTypeCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListSensitiveDataModelSensitiveTypesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSensitiveDataModelSensitiveTypesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSensitiveDataModelSensitiveTypesSortByEnum Enum with underlying type: string +type ListSensitiveDataModelSensitiveTypesSortByEnum string + +// Set of constants representing the allowable values for ListSensitiveDataModelSensitiveTypesSortByEnum +const ( + ListSensitiveDataModelSensitiveTypesSortByCount ListSensitiveDataModelSensitiveTypesSortByEnum = "count" +) + +var mappingListSensitiveDataModelSensitiveTypesSortByEnum = map[string]ListSensitiveDataModelSensitiveTypesSortByEnum{ + "count": ListSensitiveDataModelSensitiveTypesSortByCount, +} + +var mappingListSensitiveDataModelSensitiveTypesSortByEnumLowerCase = map[string]ListSensitiveDataModelSensitiveTypesSortByEnum{ + "count": ListSensitiveDataModelSensitiveTypesSortByCount, +} + +// GetListSensitiveDataModelSensitiveTypesSortByEnumValues Enumerates the set of values for ListSensitiveDataModelSensitiveTypesSortByEnum +func GetListSensitiveDataModelSensitiveTypesSortByEnumValues() []ListSensitiveDataModelSensitiveTypesSortByEnum { + values := make([]ListSensitiveDataModelSensitiveTypesSortByEnum, 0) + for _, v := range mappingListSensitiveDataModelSensitiveTypesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSensitiveDataModelSensitiveTypesSortByEnumStringValues Enumerates the set of values in String for ListSensitiveDataModelSensitiveTypesSortByEnum +func GetListSensitiveDataModelSensitiveTypesSortByEnumStringValues() []string { + return []string{ + "count", + } +} + +// GetMappingListSensitiveDataModelSensitiveTypesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSensitiveDataModelSensitiveTypesSortByEnum(val string) (ListSensitiveDataModelSensitiveTypesSortByEnum, bool) { + enum, ok := mappingListSensitiveDataModelSensitiveTypesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSensitiveDataModelSensitiveTypesSortOrderEnum Enum with underlying type: string +type ListSensitiveDataModelSensitiveTypesSortOrderEnum string + +// Set of constants representing the allowable values for ListSensitiveDataModelSensitiveTypesSortOrderEnum +const ( + ListSensitiveDataModelSensitiveTypesSortOrderAsc ListSensitiveDataModelSensitiveTypesSortOrderEnum = "ASC" + ListSensitiveDataModelSensitiveTypesSortOrderDesc ListSensitiveDataModelSensitiveTypesSortOrderEnum = "DESC" +) + +var mappingListSensitiveDataModelSensitiveTypesSortOrderEnum = map[string]ListSensitiveDataModelSensitiveTypesSortOrderEnum{ + "ASC": ListSensitiveDataModelSensitiveTypesSortOrderAsc, + "DESC": ListSensitiveDataModelSensitiveTypesSortOrderDesc, +} + +var mappingListSensitiveDataModelSensitiveTypesSortOrderEnumLowerCase = map[string]ListSensitiveDataModelSensitiveTypesSortOrderEnum{ + "asc": ListSensitiveDataModelSensitiveTypesSortOrderAsc, + "desc": ListSensitiveDataModelSensitiveTypesSortOrderDesc, +} + +// GetListSensitiveDataModelSensitiveTypesSortOrderEnumValues Enumerates the set of values for ListSensitiveDataModelSensitiveTypesSortOrderEnum +func GetListSensitiveDataModelSensitiveTypesSortOrderEnumValues() []ListSensitiveDataModelSensitiveTypesSortOrderEnum { + values := make([]ListSensitiveDataModelSensitiveTypesSortOrderEnum, 0) + for _, v := range mappingListSensitiveDataModelSensitiveTypesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSensitiveDataModelSensitiveTypesSortOrderEnumStringValues Enumerates the set of values in String for ListSensitiveDataModelSensitiveTypesSortOrderEnum +func GetListSensitiveDataModelSensitiveTypesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSensitiveDataModelSensitiveTypesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSensitiveDataModelSensitiveTypesSortOrderEnum(val string) (ListSensitiveDataModelSensitiveTypesSortOrderEnum, bool) { + enum, ok := mappingListSensitiveDataModelSensitiveTypesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/references.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/references.go index fbd890ea8f0..756d83d185e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/references.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/references.go @@ -15,7 +15,7 @@ import ( "strings" ) -// References References to the sections of STIG, CIS, and/or GDPR relevant to the current finding. +// References References to the sections of STIG, CIS, GDPR and/or OBP relevant to the current finding. type References struct { // Relevant section from STIG. @@ -26,6 +26,9 @@ type References struct { // Relevant section from GDPR. Gdpr *string `mandatory:"false" json:"gdpr"` + + // Relevant section from OBP. + Obp *string `mandatory:"false" json:"obp"` } func (m References) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report.go index c28bbc099c1..603cd26b0d2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report.go @@ -39,7 +39,7 @@ type Report struct { // Specifies a description of the report. Description *string `mandatory:"false" json:"description"` - // Specifies the format of report to be .xls or .pdf + // Specifies the format of report to be .xls or .pdf or .json MimeType ReportMimeTypeEnum `mandatory:"false" json:"mimeType,omitempty"` // The type of the audit report. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_definition.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_definition.go index 444731f9a5e..66bf5408934 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_definition.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_definition.go @@ -84,7 +84,7 @@ type ReportDefinition struct { // No constraint introduced when it is '*'. When not, day of month must equal the given value Schedule *string `mandatory:"false" json:"schedule"` - // Specifies the format of the report ( either .xls or .pdf ) + // Specifies the format of the report ( either .xls or .pdf or .json) ScheduledReportMimeType ReportDefinitionScheduledReportMimeTypeEnum `mandatory:"false" json:"scheduledReportMimeType,omitempty"` // Specifies the limit on the number of rows in the report. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_summary.go index d7f930c73ce..deb771f081d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/report_summary.go @@ -39,7 +39,7 @@ type ReportSummary struct { // Description of the report. Description *string `mandatory:"false" json:"description"` - // Specifies the format of report to be .xls or .pdf. + // Specifies the format of report to be .xls or .pdf or .json. MimeType ReportSummaryMimeTypeEnum `mandatory:"false" json:"mimeType,omitempty"` // The type of the report. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/schedule_report_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/schedule_report_details.go index 849cb4188f8..f1d7b409ee3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/schedule_report_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/schedule_report_details.go @@ -34,7 +34,7 @@ type ScheduleReportDetails struct { // No constraint introduced when it is '*'. When not, day of month must equal the given value Schedule *string `mandatory:"true" json:"schedule"` - // Specifies if the report will be in .xls or .pdf format + // Specifies if the report will be in .xls or .pdf or .json format MimeType ScheduleReportDetailsMimeTypeEnum `mandatory:"true" json:"mimeType"` // The OCID of the compartment diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/security_assessment.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/security_assessment.go index 3906bb88252..ca746f5ca97 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/security_assessment.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/security_assessment.go @@ -85,6 +85,9 @@ type SecurityAssessment struct { // The description of the security assessment. Description *string `mandatory:"false" json:"description"` + // Indicates whether the assessment is scheduled to run. + IsAssessmentScheduled *bool `mandatory:"false" json:"isAssessmentScheduled"` + // Schedule to save the assessment periodically in the specified format: // ; // Allowed version strings - "v1" diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model.go index 671932aff30..f71c048d15e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model.go @@ -75,6 +75,11 @@ type SensitiveDataModel struct { // The schemas to be scanned by data discovery jobs. SchemasForDiscovery []string `mandatory:"false" json:"schemasForDiscovery"` + // The data discovery jobs will scan the tables specified here, including both schemas and tables. + // For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + // "OE", tableName : ["T3", "T4"]}]. + TablesForDiscovery []TablesForDiscovery `mandatory:"false" json:"tablesForDiscovery"` + // The OCIDs of the sensitive types to be used by data discovery jobs. SensitiveTypeIdsForDiscovery []string `mandatory:"false" json:"sensitiveTypeIdsForDiscovery"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model_sensitive_type_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model_sensitive_type_collection.go new file mode 100644 index 00000000000..7d73f28fb01 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model_sensitive_type_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SensitiveDataModelSensitiveTypeCollection A collection of sensitive types summary objects present in a sensitive data model. +type SensitiveDataModelSensitiveTypeCollection struct { + + // An array of sensitive types summary objects present in a sensitive data model. + Items []SensitiveDataModelSensitiveTypeSummary `mandatory:"true" json:"items"` +} + +func (m SensitiveDataModelSensitiveTypeCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SensitiveDataModelSensitiveTypeCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model_sensitive_type_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model_sensitive_type_summary.go new file mode 100644 index 00000000000..e9d3d82a42a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sensitive_data_model_sensitive_type_summary.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SensitiveDataModelSensitiveTypeSummary Summary of sensitive types present in a sensitive data model. +type SensitiveDataModelSensitiveTypeSummary struct { + + // The OCID of the sensitive type. + SensitiveTypeId *string `mandatory:"true" json:"sensitiveTypeId"` + + // The total number of sensitive columns linked to this specific sensitive type . + Count *int64 `mandatory:"true" json:"count"` +} + +func (m SensitiveDataModelSensitiveTypeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SensitiveDataModelSensitiveTypeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sql_firewall_allowed_sql.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sql_firewall_allowed_sql.go new file mode 100644 index 00000000000..b8de6a4f7c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sql_firewall_allowed_sql.go @@ -0,0 +1,140 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SqlFirewallAllowedSql The resource represents a SQL Firewall allowed SQL in Data Safe. +type SqlFirewallAllowedSql struct { + + // The OCID of the SQL Firewall allowed SQL. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment containing the SQL Firewall allowed SQL. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The display name of the SQL Firewall allowed SQL. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the SQL Firewall policy corresponding to the SQL Firewall allowed SQL. + SqlFirewallPolicyId *string `mandatory:"true" json:"sqlFirewallPolicyId"` + + // The database user name. + DbUserName *string `mandatory:"true" json:"dbUserName"` + + // The SQL text of the SQL Firewall allowed SQL. + SqlText *string `mandatory:"true" json:"sqlText"` + + // Specifies the level of SQL included for this SQL Firewall policy. + // USER_ISSUED_SQL - User issued SQL statements only. + // ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units. + SqlLevel SqlFirewallAllowedSqlSqlLevelEnum `mandatory:"true" json:"sqlLevel"` + + // Version of the associated SQL Firewall policy. This identifies whether the allowed SQLs were added in the same batch or not. + Version *float32 `mandatory:"true" json:"version"` + + // The time the the SQL Firewall allowed SQL was collected from the target database, in the format defined by RFC3339. + TimeCollected *common.SDKTime `mandatory:"true" json:"timeCollected"` + + // The current state of the SQL Firewall allowed SQL. + LifecycleState SqlFirewallAllowedSqlLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The description of the SQL Firewall allowed SQL. + Description *string `mandatory:"false" json:"description"` + + // The name of the user that SQL was executed as. + CurrentUser *string `mandatory:"false" json:"currentUser"` + + // The objects accessed by the SQL. + SqlAccessedObjects []string `mandatory:"false" json:"sqlAccessedObjects"` + + // The last date and time the SQL Firewall allowed SQL was updated, in the format defined by RFC3339. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m SqlFirewallAllowedSql) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SqlFirewallAllowedSql) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSqlFirewallAllowedSqlSqlLevelEnum(string(m.SqlLevel)); !ok && m.SqlLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SqlLevel: %s. Supported values are: %s.", m.SqlLevel, strings.Join(GetSqlFirewallAllowedSqlSqlLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingSqlFirewallAllowedSqlLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetSqlFirewallAllowedSqlLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SqlFirewallAllowedSqlSqlLevelEnum Enum with underlying type: string +type SqlFirewallAllowedSqlSqlLevelEnum string + +// Set of constants representing the allowable values for SqlFirewallAllowedSqlSqlLevelEnum +const ( + SqlFirewallAllowedSqlSqlLevelUserIssuedSql SqlFirewallAllowedSqlSqlLevelEnum = "USER_ISSUED_SQL" + SqlFirewallAllowedSqlSqlLevelAllSql SqlFirewallAllowedSqlSqlLevelEnum = "ALL_SQL" +) + +var mappingSqlFirewallAllowedSqlSqlLevelEnum = map[string]SqlFirewallAllowedSqlSqlLevelEnum{ + "USER_ISSUED_SQL": SqlFirewallAllowedSqlSqlLevelUserIssuedSql, + "ALL_SQL": SqlFirewallAllowedSqlSqlLevelAllSql, +} + +var mappingSqlFirewallAllowedSqlSqlLevelEnumLowerCase = map[string]SqlFirewallAllowedSqlSqlLevelEnum{ + "user_issued_sql": SqlFirewallAllowedSqlSqlLevelUserIssuedSql, + "all_sql": SqlFirewallAllowedSqlSqlLevelAllSql, +} + +// GetSqlFirewallAllowedSqlSqlLevelEnumValues Enumerates the set of values for SqlFirewallAllowedSqlSqlLevelEnum +func GetSqlFirewallAllowedSqlSqlLevelEnumValues() []SqlFirewallAllowedSqlSqlLevelEnum { + values := make([]SqlFirewallAllowedSqlSqlLevelEnum, 0) + for _, v := range mappingSqlFirewallAllowedSqlSqlLevelEnum { + values = append(values, v) + } + return values +} + +// GetSqlFirewallAllowedSqlSqlLevelEnumStringValues Enumerates the set of values in String for SqlFirewallAllowedSqlSqlLevelEnum +func GetSqlFirewallAllowedSqlSqlLevelEnumStringValues() []string { + return []string{ + "USER_ISSUED_SQL", + "ALL_SQL", + } +} + +// GetMappingSqlFirewallAllowedSqlSqlLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSqlFirewallAllowedSqlSqlLevelEnum(val string) (SqlFirewallAllowedSqlSqlLevelEnum, bool) { + enum, ok := mappingSqlFirewallAllowedSqlSqlLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sql_firewall_allowed_sql_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sql_firewall_allowed_sql_lifecycle_state.go index 296ff70916c..af81cf6cb2d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sql_firewall_allowed_sql_lifecycle_state.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/sql_firewall_allowed_sql_lifecycle_state.go @@ -20,16 +20,19 @@ type SqlFirewallAllowedSqlLifecycleStateEnum string const ( SqlFirewallAllowedSqlLifecycleStateActive SqlFirewallAllowedSqlLifecycleStateEnum = "ACTIVE" SqlFirewallAllowedSqlLifecycleStateDeleted SqlFirewallAllowedSqlLifecycleStateEnum = "DELETED" + SqlFirewallAllowedSqlLifecycleStateFailed SqlFirewallAllowedSqlLifecycleStateEnum = "FAILED" ) var mappingSqlFirewallAllowedSqlLifecycleStateEnum = map[string]SqlFirewallAllowedSqlLifecycleStateEnum{ "ACTIVE": SqlFirewallAllowedSqlLifecycleStateActive, "DELETED": SqlFirewallAllowedSqlLifecycleStateDeleted, + "FAILED": SqlFirewallAllowedSqlLifecycleStateFailed, } var mappingSqlFirewallAllowedSqlLifecycleStateEnumLowerCase = map[string]SqlFirewallAllowedSqlLifecycleStateEnum{ "active": SqlFirewallAllowedSqlLifecycleStateActive, "deleted": SqlFirewallAllowedSqlLifecycleStateDeleted, + "failed": SqlFirewallAllowedSqlLifecycleStateFailed, } // GetSqlFirewallAllowedSqlLifecycleStateEnumValues Enumerates the set of values for SqlFirewallAllowedSqlLifecycleStateEnum @@ -46,6 +49,7 @@ func GetSqlFirewallAllowedSqlLifecycleStateEnumStringValues() []string { return []string{ "ACTIVE", "DELETED", + "FAILED", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/tables_for_discovery.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/tables_for_discovery.go new file mode 100644 index 00000000000..32fcad15235 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/tables_for_discovery.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TablesForDiscovery This contains the schema name along with one or more optional table names. +type TablesForDiscovery struct { + + // This contains the name of the schema. + SchemaName *string `mandatory:"true" json:"schemaName"` + + // This contains an optional list of the table names. + TableNames []string `mandatory:"false" json:"tableNames"` +} + +func (m TablesForDiscovery) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TablesForDiscovery) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_security_assessment_baseline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_security_assessment_baseline_details.go new file mode 100644 index 00000000000..cf83f257b5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_security_assessment_baseline_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UnsetSecurityAssessmentBaselineDetails The details required to unset the baseline of the assessment. +type UnsetSecurityAssessmentBaselineDetails struct { + + // The list of database target OCIDs for which the user intends to unset the baseline. + TargetIds []string `mandatory:"false" json:"targetIds"` +} + +func (m UnsetSecurityAssessmentBaselineDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UnsetSecurityAssessmentBaselineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_security_assessment_baseline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_security_assessment_baseline_request_response.go index 23e2cf1abde..6a022bada15 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_security_assessment_baseline_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_security_assessment_baseline_request_response.go @@ -37,6 +37,9 @@ type UnsetSecurityAssessmentBaselineRequest struct { // Unique identifier for the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Details of the target associated with the security assessment for which the user intents to unset the baseline. + UnsetSecurityAssessmentBaselineDetails `contributesTo:"body"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_user_assessment_baseline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_user_assessment_baseline_details.go new file mode 100644 index 00000000000..0b5fa00d299 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_user_assessment_baseline_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UnsetUserAssessmentBaselineDetails The details required to unset the baseline of the assessment. +type UnsetUserAssessmentBaselineDetails struct { + + // The list of database target OCIDs for which the user intends to unset the baseline. + TargetIds []string `mandatory:"false" json:"targetIds"` +} + +func (m UnsetUserAssessmentBaselineDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UnsetUserAssessmentBaselineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_user_assessment_baseline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_user_assessment_baseline_request_response.go index 5903e5a0711..37642b4d643 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_user_assessment_baseline_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/unset_user_assessment_baseline_request_response.go @@ -37,6 +37,9 @@ type UnsetUserAssessmentBaselineRequest struct { // Unique identifier for the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Details of the target associated with the user assessment for which the user intents to unset the baseline. + UnsetUserAssessmentBaselineDetails `contributesTo:"body"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_security_assessment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_security_assessment_details.go index 4bd41244645..604f9d3a348 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_security_assessment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_security_assessment_details.go @@ -24,6 +24,9 @@ type UpdateSecurityAssessmentDetails struct { // The description of the security assessment. Description *string `mandatory:"false" json:"description"` + // Indicates whether the assessment is scheduled to run. + IsAssessmentScheduled *bool `mandatory:"false" json:"isAssessmentScheduled"` + // This is applicable only for save schedule and latest assessment. It updates the existing schedule in a specified format: // ; // Allowed version strings - "v1" diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_sensitive_data_model_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_sensitive_data_model_details.go index 0d6d1be7155..393484b61b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_sensitive_data_model_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_sensitive_data_model_details.go @@ -35,6 +35,11 @@ type UpdateSensitiveDataModelDetails struct { // The schemas to be used for future data discovery jobs. SchemasForDiscovery []string `mandatory:"false" json:"schemasForDiscovery"` + // The data discovery jobs will scan the tables specified here, including both schemas and tables. + // For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: + // "OE", tableName : ["T3", "T4"]}]. + TablesForDiscovery []TablesForDiscovery `mandatory:"false" json:"tablesForDiscovery"` + // The OCIDs of the sensitive types to be used for future data discovery jobs. If OCID of a sensitive category is // provided, all its child sensitive types are used for data discovery. SensitiveTypeIdsForDiscovery []string `mandatory:"false" json:"sensitiveTypeIdsForDiscovery"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_user_assessment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_user_assessment_details.go index 3dc4c8b29fe..e7e7129cde5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_user_assessment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/update_user_assessment_details.go @@ -24,6 +24,9 @@ type UpdateUserAssessmentDetails struct { // The display name of the user assessment. DisplayName *string `mandatory:"false" json:"displayName"` + // Indicates whether the assessment is scheduled to run. + IsAssessmentScheduled *bool `mandatory:"false" json:"isAssessmentScheduled"` + // The schedule for periodically saving the assessment. This is applicable only for assessments of type save schedule and latest assessment. It updates the existing schedule in a specified format: // ; // Allowed version strings - "v1" diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment.go index 31586eedc3d..21fe2932ffc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment.go @@ -71,6 +71,9 @@ type UserAssessment struct { // The OCID of the user assessment that is responsible for creating this scheduled save assessment. ScheduleAssessmentId *string `mandatory:"false" json:"scheduleAssessmentId"` + // Indicates whether the assessment is scheduled to run. + IsAssessmentScheduled *bool `mandatory:"false" json:"isAssessmentScheduled"` + // Schedule of the assessment that runs periodically in this specified format: // ; // Allowed version strings - "v1" diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment_summary.go index 29c15321027..878587997b1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/user_assessment_summary.go @@ -70,6 +70,9 @@ type UserAssessmentSummary struct { // The OCID of the user assessment that created this scheduled save assessment. ScheduleAssessmentId *string `mandatory:"false" json:"scheduleAssessmentId"` + // Indicates whether the assessment is scheduled to run. + IsAssessmentScheduled *bool `mandatory:"false" json:"isAssessmentScheduled"` + // Schedule to save the assessment periodically in the specified format: // ; // Allowed version strings - "v1" diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request.go index e08a6fadbdb..096893bc5cb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request.go @@ -141,6 +141,7 @@ const ( WorkRequestOperationTypeRefreshSqlCollectionLogInsights WorkRequestOperationTypeEnum = "REFRESH_SQL_COLLECTION_LOG_INSIGHTS" WorkRequestOperationTypePurgeSqlCollectionLogs WorkRequestOperationTypeEnum = "PURGE_SQL_COLLECTION_LOGS" WorkRequestOperationTypeRefreshViolations WorkRequestOperationTypeEnum = "REFRESH_VIOLATIONS" + WorkRequestOperationTypeCreateArchival WorkRequestOperationTypeEnum = "CREATE_ARCHIVAL" WorkRequestOperationTypeUpdateSecurityPolicy WorkRequestOperationTypeEnum = "UPDATE_SECURITY_POLICY" WorkRequestOperationTypeChangeSecurityPolicyCompartment WorkRequestOperationTypeEnum = "CHANGE_SECURITY_POLICY_COMPARTMENT" WorkRequestOperationTypeUpdateSecurityPolicyDeployment WorkRequestOperationTypeEnum = "UPDATE_SECURITY_POLICY_DEPLOYMENT" @@ -197,6 +198,7 @@ const ( WorkRequestOperationTypePatchDifference WorkRequestOperationTypeEnum = "PATCH_DIFFERENCE" WorkRequestOperationTypeApplyDifference WorkRequestOperationTypeEnum = "APPLY_DIFFERENCE" WorkRequestOperationTypeMaskPolicyGenerateHealthReport WorkRequestOperationTypeEnum = "MASK_POLICY_GENERATE_HEALTH_REPORT" + WorkRequestOperationTypeMaskPolicyDeleteHealthReport WorkRequestOperationTypeEnum = "MASK_POLICY_DELETE_HEALTH_REPORT" WorkRequestOperationTypeAbortMasking WorkRequestOperationTypeEnum = "ABORT_MASKING" WorkRequestOperationTypeCreateSecurityPolicyReport WorkRequestOperationTypeEnum = "CREATE_SECURITY_POLICY_REPORT" WorkRequestOperationTypeRefreshSecurityPolicyCache WorkRequestOperationTypeEnum = "REFRESH_SECURITY_POLICY_CACHE" @@ -276,6 +278,7 @@ var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnu "REFRESH_SQL_COLLECTION_LOG_INSIGHTS": WorkRequestOperationTypeRefreshSqlCollectionLogInsights, "PURGE_SQL_COLLECTION_LOGS": WorkRequestOperationTypePurgeSqlCollectionLogs, "REFRESH_VIOLATIONS": WorkRequestOperationTypeRefreshViolations, + "CREATE_ARCHIVAL": WorkRequestOperationTypeCreateArchival, "UPDATE_SECURITY_POLICY": WorkRequestOperationTypeUpdateSecurityPolicy, "CHANGE_SECURITY_POLICY_COMPARTMENT": WorkRequestOperationTypeChangeSecurityPolicyCompartment, "UPDATE_SECURITY_POLICY_DEPLOYMENT": WorkRequestOperationTypeUpdateSecurityPolicyDeployment, @@ -332,6 +335,7 @@ var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnu "PATCH_DIFFERENCE": WorkRequestOperationTypePatchDifference, "APPLY_DIFFERENCE": WorkRequestOperationTypeApplyDifference, "MASK_POLICY_GENERATE_HEALTH_REPORT": WorkRequestOperationTypeMaskPolicyGenerateHealthReport, + "MASK_POLICY_DELETE_HEALTH_REPORT": WorkRequestOperationTypeMaskPolicyDeleteHealthReport, "ABORT_MASKING": WorkRequestOperationTypeAbortMasking, "CREATE_SECURITY_POLICY_REPORT": WorkRequestOperationTypeCreateSecurityPolicyReport, "REFRESH_SECURITY_POLICY_CACHE": WorkRequestOperationTypeRefreshSecurityPolicyCache, @@ -411,6 +415,7 @@ var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperati "refresh_sql_collection_log_insights": WorkRequestOperationTypeRefreshSqlCollectionLogInsights, "purge_sql_collection_logs": WorkRequestOperationTypePurgeSqlCollectionLogs, "refresh_violations": WorkRequestOperationTypeRefreshViolations, + "create_archival": WorkRequestOperationTypeCreateArchival, "update_security_policy": WorkRequestOperationTypeUpdateSecurityPolicy, "change_security_policy_compartment": WorkRequestOperationTypeChangeSecurityPolicyCompartment, "update_security_policy_deployment": WorkRequestOperationTypeUpdateSecurityPolicyDeployment, @@ -467,6 +472,7 @@ var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperati "patch_difference": WorkRequestOperationTypePatchDifference, "apply_difference": WorkRequestOperationTypeApplyDifference, "mask_policy_generate_health_report": WorkRequestOperationTypeMaskPolicyGenerateHealthReport, + "mask_policy_delete_health_report": WorkRequestOperationTypeMaskPolicyDeleteHealthReport, "abort_masking": WorkRequestOperationTypeAbortMasking, "create_security_policy_report": WorkRequestOperationTypeCreateSecurityPolicyReport, "refresh_security_policy_cache": WorkRequestOperationTypeRefreshSecurityPolicyCache, @@ -557,6 +563,7 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", + "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", @@ -613,6 +620,7 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", + "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request_summary.go index 5336f44bee3..e4e51c1cb11 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datasafe/work_request_summary.go @@ -140,6 +140,7 @@ const ( WorkRequestSummaryOperationTypeRefreshSqlCollectionLogInsights WorkRequestSummaryOperationTypeEnum = "REFRESH_SQL_COLLECTION_LOG_INSIGHTS" WorkRequestSummaryOperationTypePurgeSqlCollectionLogs WorkRequestSummaryOperationTypeEnum = "PURGE_SQL_COLLECTION_LOGS" WorkRequestSummaryOperationTypeRefreshViolations WorkRequestSummaryOperationTypeEnum = "REFRESH_VIOLATIONS" + WorkRequestSummaryOperationTypeCreateArchival WorkRequestSummaryOperationTypeEnum = "CREATE_ARCHIVAL" WorkRequestSummaryOperationTypeUpdateSecurityPolicy WorkRequestSummaryOperationTypeEnum = "UPDATE_SECURITY_POLICY" WorkRequestSummaryOperationTypeChangeSecurityPolicyCompartment WorkRequestSummaryOperationTypeEnum = "CHANGE_SECURITY_POLICY_COMPARTMENT" WorkRequestSummaryOperationTypeUpdateSecurityPolicyDeployment WorkRequestSummaryOperationTypeEnum = "UPDATE_SECURITY_POLICY_DEPLOYMENT" @@ -196,6 +197,7 @@ const ( WorkRequestSummaryOperationTypePatchDifference WorkRequestSummaryOperationTypeEnum = "PATCH_DIFFERENCE" WorkRequestSummaryOperationTypeApplyDifference WorkRequestSummaryOperationTypeEnum = "APPLY_DIFFERENCE" WorkRequestSummaryOperationTypeMaskPolicyGenerateHealthReport WorkRequestSummaryOperationTypeEnum = "MASK_POLICY_GENERATE_HEALTH_REPORT" + WorkRequestSummaryOperationTypeMaskPolicyDeleteHealthReport WorkRequestSummaryOperationTypeEnum = "MASK_POLICY_DELETE_HEALTH_REPORT" WorkRequestSummaryOperationTypeAbortMasking WorkRequestSummaryOperationTypeEnum = "ABORT_MASKING" WorkRequestSummaryOperationTypeCreateSecurityPolicyReport WorkRequestSummaryOperationTypeEnum = "CREATE_SECURITY_POLICY_REPORT" WorkRequestSummaryOperationTypeRefreshSecurityPolicyCache WorkRequestSummaryOperationTypeEnum = "REFRESH_SECURITY_POLICY_CACHE" @@ -274,6 +276,7 @@ var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOp "REFRESH_SQL_COLLECTION_LOG_INSIGHTS": WorkRequestSummaryOperationTypeRefreshSqlCollectionLogInsights, "PURGE_SQL_COLLECTION_LOGS": WorkRequestSummaryOperationTypePurgeSqlCollectionLogs, "REFRESH_VIOLATIONS": WorkRequestSummaryOperationTypeRefreshViolations, + "CREATE_ARCHIVAL": WorkRequestSummaryOperationTypeCreateArchival, "UPDATE_SECURITY_POLICY": WorkRequestSummaryOperationTypeUpdateSecurityPolicy, "CHANGE_SECURITY_POLICY_COMPARTMENT": WorkRequestSummaryOperationTypeChangeSecurityPolicyCompartment, "UPDATE_SECURITY_POLICY_DEPLOYMENT": WorkRequestSummaryOperationTypeUpdateSecurityPolicyDeployment, @@ -330,6 +333,7 @@ var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOp "PATCH_DIFFERENCE": WorkRequestSummaryOperationTypePatchDifference, "APPLY_DIFFERENCE": WorkRequestSummaryOperationTypeApplyDifference, "MASK_POLICY_GENERATE_HEALTH_REPORT": WorkRequestSummaryOperationTypeMaskPolicyGenerateHealthReport, + "MASK_POLICY_DELETE_HEALTH_REPORT": WorkRequestSummaryOperationTypeMaskPolicyDeleteHealthReport, "ABORT_MASKING": WorkRequestSummaryOperationTypeAbortMasking, "CREATE_SECURITY_POLICY_REPORT": WorkRequestSummaryOperationTypeCreateSecurityPolicyReport, "REFRESH_SECURITY_POLICY_CACHE": WorkRequestSummaryOperationTypeRefreshSecurityPolicyCache, @@ -408,6 +412,7 @@ var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequest "refresh_sql_collection_log_insights": WorkRequestSummaryOperationTypeRefreshSqlCollectionLogInsights, "purge_sql_collection_logs": WorkRequestSummaryOperationTypePurgeSqlCollectionLogs, "refresh_violations": WorkRequestSummaryOperationTypeRefreshViolations, + "create_archival": WorkRequestSummaryOperationTypeCreateArchival, "update_security_policy": WorkRequestSummaryOperationTypeUpdateSecurityPolicy, "change_security_policy_compartment": WorkRequestSummaryOperationTypeChangeSecurityPolicyCompartment, "update_security_policy_deployment": WorkRequestSummaryOperationTypeUpdateSecurityPolicyDeployment, @@ -464,6 +469,7 @@ var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequest "patch_difference": WorkRequestSummaryOperationTypePatchDifference, "apply_difference": WorkRequestSummaryOperationTypeApplyDifference, "mask_policy_generate_health_report": WorkRequestSummaryOperationTypeMaskPolicyGenerateHealthReport, + "mask_policy_delete_health_report": WorkRequestSummaryOperationTypeMaskPolicyDeleteHealthReport, "abort_masking": WorkRequestSummaryOperationTypeAbortMasking, "create_security_policy_report": WorkRequestSummaryOperationTypeCreateSecurityPolicyReport, "refresh_security_policy_cache": WorkRequestSummaryOperationTypeRefreshSecurityPolicyCache, @@ -553,6 +559,7 @@ func GetWorkRequestSummaryOperationTypeEnumStringValues() []string { "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", + "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", @@ -609,6 +616,7 @@ func GetWorkRequestSummaryOperationTypeEnumStringValues() []string { "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", + "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/action_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/action_type.go new file mode 100644 index 00000000000..4a0c599e11d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/action_type.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "strings" +) + +// ActionTypeEnum Enum with underlying type: string +type ActionTypeEnum string + +// Set of constants representing the allowable values for ActionTypeEnum +const ( + ActionTypeCreated ActionTypeEnum = "CREATED" + ActionTypeUpdated ActionTypeEnum = "UPDATED" + ActionTypeDeleted ActionTypeEnum = "DELETED" + ActionTypeInProgress ActionTypeEnum = "IN_PROGRESS" + ActionTypeRelated ActionTypeEnum = "RELATED" + ActionTypeFailed ActionTypeEnum = "FAILED" +) + +var mappingActionTypeEnum = map[string]ActionTypeEnum{ + "CREATED": ActionTypeCreated, + "UPDATED": ActionTypeUpdated, + "DELETED": ActionTypeDeleted, + "IN_PROGRESS": ActionTypeInProgress, + "RELATED": ActionTypeRelated, + "FAILED": ActionTypeFailed, +} + +var mappingActionTypeEnumLowerCase = map[string]ActionTypeEnum{ + "created": ActionTypeCreated, + "updated": ActionTypeUpdated, + "deleted": ActionTypeDeleted, + "in_progress": ActionTypeInProgress, + "related": ActionTypeRelated, + "failed": ActionTypeFailed, +} + +// GetActionTypeEnumValues Enumerates the set of values for ActionTypeEnum +func GetActionTypeEnumValues() []ActionTypeEnum { + values := make([]ActionTypeEnum, 0) + for _, v := range mappingActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetActionTypeEnumStringValues Enumerates the set of values in String for ActionTypeEnum +func GetActionTypeEnumStringValues() []string { + return []string{ + "CREATED", + "UPDATED", + "DELETED", + "IN_PROGRESS", + "RELATED", + "FAILED", + } +} + +// GetMappingActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingActionTypeEnum(val string) (ActionTypeEnum, bool) { + enum, ok := mappingActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_private_endpoint_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_private_endpoint_compartment_details.go new file mode 100644 index 00000000000..64401cf3db7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_private_endpoint_compartment_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangePrivateEndpointCompartmentDetails The configuration details for moving the resource for private endpoint to other compartment. +type ChangePrivateEndpointCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangePrivateEndpointCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangePrivateEndpointCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_private_endpoint_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_private_endpoint_compartment_request_response.go new file mode 100644 index 00000000000..df13f99ea9f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_private_endpoint_compartment_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangePrivateEndpointCompartmentRequest wrapper for the ChangePrivateEndpointCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ChangePrivateEndpointCompartment.go.html to see an example of how to use ChangePrivateEndpointCompartmentRequest. +type ChangePrivateEndpointCompartmentRequest struct { + + // Request to move the private endpoint to a different compartment. + ChangePrivateEndpointCompartmentDetails `contributesTo:"body"` + + // Oracle Sharded Database PrivateEndpoint identifier + PrivateEndpointId *string `mandatory:"true" contributesTo:"path" name:"privateEndpointId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangePrivateEndpointCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangePrivateEndpointCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangePrivateEndpointCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangePrivateEndpointCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangePrivateEndpointCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangePrivateEndpointCompartmentResponse wrapper for the ChangePrivateEndpointCompartment operation +type ChangePrivateEndpointCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangePrivateEndpointCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangePrivateEndpointCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_sharded_database_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_sharded_database_compartment_details.go new file mode 100644 index 00000000000..f23c3456e2a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_sharded_database_compartment_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeShardedDatabaseCompartmentDetails The configuration details for moving the resource for sharded database to other compartment. +type ChangeShardedDatabaseCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the resource to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeShardedDatabaseCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeShardedDatabaseCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_sharded_database_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_sharded_database_compartment_request_response.go new file mode 100644 index 00000000000..262a8c5a2b1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/change_sharded_database_compartment_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeShardedDatabaseCompartmentRequest wrapper for the ChangeShardedDatabaseCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ChangeShardedDatabaseCompartment.go.html to see an example of how to use ChangeShardedDatabaseCompartmentRequest. +type ChangeShardedDatabaseCompartmentRequest struct { + + // Request to move the sharded database to a different compartment. + ChangeShardedDatabaseCompartmentDetails `contributesTo:"body"` + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeShardedDatabaseCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeShardedDatabaseCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeShardedDatabaseCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeShardedDatabaseCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeShardedDatabaseCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeShardedDatabaseCompartmentResponse wrapper for the ChangeShardedDatabaseCompartment operation +type ChangeShardedDatabaseCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeShardedDatabaseCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeShardedDatabaseCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharded_database_gsms_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharded_database_gsms_details.go new file mode 100644 index 00000000000..9bffcd38b9e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharded_database_gsms_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigureShardedDatabaseGsmsDetails Details of the request to configure new global service manager(GSM) instances for the sharded database. +type ConfigureShardedDatabaseGsmsDetails struct { + + // Names of old global service manager(GSM) instances corresponding to which new GSM instances need to be configured. + OldGsmNames []string `mandatory:"true" json:"oldGsmNames"` + + // Flag to indicate if new global service manager(GSM) instances shall use latest image or re-use image used by existing + // GSM instances. + IsLatestGsmImage *bool `mandatory:"true" json:"isLatestGsmImage"` +} + +func (m ConfigureShardedDatabaseGsmsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigureShardedDatabaseGsmsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharded_database_gsms_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharded_database_gsms_request_response.go new file mode 100644 index 00000000000..12459cc6745 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharded_database_gsms_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ConfigureShardedDatabaseGsmsRequest wrapper for the ConfigureShardedDatabaseGsms operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ConfigureShardedDatabaseGsms.go.html to see an example of how to use ConfigureShardedDatabaseGsmsRequest. +type ConfigureShardedDatabaseGsmsRequest struct { + + // Details to configure the new GSM instances for the sharded database. + ConfigureShardedDatabaseGsmsDetails `contributesTo:"body"` + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ConfigureShardedDatabaseGsmsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConfigureShardedDatabaseGsmsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ConfigureShardedDatabaseGsmsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConfigureShardedDatabaseGsmsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ConfigureShardedDatabaseGsmsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfigureShardedDatabaseGsmsResponse wrapper for the ConfigureShardedDatabaseGsms operation +type ConfigureShardedDatabaseGsmsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ConfigureShardedDatabaseGsmsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConfigureShardedDatabaseGsmsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharding_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharding_request_response.go new file mode 100644 index 00000000000..c3450b2521b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/configure_sharding_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ConfigureShardingRequest wrapper for the ConfigureSharding operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ConfigureSharding.go.html to see an example of how to use ConfigureShardingRequest. +type ConfigureShardingRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined + // sharding type. + IsRebalanceRequired *bool `mandatory:"false" contributesTo:"query" name:"isRebalanceRequired"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ConfigureShardingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConfigureShardingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ConfigureShardingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConfigureShardingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ConfigureShardingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfigureShardingResponse wrapper for the ConfigureSharding operation +type ConfigureShardingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ConfigureShardingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConfigureShardingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/connection_string.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/connection_string.go new file mode 100644 index 00000000000..f53b2422e1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/connection_string.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionString Details of sharded database connection String. +type ConnectionString struct { + + // Collection of connection strings. + AllConnectionStrings map[string]string `mandatory:"true" json:"allConnectionStrings"` +} + +func (m ConnectionString) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionString) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_catalog_detail.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_catalog_detail.go new file mode 100644 index 00000000000..5ae04fb050e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_catalog_detail.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDedicatedCatalogDetail Details required for creation of ATP-D based catalog. +type CreateDedicatedCatalogDetail struct { + + // Admin password for the catalog database. + AdminPassword *string `mandatory:"true" json:"adminPassword"` + + // The compute count for the catalog database. It has to be in multiple of 2. + ComputeCount *float32 `mandatory:"true" json:"computeCount"` + + // The data disk group size to be allocated in GBs for the catalog database. + DataStorageSizeInGbs *float64 `mandatory:"true" json:"dataStorageSizeInGbs"` + + // Determines the auto-scaling mode for the catalog database. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + CloudAutonomousVmClusterId *string `mandatory:"true" json:"cloudAutonomousVmClusterId"` + + EncryptionKeyDetails *DedicatedShardOrCatalogEncryptionKeyDetails `mandatory:"false" json:"encryptionKeyDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + PeerCloudAutonomousVmClusterId *string `mandatory:"false" json:"peerCloudAutonomousVmClusterId"` +} + +func (m CreateDedicatedCatalogDetail) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDedicatedCatalogDetail) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_shard_detail.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_shard_detail.go new file mode 100644 index 00000000000..1c7e337ba90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_shard_detail.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDedicatedShardDetail Details required for creation of ATP-D based shard. +type CreateDedicatedShardDetail struct { + + // Admin password for shard database. + AdminPassword *string `mandatory:"true" json:"adminPassword"` + + // The compute count for the shard database. It has to be in multiples of 2. + ComputeCount *float32 `mandatory:"true" json:"computeCount"` + + // The data disk group size to be allocated in GBs for the shard database. + DataStorageSizeInGbs *float64 `mandatory:"true" json:"dataStorageSizeInGbs"` + + // Determines the auto-scaling mode for the shard database. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + CloudAutonomousVmClusterId *string `mandatory:"true" json:"cloudAutonomousVmClusterId"` + + EncryptionKeyDetails *DedicatedShardOrCatalogEncryptionKeyDetails `mandatory:"false" json:"encryptionKeyDetails"` + + // The shard space name for the shard database. Shard space for existing shard cannot be changed, once shard is created. + // Shard space name shall be used while creation of new shards. For User defined sharding, every shard must have a unique + // shard space name. For system defined sharding, shard space name is not required. + ShardSpace *string `mandatory:"false" json:"shardSpace"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + PeerCloudAutonomousVmClusterId *string `mandatory:"false" json:"peerCloudAutonomousVmClusterId"` +} + +func (m CreateDedicatedShardDetail) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDedicatedShardDetail) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_sharded_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_sharded_database.go new file mode 100644 index 00000000000..4bb63b52201 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_dedicated_sharded_database.go @@ -0,0 +1,237 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDedicatedShardedDatabase Request details for creation of ATP-Dedicated based sharded database. +type CreateDedicatedShardedDatabase struct { + + // Identifier of the compartment where sharded database is to be created. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Oracle sharded database display name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Oracle Database version of the Autonomous Container Database. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // The character set for the new shard database being created. Use database api ListAutonomousDatabaseCharacterSets to + // get the list of allowed character set for autonomous dedicated database. See documentation: + // https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/ListAutonomousDatabaseCharacterSets + CharacterSet *string `mandatory:"true" json:"characterSet"` + + // The national character set for the new shard database being created. Use database api ListAutonomousDatabaseCharacterSets to + // get the list of allowed national character set for autonomous dedicated database. See documentation: + // https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/ListAutonomousDatabaseCharacterSets + NcharacterSet *string `mandatory:"true" json:"ncharacterSet"` + + // The listener port number for sharded database. + ListenerPort *int `mandatory:"true" json:"listenerPort"` + + // The TLS listener port number for sharded database. + ListenerPortTls *int `mandatory:"true" json:"listenerPortTls"` + + // Ons port local for sharded database. + OnsPortLocal *int `mandatory:"true" json:"onsPortLocal"` + + // Ons remote port for sharded database. + OnsPortRemote *int `mandatory:"true" json:"onsPortRemote"` + + // Unique name prefix for the sharded databases. Only alpha-numeric values are allowed. First character + // has to be a letter followed by any combination of letter and number. + Prefix *string `mandatory:"true" json:"prefix"` + + // Collection of ATP-Dedicated shards that needs to be created. + ShardDetails []CreateDedicatedShardDetail `mandatory:"true" json:"shardDetails"` + + // Collection of ATP-Dedicated catalogs that needs to be created. + CatalogDetails []CreateDedicatedCatalogDetail `mandatory:"true" json:"catalogDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7. + ReplicationFactor *int `mandatory:"false" json:"replicationFactor"` + + // For RAFT replication based sharded database, the value should be atleast twice the number of shards. + ReplicationUnit *int `mandatory:"false" json:"replicationUnit"` + + // The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. + // All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for + // clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period. + ClusterCertificateCommonName *string `mandatory:"false" json:"clusterCertificateCommonName"` + + // The default number of unique chunks in a shardspace. The value of chunks must be + // greater than 2 times the size of the largest shardgroup in any shardspace. + Chunks *int `mandatory:"false" json:"chunks"` + + // Possible workload types. + DbWorkload CreateDedicatedShardedDatabaseDbWorkloadEnum `mandatory:"true" json:"dbWorkload"` + + // Sharding Method. + ShardingMethod CreateDedicatedShardedDatabaseShardingMethodEnum `mandatory:"true" json:"shardingMethod"` + + // The Replication method for sharded database. + ReplicationMethod DedicatedShardedDatabaseReplicationMethodEnum `mandatory:"false" json:"replicationMethod,omitempty"` +} + +// GetCompartmentId returns CompartmentId +func (m CreateDedicatedShardedDatabase) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m CreateDedicatedShardedDatabase) GetDisplayName() *string { + return m.DisplayName +} + +// GetFreeformTags returns FreeformTags +func (m CreateDedicatedShardedDatabase) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateDedicatedShardedDatabase) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateDedicatedShardedDatabase) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDedicatedShardedDatabase) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCreateDedicatedShardedDatabaseDbWorkloadEnum(string(m.DbWorkload)); !ok && m.DbWorkload != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbWorkload: %s. Supported values are: %s.", m.DbWorkload, strings.Join(GetCreateDedicatedShardedDatabaseDbWorkloadEnumStringValues(), ","))) + } + if _, ok := GetMappingCreateDedicatedShardedDatabaseShardingMethodEnum(string(m.ShardingMethod)); !ok && m.ShardingMethod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ShardingMethod: %s. Supported values are: %s.", m.ShardingMethod, strings.Join(GetCreateDedicatedShardedDatabaseShardingMethodEnumStringValues(), ","))) + } + + if _, ok := GetMappingDedicatedShardedDatabaseReplicationMethodEnum(string(m.ReplicationMethod)); !ok && m.ReplicationMethod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReplicationMethod: %s. Supported values are: %s.", m.ReplicationMethod, strings.Join(GetDedicatedShardedDatabaseReplicationMethodEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateDedicatedShardedDatabase) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDedicatedShardedDatabase CreateDedicatedShardedDatabase + s := struct { + DiscriminatorParam string `json:"dbDeploymentType"` + MarshalTypeCreateDedicatedShardedDatabase + }{ + "DEDICATED", + (MarshalTypeCreateDedicatedShardedDatabase)(m), + } + + return json.Marshal(&s) +} + +// CreateDedicatedShardedDatabaseDbWorkloadEnum Enum with underlying type: string +type CreateDedicatedShardedDatabaseDbWorkloadEnum string + +// Set of constants representing the allowable values for CreateDedicatedShardedDatabaseDbWorkloadEnum +const ( + CreateDedicatedShardedDatabaseDbWorkloadOltp CreateDedicatedShardedDatabaseDbWorkloadEnum = "OLTP" + CreateDedicatedShardedDatabaseDbWorkloadDw CreateDedicatedShardedDatabaseDbWorkloadEnum = "DW" +) + +var mappingCreateDedicatedShardedDatabaseDbWorkloadEnum = map[string]CreateDedicatedShardedDatabaseDbWorkloadEnum{ + "OLTP": CreateDedicatedShardedDatabaseDbWorkloadOltp, + "DW": CreateDedicatedShardedDatabaseDbWorkloadDw, +} + +var mappingCreateDedicatedShardedDatabaseDbWorkloadEnumLowerCase = map[string]CreateDedicatedShardedDatabaseDbWorkloadEnum{ + "oltp": CreateDedicatedShardedDatabaseDbWorkloadOltp, + "dw": CreateDedicatedShardedDatabaseDbWorkloadDw, +} + +// GetCreateDedicatedShardedDatabaseDbWorkloadEnumValues Enumerates the set of values for CreateDedicatedShardedDatabaseDbWorkloadEnum +func GetCreateDedicatedShardedDatabaseDbWorkloadEnumValues() []CreateDedicatedShardedDatabaseDbWorkloadEnum { + values := make([]CreateDedicatedShardedDatabaseDbWorkloadEnum, 0) + for _, v := range mappingCreateDedicatedShardedDatabaseDbWorkloadEnum { + values = append(values, v) + } + return values +} + +// GetCreateDedicatedShardedDatabaseDbWorkloadEnumStringValues Enumerates the set of values in String for CreateDedicatedShardedDatabaseDbWorkloadEnum +func GetCreateDedicatedShardedDatabaseDbWorkloadEnumStringValues() []string { + return []string{ + "OLTP", + "DW", + } +} + +// GetMappingCreateDedicatedShardedDatabaseDbWorkloadEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateDedicatedShardedDatabaseDbWorkloadEnum(val string) (CreateDedicatedShardedDatabaseDbWorkloadEnum, bool) { + enum, ok := mappingCreateDedicatedShardedDatabaseDbWorkloadEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CreateDedicatedShardedDatabaseShardingMethodEnum Enum with underlying type: string +type CreateDedicatedShardedDatabaseShardingMethodEnum string + +// Set of constants representing the allowable values for CreateDedicatedShardedDatabaseShardingMethodEnum +const ( + CreateDedicatedShardedDatabaseShardingMethodUser CreateDedicatedShardedDatabaseShardingMethodEnum = "USER" + CreateDedicatedShardedDatabaseShardingMethodSystem CreateDedicatedShardedDatabaseShardingMethodEnum = "SYSTEM" +) + +var mappingCreateDedicatedShardedDatabaseShardingMethodEnum = map[string]CreateDedicatedShardedDatabaseShardingMethodEnum{ + "USER": CreateDedicatedShardedDatabaseShardingMethodUser, + "SYSTEM": CreateDedicatedShardedDatabaseShardingMethodSystem, +} + +var mappingCreateDedicatedShardedDatabaseShardingMethodEnumLowerCase = map[string]CreateDedicatedShardedDatabaseShardingMethodEnum{ + "user": CreateDedicatedShardedDatabaseShardingMethodUser, + "system": CreateDedicatedShardedDatabaseShardingMethodSystem, +} + +// GetCreateDedicatedShardedDatabaseShardingMethodEnumValues Enumerates the set of values for CreateDedicatedShardedDatabaseShardingMethodEnum +func GetCreateDedicatedShardedDatabaseShardingMethodEnumValues() []CreateDedicatedShardedDatabaseShardingMethodEnum { + values := make([]CreateDedicatedShardedDatabaseShardingMethodEnum, 0) + for _, v := range mappingCreateDedicatedShardedDatabaseShardingMethodEnum { + values = append(values, v) + } + return values +} + +// GetCreateDedicatedShardedDatabaseShardingMethodEnumStringValues Enumerates the set of values in String for CreateDedicatedShardedDatabaseShardingMethodEnum +func GetCreateDedicatedShardedDatabaseShardingMethodEnumStringValues() []string { + return []string{ + "USER", + "SYSTEM", + } +} + +// GetMappingCreateDedicatedShardedDatabaseShardingMethodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateDedicatedShardedDatabaseShardingMethodEnum(val string) (CreateDedicatedShardedDatabaseShardingMethodEnum, bool) { + enum, ok := mappingCreateDedicatedShardedDatabaseShardingMethodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_private_endpoint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_private_endpoint_details.go new file mode 100644 index 00000000000..c3d1a993f2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_private_endpoint_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePrivateEndpointDetails Details required for private endpoint creation. +type CreatePrivateEndpointDetails struct { + + // Identifier of the compartment where private endpoint is to be created. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Identifier of the customer subnet against which private endpoint is to be created. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Private endpoint display name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // PrivateEndpoint description. + Description *string `mandatory:"false" json:"description"` + + // The OCIDs of the network security groups that the private endpoint belongs to. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreatePrivateEndpointDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePrivateEndpointDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_private_endpoint_request_response.go new file mode 100644 index 00000000000..e3411556e2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_private_endpoint_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePrivateEndpointRequest wrapper for the CreatePrivateEndpoint operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/CreatePrivateEndpoint.go.html to see an example of how to use CreatePrivateEndpointRequest. +type CreatePrivateEndpointRequest struct { + + // Details of PrivateEndpoint to be created. + CreatePrivateEndpointDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePrivateEndpointResponse wrapper for the CreatePrivateEndpoint operation +type CreatePrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateEndpoint instance + PrivateEndpoint `presentIn:"body"` + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreatePrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_sharded_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_sharded_database_details.go new file mode 100644 index 00000000000..fdce50ff64b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_sharded_database_details.go @@ -0,0 +1,157 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateShardedDatabaseDetails Details required for Sharded database creation. +type CreateShardedDatabaseDetails interface { + + // Identifier of the compartment where sharded database is to be created. + GetCompartmentId() *string + + // Oracle sharded database display name. + GetDisplayName() *string + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} +} + +type createshardeddatabasedetails struct { + JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + DisplayName *string `mandatory:"true" json:"displayName"` + DbDeploymentType string `json:"dbDeploymentType"` +} + +// UnmarshalJSON unmarshals json +func (m *createshardeddatabasedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreateshardeddatabasedetails createshardeddatabasedetails + s := struct { + Model Unmarshalercreateshardeddatabasedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CompartmentId = s.Model.CompartmentId + m.DisplayName = s.Model.DisplayName + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.DbDeploymentType = s.Model.DbDeploymentType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createshardeddatabasedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.DbDeploymentType { + case "DEDICATED": + mm := CreateDedicatedShardedDatabase{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CreateShardedDatabaseDetails: %s.", m.DbDeploymentType) + return *m, nil + } +} + +// GetFreeformTags returns FreeformTags +func (m createshardeddatabasedetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m createshardeddatabasedetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetCompartmentId returns CompartmentId +func (m createshardeddatabasedetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m createshardeddatabasedetails) GetDisplayName() *string { + return m.DisplayName +} + +func (m createshardeddatabasedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m createshardeddatabasedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateShardedDatabaseDetailsDbDeploymentTypeEnum Enum with underlying type: string +type CreateShardedDatabaseDetailsDbDeploymentTypeEnum string + +// Set of constants representing the allowable values for CreateShardedDatabaseDetailsDbDeploymentTypeEnum +const ( + CreateShardedDatabaseDetailsDbDeploymentTypeDedicated CreateShardedDatabaseDetailsDbDeploymentTypeEnum = "DEDICATED" +) + +var mappingCreateShardedDatabaseDetailsDbDeploymentTypeEnum = map[string]CreateShardedDatabaseDetailsDbDeploymentTypeEnum{ + "DEDICATED": CreateShardedDatabaseDetailsDbDeploymentTypeDedicated, +} + +var mappingCreateShardedDatabaseDetailsDbDeploymentTypeEnumLowerCase = map[string]CreateShardedDatabaseDetailsDbDeploymentTypeEnum{ + "dedicated": CreateShardedDatabaseDetailsDbDeploymentTypeDedicated, +} + +// GetCreateShardedDatabaseDetailsDbDeploymentTypeEnumValues Enumerates the set of values for CreateShardedDatabaseDetailsDbDeploymentTypeEnum +func GetCreateShardedDatabaseDetailsDbDeploymentTypeEnumValues() []CreateShardedDatabaseDetailsDbDeploymentTypeEnum { + values := make([]CreateShardedDatabaseDetailsDbDeploymentTypeEnum, 0) + for _, v := range mappingCreateShardedDatabaseDetailsDbDeploymentTypeEnum { + values = append(values, v) + } + return values +} + +// GetCreateShardedDatabaseDetailsDbDeploymentTypeEnumStringValues Enumerates the set of values in String for CreateShardedDatabaseDetailsDbDeploymentTypeEnum +func GetCreateShardedDatabaseDetailsDbDeploymentTypeEnumStringValues() []string { + return []string{ + "DEDICATED", + } +} + +// GetMappingCreateShardedDatabaseDetailsDbDeploymentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateShardedDatabaseDetailsDbDeploymentTypeEnum(val string) (CreateShardedDatabaseDetailsDbDeploymentTypeEnum, bool) { + enum, ok := mappingCreateShardedDatabaseDetailsDbDeploymentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_sharded_database_request_response.go new file mode 100644 index 00000000000..1291546e3a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/create_sharded_database_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateShardedDatabaseRequest wrapper for the CreateShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/CreateShardedDatabase.go.html to see an example of how to use CreateShardedDatabaseRequest. +type CreateShardedDatabaseRequest struct { + + // Details of Sharded database to be created. + CreateShardedDatabaseDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateShardedDatabaseResponse wrapper for the CreateShardedDatabase operation +type CreateShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ShardedDatabase instance + ShardedDatabase `presentIn:"body"` + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_catalog_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_catalog_details.go new file mode 100644 index 00000000000..a0034834911 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_catalog_details.go @@ -0,0 +1,156 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedCatalogDetails Details of ATP-D based catalog. +type DedicatedCatalogDetails struct { + + // Catalog name + Name *string `mandatory:"true" json:"name"` + + // The compute amount available to the underlying autonomous database associated with shard or catalog. + ComputeCount *float32 `mandatory:"true" json:"computeCount"` + + // The data disk group size to be allocated in GBs. + DataStorageSizeInGbs *float64 `mandatory:"true" json:"dataStorageSizeInGbs"` + + // Name of the shard-group to which the catalog belongs. + ShardGroup *string `mandatory:"true" json:"shardGroup"` + + // The time the catalog was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the catalog was last created. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Status of shard or catalog or gsm for the sharded database. + Status DedicatedCatalogDetailsStatusEnum `mandatory:"true" json:"status"` + + // Determines the auto-scaling mode. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + // Identifier of the primary cloudAutonomousVmCluster for the catalog. + CloudAutonomousVmClusterId *string `mandatory:"true" json:"cloudAutonomousVmClusterId"` + + EncryptionKeyDetails *DedicatedShardOrCatalogEncryptionKeyDetails `mandatory:"false" json:"encryptionKeyDetails"` + + // The time the ssl certificate associated with catalog expires. An RFC3339 formatted datetime string + TimeSslCertificateExpires *common.SDKTime `mandatory:"false" json:"timeSslCertificateExpires"` + + // Identifier of the underlying supporting resource. + SupportingResourceId *string `mandatory:"false" json:"supportingResourceId"` + + // Identifier of the underlying container database. + ContainerDatabaseId *string `mandatory:"false" json:"containerDatabaseId"` + + // Identifier of the underlying container database parent. + ContainerDatabaseParentId *string `mandatory:"false" json:"containerDatabaseParentId"` + + // Identifier of the peer cloudAutonomousVmCluster for the catalog. + PeerCloudAutonomousVmClusterId *string `mandatory:"false" json:"peerCloudAutonomousVmClusterId"` + + // Additional metadata related to catalog's underlying supporting resource. + Metadata map[string]interface{} `mandatory:"false" json:"metadata"` +} + +func (m DedicatedCatalogDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedCatalogDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDedicatedCatalogDetailsStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetDedicatedCatalogDetailsStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DedicatedCatalogDetailsStatusEnum Enum with underlying type: string +type DedicatedCatalogDetailsStatusEnum string + +// Set of constants representing the allowable values for DedicatedCatalogDetailsStatusEnum +const ( + DedicatedCatalogDetailsStatusFailed DedicatedCatalogDetailsStatusEnum = "FAILED" + DedicatedCatalogDetailsStatusDeleting DedicatedCatalogDetailsStatusEnum = "DELETING" + DedicatedCatalogDetailsStatusDeleted DedicatedCatalogDetailsStatusEnum = "DELETED" + DedicatedCatalogDetailsStatusUpdating DedicatedCatalogDetailsStatusEnum = "UPDATING" + DedicatedCatalogDetailsStatusCreating DedicatedCatalogDetailsStatusEnum = "CREATING" + DedicatedCatalogDetailsStatusCreated DedicatedCatalogDetailsStatusEnum = "CREATED" + DedicatedCatalogDetailsStatusReadyForConfiguration DedicatedCatalogDetailsStatusEnum = "READY_FOR_CONFIGURATION" + DedicatedCatalogDetailsStatusConfigured DedicatedCatalogDetailsStatusEnum = "CONFIGURED" + DedicatedCatalogDetailsStatusNeedsAttention DedicatedCatalogDetailsStatusEnum = "NEEDS_ATTENTION" +) + +var mappingDedicatedCatalogDetailsStatusEnum = map[string]DedicatedCatalogDetailsStatusEnum{ + "FAILED": DedicatedCatalogDetailsStatusFailed, + "DELETING": DedicatedCatalogDetailsStatusDeleting, + "DELETED": DedicatedCatalogDetailsStatusDeleted, + "UPDATING": DedicatedCatalogDetailsStatusUpdating, + "CREATING": DedicatedCatalogDetailsStatusCreating, + "CREATED": DedicatedCatalogDetailsStatusCreated, + "READY_FOR_CONFIGURATION": DedicatedCatalogDetailsStatusReadyForConfiguration, + "CONFIGURED": DedicatedCatalogDetailsStatusConfigured, + "NEEDS_ATTENTION": DedicatedCatalogDetailsStatusNeedsAttention, +} + +var mappingDedicatedCatalogDetailsStatusEnumLowerCase = map[string]DedicatedCatalogDetailsStatusEnum{ + "failed": DedicatedCatalogDetailsStatusFailed, + "deleting": DedicatedCatalogDetailsStatusDeleting, + "deleted": DedicatedCatalogDetailsStatusDeleted, + "updating": DedicatedCatalogDetailsStatusUpdating, + "creating": DedicatedCatalogDetailsStatusCreating, + "created": DedicatedCatalogDetailsStatusCreated, + "ready_for_configuration": DedicatedCatalogDetailsStatusReadyForConfiguration, + "configured": DedicatedCatalogDetailsStatusConfigured, + "needs_attention": DedicatedCatalogDetailsStatusNeedsAttention, +} + +// GetDedicatedCatalogDetailsStatusEnumValues Enumerates the set of values for DedicatedCatalogDetailsStatusEnum +func GetDedicatedCatalogDetailsStatusEnumValues() []DedicatedCatalogDetailsStatusEnum { + values := make([]DedicatedCatalogDetailsStatusEnum, 0) + for _, v := range mappingDedicatedCatalogDetailsStatusEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedCatalogDetailsStatusEnumStringValues Enumerates the set of values in String for DedicatedCatalogDetailsStatusEnum +func GetDedicatedCatalogDetailsStatusEnumStringValues() []string { + return []string{ + "FAILED", + "DELETING", + "DELETED", + "UPDATING", + "CREATING", + "CREATED", + "READY_FOR_CONFIGURATION", + "CONFIGURED", + "NEEDS_ATTENTION", + } +} + +// GetMappingDedicatedCatalogDetailsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedCatalogDetailsStatusEnum(val string) (DedicatedCatalogDetailsStatusEnum, bool) { + enum, ok := mappingDedicatedCatalogDetailsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_shard_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_shard_details.go new file mode 100644 index 00000000000..cac0a5278c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_shard_details.go @@ -0,0 +1,159 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedShardDetails Details of ATP-D based shard. +type DedicatedShardDetails struct { + + // Name of the shard. + Name *string `mandatory:"true" json:"name"` + + // The compute amount available to the underlying autonomous database associated with shard. + ComputeCount *float32 `mandatory:"true" json:"computeCount"` + + // The data disk group size to be allocated in GBs. + DataStorageSizeInGbs *float64 `mandatory:"true" json:"dataStorageSizeInGbs"` + + // Name of the shard-group to which the shard belongs. + ShardGroup *string `mandatory:"true" json:"shardGroup"` + + // The time the the shard was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the shard was last updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Status of shard or catalog or gsm for the sharded database. + Status DedicatedShardDetailsStatusEnum `mandatory:"true" json:"status"` + + // Determines the auto-scaling mode. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + // Identifier of the primary cloudAutonomousVmCluster for the shard. + CloudAutonomousVmClusterId *string `mandatory:"true" json:"cloudAutonomousVmClusterId"` + + EncryptionKeyDetails *DedicatedShardOrCatalogEncryptionKeyDetails `mandatory:"false" json:"encryptionKeyDetails"` + + // The time the ssl certificate associated with shard expires. An RFC3339 formatted datetime string + TimeSslCertificateExpires *common.SDKTime `mandatory:"false" json:"timeSslCertificateExpires"` + + // Shard space name. + ShardSpace *string `mandatory:"false" json:"shardSpace"` + + // Identifier of the underlying supporting resource. + SupportingResourceId *string `mandatory:"false" json:"supportingResourceId"` + + // Identifier of the underlying container database. + ContainerDatabaseId *string `mandatory:"false" json:"containerDatabaseId"` + + // Identifier of the underlying container database parent. + ContainerDatabaseParentId *string `mandatory:"false" json:"containerDatabaseParentId"` + + // Identifier of the peer cloudAutonomousVmCluster for the shard. + PeerCloudAutonomousVmClusterId *string `mandatory:"false" json:"peerCloudAutonomousVmClusterId"` + + // Additional metadata related to shard's underlying supporting resource. + Metadata map[string]interface{} `mandatory:"false" json:"metadata"` +} + +func (m DedicatedShardDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedShardDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDedicatedShardDetailsStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetDedicatedShardDetailsStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DedicatedShardDetailsStatusEnum Enum with underlying type: string +type DedicatedShardDetailsStatusEnum string + +// Set of constants representing the allowable values for DedicatedShardDetailsStatusEnum +const ( + DedicatedShardDetailsStatusFailed DedicatedShardDetailsStatusEnum = "FAILED" + DedicatedShardDetailsStatusDeleting DedicatedShardDetailsStatusEnum = "DELETING" + DedicatedShardDetailsStatusDeleted DedicatedShardDetailsStatusEnum = "DELETED" + DedicatedShardDetailsStatusUpdating DedicatedShardDetailsStatusEnum = "UPDATING" + DedicatedShardDetailsStatusCreating DedicatedShardDetailsStatusEnum = "CREATING" + DedicatedShardDetailsStatusCreated DedicatedShardDetailsStatusEnum = "CREATED" + DedicatedShardDetailsStatusReadyForConfiguration DedicatedShardDetailsStatusEnum = "READY_FOR_CONFIGURATION" + DedicatedShardDetailsStatusConfigured DedicatedShardDetailsStatusEnum = "CONFIGURED" + DedicatedShardDetailsStatusNeedsAttention DedicatedShardDetailsStatusEnum = "NEEDS_ATTENTION" +) + +var mappingDedicatedShardDetailsStatusEnum = map[string]DedicatedShardDetailsStatusEnum{ + "FAILED": DedicatedShardDetailsStatusFailed, + "DELETING": DedicatedShardDetailsStatusDeleting, + "DELETED": DedicatedShardDetailsStatusDeleted, + "UPDATING": DedicatedShardDetailsStatusUpdating, + "CREATING": DedicatedShardDetailsStatusCreating, + "CREATED": DedicatedShardDetailsStatusCreated, + "READY_FOR_CONFIGURATION": DedicatedShardDetailsStatusReadyForConfiguration, + "CONFIGURED": DedicatedShardDetailsStatusConfigured, + "NEEDS_ATTENTION": DedicatedShardDetailsStatusNeedsAttention, +} + +var mappingDedicatedShardDetailsStatusEnumLowerCase = map[string]DedicatedShardDetailsStatusEnum{ + "failed": DedicatedShardDetailsStatusFailed, + "deleting": DedicatedShardDetailsStatusDeleting, + "deleted": DedicatedShardDetailsStatusDeleted, + "updating": DedicatedShardDetailsStatusUpdating, + "creating": DedicatedShardDetailsStatusCreating, + "created": DedicatedShardDetailsStatusCreated, + "ready_for_configuration": DedicatedShardDetailsStatusReadyForConfiguration, + "configured": DedicatedShardDetailsStatusConfigured, + "needs_attention": DedicatedShardDetailsStatusNeedsAttention, +} + +// GetDedicatedShardDetailsStatusEnumValues Enumerates the set of values for DedicatedShardDetailsStatusEnum +func GetDedicatedShardDetailsStatusEnumValues() []DedicatedShardDetailsStatusEnum { + values := make([]DedicatedShardDetailsStatusEnum, 0) + for _, v := range mappingDedicatedShardDetailsStatusEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedShardDetailsStatusEnumStringValues Enumerates the set of values in String for DedicatedShardDetailsStatusEnum +func GetDedicatedShardDetailsStatusEnumStringValues() []string { + return []string{ + "FAILED", + "DELETING", + "DELETED", + "UPDATING", + "CREATING", + "CREATED", + "READY_FOR_CONFIGURATION", + "CONFIGURED", + "NEEDS_ATTENTION", + } +} + +// GetMappingDedicatedShardDetailsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedShardDetailsStatusEnum(val string) (DedicatedShardDetailsStatusEnum, bool) { + enum, ok := mappingDedicatedShardDetailsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_shard_or_catalog_encryption_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_shard_or_catalog_encryption_key_details.go new file mode 100644 index 00000000000..b00a4888d0e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_shard_or_catalog_encryption_key_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedShardOrCatalogEncryptionKeyDetails Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined +// sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails +// are not specified for catalog, then Oracle managed key will be used for catalog. +// For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed +// key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog +// has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard +// or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). +type DedicatedShardOrCatalogEncryptionKeyDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. + // For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, + // which is also replicated in the region of standby shard. + VaultId *string `mandatory:"true" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy + // that is used as the master encryption key. + KmsKeyId *string `mandatory:"true" json:"kmsKeyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId + // that is used in data encryption (TDE) operations. + KmsKeyVersionId *string `mandatory:"false" json:"kmsKeyVersionId"` +} + +func (m DedicatedShardOrCatalogEncryptionKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedShardOrCatalogEncryptionKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_sharded_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_sharded_database.go new file mode 100644 index 00000000000..79e09dcded6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_sharded_database.go @@ -0,0 +1,338 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedShardedDatabase Details of ATP-D based sharded database. +type DedicatedShardedDatabase struct { + + // Sharded Database identifier + Id *string `mandatory:"true" json:"id"` + + // Identifier of the compartment in which sharded database exists. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Oracle sharded database display name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time the the Sharded Database was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the Sharded Database was last updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Detailed message for the lifecycle state. + LifecycleStateDetails *string `mandatory:"true" json:"lifecycleStateDetails"` + + // The character set for the database. + CharacterSet *string `mandatory:"true" json:"characterSet"` + + // The national character set for the database. + NcharacterSet *string `mandatory:"true" json:"ncharacterSet"` + + // Oracle Database version number. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // Unique prefix for the sharded database. + Prefix *string `mandatory:"true" json:"prefix"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7. + ReplicationFactor *int `mandatory:"false" json:"replicationFactor"` + + // For RAFT replication based sharded database, the value should be atleast twice the number of shards. + ReplicationUnit *int `mandatory:"false" json:"replicationUnit"` + + // The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. + // All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for + // clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period. + ClusterCertificateCommonName *string `mandatory:"false" json:"clusterCertificateCommonName"` + + // The default number of unique chunks in a shardspace. The value of chunks must be + // greater than 2 times the size of the largest shardgroup in any shardspace. + Chunks *int `mandatory:"false" json:"chunks"` + + // The GSM listener port number. + ListenerPort *int `mandatory:"false" json:"listenerPort"` + + // The TLS listener port number for sharded database. + ListenerPortTls *int `mandatory:"false" json:"listenerPortTls"` + + // Ons local port number. + OnsPortLocal *int `mandatory:"false" json:"onsPortLocal"` + + // Ons remote port number. + OnsPortRemote *int `mandatory:"false" json:"onsPortRemote"` + + // The OCID of private endpoint being used by the sharded database. + PrivateEndpoint *string `mandatory:"false" json:"privateEndpoint"` + + ConnectionStrings *ConnectionString `mandatory:"false" json:"connectionStrings"` + + // Timezone associated with the sharded database. + TimeZone *string `mandatory:"false" json:"timeZone"` + + // Details of GSM instances for the sharded database. + Gsms []GsmDetails `mandatory:"false" json:"gsms"` + + // Details of ATP-D based shards. + ShardDetails []DedicatedShardDetails `mandatory:"false" json:"shardDetails"` + + // Details of ATP-D based catalogs. + CatalogDetails []DedicatedCatalogDetails `mandatory:"false" json:"catalogDetails"` + + // The Replication method for sharded database. Use RAFT for Raft replication, and DG for + // DataGuard. If replicationMethod is not provided, it defaults to DG. + ReplicationMethod DedicatedShardedDatabaseReplicationMethodEnum `mandatory:"false" json:"replicationMethod,omitempty"` + + // Possible workload types. + DbWorkload DedicatedShardedDatabaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` + + // Sharding Method. + ShardingMethod DedicatedShardedDatabaseShardingMethodEnum `mandatory:"true" json:"shardingMethod"` + + // Lifecycle states for sharded databases. + LifecycleState ShardedDatabaseLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m DedicatedShardedDatabase) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m DedicatedShardedDatabase) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m DedicatedShardedDatabase) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m DedicatedShardedDatabase) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m DedicatedShardedDatabase) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m DedicatedShardedDatabase) GetLifecycleState() ShardedDatabaseLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleStateDetails returns LifecycleStateDetails +func (m DedicatedShardedDatabase) GetLifecycleStateDetails() *string { + return m.LifecycleStateDetails +} + +// GetFreeformTags returns FreeformTags +func (m DedicatedShardedDatabase) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m DedicatedShardedDatabase) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m DedicatedShardedDatabase) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m DedicatedShardedDatabase) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedShardedDatabase) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDedicatedShardedDatabaseReplicationMethodEnum(string(m.ReplicationMethod)); !ok && m.ReplicationMethod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReplicationMethod: %s. Supported values are: %s.", m.ReplicationMethod, strings.Join(GetDedicatedShardedDatabaseReplicationMethodEnumStringValues(), ","))) + } + if _, ok := GetMappingDedicatedShardedDatabaseDbWorkloadEnum(string(m.DbWorkload)); !ok && m.DbWorkload != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbWorkload: %s. Supported values are: %s.", m.DbWorkload, strings.Join(GetDedicatedShardedDatabaseDbWorkloadEnumStringValues(), ","))) + } + if _, ok := GetMappingDedicatedShardedDatabaseShardingMethodEnum(string(m.ShardingMethod)); !ok && m.ShardingMethod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ShardingMethod: %s. Supported values are: %s.", m.ShardingMethod, strings.Join(GetDedicatedShardedDatabaseShardingMethodEnumStringValues(), ","))) + } + + if _, ok := GetMappingShardedDatabaseLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetShardedDatabaseLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DedicatedShardedDatabase) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDedicatedShardedDatabase DedicatedShardedDatabase + s := struct { + DiscriminatorParam string `json:"dbDeploymentType"` + MarshalTypeDedicatedShardedDatabase + }{ + "DEDICATED", + (MarshalTypeDedicatedShardedDatabase)(m), + } + + return json.Marshal(&s) +} + +// DedicatedShardedDatabaseReplicationMethodEnum Enum with underlying type: string +type DedicatedShardedDatabaseReplicationMethodEnum string + +// Set of constants representing the allowable values for DedicatedShardedDatabaseReplicationMethodEnum +const ( + DedicatedShardedDatabaseReplicationMethodRaft DedicatedShardedDatabaseReplicationMethodEnum = "RAFT" + DedicatedShardedDatabaseReplicationMethodDg DedicatedShardedDatabaseReplicationMethodEnum = "DG" +) + +var mappingDedicatedShardedDatabaseReplicationMethodEnum = map[string]DedicatedShardedDatabaseReplicationMethodEnum{ + "RAFT": DedicatedShardedDatabaseReplicationMethodRaft, + "DG": DedicatedShardedDatabaseReplicationMethodDg, +} + +var mappingDedicatedShardedDatabaseReplicationMethodEnumLowerCase = map[string]DedicatedShardedDatabaseReplicationMethodEnum{ + "raft": DedicatedShardedDatabaseReplicationMethodRaft, + "dg": DedicatedShardedDatabaseReplicationMethodDg, +} + +// GetDedicatedShardedDatabaseReplicationMethodEnumValues Enumerates the set of values for DedicatedShardedDatabaseReplicationMethodEnum +func GetDedicatedShardedDatabaseReplicationMethodEnumValues() []DedicatedShardedDatabaseReplicationMethodEnum { + values := make([]DedicatedShardedDatabaseReplicationMethodEnum, 0) + for _, v := range mappingDedicatedShardedDatabaseReplicationMethodEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedShardedDatabaseReplicationMethodEnumStringValues Enumerates the set of values in String for DedicatedShardedDatabaseReplicationMethodEnum +func GetDedicatedShardedDatabaseReplicationMethodEnumStringValues() []string { + return []string{ + "RAFT", + "DG", + } +} + +// GetMappingDedicatedShardedDatabaseReplicationMethodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedShardedDatabaseReplicationMethodEnum(val string) (DedicatedShardedDatabaseReplicationMethodEnum, bool) { + enum, ok := mappingDedicatedShardedDatabaseReplicationMethodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DedicatedShardedDatabaseDbWorkloadEnum Enum with underlying type: string +type DedicatedShardedDatabaseDbWorkloadEnum string + +// Set of constants representing the allowable values for DedicatedShardedDatabaseDbWorkloadEnum +const ( + DedicatedShardedDatabaseDbWorkloadOltp DedicatedShardedDatabaseDbWorkloadEnum = "OLTP" + DedicatedShardedDatabaseDbWorkloadDw DedicatedShardedDatabaseDbWorkloadEnum = "DW" +) + +var mappingDedicatedShardedDatabaseDbWorkloadEnum = map[string]DedicatedShardedDatabaseDbWorkloadEnum{ + "OLTP": DedicatedShardedDatabaseDbWorkloadOltp, + "DW": DedicatedShardedDatabaseDbWorkloadDw, +} + +var mappingDedicatedShardedDatabaseDbWorkloadEnumLowerCase = map[string]DedicatedShardedDatabaseDbWorkloadEnum{ + "oltp": DedicatedShardedDatabaseDbWorkloadOltp, + "dw": DedicatedShardedDatabaseDbWorkloadDw, +} + +// GetDedicatedShardedDatabaseDbWorkloadEnumValues Enumerates the set of values for DedicatedShardedDatabaseDbWorkloadEnum +func GetDedicatedShardedDatabaseDbWorkloadEnumValues() []DedicatedShardedDatabaseDbWorkloadEnum { + values := make([]DedicatedShardedDatabaseDbWorkloadEnum, 0) + for _, v := range mappingDedicatedShardedDatabaseDbWorkloadEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedShardedDatabaseDbWorkloadEnumStringValues Enumerates the set of values in String for DedicatedShardedDatabaseDbWorkloadEnum +func GetDedicatedShardedDatabaseDbWorkloadEnumStringValues() []string { + return []string{ + "OLTP", + "DW", + } +} + +// GetMappingDedicatedShardedDatabaseDbWorkloadEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedShardedDatabaseDbWorkloadEnum(val string) (DedicatedShardedDatabaseDbWorkloadEnum, bool) { + enum, ok := mappingDedicatedShardedDatabaseDbWorkloadEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DedicatedShardedDatabaseShardingMethodEnum Enum with underlying type: string +type DedicatedShardedDatabaseShardingMethodEnum string + +// Set of constants representing the allowable values for DedicatedShardedDatabaseShardingMethodEnum +const ( + DedicatedShardedDatabaseShardingMethodUser DedicatedShardedDatabaseShardingMethodEnum = "USER" + DedicatedShardedDatabaseShardingMethodSystem DedicatedShardedDatabaseShardingMethodEnum = "SYSTEM" +) + +var mappingDedicatedShardedDatabaseShardingMethodEnum = map[string]DedicatedShardedDatabaseShardingMethodEnum{ + "USER": DedicatedShardedDatabaseShardingMethodUser, + "SYSTEM": DedicatedShardedDatabaseShardingMethodSystem, +} + +var mappingDedicatedShardedDatabaseShardingMethodEnumLowerCase = map[string]DedicatedShardedDatabaseShardingMethodEnum{ + "user": DedicatedShardedDatabaseShardingMethodUser, + "system": DedicatedShardedDatabaseShardingMethodSystem, +} + +// GetDedicatedShardedDatabaseShardingMethodEnumValues Enumerates the set of values for DedicatedShardedDatabaseShardingMethodEnum +func GetDedicatedShardedDatabaseShardingMethodEnumValues() []DedicatedShardedDatabaseShardingMethodEnum { + values := make([]DedicatedShardedDatabaseShardingMethodEnum, 0) + for _, v := range mappingDedicatedShardedDatabaseShardingMethodEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedShardedDatabaseShardingMethodEnumStringValues Enumerates the set of values in String for DedicatedShardedDatabaseShardingMethodEnum +func GetDedicatedShardedDatabaseShardingMethodEnumStringValues() []string { + return []string{ + "USER", + "SYSTEM", + } +} + +// GetMappingDedicatedShardedDatabaseShardingMethodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedShardedDatabaseShardingMethodEnum(val string) (DedicatedShardedDatabaseShardingMethodEnum, bool) { + enum, ok := mappingDedicatedShardedDatabaseShardingMethodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_sharded_database_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_sharded_database_summary.go new file mode 100644 index 00000000000..6c7bd197606 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/dedicated_sharded_database_summary.go @@ -0,0 +1,284 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DedicatedShardedDatabaseSummary Summary of ATP-D based sharded database. +type DedicatedShardedDatabaseSummary struct { + + // Sharded Database identifier + Id *string `mandatory:"true" json:"id"` + + // Identifier of the compartment where sharded database exists. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Oracle sharded database display name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time the the Sharded Database was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the Sharded Database was last updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Detailed message for the lifecycle state. + LifecycleStateDetails *string `mandatory:"true" json:"lifecycleStateDetails"` + + // The character set for the sharded database. + CharacterSet *string `mandatory:"true" json:"characterSet"` + + // The national character set for the sharded database. + NcharacterSet *string `mandatory:"true" json:"ncharacterSet"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7. + ReplicationFactor *int `mandatory:"false" json:"replicationFactor"` + + // For RAFT replication based sharded database, the value should be atleast twice the number of shards. + ReplicationUnit *int `mandatory:"false" json:"replicationUnit"` + + // The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. + // All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for + // clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period. + ClusterCertificateCommonName *string `mandatory:"false" json:"clusterCertificateCommonName"` + + // The default number of unique chunks in a shardspace. The value of chunks must be + // greater than 2 times the size of the largest shardgroup in any shardspace. + Chunks *int `mandatory:"false" json:"chunks"` + + // Oracle Database version of the Autonomous Container Database. + DbVersion *string `mandatory:"false" json:"dbVersion"` + + // The listener port number for the sharded database. + ListenerPort *int `mandatory:"false" json:"listenerPort"` + + // The TLS listener port number for sharded database. + ListenerPortTls *int `mandatory:"false" json:"listenerPortTls"` + + // Ons local port number. + OnsPortLocal *int `mandatory:"false" json:"onsPortLocal"` + + // Ons remote port number. + OnsPortRemote *int `mandatory:"false" json:"onsPortRemote"` + + // Name prefix for the sharded databases. + Prefix *string `mandatory:"false" json:"prefix"` + + // Total cpu count usage for shards and catalogs of the sharded database. + TotalCpuCount *int `mandatory:"false" json:"totalCpuCount"` + + // The aggregarted value of dataStorageSizeInGbs for all shards and catalogs. + TotalDataStorageSizeInGbs *float64 `mandatory:"false" json:"totalDataStorageSizeInGbs"` + + // Possible workload types. + DbWorkload DedicatedShardedDatabaseSummaryDbWorkloadEnum `mandatory:"true" json:"dbWorkload"` + + // Sharding Method. + ShardingMethod DedicatedShardedDatabaseSummaryShardingMethodEnum `mandatory:"true" json:"shardingMethod"` + + // Lifecycle state of sharded database. + LifecycleState ShardedDatabaseLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The Replication method for sharded database. + ReplicationMethod DedicatedShardedDatabaseReplicationMethodEnum `mandatory:"false" json:"replicationMethod,omitempty"` +} + +// GetId returns Id +func (m DedicatedShardedDatabaseSummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m DedicatedShardedDatabaseSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m DedicatedShardedDatabaseSummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m DedicatedShardedDatabaseSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m DedicatedShardedDatabaseSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m DedicatedShardedDatabaseSummary) GetLifecycleState() ShardedDatabaseLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleStateDetails returns LifecycleStateDetails +func (m DedicatedShardedDatabaseSummary) GetLifecycleStateDetails() *string { + return m.LifecycleStateDetails +} + +// GetFreeformTags returns FreeformTags +func (m DedicatedShardedDatabaseSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m DedicatedShardedDatabaseSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m DedicatedShardedDatabaseSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m DedicatedShardedDatabaseSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedShardedDatabaseSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDedicatedShardedDatabaseSummaryDbWorkloadEnum(string(m.DbWorkload)); !ok && m.DbWorkload != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbWorkload: %s. Supported values are: %s.", m.DbWorkload, strings.Join(GetDedicatedShardedDatabaseSummaryDbWorkloadEnumStringValues(), ","))) + } + if _, ok := GetMappingDedicatedShardedDatabaseSummaryShardingMethodEnum(string(m.ShardingMethod)); !ok && m.ShardingMethod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ShardingMethod: %s. Supported values are: %s.", m.ShardingMethod, strings.Join(GetDedicatedShardedDatabaseSummaryShardingMethodEnumStringValues(), ","))) + } + + if _, ok := GetMappingShardedDatabaseLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetShardedDatabaseLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingDedicatedShardedDatabaseReplicationMethodEnum(string(m.ReplicationMethod)); !ok && m.ReplicationMethod != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReplicationMethod: %s. Supported values are: %s.", m.ReplicationMethod, strings.Join(GetDedicatedShardedDatabaseReplicationMethodEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DedicatedShardedDatabaseSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDedicatedShardedDatabaseSummary DedicatedShardedDatabaseSummary + s := struct { + DiscriminatorParam string `json:"dbDeploymentType"` + MarshalTypeDedicatedShardedDatabaseSummary + }{ + "DEDICATED", + (MarshalTypeDedicatedShardedDatabaseSummary)(m), + } + + return json.Marshal(&s) +} + +// DedicatedShardedDatabaseSummaryDbWorkloadEnum Enum with underlying type: string +type DedicatedShardedDatabaseSummaryDbWorkloadEnum string + +// Set of constants representing the allowable values for DedicatedShardedDatabaseSummaryDbWorkloadEnum +const ( + DedicatedShardedDatabaseSummaryDbWorkloadOltp DedicatedShardedDatabaseSummaryDbWorkloadEnum = "OLTP" + DedicatedShardedDatabaseSummaryDbWorkloadDw DedicatedShardedDatabaseSummaryDbWorkloadEnum = "DW" +) + +var mappingDedicatedShardedDatabaseSummaryDbWorkloadEnum = map[string]DedicatedShardedDatabaseSummaryDbWorkloadEnum{ + "OLTP": DedicatedShardedDatabaseSummaryDbWorkloadOltp, + "DW": DedicatedShardedDatabaseSummaryDbWorkloadDw, +} + +var mappingDedicatedShardedDatabaseSummaryDbWorkloadEnumLowerCase = map[string]DedicatedShardedDatabaseSummaryDbWorkloadEnum{ + "oltp": DedicatedShardedDatabaseSummaryDbWorkloadOltp, + "dw": DedicatedShardedDatabaseSummaryDbWorkloadDw, +} + +// GetDedicatedShardedDatabaseSummaryDbWorkloadEnumValues Enumerates the set of values for DedicatedShardedDatabaseSummaryDbWorkloadEnum +func GetDedicatedShardedDatabaseSummaryDbWorkloadEnumValues() []DedicatedShardedDatabaseSummaryDbWorkloadEnum { + values := make([]DedicatedShardedDatabaseSummaryDbWorkloadEnum, 0) + for _, v := range mappingDedicatedShardedDatabaseSummaryDbWorkloadEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedShardedDatabaseSummaryDbWorkloadEnumStringValues Enumerates the set of values in String for DedicatedShardedDatabaseSummaryDbWorkloadEnum +func GetDedicatedShardedDatabaseSummaryDbWorkloadEnumStringValues() []string { + return []string{ + "OLTP", + "DW", + } +} + +// GetMappingDedicatedShardedDatabaseSummaryDbWorkloadEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedShardedDatabaseSummaryDbWorkloadEnum(val string) (DedicatedShardedDatabaseSummaryDbWorkloadEnum, bool) { + enum, ok := mappingDedicatedShardedDatabaseSummaryDbWorkloadEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DedicatedShardedDatabaseSummaryShardingMethodEnum Enum with underlying type: string +type DedicatedShardedDatabaseSummaryShardingMethodEnum string + +// Set of constants representing the allowable values for DedicatedShardedDatabaseSummaryShardingMethodEnum +const ( + DedicatedShardedDatabaseSummaryShardingMethodUser DedicatedShardedDatabaseSummaryShardingMethodEnum = "USER" + DedicatedShardedDatabaseSummaryShardingMethodSystem DedicatedShardedDatabaseSummaryShardingMethodEnum = "SYSTEM" +) + +var mappingDedicatedShardedDatabaseSummaryShardingMethodEnum = map[string]DedicatedShardedDatabaseSummaryShardingMethodEnum{ + "USER": DedicatedShardedDatabaseSummaryShardingMethodUser, + "SYSTEM": DedicatedShardedDatabaseSummaryShardingMethodSystem, +} + +var mappingDedicatedShardedDatabaseSummaryShardingMethodEnumLowerCase = map[string]DedicatedShardedDatabaseSummaryShardingMethodEnum{ + "user": DedicatedShardedDatabaseSummaryShardingMethodUser, + "system": DedicatedShardedDatabaseSummaryShardingMethodSystem, +} + +// GetDedicatedShardedDatabaseSummaryShardingMethodEnumValues Enumerates the set of values for DedicatedShardedDatabaseSummaryShardingMethodEnum +func GetDedicatedShardedDatabaseSummaryShardingMethodEnumValues() []DedicatedShardedDatabaseSummaryShardingMethodEnum { + values := make([]DedicatedShardedDatabaseSummaryShardingMethodEnum, 0) + for _, v := range mappingDedicatedShardedDatabaseSummaryShardingMethodEnum { + values = append(values, v) + } + return values +} + +// GetDedicatedShardedDatabaseSummaryShardingMethodEnumStringValues Enumerates the set of values in String for DedicatedShardedDatabaseSummaryShardingMethodEnum +func GetDedicatedShardedDatabaseSummaryShardingMethodEnumStringValues() []string { + return []string{ + "USER", + "SYSTEM", + } +} + +// GetMappingDedicatedShardedDatabaseSummaryShardingMethodEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDedicatedShardedDatabaseSummaryShardingMethodEnum(val string) (DedicatedShardedDatabaseSummaryShardingMethodEnum, bool) { + enum, ok := mappingDedicatedShardedDatabaseSummaryShardingMethodEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/delete_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/delete_private_endpoint_request_response.go new file mode 100644 index 00000000000..c94f1b50370 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/delete_private_endpoint_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePrivateEndpointRequest wrapper for the DeletePrivateEndpoint operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/DeletePrivateEndpoint.go.html to see an example of how to use DeletePrivateEndpointRequest. +type DeletePrivateEndpointRequest struct { + + // Oracle Sharded Database PrivateEndpoint identifier + PrivateEndpointId *string `mandatory:"true" contributesTo:"path" name:"privateEndpointId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePrivateEndpointResponse wrapper for the DeletePrivateEndpoint operation +type DeletePrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/delete_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/delete_sharded_database_request_response.go new file mode 100644 index 00000000000..fc78178e016 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/delete_sharded_database_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteShardedDatabaseRequest wrapper for the DeleteShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/DeleteShardedDatabase.go.html to see an example of how to use DeleteShardedDatabaseRequest. +type DeleteShardedDatabaseRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteShardedDatabaseResponse wrapper for the DeleteShardedDatabase operation +type DeleteShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/download_gsm_certificate_signing_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/download_gsm_certificate_signing_request_request_response.go new file mode 100644 index 00000000000..2b10b4e3adb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/download_gsm_certificate_signing_request_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// DownloadGsmCertificateSigningRequestRequest wrapper for the DownloadGsmCertificateSigningRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/DownloadGsmCertificateSigningRequest.go.html to see an example of how to use DownloadGsmCertificateSigningRequestRequest. +type DownloadGsmCertificateSigningRequestRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DownloadGsmCertificateSigningRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DownloadGsmCertificateSigningRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DownloadGsmCertificateSigningRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DownloadGsmCertificateSigningRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DownloadGsmCertificateSigningRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DownloadGsmCertificateSigningRequestResponse wrapper for the DownloadGsmCertificateSigningRequest operation +type DownloadGsmCertificateSigningRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Size of the file. + ContentLength *int64 `presentIn:"header" name:"content-length"` + + // The date and time the certificate signing request was created. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` +} + +func (response DownloadGsmCertificateSigningRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DownloadGsmCertificateSigningRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_connection_string_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_connection_string_request_response.go new file mode 100644 index 00000000000..b01f7c88ebc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_connection_string_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// FetchConnectionStringRequest wrapper for the FetchConnectionString operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/FetchConnectionString.go.html to see an example of how to use FetchConnectionStringRequest. +type FetchConnectionStringRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request FetchConnectionStringRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request FetchConnectionStringRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request FetchConnectionStringRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request FetchConnectionStringRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request FetchConnectionStringRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FetchConnectionStringResponse wrapper for the FetchConnectionString operation +type FetchConnectionStringResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ConnectionString instance + ConnectionString `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response FetchConnectionStringResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response FetchConnectionStringResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_shardable_cloud_autonomous_vm_clusters_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_shardable_cloud_autonomous_vm_clusters_details.go new file mode 100644 index 00000000000..03d730e29b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_shardable_cloud_autonomous_vm_clusters_details.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FetchShardableCloudAutonomousVmClustersDetails Details required for fetch sharded cloud autonomous vm clusters. +type FetchShardableCloudAutonomousVmClustersDetails struct { + + // Compartment id of cloud autonomous vm clusters. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Lifecycle states for shardable Cloud autonomous vm cluster. + LifecycleState FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Detailed message for the lifecycle state. + LifecycleStateDetails *string `mandatory:"false" json:"lifecycleStateDetails"` + + // List only clusters for which atleast given minimum CDB count is available. + MinimumAvailableCdbCount *int `mandatory:"false" json:"minimumAvailableCdbCount"` + + // Flag to indicate of response shall also include clusters for which no more capacity is left to create new resources. + AreDepletedClustersIncluded *bool `mandatory:"false" json:"areDepletedClustersIncluded"` + + // Region code of regions for which sharded cloud autonomous vm clusters need to be fetched. + Regions []string `mandatory:"false" json:"regions"` +} + +func (m FetchShardableCloudAutonomousVmClustersDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FetchShardableCloudAutonomousVmClustersDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum Enum with underlying type: string +type FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum string + +// Set of constants representing the allowable values for FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum +const ( + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateActive FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "ACTIVE" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateFailed FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "FAILED" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateNeedsAttention FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "NEEDS_ATTENTION" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateInactive FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "INACTIVE" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateDeleting FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "DELETING" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateDeleted FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "DELETED" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateUpdating FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "UPDATING" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateCreating FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "CREATING" + FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateUnavailable FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = "UNAVAILABLE" +) + +var mappingFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum = map[string]FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum{ + "ACTIVE": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateActive, + "FAILED": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateFailed, + "NEEDS_ATTENTION": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateNeedsAttention, + "INACTIVE": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateInactive, + "DELETING": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateDeleting, + "DELETED": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateDeleted, + "UPDATING": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateUpdating, + "CREATING": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateCreating, + "UNAVAILABLE": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateUnavailable, +} + +var mappingFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnumLowerCase = map[string]FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum{ + "active": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateActive, + "failed": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateFailed, + "needs_attention": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateNeedsAttention, + "inactive": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateInactive, + "deleting": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateDeleting, + "deleted": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateDeleted, + "updating": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateUpdating, + "creating": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateCreating, + "unavailable": FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateUnavailable, +} + +// GetFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnumValues Enumerates the set of values for FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum +func GetFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnumValues() []FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum { + values := make([]FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum, 0) + for _, v := range mappingFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnumStringValues Enumerates the set of values in String for FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum +func GetFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "FAILED", + "NEEDS_ATTENTION", + "INACTIVE", + "DELETING", + "DELETED", + "UPDATING", + "CREATING", + "UNAVAILABLE", + } +} + +// GetMappingFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum(val string) (FetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnum, bool) { + enum, ok := mappingFetchShardableCloudAutonomousVmClustersDetailsLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_shardable_cloud_autonomous_vm_clusters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_shardable_cloud_autonomous_vm_clusters_request_response.go new file mode 100644 index 00000000000..b5c70969305 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/fetch_shardable_cloud_autonomous_vm_clusters_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// FetchShardableCloudAutonomousVmClustersRequest wrapper for the FetchShardableCloudAutonomousVmClusters operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/FetchShardableCloudAutonomousVmClusters.go.html to see an example of how to use FetchShardableCloudAutonomousVmClustersRequest. +type FetchShardableCloudAutonomousVmClustersRequest struct { + + // Request payload to get sharded cloud autonomous vm clusters. + FetchShardableCloudAutonomousVmClustersDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request FetchShardableCloudAutonomousVmClustersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request FetchShardableCloudAutonomousVmClustersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request FetchShardableCloudAutonomousVmClustersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request FetchShardableCloudAutonomousVmClustersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request FetchShardableCloudAutonomousVmClustersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FetchShardableCloudAutonomousVmClustersResponse wrapper for the FetchShardableCloudAutonomousVmClusters operation +type FetchShardableCloudAutonomousVmClustersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ShardableCloudAutonomousVmClusters instance + ShardableCloudAutonomousVmClusters `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response FetchShardableCloudAutonomousVmClustersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response FetchShardableCloudAutonomousVmClustersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_gsm_certificate_signing_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_gsm_certificate_signing_request_request_response.go new file mode 100644 index 00000000000..579d2d55b12 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_gsm_certificate_signing_request_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GenerateGsmCertificateSigningRequestRequest wrapper for the GenerateGsmCertificateSigningRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GenerateGsmCertificateSigningRequest.go.html to see an example of how to use GenerateGsmCertificateSigningRequestRequest. +type GenerateGsmCertificateSigningRequestRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The ID of the Ca Bundle. + CaBundleId *string `mandatory:"false" contributesTo:"query" name:"caBundleId"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GenerateGsmCertificateSigningRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GenerateGsmCertificateSigningRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GenerateGsmCertificateSigningRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GenerateGsmCertificateSigningRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GenerateGsmCertificateSigningRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GenerateGsmCertificateSigningRequestResponse wrapper for the GenerateGsmCertificateSigningRequest operation +type GenerateGsmCertificateSigningRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GenerateGsmCertificateSigningRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GenerateGsmCertificateSigningRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_wallet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_wallet_details.go new file mode 100644 index 00000000000..c720df0252d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_wallet_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenerateWalletDetails Details to create and download an Oracle Sharded Database wallet. +type GenerateWalletDetails struct { + + // The password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. + Password *string `mandatory:"true" json:"password"` +} + +func (m GenerateWalletDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenerateWalletDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_wallet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_wallet_request_response.go new file mode 100644 index 00000000000..a93186b7bbe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/generate_wallet_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// GenerateWalletRequest wrapper for the GenerateWallet operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GenerateWallet.go.html to see an example of how to use GenerateWalletRequest. +type GenerateWalletRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // Details for generating sharded database wallet. + GenerateWalletDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GenerateWalletRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GenerateWalletRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GenerateWalletRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GenerateWalletRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GenerateWalletRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GenerateWalletResponse wrapper for the GenerateWallet operation +type GenerateWalletResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Size of the file. + ContentLength *int64 `presentIn:"header" name:"content-length"` + + // The date and time the wallet was created. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` +} + +func (response GenerateWalletResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GenerateWalletResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_private_endpoint_request_response.go new file mode 100644 index 00000000000..2eeab1bb3e1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_private_endpoint_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPrivateEndpointRequest wrapper for the GetPrivateEndpoint operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GetPrivateEndpoint.go.html to see an example of how to use GetPrivateEndpointRequest. +type GetPrivateEndpointRequest struct { + + // Oracle Sharded Database PrivateEndpoint identifier + PrivateEndpointId *string `mandatory:"true" contributesTo:"path" name:"privateEndpointId"` + + // For conditional requests. In the GET call for a resource, set the + // `If-None-Match` header to the value of the ETag from a previous GET (or + // POST or PUT) response for that resource. The server will return with + // either a 304 Not Modified response if the resource has not changed, or a + // 200 OK response with the updated representation. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPrivateEndpointResponse wrapper for the GetPrivateEndpoint operation +type GetPrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateEndpoint instance + PrivateEndpoint `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response GetPrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_sharded_database_request_response.go new file mode 100644 index 00000000000..a2b00954507 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_sharded_database_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetShardedDatabaseRequest wrapper for the GetShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GetShardedDatabase.go.html to see an example of how to use GetShardedDatabaseRequest. +type GetShardedDatabaseRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // Comma separated names of argument corresponding to which metadata need to be retrived, namely VM_CLUSTER_INFO, ADDITIONAL_RESOURCE_INFO. + // An example is metadata=VM_CLUSTER_INFO,ADDITIONAL_RESOURCE_INFO. + Metadata *string `mandatory:"false" contributesTo:"query" name:"metadata"` + + // For conditional requests. In the GET call for a resource, set the + // `If-None-Match` header to the value of the ETag from a previous GET (or + // POST or PUT) response for that resource. The server will return with + // either a 304 Not Modified response if the resource has not changed, or a + // 200 OK response with the updated representation. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetShardedDatabaseResponse wrapper for the GetShardedDatabase operation +type GetShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ShardedDatabase instance + ShardedDatabase `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response GetShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_work_request_request_response.go new file mode 100644 index 00000000000..8f0b1cfe1e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/get_work_request_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GetWorkRequest.go.html to see an example of how to use GetWorkRequestRequest. +type GetWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkRequestResponse wrapper for the GetWorkRequest operation +type GetWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkRequest instance + WorkRequest `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // A decimal number representing the number of seconds the client should wait before polling this endpoint again. + RetryAfter *int `presentIn:"header" name:"retry-after"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/globallydistributeddatabase_shardeddatabaseservice_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/globallydistributeddatabase_shardeddatabaseservice_client.go new file mode 100644 index 00000000000..9b385104728 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/globallydistributeddatabase_shardeddatabaseservice_client.go @@ -0,0 +1,1946 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// ShardedDatabaseServiceClient a client for ShardedDatabaseService +type ShardedDatabaseServiceClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewShardedDatabaseServiceClientWithConfigurationProvider Creates a new default ShardedDatabaseService client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewShardedDatabaseServiceClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ShardedDatabaseServiceClient, err error) { + if enabled := common.CheckForEnabledServices("globallydistributeddatabase"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newShardedDatabaseServiceClientFromBaseClient(baseClient, provider) +} + +// NewShardedDatabaseServiceClientWithOboToken Creates a new default ShardedDatabaseService client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewShardedDatabaseServiceClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ShardedDatabaseServiceClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newShardedDatabaseServiceClientFromBaseClient(baseClient, configProvider) +} + +func newShardedDatabaseServiceClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client ShardedDatabaseServiceClient, err error) { + // ShardedDatabaseService service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("ShardedDatabaseService")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = ShardedDatabaseServiceClient{BaseClient: baseClient} + client.BasePath = "20230301" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *ShardedDatabaseServiceClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("globallydistributeddatabase", "https://globaldb.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *ShardedDatabaseServiceClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ShardedDatabaseServiceClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// ChangePrivateEndpointCompartment Move the private endpoint to the specified compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ChangePrivateEndpointCompartment.go.html to see an example of how to use ChangePrivateEndpointCompartment API. +// A default retry strategy applies to this operation ChangePrivateEndpointCompartment() +func (client ShardedDatabaseServiceClient) ChangePrivateEndpointCompartment(ctx context.Context, request ChangePrivateEndpointCompartmentRequest) (response ChangePrivateEndpointCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changePrivateEndpointCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangePrivateEndpointCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangePrivateEndpointCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangePrivateEndpointCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangePrivateEndpointCompartmentResponse") + } + return +} + +// changePrivateEndpointCompartment implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) changePrivateEndpointCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateEndpoints/{privateEndpointId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangePrivateEndpointCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/PrivateEndpoint/ChangePrivateEndpointCompartment" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ChangePrivateEndpointCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeShardedDatabaseCompartment Move the sharded database database and its dependent resources to the specified compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ChangeShardedDatabaseCompartment.go.html to see an example of how to use ChangeShardedDatabaseCompartment API. +// A default retry strategy applies to this operation ChangeShardedDatabaseCompartment() +func (client ShardedDatabaseServiceClient) ChangeShardedDatabaseCompartment(ctx context.Context, request ChangeShardedDatabaseCompartmentRequest) (response ChangeShardedDatabaseCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeShardedDatabaseCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeShardedDatabaseCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeShardedDatabaseCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeShardedDatabaseCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeShardedDatabaseCompartmentResponse") + } + return +} + +// changeShardedDatabaseCompartment implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) changeShardedDatabaseCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeShardedDatabaseCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/ChangeShardedDatabaseCompartment" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ChangeShardedDatabaseCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ConfigureShardedDatabaseGsms Configure new Global Service Manager(GSM aka shard manager) instances for the sharded database. Specify the names +// of old GSM instances that need to be replaced via parameter oldGsmNames in the request payload. Also specify +// whether rotated GSM instances shall be provisioned with latest image of GSM software or the image used by +// existing GSM instances shall be used. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ConfigureShardedDatabaseGsms.go.html to see an example of how to use ConfigureShardedDatabaseGsms API. +// A default retry strategy applies to this operation ConfigureShardedDatabaseGsms() +func (client ShardedDatabaseServiceClient) ConfigureShardedDatabaseGsms(ctx context.Context, request ConfigureShardedDatabaseGsmsRequest) (response ConfigureShardedDatabaseGsmsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.configureShardedDatabaseGsms, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ConfigureShardedDatabaseGsmsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ConfigureShardedDatabaseGsmsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ConfigureShardedDatabaseGsmsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConfigureShardedDatabaseGsmsResponse") + } + return +} + +// configureShardedDatabaseGsms implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) configureShardedDatabaseGsms(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/configureGsms", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ConfigureShardedDatabaseGsmsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/ConfigureShardedDatabaseGsms" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ConfigureShardedDatabaseGsms", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ConfigureSharding Once all components of sharded database are provisioned, and signed GSM certificates are successfully uploaded, this +// api shall be invoked to configure sharding on the sharded database. Note that this 'ConfigureSharding' API also needs to be +// invoked after successfully adding a new shard to the sharded database using PATCH api. If this API is not +// invoked after successfully adding a new shard, then that new shard will not be a participant in sharding topology of +// the sharded database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ConfigureSharding.go.html to see an example of how to use ConfigureSharding API. +// A default retry strategy applies to this operation ConfigureSharding() +func (client ShardedDatabaseServiceClient) ConfigureSharding(ctx context.Context, request ConfigureShardingRequest) (response ConfigureShardingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.configureSharding, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ConfigureShardingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ConfigureShardingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ConfigureShardingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConfigureShardingResponse") + } + return +} + +// configureSharding implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) configureSharding(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/configureSharding", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ConfigureShardingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/ConfigureSharding" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ConfigureSharding", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePrivateEndpoint Creates a PrivateEndpoint. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/CreatePrivateEndpoint.go.html to see an example of how to use CreatePrivateEndpoint API. +// A default retry strategy applies to this operation CreatePrivateEndpoint() +func (client ShardedDatabaseServiceClient) CreatePrivateEndpoint(ctx context.Context, request CreatePrivateEndpointRequest) (response CreatePrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePrivateEndpointResponse") + } + return +} + +// createPrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) createPrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateEndpoints", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "CreatePrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateShardedDatabase Creates a Sharded Database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/CreateShardedDatabase.go.html to see an example of how to use CreateShardedDatabase API. +// A default retry strategy applies to this operation CreateShardedDatabase() +func (client ShardedDatabaseServiceClient) CreateShardedDatabase(ctx context.Context, request CreateShardedDatabaseRequest) (response CreateShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateShardedDatabaseResponse") + } + return +} + +// createShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) createShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "CreateShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &shardeddatabase{}) + return response, err +} + +// DeletePrivateEndpoint Delete the given private endpoint. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/DeletePrivateEndpoint.go.html to see an example of how to use DeletePrivateEndpoint API. +// A default retry strategy applies to this operation DeletePrivateEndpoint() +func (client ShardedDatabaseServiceClient) DeletePrivateEndpoint(ctx context.Context, request DeletePrivateEndpointRequest) (response DeletePrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deletePrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePrivateEndpointResponse") + } + return +} + +// deletePrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) deletePrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/privateEndpoints/{privateEndpointId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/PrivateEndpoint/DeletePrivateEndpoint" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "DeletePrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteShardedDatabase Terminate the given sharded databases. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/DeleteShardedDatabase.go.html to see an example of how to use DeleteShardedDatabase API. +// A default retry strategy applies to this operation DeleteShardedDatabase() +func (client ShardedDatabaseServiceClient) DeleteShardedDatabase(ctx context.Context, request DeleteShardedDatabaseRequest) (response DeleteShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteShardedDatabaseResponse") + } + return +} + +// deleteShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) deleteShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/shardedDatabases/{shardedDatabaseId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/DeleteShardedDatabase" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "DeleteShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DownloadGsmCertificateSigningRequest Generate the common certificate signing request for GSMs. Download the .csr file from +// API response. Users can use this .csr file to generate the CA signed certificate, and as a next step +// use 'uploadSignedCertificateAndGenerateWallet' API to upload the CA signed certificate to GSM, and +// generate wallets for the GSM instances of the sharded database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/DownloadGsmCertificateSigningRequest.go.html to see an example of how to use DownloadGsmCertificateSigningRequest API. +// A default retry strategy applies to this operation DownloadGsmCertificateSigningRequest() +func (client ShardedDatabaseServiceClient) DownloadGsmCertificateSigningRequest(ctx context.Context, request DownloadGsmCertificateSigningRequestRequest) (response DownloadGsmCertificateSigningRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.downloadGsmCertificateSigningRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DownloadGsmCertificateSigningRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DownloadGsmCertificateSigningRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DownloadGsmCertificateSigningRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DownloadGsmCertificateSigningRequestResponse") + } + return +} + +// downloadGsmCertificateSigningRequest implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) downloadGsmCertificateSigningRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/downloadGsmCertificateSigningRequest", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DownloadGsmCertificateSigningRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/DownloadGsmCertificateSigningRequest" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "DownloadGsmCertificateSigningRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// FetchConnectionString Gets the Sharded Database Connection Strings. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/FetchConnectionString.go.html to see an example of how to use FetchConnectionString API. +// A default retry strategy applies to this operation FetchConnectionString() +func (client ShardedDatabaseServiceClient) FetchConnectionString(ctx context.Context, request FetchConnectionStringRequest) (response FetchConnectionStringResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.fetchConnectionString, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = FetchConnectionStringResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = FetchConnectionStringResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(FetchConnectionStringResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into FetchConnectionStringResponse") + } + return +} + +// fetchConnectionString implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) fetchConnectionString(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/getConnectionString", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response FetchConnectionStringResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/FetchConnectionString" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "FetchConnectionString", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// FetchShardableCloudAutonomousVmClusters List of cloudAutonomousVMClusters for the given tenancy, that can be sharded. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/FetchShardableCloudAutonomousVmClusters.go.html to see an example of how to use FetchShardableCloudAutonomousVmClusters API. +// A default retry strategy applies to this operation FetchShardableCloudAutonomousVmClusters() +func (client ShardedDatabaseServiceClient) FetchShardableCloudAutonomousVmClusters(ctx context.Context, request FetchShardableCloudAutonomousVmClustersRequest) (response FetchShardableCloudAutonomousVmClustersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.fetchShardableCloudAutonomousVmClusters, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = FetchShardableCloudAutonomousVmClustersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = FetchShardableCloudAutonomousVmClustersResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(FetchShardableCloudAutonomousVmClustersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into FetchShardableCloudAutonomousVmClustersResponse") + } + return +} + +// fetchShardableCloudAutonomousVmClusters implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) fetchShardableCloudAutonomousVmClusters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/actions/listShardableCloudAutonomousVmClusters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response FetchShardableCloudAutonomousVmClustersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/FetchShardableCloudAutonomousVmClusters" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "FetchShardableCloudAutonomousVmClusters", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GenerateGsmCertificateSigningRequest Generate the certificate signing request for GSM instances of the sharded database. Once certificate signing +// request is generated, then customers can download the certificate signing request using +// 'downloadGsmCertificateSigningRequest' api call. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GenerateGsmCertificateSigningRequest.go.html to see an example of how to use GenerateGsmCertificateSigningRequest API. +// A default retry strategy applies to this operation GenerateGsmCertificateSigningRequest() +func (client ShardedDatabaseServiceClient) GenerateGsmCertificateSigningRequest(ctx context.Context, request GenerateGsmCertificateSigningRequestRequest) (response GenerateGsmCertificateSigningRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.generateGsmCertificateSigningRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GenerateGsmCertificateSigningRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GenerateGsmCertificateSigningRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GenerateGsmCertificateSigningRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GenerateGsmCertificateSigningRequestResponse") + } + return +} + +// generateGsmCertificateSigningRequest implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) generateGsmCertificateSigningRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/generateGsmCertificateSigningRequest", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GenerateGsmCertificateSigningRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/GenerateGsmCertificateSigningRequest" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "GenerateGsmCertificateSigningRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GenerateWallet Generate the wallet associated with sharded database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GenerateWallet.go.html to see an example of how to use GenerateWallet API. +// A default retry strategy applies to this operation GenerateWallet() +func (client ShardedDatabaseServiceClient) GenerateWallet(ctx context.Context, request GenerateWalletRequest) (response GenerateWalletResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.generateWallet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GenerateWalletResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GenerateWalletResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GenerateWalletResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GenerateWalletResponse") + } + return +} + +// generateWallet implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) generateWallet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/generateWallet", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GenerateWalletResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/GenerateWallet" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "GenerateWallet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPrivateEndpoint Get the PrivateEndpoint resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GetPrivateEndpoint.go.html to see an example of how to use GetPrivateEndpoint API. +// A default retry strategy applies to this operation GetPrivateEndpoint() +func (client ShardedDatabaseServiceClient) GetPrivateEndpoint(ctx context.Context, request GetPrivateEndpointRequest) (response GetPrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPrivateEndpointResponse") + } + return +} + +// getPrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) getPrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/privateEndpoints/{privateEndpointId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/PrivateEndpoint/GetPrivateEndpoint" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "GetPrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetShardedDatabase Gets the details of the Sharded database identified by given id. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GetShardedDatabase.go.html to see an example of how to use GetShardedDatabase API. +// A default retry strategy applies to this operation GetShardedDatabase() +func (client ShardedDatabaseServiceClient) GetShardedDatabase(ctx context.Context, request GetShardedDatabaseRequest) (response GetShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetShardedDatabaseResponse") + } + return +} + +// getShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) getShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/shardedDatabases/{shardedDatabaseId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/GetShardedDatabase" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "GetShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &shardeddatabase{}) + return response, err +} + +// GetWorkRequest Gets details of the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client ShardedDatabaseServiceClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} + +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/WorkRequest/GetWorkRequest" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPrivateEndpoints List of PrivateEndpoints. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListPrivateEndpoints.go.html to see an example of how to use ListPrivateEndpoints API. +// A default retry strategy applies to this operation ListPrivateEndpoints() +func (client ShardedDatabaseServiceClient) ListPrivateEndpoints(ctx context.Context, request ListPrivateEndpointsRequest) (response ListPrivateEndpointsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPrivateEndpoints, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPrivateEndpointsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPrivateEndpointsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPrivateEndpointsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPrivateEndpointsResponse") + } + return +} + +// listPrivateEndpoints implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) listPrivateEndpoints(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/privateEndpoints", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListPrivateEndpointsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/PrivateEndpointCollection/ListPrivateEndpoints" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ListPrivateEndpoints", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListShardedDatabases List of Sharded databases. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListShardedDatabases.go.html to see an example of how to use ListShardedDatabases API. +// A default retry strategy applies to this operation ListShardedDatabases() +func (client ShardedDatabaseServiceClient) ListShardedDatabases(ctx context.Context, request ListShardedDatabasesRequest) (response ListShardedDatabasesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listShardedDatabases, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListShardedDatabasesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListShardedDatabasesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListShardedDatabasesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListShardedDatabasesResponse") + } + return +} + +// listShardedDatabases implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) listShardedDatabases(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/shardedDatabases", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListShardedDatabasesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabaseCollection/ListShardedDatabases" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ListShardedDatabases", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Returns a (paginated) list of errors for the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client ShardedDatabaseServiceClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/WorkRequestError/ListWorkRequestErrors" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Returns a (paginated) list of logs for the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client ShardedDatabaseServiceClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/WorkRequestLogEntry/ListWorkRequestLogs" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in a compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client ShardedDatabaseServiceClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/WorkRequest/ListWorkRequests" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ListWorkRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PatchShardedDatabase Patch operation to add, remove or update shards to the sharded database topology. In single patch +// operation, multiple shards can be either added, or removed or updated. Combination of inserts, update +// and remove in single operation is not allowed. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/PatchShardedDatabase.go.html to see an example of how to use PatchShardedDatabase API. +// A default retry strategy applies to this operation PatchShardedDatabase() +func (client ShardedDatabaseServiceClient) PatchShardedDatabase(ctx context.Context, request PatchShardedDatabaseRequest) (response PatchShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.patchShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PatchShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PatchShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PatchShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchShardedDatabaseResponse") + } + return +} + +// patchShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) patchShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/shardedDatabases/{shardedDatabaseId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PatchShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/PatchShardedDatabase" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "PatchShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PrevalidateShardedDatabase Sharded database pre-validation request. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/PrevalidateShardedDatabase.go.html to see an example of how to use PrevalidateShardedDatabase API. +// A default retry strategy applies to this operation PrevalidateShardedDatabase() +func (client ShardedDatabaseServiceClient) PrevalidateShardedDatabase(ctx context.Context, request PrevalidateShardedDatabaseRequest) (response PrevalidateShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.prevalidateShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PrevalidateShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PrevalidateShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PrevalidateShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PrevalidateShardedDatabaseResponse") + } + return +} + +// prevalidateShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) prevalidateShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/actions/prevalidate", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PrevalidateShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/PrevalidateShardedDatabase" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "PrevalidateShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ReinstateProxyInstance API to reinstate the proxy instances associated with the private endpoint. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ReinstateProxyInstance.go.html to see an example of how to use ReinstateProxyInstance API. +// A default retry strategy applies to this operation ReinstateProxyInstance() +func (client ShardedDatabaseServiceClient) ReinstateProxyInstance(ctx context.Context, request ReinstateProxyInstanceRequest) (response ReinstateProxyInstanceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.reinstateProxyInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ReinstateProxyInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ReinstateProxyInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ReinstateProxyInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ReinstateProxyInstanceResponse") + } + return +} + +// reinstateProxyInstance implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) reinstateProxyInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/privateEndpoints/{privateEndpointId}/actions/reinstateProxyInstance", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ReinstateProxyInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/PrivateEndpoint/ReinstateProxyInstance" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ReinstateProxyInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// StartShardedDatabase Start the shards, catalog and GSMs of Sharded Database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/StartShardedDatabase.go.html to see an example of how to use StartShardedDatabase API. +// A default retry strategy applies to this operation StartShardedDatabase() +func (client ShardedDatabaseServiceClient) StartShardedDatabase(ctx context.Context, request StartShardedDatabaseRequest) (response StartShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.startShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StartShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StartShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StartShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StartShardedDatabaseResponse") + } + return +} + +// startShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) startShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/startDatabase", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response StartShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/StartShardedDatabase" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "StartShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// StopShardedDatabase Stop the shards, catalog and GSM instances for the sharded database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/StopShardedDatabase.go.html to see an example of how to use StopShardedDatabase API. +// A default retry strategy applies to this operation StopShardedDatabase() +func (client ShardedDatabaseServiceClient) StopShardedDatabase(ctx context.Context, request StopShardedDatabaseRequest) (response StopShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.stopShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StopShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StopShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StopShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StopShardedDatabaseResponse") + } + return +} + +// stopShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) stopShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/stopDatabase", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response StopShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/StopShardedDatabase" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "StopShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePrivateEndpoint Updates the configuration of privateendpoint. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/UpdatePrivateEndpoint.go.html to see an example of how to use UpdatePrivateEndpoint API. +// A default retry strategy applies to this operation UpdatePrivateEndpoint() +func (client ShardedDatabaseServiceClient) UpdatePrivateEndpoint(ctx context.Context, request UpdatePrivateEndpointRequest) (response UpdatePrivateEndpointResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updatePrivateEndpoint, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePrivateEndpointResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePrivateEndpointResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePrivateEndpointResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePrivateEndpointResponse") + } + return +} + +// updatePrivateEndpoint implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) updatePrivateEndpoint(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/privateEndpoints/{privateEndpointId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdatePrivateEndpointResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/PrivateEndpoint/UpdatePrivateEndpoint" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "UpdatePrivateEndpoint", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateShardedDatabase Updates the configuration of sharded database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/UpdateShardedDatabase.go.html to see an example of how to use UpdateShardedDatabase API. +// A default retry strategy applies to this operation UpdateShardedDatabase() +func (client ShardedDatabaseServiceClient) UpdateShardedDatabase(ctx context.Context, request UpdateShardedDatabaseRequest) (response UpdateShardedDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateShardedDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateShardedDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateShardedDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateShardedDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateShardedDatabaseResponse") + } + return +} + +// updateShardedDatabase implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) updateShardedDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/shardedDatabases/{shardedDatabaseId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateShardedDatabaseResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/UpdateShardedDatabase" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "UpdateShardedDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &shardeddatabase{}) + return response, err +} + +// UploadSignedCertificateAndGenerateWallet Upload the CA signed certificate to the GSM instances and generate wallets for GSM instances of the +// sharded database. Customer shall provide the CA signed certificate key details by adding the certificate +// in request body. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/UploadSignedCertificateAndGenerateWallet.go.html to see an example of how to use UploadSignedCertificateAndGenerateWallet API. +// A default retry strategy applies to this operation UploadSignedCertificateAndGenerateWallet() +func (client ShardedDatabaseServiceClient) UploadSignedCertificateAndGenerateWallet(ctx context.Context, request UploadSignedCertificateAndGenerateWalletRequest) (response UploadSignedCertificateAndGenerateWalletResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.uploadSignedCertificateAndGenerateWallet, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UploadSignedCertificateAndGenerateWalletResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UploadSignedCertificateAndGenerateWalletResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UploadSignedCertificateAndGenerateWalletResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UploadSignedCertificateAndGenerateWalletResponse") + } + return +} + +// uploadSignedCertificateAndGenerateWallet implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) uploadSignedCertificateAndGenerateWallet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/uploadSignedCertificateAndGenerateWallet", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UploadSignedCertificateAndGenerateWalletResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/UploadSignedCertificateAndGenerateWallet" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "UploadSignedCertificateAndGenerateWallet", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ValidateNetwork Validate the network connectivity between components of sharded database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ValidateNetwork.go.html to see an example of how to use ValidateNetwork API. +// A default retry strategy applies to this operation ValidateNetwork() +func (client ShardedDatabaseServiceClient) ValidateNetwork(ctx context.Context, request ValidateNetworkRequest) (response ValidateNetworkResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.validateNetwork, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ValidateNetworkResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ValidateNetworkResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ValidateNetworkResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ValidateNetworkResponse") + } + return +} + +// validateNetwork implements the OCIOperation interface (enables retrying operations) +func (client ShardedDatabaseServiceClient) validateNetwork(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/shardedDatabases/{shardedDatabaseId}/actions/validateNetwork", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ValidateNetworkResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/globally-distributed-autonomous-database/20230301/ShardedDatabase/ValidateNetwork" + err = common.PostProcessServiceError(err, "ShardedDatabaseService", "ValidateNetwork", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/gsm_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/gsm_details.go new file mode 100644 index 00000000000..a759d5e04fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/gsm_details.go @@ -0,0 +1,136 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GsmDetails Details of global service manager(GSM also known as shard director) instances for sharded database. +type GsmDetails struct { + + // Name of the GSM instance + Name *string `mandatory:"true" json:"name"` + + // The compute count for the GSM instance. + ComputeCount *float32 `mandatory:"true" json:"computeCount"` + + // The data disk group size to be allocated in GBs. + DataStorageSizeInGbs *float64 `mandatory:"true" json:"dataStorageSizeInGbs"` + + // The time the GSM instance was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the GSM instance was last updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Status of shard or catalog or gsm for the sharded database. + Status GsmDetailsStatusEnum `mandatory:"true" json:"status"` + + // The time the ssl certificate associated with GSM expires. An RFC3339 formatted datetime string + TimeSslCertificateExpires *common.SDKTime `mandatory:"false" json:"timeSslCertificateExpires"` + + // Identifier of the underlying supporting resource. + SupportingResourceId *string `mandatory:"false" json:"supportingResourceId"` + + // Additional metadata related to GSM's underlying supporting resource. + Metadata map[string]interface{} `mandatory:"false" json:"metadata"` +} + +func (m GsmDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GsmDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGsmDetailsStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetGsmDetailsStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GsmDetailsStatusEnum Enum with underlying type: string +type GsmDetailsStatusEnum string + +// Set of constants representing the allowable values for GsmDetailsStatusEnum +const ( + GsmDetailsStatusFailed GsmDetailsStatusEnum = "FAILED" + GsmDetailsStatusDeleting GsmDetailsStatusEnum = "DELETING" + GsmDetailsStatusDeleted GsmDetailsStatusEnum = "DELETED" + GsmDetailsStatusUpdating GsmDetailsStatusEnum = "UPDATING" + GsmDetailsStatusCreating GsmDetailsStatusEnum = "CREATING" + GsmDetailsStatusCreated GsmDetailsStatusEnum = "CREATED" + GsmDetailsStatusReadyForConfiguration GsmDetailsStatusEnum = "READY_FOR_CONFIGURATION" + GsmDetailsStatusConfigured GsmDetailsStatusEnum = "CONFIGURED" + GsmDetailsStatusNeedsAttention GsmDetailsStatusEnum = "NEEDS_ATTENTION" +) + +var mappingGsmDetailsStatusEnum = map[string]GsmDetailsStatusEnum{ + "FAILED": GsmDetailsStatusFailed, + "DELETING": GsmDetailsStatusDeleting, + "DELETED": GsmDetailsStatusDeleted, + "UPDATING": GsmDetailsStatusUpdating, + "CREATING": GsmDetailsStatusCreating, + "CREATED": GsmDetailsStatusCreated, + "READY_FOR_CONFIGURATION": GsmDetailsStatusReadyForConfiguration, + "CONFIGURED": GsmDetailsStatusConfigured, + "NEEDS_ATTENTION": GsmDetailsStatusNeedsAttention, +} + +var mappingGsmDetailsStatusEnumLowerCase = map[string]GsmDetailsStatusEnum{ + "failed": GsmDetailsStatusFailed, + "deleting": GsmDetailsStatusDeleting, + "deleted": GsmDetailsStatusDeleted, + "updating": GsmDetailsStatusUpdating, + "creating": GsmDetailsStatusCreating, + "created": GsmDetailsStatusCreated, + "ready_for_configuration": GsmDetailsStatusReadyForConfiguration, + "configured": GsmDetailsStatusConfigured, + "needs_attention": GsmDetailsStatusNeedsAttention, +} + +// GetGsmDetailsStatusEnumValues Enumerates the set of values for GsmDetailsStatusEnum +func GetGsmDetailsStatusEnumValues() []GsmDetailsStatusEnum { + values := make([]GsmDetailsStatusEnum, 0) + for _, v := range mappingGsmDetailsStatusEnum { + values = append(values, v) + } + return values +} + +// GetGsmDetailsStatusEnumStringValues Enumerates the set of values in String for GsmDetailsStatusEnum +func GetGsmDetailsStatusEnumStringValues() []string { + return []string{ + "FAILED", + "DELETING", + "DELETED", + "UPDATING", + "CREATING", + "CREATED", + "READY_FOR_CONFIGURATION", + "CONFIGURED", + "NEEDS_ATTENTION", + } +} + +// GetMappingGsmDetailsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGsmDetailsStatusEnum(val string) (GsmDetailsStatusEnum, bool) { + enum, ok := mappingGsmDetailsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_private_endpoints_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_private_endpoints_request_response.go new file mode 100644 index 00000000000..5e9aff2c613 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_private_endpoints_request_response.go @@ -0,0 +1,206 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPrivateEndpointsRequest wrapper for the ListPrivateEndpoints operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListPrivateEndpoints.go.html to see an example of how to use ListPrivateEndpointsRequest. +type ListPrivateEndpointsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState PrivateEndpointLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListPrivateEndpointsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListPrivateEndpointsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A filter to return only private endpoint that match the entire name given. The match is not case sensitive. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPrivateEndpointsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPrivateEndpointsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPrivateEndpointsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPrivateEndpointsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPrivateEndpointsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPrivateEndpointLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetPrivateEndpointLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListPrivateEndpointsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPrivateEndpointsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPrivateEndpointsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPrivateEndpointsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPrivateEndpointsResponse wrapper for the ListPrivateEndpoints operation +type ListPrivateEndpointsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PrivateEndpointCollection instances + PrivateEndpointCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPrivateEndpointsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPrivateEndpointsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPrivateEndpointsSortOrderEnum Enum with underlying type: string +type ListPrivateEndpointsSortOrderEnum string + +// Set of constants representing the allowable values for ListPrivateEndpointsSortOrderEnum +const ( + ListPrivateEndpointsSortOrderAsc ListPrivateEndpointsSortOrderEnum = "ASC" + ListPrivateEndpointsSortOrderDesc ListPrivateEndpointsSortOrderEnum = "DESC" +) + +var mappingListPrivateEndpointsSortOrderEnum = map[string]ListPrivateEndpointsSortOrderEnum{ + "ASC": ListPrivateEndpointsSortOrderAsc, + "DESC": ListPrivateEndpointsSortOrderDesc, +} + +var mappingListPrivateEndpointsSortOrderEnumLowerCase = map[string]ListPrivateEndpointsSortOrderEnum{ + "asc": ListPrivateEndpointsSortOrderAsc, + "desc": ListPrivateEndpointsSortOrderDesc, +} + +// GetListPrivateEndpointsSortOrderEnumValues Enumerates the set of values for ListPrivateEndpointsSortOrderEnum +func GetListPrivateEndpointsSortOrderEnumValues() []ListPrivateEndpointsSortOrderEnum { + values := make([]ListPrivateEndpointsSortOrderEnum, 0) + for _, v := range mappingListPrivateEndpointsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPrivateEndpointsSortOrderEnumStringValues Enumerates the set of values in String for ListPrivateEndpointsSortOrderEnum +func GetListPrivateEndpointsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPrivateEndpointsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPrivateEndpointsSortOrderEnum(val string) (ListPrivateEndpointsSortOrderEnum, bool) { + enum, ok := mappingListPrivateEndpointsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPrivateEndpointsSortByEnum Enum with underlying type: string +type ListPrivateEndpointsSortByEnum string + +// Set of constants representing the allowable values for ListPrivateEndpointsSortByEnum +const ( + ListPrivateEndpointsSortByTimecreated ListPrivateEndpointsSortByEnum = "timeCreated" + ListPrivateEndpointsSortByTimeupdated ListPrivateEndpointsSortByEnum = "timeUpdated" +) + +var mappingListPrivateEndpointsSortByEnum = map[string]ListPrivateEndpointsSortByEnum{ + "timeCreated": ListPrivateEndpointsSortByTimecreated, + "timeUpdated": ListPrivateEndpointsSortByTimeupdated, +} + +var mappingListPrivateEndpointsSortByEnumLowerCase = map[string]ListPrivateEndpointsSortByEnum{ + "timecreated": ListPrivateEndpointsSortByTimecreated, + "timeupdated": ListPrivateEndpointsSortByTimeupdated, +} + +// GetListPrivateEndpointsSortByEnumValues Enumerates the set of values for ListPrivateEndpointsSortByEnum +func GetListPrivateEndpointsSortByEnumValues() []ListPrivateEndpointsSortByEnum { + values := make([]ListPrivateEndpointsSortByEnum, 0) + for _, v := range mappingListPrivateEndpointsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPrivateEndpointsSortByEnumStringValues Enumerates the set of values in String for ListPrivateEndpointsSortByEnum +func GetListPrivateEndpointsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "timeUpdated", + } +} + +// GetMappingListPrivateEndpointsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPrivateEndpointsSortByEnum(val string) (ListPrivateEndpointsSortByEnum, bool) { + enum, ok := mappingListPrivateEndpointsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_sharded_databases_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_sharded_databases_request_response.go new file mode 100644 index 00000000000..d0ebdb2ef91 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_sharded_databases_request_response.go @@ -0,0 +1,206 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListShardedDatabasesRequest wrapper for the ListShardedDatabases operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListShardedDatabases.go.html to see an example of how to use ListShardedDatabasesRequest. +type ListShardedDatabasesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState ShardedDatabaseLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListShardedDatabasesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListShardedDatabasesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A filter to return only sharded databases that match the entire name given. The match is not case sensitive. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListShardedDatabasesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListShardedDatabasesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListShardedDatabasesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListShardedDatabasesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListShardedDatabasesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingShardedDatabaseLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetShardedDatabaseLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListShardedDatabasesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListShardedDatabasesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListShardedDatabasesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListShardedDatabasesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListShardedDatabasesResponse wrapper for the ListShardedDatabases operation +type ListShardedDatabasesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ShardedDatabaseCollection instances + ShardedDatabaseCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListShardedDatabasesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListShardedDatabasesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListShardedDatabasesSortOrderEnum Enum with underlying type: string +type ListShardedDatabasesSortOrderEnum string + +// Set of constants representing the allowable values for ListShardedDatabasesSortOrderEnum +const ( + ListShardedDatabasesSortOrderAsc ListShardedDatabasesSortOrderEnum = "ASC" + ListShardedDatabasesSortOrderDesc ListShardedDatabasesSortOrderEnum = "DESC" +) + +var mappingListShardedDatabasesSortOrderEnum = map[string]ListShardedDatabasesSortOrderEnum{ + "ASC": ListShardedDatabasesSortOrderAsc, + "DESC": ListShardedDatabasesSortOrderDesc, +} + +var mappingListShardedDatabasesSortOrderEnumLowerCase = map[string]ListShardedDatabasesSortOrderEnum{ + "asc": ListShardedDatabasesSortOrderAsc, + "desc": ListShardedDatabasesSortOrderDesc, +} + +// GetListShardedDatabasesSortOrderEnumValues Enumerates the set of values for ListShardedDatabasesSortOrderEnum +func GetListShardedDatabasesSortOrderEnumValues() []ListShardedDatabasesSortOrderEnum { + values := make([]ListShardedDatabasesSortOrderEnum, 0) + for _, v := range mappingListShardedDatabasesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListShardedDatabasesSortOrderEnumStringValues Enumerates the set of values in String for ListShardedDatabasesSortOrderEnum +func GetListShardedDatabasesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListShardedDatabasesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListShardedDatabasesSortOrderEnum(val string) (ListShardedDatabasesSortOrderEnum, bool) { + enum, ok := mappingListShardedDatabasesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListShardedDatabasesSortByEnum Enum with underlying type: string +type ListShardedDatabasesSortByEnum string + +// Set of constants representing the allowable values for ListShardedDatabasesSortByEnum +const ( + ListShardedDatabasesSortByTimecreated ListShardedDatabasesSortByEnum = "timeCreated" + ListShardedDatabasesSortByTimeupdated ListShardedDatabasesSortByEnum = "timeUpdated" +) + +var mappingListShardedDatabasesSortByEnum = map[string]ListShardedDatabasesSortByEnum{ + "timeCreated": ListShardedDatabasesSortByTimecreated, + "timeUpdated": ListShardedDatabasesSortByTimeupdated, +} + +var mappingListShardedDatabasesSortByEnumLowerCase = map[string]ListShardedDatabasesSortByEnum{ + "timecreated": ListShardedDatabasesSortByTimecreated, + "timeupdated": ListShardedDatabasesSortByTimeupdated, +} + +// GetListShardedDatabasesSortByEnumValues Enumerates the set of values for ListShardedDatabasesSortByEnum +func GetListShardedDatabasesSortByEnumValues() []ListShardedDatabasesSortByEnum { + values := make([]ListShardedDatabasesSortByEnum, 0) + for _, v := range mappingListShardedDatabasesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListShardedDatabasesSortByEnumStringValues Enumerates the set of values in String for ListShardedDatabasesSortByEnum +func GetListShardedDatabasesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "timeUpdated", + } +} + +// GetMappingListShardedDatabasesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListShardedDatabasesSortByEnum(val string) (ListShardedDatabasesSortByEnum, bool) { + enum, ok := mappingListShardedDatabasesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_request_errors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_request_errors_request_response.go new file mode 100644 index 00000000000..2fb2d450c6c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_request_errors_request_response.go @@ -0,0 +1,193 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrorsRequest. +type ListWorkRequestErrorsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + SortBy ListWorkRequestErrorsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestErrorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestErrorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestErrorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestErrorsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestErrorsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestErrorsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestErrorsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestErrorCollection instances + WorkRequestErrorCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestErrorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestErrorsSortByEnum Enum with underlying type: string +type ListWorkRequestErrorsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortByEnum +const ( + ListWorkRequestErrorsSortByTimeaccepted ListWorkRequestErrorsSortByEnum = "timeAccepted" +) + +var mappingListWorkRequestErrorsSortByEnum = map[string]ListWorkRequestErrorsSortByEnum{ + "timeAccepted": ListWorkRequestErrorsSortByTimeaccepted, +} + +var mappingListWorkRequestErrorsSortByEnumLowerCase = map[string]ListWorkRequestErrorsSortByEnum{ + "timeaccepted": ListWorkRequestErrorsSortByTimeaccepted, +} + +// GetListWorkRequestErrorsSortByEnumValues Enumerates the set of values for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumValues() []ListWorkRequestErrorsSortByEnum { + values := make([]ListWorkRequestErrorsSortByEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + } +} + +// GetMappingListWorkRequestErrorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortByEnum(val string) (ListWorkRequestErrorsSortByEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestErrorsSortOrderEnum Enum with underlying type: string +type ListWorkRequestErrorsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortOrderEnum +const ( + ListWorkRequestErrorsSortOrderAsc ListWorkRequestErrorsSortOrderEnum = "ASC" + ListWorkRequestErrorsSortOrderDesc ListWorkRequestErrorsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestErrorsSortOrderEnum = map[string]ListWorkRequestErrorsSortOrderEnum{ + "ASC": ListWorkRequestErrorsSortOrderAsc, + "DESC": ListWorkRequestErrorsSortOrderDesc, +} + +var mappingListWorkRequestErrorsSortOrderEnumLowerCase = map[string]ListWorkRequestErrorsSortOrderEnum{ + "asc": ListWorkRequestErrorsSortOrderAsc, + "desc": ListWorkRequestErrorsSortOrderDesc, +} + +// GetListWorkRequestErrorsSortOrderEnumValues Enumerates the set of values for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumValues() []ListWorkRequestErrorsSortOrderEnum { + values := make([]ListWorkRequestErrorsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestErrorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortOrderEnum(val string) (ListWorkRequestErrorsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_request_logs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_request_logs_request_response.go new file mode 100644 index 00000000000..ab59f5cb4ca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_request_logs_request_response.go @@ -0,0 +1,193 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogsRequest. +type ListWorkRequestLogsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + SortBy ListWorkRequestLogsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestLogsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestLogsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestLogsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestLogsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestLogsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestLogsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestLogsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestLogEntryCollection instances + WorkRequestLogEntryCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestLogsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestLogsSortByEnum Enum with underlying type: string +type ListWorkRequestLogsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortByEnum +const ( + ListWorkRequestLogsSortByTimeaccepted ListWorkRequestLogsSortByEnum = "timeAccepted" +) + +var mappingListWorkRequestLogsSortByEnum = map[string]ListWorkRequestLogsSortByEnum{ + "timeAccepted": ListWorkRequestLogsSortByTimeaccepted, +} + +var mappingListWorkRequestLogsSortByEnumLowerCase = map[string]ListWorkRequestLogsSortByEnum{ + "timeaccepted": ListWorkRequestLogsSortByTimeaccepted, +} + +// GetListWorkRequestLogsSortByEnumValues Enumerates the set of values for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumValues() []ListWorkRequestLogsSortByEnum { + values := make([]ListWorkRequestLogsSortByEnum, 0) + for _, v := range mappingListWorkRequestLogsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + } +} + +// GetMappingListWorkRequestLogsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortByEnum(val string) (ListWorkRequestLogsSortByEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestLogsSortOrderEnum Enum with underlying type: string +type ListWorkRequestLogsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortOrderEnum +const ( + ListWorkRequestLogsSortOrderAsc ListWorkRequestLogsSortOrderEnum = "ASC" + ListWorkRequestLogsSortOrderDesc ListWorkRequestLogsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestLogsSortOrderEnum = map[string]ListWorkRequestLogsSortOrderEnum{ + "ASC": ListWorkRequestLogsSortOrderAsc, + "DESC": ListWorkRequestLogsSortOrderDesc, +} + +var mappingListWorkRequestLogsSortOrderEnumLowerCase = map[string]ListWorkRequestLogsSortOrderEnum{ + "asc": ListWorkRequestLogsSortOrderAsc, + "desc": ListWorkRequestLogsSortOrderDesc, +} + +// GetListWorkRequestLogsSortOrderEnumValues Enumerates the set of values for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumValues() []ListWorkRequestLogsSortOrderEnum { + values := make([]ListWorkRequestLogsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestLogsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestLogsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortOrderEnum(val string) (ListWorkRequestLogsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_requests_request_response.go new file mode 100644 index 00000000000..5d767c09194 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/list_work_requests_request_response.go @@ -0,0 +1,267 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. +type ListWorkRequestsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The ID of the asynchronous work request. + WorkRequestId *string `mandatory:"false" contributesTo:"query" name:"workRequestId"` + + // A filter to return only resources their lifecycleState matches the given OperationStatus. + Status ListWorkRequestsStatusEnum `mandatory:"false" contributesTo:"query" name:"status" omitEmpty:"true"` + + // The ID of the resource affected by the work request. + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestsStatusEnum(string(request.Status)); !ok && request.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", request.Status, strings.Join(GetListWorkRequestsStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestSummaryCollection instances + WorkRequestSummaryCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestsStatusEnum Enum with underlying type: string +type ListWorkRequestsStatusEnum string + +// Set of constants representing the allowable values for ListWorkRequestsStatusEnum +const ( + ListWorkRequestsStatusAccepted ListWorkRequestsStatusEnum = "ACCEPTED" + ListWorkRequestsStatusInProgress ListWorkRequestsStatusEnum = "IN_PROGRESS" + ListWorkRequestsStatusWaiting ListWorkRequestsStatusEnum = "WAITING" + ListWorkRequestsStatusFailed ListWorkRequestsStatusEnum = "FAILED" + ListWorkRequestsStatusSucceeded ListWorkRequestsStatusEnum = "SUCCEEDED" + ListWorkRequestsStatusCanceling ListWorkRequestsStatusEnum = "CANCELING" + ListWorkRequestsStatusCanceled ListWorkRequestsStatusEnum = "CANCELED" +) + +var mappingListWorkRequestsStatusEnum = map[string]ListWorkRequestsStatusEnum{ + "ACCEPTED": ListWorkRequestsStatusAccepted, + "IN_PROGRESS": ListWorkRequestsStatusInProgress, + "WAITING": ListWorkRequestsStatusWaiting, + "FAILED": ListWorkRequestsStatusFailed, + "SUCCEEDED": ListWorkRequestsStatusSucceeded, + "CANCELING": ListWorkRequestsStatusCanceling, + "CANCELED": ListWorkRequestsStatusCanceled, +} + +var mappingListWorkRequestsStatusEnumLowerCase = map[string]ListWorkRequestsStatusEnum{ + "accepted": ListWorkRequestsStatusAccepted, + "in_progress": ListWorkRequestsStatusInProgress, + "waiting": ListWorkRequestsStatusWaiting, + "failed": ListWorkRequestsStatusFailed, + "succeeded": ListWorkRequestsStatusSucceeded, + "canceling": ListWorkRequestsStatusCanceling, + "canceled": ListWorkRequestsStatusCanceled, +} + +// GetListWorkRequestsStatusEnumValues Enumerates the set of values for ListWorkRequestsStatusEnum +func GetListWorkRequestsStatusEnumValues() []ListWorkRequestsStatusEnum { + values := make([]ListWorkRequestsStatusEnum, 0) + for _, v := range mappingListWorkRequestsStatusEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsStatusEnumStringValues Enumerates the set of values in String for ListWorkRequestsStatusEnum +func GetListWorkRequestsStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "WAITING", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingListWorkRequestsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsStatusEnum(val string) (ListWorkRequestsStatusEnum, bool) { + enum, ok := mappingListWorkRequestsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortOrderEnum Enum with underlying type: string +type ListWorkRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortOrderEnum +const ( + ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC" + ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestsSortOrderEnum = map[string]ListWorkRequestsSortOrderEnum{ + "ASC": ListWorkRequestsSortOrderAsc, + "DESC": ListWorkRequestsSortOrderDesc, +} + +var mappingListWorkRequestsSortOrderEnumLowerCase = map[string]ListWorkRequestsSortOrderEnum{ + "asc": ListWorkRequestsSortOrderAsc, + "desc": ListWorkRequestsSortOrderDesc, +} + +// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum { + values := make([]ListWorkRequestsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortOrderEnum(val string) (ListWorkRequestsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortByEnum Enum with underlying type: string +type ListWorkRequestsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortByEnum +const ( + ListWorkRequestsSortByTimeaccepted ListWorkRequestsSortByEnum = "timeAccepted" +) + +var mappingListWorkRequestsSortByEnum = map[string]ListWorkRequestsSortByEnum{ + "timeAccepted": ListWorkRequestsSortByTimeaccepted, +} + +var mappingListWorkRequestsSortByEnumLowerCase = map[string]ListWorkRequestsSortByEnum{ + "timeaccepted": ListWorkRequestsSortByTimeaccepted, +} + +// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum { + values := make([]ListWorkRequestsSortByEnum, 0) + for _, v := range mappingListWorkRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + } +} + +// GetMappingListWorkRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortByEnum(val string) (ListWorkRequestsSortByEnum, bool) { + enum, ok := mappingListWorkRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/operation_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/operation_status.go new file mode 100644 index 00000000000..187ae8d90db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/operation_status.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "strings" +) + +// OperationStatusEnum Enum with underlying type: string +type OperationStatusEnum string + +// Set of constants representing the allowable values for OperationStatusEnum +const ( + OperationStatusAccepted OperationStatusEnum = "ACCEPTED" + OperationStatusInProgress OperationStatusEnum = "IN_PROGRESS" + OperationStatusWaiting OperationStatusEnum = "WAITING" + OperationStatusFailed OperationStatusEnum = "FAILED" + OperationStatusSucceeded OperationStatusEnum = "SUCCEEDED" + OperationStatusCanceling OperationStatusEnum = "CANCELING" + OperationStatusCanceled OperationStatusEnum = "CANCELED" +) + +var mappingOperationStatusEnum = map[string]OperationStatusEnum{ + "ACCEPTED": OperationStatusAccepted, + "IN_PROGRESS": OperationStatusInProgress, + "WAITING": OperationStatusWaiting, + "FAILED": OperationStatusFailed, + "SUCCEEDED": OperationStatusSucceeded, + "CANCELING": OperationStatusCanceling, + "CANCELED": OperationStatusCanceled, +} + +var mappingOperationStatusEnumLowerCase = map[string]OperationStatusEnum{ + "accepted": OperationStatusAccepted, + "in_progress": OperationStatusInProgress, + "waiting": OperationStatusWaiting, + "failed": OperationStatusFailed, + "succeeded": OperationStatusSucceeded, + "canceling": OperationStatusCanceling, + "canceled": OperationStatusCanceled, +} + +// GetOperationStatusEnumValues Enumerates the set of values for OperationStatusEnum +func GetOperationStatusEnumValues() []OperationStatusEnum { + values := make([]OperationStatusEnum, 0) + for _, v := range mappingOperationStatusEnum { + values = append(values, v) + } + return values +} + +// GetOperationStatusEnumStringValues Enumerates the set of values in String for OperationStatusEnum +func GetOperationStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "WAITING", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingOperationStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationStatusEnum(val string) (OperationStatusEnum, bool) { + enum, ok := mappingOperationStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/operation_type.go new file mode 100644 index 00000000000..0f287ab65a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/operation_type.go @@ -0,0 +1,168 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "strings" +) + +// OperationTypeEnum Enum with underlying type: string +type OperationTypeEnum string + +// Set of constants representing the allowable values for OperationTypeEnum +const ( + OperationTypeCreateShardedDatabase OperationTypeEnum = "CREATE_SHARDED_DATABASE" + OperationTypeDeleteShardedDatabase OperationTypeEnum = "DELETE_SHARDED_DATABASE" + OperationTypeUpdateShardedDatabase OperationTypeEnum = "UPDATE_SHARDED_DATABASE" + OperationTypeConfigureShardedDatabaseGsms OperationTypeEnum = "CONFIGURE_SHARDED_DATABASE_GSMS" + OperationTypeStartShardedDatabase OperationTypeEnum = "START_SHARDED_DATABASE" + OperationTypeStopShardedDatabase OperationTypeEnum = "STOP_SHARDED_DATABASE" + OperationTypeValidateNetwork OperationTypeEnum = "VALIDATE_NETWORK" + OperationTypeChangeShardedDbCompartment OperationTypeEnum = "CHANGE_SHARDED_DB_COMPARTMENT" + OperationTypeCreatePrivateEndpoint OperationTypeEnum = "CREATE_PRIVATE_ENDPOINT" + OperationTypeUpdatePrivateEndpoint OperationTypeEnum = "UPDATE_PRIVATE_ENDPOINT" + OperationTypeDeletePrivateEndpoint OperationTypeEnum = "DELETE_PRIVATE_ENDPOINT" + OperationTypeChangePrivateEndpointCompartment OperationTypeEnum = "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT" + OperationTypeInsertShards OperationTypeEnum = "INSERT_SHARDS" + OperationTypeRemoveShards OperationTypeEnum = "REMOVE_SHARDS" + OperationTypeMergeCatalogShards OperationTypeEnum = "MERGE_CATALOG_SHARDS" + OperationTypeUploadSignedCertAndGenerateWallet OperationTypeEnum = "UPLOAD_SIGNED_CERT_AND_GENERATE_WALLET" + OperationTypeGenerateGsmCertSigningReq OperationTypeEnum = "GENERATE_GSM_CERT_SIGNING_REQ" + OperationTypeConfigureSharding OperationTypeEnum = "CONFIGURE_SHARDING" + OperationTypeExecuteValidateNetworkTests OperationTypeEnum = "EXECUTE_VALIDATE_NETWORK_TESTS" + OperationTypeUpdateShard OperationTypeEnum = "UPDATE_SHARD" + OperationTypePrivateDeleteSdb OperationTypeEnum = "PRIVATE_DELETE_SDB" + OperationTypeProcessShardedDatabase OperationTypeEnum = "PROCESS_SHARDED_DATABASE" + OperationTypeCreateCatalogs OperationTypeEnum = "CREATE_CATALOGS" + OperationTypeCreateShards OperationTypeEnum = "CREATE_SHARDS" + OperationTypeCreateGsmNodes OperationTypeEnum = "CREATE_GSM_NODES" + OperationTypeAddGsmNodes OperationTypeEnum = "ADD_GSM_NODES" + OperationTypePrivateDeleteAtpdCatalog OperationTypeEnum = "PRIVATE_DELETE_ATPD_CATALOG" + OperationTypePrivateDeleteAtpdShard OperationTypeEnum = "PRIVATE_DELETE_ATPD_SHARD" + OperationTypePrivateDeleteGsm OperationTypeEnum = "PRIVATE_DELETE_GSM" + OperationTypeReinstateProxyInstance OperationTypeEnum = "REINSTATE_PROXY_INSTANCE" +) + +var mappingOperationTypeEnum = map[string]OperationTypeEnum{ + "CREATE_SHARDED_DATABASE": OperationTypeCreateShardedDatabase, + "DELETE_SHARDED_DATABASE": OperationTypeDeleteShardedDatabase, + "UPDATE_SHARDED_DATABASE": OperationTypeUpdateShardedDatabase, + "CONFIGURE_SHARDED_DATABASE_GSMS": OperationTypeConfigureShardedDatabaseGsms, + "START_SHARDED_DATABASE": OperationTypeStartShardedDatabase, + "STOP_SHARDED_DATABASE": OperationTypeStopShardedDatabase, + "VALIDATE_NETWORK": OperationTypeValidateNetwork, + "CHANGE_SHARDED_DB_COMPARTMENT": OperationTypeChangeShardedDbCompartment, + "CREATE_PRIVATE_ENDPOINT": OperationTypeCreatePrivateEndpoint, + "UPDATE_PRIVATE_ENDPOINT": OperationTypeUpdatePrivateEndpoint, + "DELETE_PRIVATE_ENDPOINT": OperationTypeDeletePrivateEndpoint, + "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT": OperationTypeChangePrivateEndpointCompartment, + "INSERT_SHARDS": OperationTypeInsertShards, + "REMOVE_SHARDS": OperationTypeRemoveShards, + "MERGE_CATALOG_SHARDS": OperationTypeMergeCatalogShards, + "UPLOAD_SIGNED_CERT_AND_GENERATE_WALLET": OperationTypeUploadSignedCertAndGenerateWallet, + "GENERATE_GSM_CERT_SIGNING_REQ": OperationTypeGenerateGsmCertSigningReq, + "CONFIGURE_SHARDING": OperationTypeConfigureSharding, + "EXECUTE_VALIDATE_NETWORK_TESTS": OperationTypeExecuteValidateNetworkTests, + "UPDATE_SHARD": OperationTypeUpdateShard, + "PRIVATE_DELETE_SDB": OperationTypePrivateDeleteSdb, + "PROCESS_SHARDED_DATABASE": OperationTypeProcessShardedDatabase, + "CREATE_CATALOGS": OperationTypeCreateCatalogs, + "CREATE_SHARDS": OperationTypeCreateShards, + "CREATE_GSM_NODES": OperationTypeCreateGsmNodes, + "ADD_GSM_NODES": OperationTypeAddGsmNodes, + "PRIVATE_DELETE_ATPD_CATALOG": OperationTypePrivateDeleteAtpdCatalog, + "PRIVATE_DELETE_ATPD_SHARD": OperationTypePrivateDeleteAtpdShard, + "PRIVATE_DELETE_GSM": OperationTypePrivateDeleteGsm, + "REINSTATE_PROXY_INSTANCE": OperationTypeReinstateProxyInstance, +} + +var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ + "create_sharded_database": OperationTypeCreateShardedDatabase, + "delete_sharded_database": OperationTypeDeleteShardedDatabase, + "update_sharded_database": OperationTypeUpdateShardedDatabase, + "configure_sharded_database_gsms": OperationTypeConfigureShardedDatabaseGsms, + "start_sharded_database": OperationTypeStartShardedDatabase, + "stop_sharded_database": OperationTypeStopShardedDatabase, + "validate_network": OperationTypeValidateNetwork, + "change_sharded_db_compartment": OperationTypeChangeShardedDbCompartment, + "create_private_endpoint": OperationTypeCreatePrivateEndpoint, + "update_private_endpoint": OperationTypeUpdatePrivateEndpoint, + "delete_private_endpoint": OperationTypeDeletePrivateEndpoint, + "change_private_endpoint_compartment": OperationTypeChangePrivateEndpointCompartment, + "insert_shards": OperationTypeInsertShards, + "remove_shards": OperationTypeRemoveShards, + "merge_catalog_shards": OperationTypeMergeCatalogShards, + "upload_signed_cert_and_generate_wallet": OperationTypeUploadSignedCertAndGenerateWallet, + "generate_gsm_cert_signing_req": OperationTypeGenerateGsmCertSigningReq, + "configure_sharding": OperationTypeConfigureSharding, + "execute_validate_network_tests": OperationTypeExecuteValidateNetworkTests, + "update_shard": OperationTypeUpdateShard, + "private_delete_sdb": OperationTypePrivateDeleteSdb, + "process_sharded_database": OperationTypeProcessShardedDatabase, + "create_catalogs": OperationTypeCreateCatalogs, + "create_shards": OperationTypeCreateShards, + "create_gsm_nodes": OperationTypeCreateGsmNodes, + "add_gsm_nodes": OperationTypeAddGsmNodes, + "private_delete_atpd_catalog": OperationTypePrivateDeleteAtpdCatalog, + "private_delete_atpd_shard": OperationTypePrivateDeleteAtpdShard, + "private_delete_gsm": OperationTypePrivateDeleteGsm, + "reinstate_proxy_instance": OperationTypeReinstateProxyInstance, +} + +// GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum +func GetOperationTypeEnumValues() []OperationTypeEnum { + values := make([]OperationTypeEnum, 0) + for _, v := range mappingOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetOperationTypeEnumStringValues Enumerates the set of values in String for OperationTypeEnum +func GetOperationTypeEnumStringValues() []string { + return []string{ + "CREATE_SHARDED_DATABASE", + "DELETE_SHARDED_DATABASE", + "UPDATE_SHARDED_DATABASE", + "CONFIGURE_SHARDED_DATABASE_GSMS", + "START_SHARDED_DATABASE", + "STOP_SHARDED_DATABASE", + "VALIDATE_NETWORK", + "CHANGE_SHARDED_DB_COMPARTMENT", + "CREATE_PRIVATE_ENDPOINT", + "UPDATE_PRIVATE_ENDPOINT", + "DELETE_PRIVATE_ENDPOINT", + "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", + "INSERT_SHARDS", + "REMOVE_SHARDS", + "MERGE_CATALOG_SHARDS", + "UPLOAD_SIGNED_CERT_AND_GENERATE_WALLET", + "GENERATE_GSM_CERT_SIGNING_REQ", + "CONFIGURE_SHARDING", + "EXECUTE_VALIDATE_NETWORK_TESTS", + "UPDATE_SHARD", + "PRIVATE_DELETE_SDB", + "PROCESS_SHARDED_DATABASE", + "CREATE_CATALOGS", + "CREATE_SHARDS", + "CREATE_GSM_NODES", + "ADD_GSM_NODES", + "PRIVATE_DELETE_ATPD_CATALOG", + "PRIVATE_DELETE_ATPD_SHARD", + "PRIVATE_DELETE_GSM", + "REINSTATE_PROXY_INSTANCE", + } +} + +// GetMappingOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationTypeEnum(val string) (OperationTypeEnum, bool) { + enum, ok := mappingOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_insert_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_insert_instruction.go new file mode 100644 index 00000000000..0f67b19ba44 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_insert_instruction.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchInsertInstruction An operation that inserts a value into an array, shifting array items as necessary and handling NOT_FOUND exceptions by creating the implied containing structure. +type PatchInsertInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be inserted into the target. + Value *interface{} `mandatory:"true" json:"value"` +} + +// GetSelection returns Selection +func (m PatchInsertInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchInsertInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchInsertInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchInsertInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchInsertInstruction PatchInsertInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchInsertInstruction + }{ + "INSERT", + (MarshalTypePatchInsertInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_instruction.go new file mode 100644 index 00000000000..ce166b25599 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_instruction.go @@ -0,0 +1,143 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchInstruction A single instruction to be included as part of Patch request content. +type PatchInstruction interface { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + GetSelection() *string +} + +type patchinstruction struct { + JsonData []byte + Selection *string `mandatory:"true" json:"selection"` + Operation string `json:"operation"` +} + +// UnmarshalJSON unmarshals json +func (m *patchinstruction) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpatchinstruction patchinstruction + s := struct { + Model Unmarshalerpatchinstruction + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Selection = s.Model.Selection + m.Operation = s.Model.Operation + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *patchinstruction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Operation { + case "REMOVE": + mm := PatchRemoveInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INSERT": + mm := PatchInsertInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MERGE": + mm := PatchMergeInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PatchInstruction: %s.", m.Operation) + return *m, nil + } +} + +// GetSelection returns Selection +func (m patchinstruction) GetSelection() *string { + return m.Selection +} + +func (m patchinstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m patchinstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchInstructionOperationEnum Enum with underlying type: string +type PatchInstructionOperationEnum string + +// Set of constants representing the allowable values for PatchInstructionOperationEnum +const ( + PatchInstructionOperationInsert PatchInstructionOperationEnum = "INSERT" + PatchInstructionOperationRemove PatchInstructionOperationEnum = "REMOVE" + PatchInstructionOperationMerge PatchInstructionOperationEnum = "MERGE" +) + +var mappingPatchInstructionOperationEnum = map[string]PatchInstructionOperationEnum{ + "INSERT": PatchInstructionOperationInsert, + "REMOVE": PatchInstructionOperationRemove, + "MERGE": PatchInstructionOperationMerge, +} + +var mappingPatchInstructionOperationEnumLowerCase = map[string]PatchInstructionOperationEnum{ + "insert": PatchInstructionOperationInsert, + "remove": PatchInstructionOperationRemove, + "merge": PatchInstructionOperationMerge, +} + +// GetPatchInstructionOperationEnumValues Enumerates the set of values for PatchInstructionOperationEnum +func GetPatchInstructionOperationEnumValues() []PatchInstructionOperationEnum { + values := make([]PatchInstructionOperationEnum, 0) + for _, v := range mappingPatchInstructionOperationEnum { + values = append(values, v) + } + return values +} + +// GetPatchInstructionOperationEnumStringValues Enumerates the set of values in String for PatchInstructionOperationEnum +func GetPatchInstructionOperationEnumStringValues() []string { + return []string{ + "INSERT", + "REMOVE", + "MERGE", + } +} + +// GetMappingPatchInstructionOperationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchInstructionOperationEnum(val string) (PatchInstructionOperationEnum, bool) { + enum, ok := mappingPatchInstructionOperationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_merge_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_merge_instruction.go new file mode 100644 index 00000000000..fd2d72cd53b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_merge_instruction.go @@ -0,0 +1,70 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchMergeInstruction An operation that recursively updates items of the selection, or adding the value if the selection is empty. +// If the value is not an object, it is used directly, otherwise each key-value member is used +// to create or update a member of the same name in the target and the same process is applied recursively for each object-typed value +// (similar to RFC 7396 (https://tools.ietf.org/html/rfc7396#section-2) JSON Merge Patch, except that null values are copied +// rather than transformed into deletions). +// NOT_FOUND exceptions are handled by creating the implied containing structure. +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchMergeInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be merged into the target. + Value *interface{} `mandatory:"false" json:"value"` +} + +// GetSelection returns Selection +func (m PatchMergeInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchMergeInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchMergeInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchMergeInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchMergeInstruction PatchMergeInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchMergeInstruction + }{ + "MERGE", + (MarshalTypePatchMergeInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_remove_instruction.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_remove_instruction.go new file mode 100644 index 00000000000..39a2ce0302b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_remove_instruction.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchRemoveInstruction An operation that deletes items, ignoring NOT_FOUND exceptions. +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchRemoveInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` +} + +// GetSelection returns Selection +func (m PatchRemoveInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchRemoveInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchRemoveInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchRemoveInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchRemoveInstruction PatchRemoveInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchRemoveInstruction + }{ + "REMOVE", + (MarshalTypePatchRemoveInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_sharded_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_sharded_database_details.go new file mode 100644 index 00000000000..6d235a37d08 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_sharded_database_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchShardedDatabaseDetails Provide PatchInstuction(s) in items array. All instructions in items have to be of same type. +// All instructions in items have to either PatchInsertInstruction type, PatchRemoveInstruction or +// PatchMergeInstruction. Multiple instructions of different types is not allowed to be performed in +// single operation. +type PatchShardedDatabaseDetails struct { + + // List of patch instructions. + Items []PatchInstruction `mandatory:"false" json:"items"` +} + +func (m PatchShardedDatabaseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchShardedDatabaseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PatchShardedDatabaseDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []patchinstruction `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]PatchInstruction, len(model.Items)) + for i, n := range model.Items { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Items[i] = nn.(PatchInstruction) + } else { + m.Items[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_sharded_database_request_response.go new file mode 100644 index 00000000000..1ceaa7275a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/patch_sharded_database_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchShardedDatabaseRequest wrapper for the PatchShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/PatchShardedDatabase.go.html to see an example of how to use PatchShardedDatabaseRequest. +type PatchShardedDatabaseRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // The payload containing instructions to patch the sharded database. + PatchShardedDatabaseDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchShardedDatabaseResponse wrapper for the PatchShardedDatabase operation +type PatchShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PatchShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_create_payload.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_create_payload.go new file mode 100644 index 00000000000..d263ca079e6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_create_payload.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrevalidateCreatePayload Payload to prevalidate create sharded database operation. +type PrevalidateCreatePayload struct { + PrevalidatePayload CreateShardedDatabaseDetails `mandatory:"true" json:"prevalidatePayload"` +} + +func (m PrevalidateCreatePayload) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrevalidateCreatePayload) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PrevalidateCreatePayload) MarshalJSON() (buff []byte, e error) { + type MarshalTypePrevalidateCreatePayload PrevalidateCreatePayload + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePrevalidateCreatePayload + }{ + "CREATE", + (MarshalTypePrevalidateCreatePayload)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *PrevalidateCreatePayload) UnmarshalJSON(data []byte) (e error) { + model := struct { + PrevalidatePayload createshardeddatabasedetails `json:"prevalidatePayload"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.PrevalidatePayload.UnmarshalPolymorphicJSON(model.PrevalidatePayload.JsonData) + if e != nil { + return + } + if nn != nil { + m.PrevalidatePayload = nn.(CreateShardedDatabaseDetails) + } else { + m.PrevalidatePayload = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_patch_payload.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_patch_payload.go new file mode 100644 index 00000000000..f4201f5c76a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_patch_payload.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrevalidatePatchPayload Payload to prevalidate patch sharded database operation. +type PrevalidatePatchPayload struct { + PrevalidatePayload *PatchShardedDatabaseDetails `mandatory:"true" json:"prevalidatePayload"` + + // Sharded database identifier + ShardedDatabaseId *string `mandatory:"true" json:"shardedDatabaseId"` +} + +func (m PrevalidatePatchPayload) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrevalidatePatchPayload) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PrevalidatePatchPayload) MarshalJSON() (buff []byte, e error) { + type MarshalTypePrevalidatePatchPayload PrevalidatePatchPayload + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePrevalidatePatchPayload + }{ + "PATCH", + (MarshalTypePrevalidatePatchPayload)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_payload.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_payload.go new file mode 100644 index 00000000000..1e21ddcda34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_payload.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrevalidatePayload Payload required to run prevalidation operation for create sharded database or patch sharded database, based on operation selected. +type PrevalidatePayload interface { +} + +type prevalidatepayload struct { + JsonData []byte + Operation string `json:"operation"` +} + +// UnmarshalJSON unmarshals json +func (m *prevalidatepayload) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerprevalidatepayload prevalidatepayload + s := struct { + Model Unmarshalerprevalidatepayload + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Operation = s.Model.Operation + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *prevalidatepayload) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Operation { + case "PATCH": + mm := PrevalidatePatchPayload{} + err = json.Unmarshal(data, &mm) + return mm, err + case "CREATE": + mm := PrevalidateCreatePayload{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PrevalidatePayload: %s.", m.Operation) + return *m, nil + } +} + +func (m prevalidatepayload) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m prevalidatepayload) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PrevalidatePayloadOperationEnum Enum with underlying type: string +type PrevalidatePayloadOperationEnum string + +// Set of constants representing the allowable values for PrevalidatePayloadOperationEnum +const ( + PrevalidatePayloadOperationCreate PrevalidatePayloadOperationEnum = "CREATE" + PrevalidatePayloadOperationPatch PrevalidatePayloadOperationEnum = "PATCH" +) + +var mappingPrevalidatePayloadOperationEnum = map[string]PrevalidatePayloadOperationEnum{ + "CREATE": PrevalidatePayloadOperationCreate, + "PATCH": PrevalidatePayloadOperationPatch, +} + +var mappingPrevalidatePayloadOperationEnumLowerCase = map[string]PrevalidatePayloadOperationEnum{ + "create": PrevalidatePayloadOperationCreate, + "patch": PrevalidatePayloadOperationPatch, +} + +// GetPrevalidatePayloadOperationEnumValues Enumerates the set of values for PrevalidatePayloadOperationEnum +func GetPrevalidatePayloadOperationEnumValues() []PrevalidatePayloadOperationEnum { + values := make([]PrevalidatePayloadOperationEnum, 0) + for _, v := range mappingPrevalidatePayloadOperationEnum { + values = append(values, v) + } + return values +} + +// GetPrevalidatePayloadOperationEnumStringValues Enumerates the set of values in String for PrevalidatePayloadOperationEnum +func GetPrevalidatePayloadOperationEnumStringValues() []string { + return []string{ + "CREATE", + "PATCH", + } +} + +// GetMappingPrevalidatePayloadOperationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPrevalidatePayloadOperationEnum(val string) (PrevalidatePayloadOperationEnum, bool) { + enum, ok := mappingPrevalidatePayloadOperationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_details.go new file mode 100644 index 00000000000..301ee0efb2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrevalidateShardedDatabaseDetails Input for prevalidate sharded database API to validate various operations payload. +type PrevalidateShardedDatabaseDetails struct { + PrevalidateShardedDatabaseDetails PrevalidatePayload `mandatory:"true" json:"prevalidateShardedDatabaseDetails"` +} + +func (m PrevalidateShardedDatabaseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrevalidateShardedDatabaseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PrevalidateShardedDatabaseDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + PrevalidateShardedDatabaseDetails prevalidatepayload `json:"prevalidateShardedDatabaseDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.PrevalidateShardedDatabaseDetails.UnmarshalPolymorphicJSON(model.PrevalidateShardedDatabaseDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PrevalidateShardedDatabaseDetails = nn.(PrevalidatePayload) + } else { + m.PrevalidateShardedDatabaseDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_request_response.go new file mode 100644 index 00000000000..246a7fdf3e4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PrevalidateShardedDatabaseRequest wrapper for the PrevalidateShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/PrevalidateShardedDatabase.go.html to see an example of how to use PrevalidateShardedDatabaseRequest. +type PrevalidateShardedDatabaseRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Request to pre-validate sharded database operation like CREATE, PATCH payload before executing them. + PrevalidateShardedDatabaseDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PrevalidateShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PrevalidateShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PrevalidateShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PrevalidateShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PrevalidateShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PrevalidateShardedDatabaseResponse wrapper for the PrevalidateShardedDatabase operation +type PrevalidateShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrevalidateShardedDatabaseResult instance + PrevalidateShardedDatabaseResult `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PrevalidateShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PrevalidateShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_result.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_result.go new file mode 100644 index 00000000000..473c2a08bbe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/prevalidate_sharded_database_result.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrevalidateShardedDatabaseResult Response of prevalidation api. +type PrevalidateShardedDatabaseResult struct { + + // Prevalidation result based on input payload. + ValidationResult map[string]interface{} `mandatory:"true" json:"validationResult"` +} + +func (m PrevalidateShardedDatabaseResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrevalidateShardedDatabaseResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint.go new file mode 100644 index 00000000000..8b55f3b0f2d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint.go @@ -0,0 +1,155 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrivateEndpoint PrivateEndpoint resource. +type PrivateEndpoint struct { + + // The identifier of the Private Endpoint. + Id *string `mandatory:"true" json:"id"` + + // Identifier of the compartment in which private endpoint exists. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Identifier of the subnet in which private endpoint exists. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Identifier of the VCN in which subnet exists. + VcnId *string `mandatory:"true" json:"vcnId"` + + // PrivateEndpoint display name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time the PrivateEndpoint was first created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the Private Endpoint was last updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Lifecycle states for private endpoint. + LifecycleState PrivateEndpointLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // PrivateEndpoint description. + Description *string `mandatory:"false" json:"description"` + + // IP address of the Private Endpoint. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // The OCIDs of the network security groups that the private endpoint belongs to. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The OCIDs of sharded databases that consumes the given private endpoint. + ShardedDatabases []string `mandatory:"false" json:"shardedDatabases"` + + // Detailed message for the lifecycle state. + LifecycleStateDetails *string `mandatory:"false" json:"lifecycleStateDetails"` + + // The identifier of the proxy compute instance. + ProxyComputeInstanceId *string `mandatory:"false" json:"proxyComputeInstanceId"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m PrivateEndpoint) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrivateEndpoint) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPrivateEndpointLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPrivateEndpointLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PrivateEndpointLifecycleStateEnum Enum with underlying type: string +type PrivateEndpointLifecycleStateEnum string + +// Set of constants representing the allowable values for PrivateEndpointLifecycleStateEnum +const ( + PrivateEndpointLifecycleStateActive PrivateEndpointLifecycleStateEnum = "ACTIVE" + PrivateEndpointLifecycleStateFailed PrivateEndpointLifecycleStateEnum = "FAILED" + PrivateEndpointLifecycleStateInactive PrivateEndpointLifecycleStateEnum = "INACTIVE" + PrivateEndpointLifecycleStateDeleting PrivateEndpointLifecycleStateEnum = "DELETING" + PrivateEndpointLifecycleStateDeleted PrivateEndpointLifecycleStateEnum = "DELETED" + PrivateEndpointLifecycleStateUpdating PrivateEndpointLifecycleStateEnum = "UPDATING" + PrivateEndpointLifecycleStateCreating PrivateEndpointLifecycleStateEnum = "CREATING" +) + +var mappingPrivateEndpointLifecycleStateEnum = map[string]PrivateEndpointLifecycleStateEnum{ + "ACTIVE": PrivateEndpointLifecycleStateActive, + "FAILED": PrivateEndpointLifecycleStateFailed, + "INACTIVE": PrivateEndpointLifecycleStateInactive, + "DELETING": PrivateEndpointLifecycleStateDeleting, + "DELETED": PrivateEndpointLifecycleStateDeleted, + "UPDATING": PrivateEndpointLifecycleStateUpdating, + "CREATING": PrivateEndpointLifecycleStateCreating, +} + +var mappingPrivateEndpointLifecycleStateEnumLowerCase = map[string]PrivateEndpointLifecycleStateEnum{ + "active": PrivateEndpointLifecycleStateActive, + "failed": PrivateEndpointLifecycleStateFailed, + "inactive": PrivateEndpointLifecycleStateInactive, + "deleting": PrivateEndpointLifecycleStateDeleting, + "deleted": PrivateEndpointLifecycleStateDeleted, + "updating": PrivateEndpointLifecycleStateUpdating, + "creating": PrivateEndpointLifecycleStateCreating, +} + +// GetPrivateEndpointLifecycleStateEnumValues Enumerates the set of values for PrivateEndpointLifecycleStateEnum +func GetPrivateEndpointLifecycleStateEnumValues() []PrivateEndpointLifecycleStateEnum { + values := make([]PrivateEndpointLifecycleStateEnum, 0) + for _, v := range mappingPrivateEndpointLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPrivateEndpointLifecycleStateEnumStringValues Enumerates the set of values in String for PrivateEndpointLifecycleStateEnum +func GetPrivateEndpointLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "FAILED", + "INACTIVE", + "DELETING", + "DELETED", + "UPDATING", + "CREATING", + } +} + +// GetMappingPrivateEndpointLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPrivateEndpointLifecycleStateEnum(val string) (PrivateEndpointLifecycleStateEnum, bool) { + enum, ok := mappingPrivateEndpointLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint_collection.go new file mode 100644 index 00000000000..72bcaa4026a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrivateEndpointCollection Collection of private endpoints. +type PrivateEndpointCollection struct { + + // Array of private endpoint summaries. + Items []PrivateEndpointSummary `mandatory:"true" json:"items"` +} + +func (m PrivateEndpointCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrivateEndpointCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint_summary.go new file mode 100644 index 00000000000..4f871e18be6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/private_endpoint_summary.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrivateEndpointSummary PrivateEndpoint resource summary. +type PrivateEndpointSummary struct { + + // PrivateEndpoint identifier + Id *string `mandatory:"true" json:"id"` + + // Identifier of the compartment where private endpoint exists. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Identifier of the customer subnet against which private endpoint is created. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Identifier of the VCN in which subnet exists. + VcnId *string `mandatory:"true" json:"vcnId"` + + // Private endpoint display name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time the the private endpoint was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the private endpoint was last updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Lifecycle state of private endpoint. + LifecycleState PrivateEndpointLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // PrivateEndpoint description. + Description *string `mandatory:"false" json:"description"` + + // The OCIDs of the network security groups that the private endpoint belongs to. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Detailed message for the lifecycle state. + LifecycleStateDetails *string `mandatory:"false" json:"lifecycleStateDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m PrivateEndpointSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrivateEndpointSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPrivateEndpointLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPrivateEndpointLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/reinstate_proxy_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/reinstate_proxy_instance_request_response.go new file mode 100644 index 00000000000..1f76d44103d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/reinstate_proxy_instance_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ReinstateProxyInstanceRequest wrapper for the ReinstateProxyInstance operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ReinstateProxyInstance.go.html to see an example of how to use ReinstateProxyInstanceRequest. +type ReinstateProxyInstanceRequest struct { + + // Oracle Sharded Database PrivateEndpoint identifier + PrivateEndpointId *string `mandatory:"true" contributesTo:"path" name:"privateEndpointId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ReinstateProxyInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ReinstateProxyInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ReinstateProxyInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ReinstateProxyInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ReinstateProxyInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReinstateProxyInstanceResponse wrapper for the ReinstateProxyInstance operation +type ReinstateProxyInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ReinstateProxyInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ReinstateProxyInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/shardable_cloud_autonomous_vm_cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/shardable_cloud_autonomous_vm_cluster_summary.go new file mode 100644 index 00000000000..179f51f62cd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/shardable_cloud_autonomous_vm_cluster_summary.go @@ -0,0 +1,193 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShardableCloudAutonomousVmClusterSummary Shardable cloud autonomous vm cluster summary. +type ShardableCloudAutonomousVmClusterSummary struct { + + // Cloud autonomous vmcluster identifier + Id *string `mandatory:"true" json:"id"` + + // Cloud autonomous vmcluster compartment id + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Lifecycle states for shardable Cloud autonomous vm cluster. + LifecycleState ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Cloud autonomous vmcluster displayName + DisplayName *string `mandatory:"true" json:"displayName"` + + // Detailed message for the lifecycle state. + LifecycleStateDetails *string `mandatory:"false" json:"lifecycleStateDetails"` + + // The compute model of the Cloud Autonomous VM Cluster. + ComputeModel *string `mandatory:"false" json:"computeModel"` + + // The number of Autonomous Container Databases that can be created with the currently available local storage. + AvailableContainerDatabases *int `mandatory:"false" json:"availableContainerDatabases"` + + // CPU cores available for allocation to Autonomous Databases. + AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` + + // The name of the availability domain that the cloud Autonomous VM cluster is located in. + // The format of the availability domain is the same as returned by Cloud Autonomous VM Cluster API. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The data disk group size allocated for Autonomous Databases, in TBs. + AutonomousDataStorageSizeInTBs *float32 `mandatory:"false" json:"autonomousDataStorageSizeInTBs"` + + // The data disk group size available for Autonomous Databases, in TBs. + AvailableAutonomousDataStorageSizeInTBs *float32 `mandatory:"false" json:"availableAutonomousDataStorageSizeInTBs"` + + // Cloud Exadata Infrastructure Identifier. + CloudExadataInfrastructureId *string `mandatory:"false" json:"cloudExadataInfrastructureId"` + + // The time zone of the Cloud Autonomous VM Cluster. + ClusterTimeZone *string `mandatory:"false" json:"clusterTimeZone"` + + // The total number of Autonomous Container Databases that can be created with the allocated local storage. + TotalContainerDatabases *int `mandatory:"false" json:"totalContainerDatabases"` + + // Cloud autonomous vmcluster subnet id + SubnetId *string `mandatory:"false" json:"subnetId"` + + // Cloud autonomous vmcluster shape + Shape *string `mandatory:"false" json:"shape"` + + // Cloud autonomous vmcluster node count + NodeCount *int `mandatory:"false" json:"nodeCount"` + + // The Oracle license model that applies to the Oracle Autonomous Database. + LicenseModel *string `mandatory:"false" json:"licenseModel"` + + // The memory allocated in GBs. + MemorySizeInGBs *int `mandatory:"false" json:"memorySizeInGBs"` + + // The amount of memory (in GBs) enabled per OCPU or ECPU. + MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` + + // The number of CPU cores on the cloud Autonomous VM cluster. + CpuCoreCount *int `mandatory:"false" json:"cpuCoreCount"` + + // The number of CPU cores enabled per VM cluster node. + CpuCoreCountPerNode *int `mandatory:"false" json:"cpuCoreCountPerNode"` + + // The number of CPU cores on the cloud Autonomous VM cluster. + OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` + + // The CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` + + // Number of Autonomous Container Databases that can be created in the Autonomous VM Cluster + ProvisionableAutonomousContainerDatabases *int `mandatory:"false" json:"provisionableAutonomousContainerDatabases"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m ShardableCloudAutonomousVmClusterSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShardableCloudAutonomousVmClusterSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetShardableCloudAutonomousVmClusterSummaryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum Enum with underlying type: string +type ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum +const ( + ShardableCloudAutonomousVmClusterSummaryLifecycleStateActive ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "ACTIVE" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateFailed ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "FAILED" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateNeedsAttention ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "NEEDS_ATTENTION" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateInactive ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "INACTIVE" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateDeleting ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "DELETING" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateDeleted ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "DELETED" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateUpdating ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "UPDATING" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateCreating ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "CREATING" + ShardableCloudAutonomousVmClusterSummaryLifecycleStateUnavailable ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = "UNAVAILABLE" +) + +var mappingShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum = map[string]ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum{ + "ACTIVE": ShardableCloudAutonomousVmClusterSummaryLifecycleStateActive, + "FAILED": ShardableCloudAutonomousVmClusterSummaryLifecycleStateFailed, + "NEEDS_ATTENTION": ShardableCloudAutonomousVmClusterSummaryLifecycleStateNeedsAttention, + "INACTIVE": ShardableCloudAutonomousVmClusterSummaryLifecycleStateInactive, + "DELETING": ShardableCloudAutonomousVmClusterSummaryLifecycleStateDeleting, + "DELETED": ShardableCloudAutonomousVmClusterSummaryLifecycleStateDeleted, + "UPDATING": ShardableCloudAutonomousVmClusterSummaryLifecycleStateUpdating, + "CREATING": ShardableCloudAutonomousVmClusterSummaryLifecycleStateCreating, + "UNAVAILABLE": ShardableCloudAutonomousVmClusterSummaryLifecycleStateUnavailable, +} + +var mappingShardableCloudAutonomousVmClusterSummaryLifecycleStateEnumLowerCase = map[string]ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum{ + "active": ShardableCloudAutonomousVmClusterSummaryLifecycleStateActive, + "failed": ShardableCloudAutonomousVmClusterSummaryLifecycleStateFailed, + "needs_attention": ShardableCloudAutonomousVmClusterSummaryLifecycleStateNeedsAttention, + "inactive": ShardableCloudAutonomousVmClusterSummaryLifecycleStateInactive, + "deleting": ShardableCloudAutonomousVmClusterSummaryLifecycleStateDeleting, + "deleted": ShardableCloudAutonomousVmClusterSummaryLifecycleStateDeleted, + "updating": ShardableCloudAutonomousVmClusterSummaryLifecycleStateUpdating, + "creating": ShardableCloudAutonomousVmClusterSummaryLifecycleStateCreating, + "unavailable": ShardableCloudAutonomousVmClusterSummaryLifecycleStateUnavailable, +} + +// GetShardableCloudAutonomousVmClusterSummaryLifecycleStateEnumValues Enumerates the set of values for ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum +func GetShardableCloudAutonomousVmClusterSummaryLifecycleStateEnumValues() []ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum { + values := make([]ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum, 0) + for _, v := range mappingShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetShardableCloudAutonomousVmClusterSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum +func GetShardableCloudAutonomousVmClusterSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "FAILED", + "NEEDS_ATTENTION", + "INACTIVE", + "DELETING", + "DELETED", + "UPDATING", + "CREATING", + "UNAVAILABLE", + } +} + +// GetMappingShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum(val string) (ShardableCloudAutonomousVmClusterSummaryLifecycleStateEnum, bool) { + enum, ok := mappingShardableCloudAutonomousVmClusterSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/shardable_cloud_autonomous_vm_clusters.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/shardable_cloud_autonomous_vm_clusters.go new file mode 100644 index 00000000000..94e01de236f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/shardable_cloud_autonomous_vm_clusters.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShardableCloudAutonomousVmClusters Collection of shardable cloud autonomous vm clusters. +type ShardableCloudAutonomousVmClusters struct { + + // Array of shardable cloud autonomous vm clusters summaries. + Items []ShardableCloudAutonomousVmClusterSummary `mandatory:"true" json:"items"` +} + +func (m ShardableCloudAutonomousVmClusters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShardableCloudAutonomousVmClusters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database.go new file mode 100644 index 00000000000..733d0a46e85 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database.go @@ -0,0 +1,291 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShardedDatabase Sharded Database resource. +type ShardedDatabase interface { + + // Sharded Database identifier + GetId() *string + + // Identifier of the compartment in which sharded database exists. + GetCompartmentId() *string + + // Oracle sharded database display name. + GetDisplayName() *string + + // The time the the Sharded Database was created. An RFC3339 formatted datetime string + GetTimeCreated() *common.SDKTime + + // The time the Sharded Database was last updated. An RFC3339 formatted datetime string + GetTimeUpdated() *common.SDKTime + + // Lifecycle states for sharded databases. + GetLifecycleState() ShardedDatabaseLifecycleStateEnum + + // Detailed message for the lifecycle state. + GetLifecycleStateDetails() *string + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + GetSystemTags() map[string]map[string]interface{} +} + +type shardeddatabase struct { + JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + DisplayName *string `mandatory:"true" json:"displayName"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + LifecycleState ShardedDatabaseLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + LifecycleStateDetails *string `mandatory:"true" json:"lifecycleStateDetails"` + DbDeploymentType string `json:"dbDeploymentType"` +} + +// UnmarshalJSON unmarshals json +func (m *shardeddatabase) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalershardeddatabase shardeddatabase + s := struct { + Model Unmarshalershardeddatabase + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.CompartmentId = s.Model.CompartmentId + m.DisplayName = s.Model.DisplayName + m.TimeCreated = s.Model.TimeCreated + m.TimeUpdated = s.Model.TimeUpdated + m.LifecycleState = s.Model.LifecycleState + m.LifecycleStateDetails = s.Model.LifecycleStateDetails + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.SystemTags = s.Model.SystemTags + m.DbDeploymentType = s.Model.DbDeploymentType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *shardeddatabase) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.DbDeploymentType { + case "DEDICATED": + mm := DedicatedShardedDatabase{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ShardedDatabase: %s.", m.DbDeploymentType) + return *m, nil + } +} + +// GetFreeformTags returns FreeformTags +func (m shardeddatabase) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m shardeddatabase) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m shardeddatabase) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id +func (m shardeddatabase) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m shardeddatabase) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m shardeddatabase) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m shardeddatabase) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m shardeddatabase) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m shardeddatabase) GetLifecycleState() ShardedDatabaseLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleStateDetails returns LifecycleStateDetails +func (m shardeddatabase) GetLifecycleStateDetails() *string { + return m.LifecycleStateDetails +} + +func (m shardeddatabase) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m shardeddatabase) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingShardedDatabaseLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetShardedDatabaseLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ShardedDatabaseLifecycleStateEnum Enum with underlying type: string +type ShardedDatabaseLifecycleStateEnum string + +// Set of constants representing the allowable values for ShardedDatabaseLifecycleStateEnum +const ( + ShardedDatabaseLifecycleStateActive ShardedDatabaseLifecycleStateEnum = "ACTIVE" + ShardedDatabaseLifecycleStateFailed ShardedDatabaseLifecycleStateEnum = "FAILED" + ShardedDatabaseLifecycleStateNeedsAttention ShardedDatabaseLifecycleStateEnum = "NEEDS_ATTENTION" + ShardedDatabaseLifecycleStateInactive ShardedDatabaseLifecycleStateEnum = "INACTIVE" + ShardedDatabaseLifecycleStateDeleting ShardedDatabaseLifecycleStateEnum = "DELETING" + ShardedDatabaseLifecycleStateDeleted ShardedDatabaseLifecycleStateEnum = "DELETED" + ShardedDatabaseLifecycleStateUpdating ShardedDatabaseLifecycleStateEnum = "UPDATING" + ShardedDatabaseLifecycleStateCreating ShardedDatabaseLifecycleStateEnum = "CREATING" + ShardedDatabaseLifecycleStateUnavailable ShardedDatabaseLifecycleStateEnum = "UNAVAILABLE" +) + +var mappingShardedDatabaseLifecycleStateEnum = map[string]ShardedDatabaseLifecycleStateEnum{ + "ACTIVE": ShardedDatabaseLifecycleStateActive, + "FAILED": ShardedDatabaseLifecycleStateFailed, + "NEEDS_ATTENTION": ShardedDatabaseLifecycleStateNeedsAttention, + "INACTIVE": ShardedDatabaseLifecycleStateInactive, + "DELETING": ShardedDatabaseLifecycleStateDeleting, + "DELETED": ShardedDatabaseLifecycleStateDeleted, + "UPDATING": ShardedDatabaseLifecycleStateUpdating, + "CREATING": ShardedDatabaseLifecycleStateCreating, + "UNAVAILABLE": ShardedDatabaseLifecycleStateUnavailable, +} + +var mappingShardedDatabaseLifecycleStateEnumLowerCase = map[string]ShardedDatabaseLifecycleStateEnum{ + "active": ShardedDatabaseLifecycleStateActive, + "failed": ShardedDatabaseLifecycleStateFailed, + "needs_attention": ShardedDatabaseLifecycleStateNeedsAttention, + "inactive": ShardedDatabaseLifecycleStateInactive, + "deleting": ShardedDatabaseLifecycleStateDeleting, + "deleted": ShardedDatabaseLifecycleStateDeleted, + "updating": ShardedDatabaseLifecycleStateUpdating, + "creating": ShardedDatabaseLifecycleStateCreating, + "unavailable": ShardedDatabaseLifecycleStateUnavailable, +} + +// GetShardedDatabaseLifecycleStateEnumValues Enumerates the set of values for ShardedDatabaseLifecycleStateEnum +func GetShardedDatabaseLifecycleStateEnumValues() []ShardedDatabaseLifecycleStateEnum { + values := make([]ShardedDatabaseLifecycleStateEnum, 0) + for _, v := range mappingShardedDatabaseLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetShardedDatabaseLifecycleStateEnumStringValues Enumerates the set of values in String for ShardedDatabaseLifecycleStateEnum +func GetShardedDatabaseLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "FAILED", + "NEEDS_ATTENTION", + "INACTIVE", + "DELETING", + "DELETED", + "UPDATING", + "CREATING", + "UNAVAILABLE", + } +} + +// GetMappingShardedDatabaseLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShardedDatabaseLifecycleStateEnum(val string) (ShardedDatabaseLifecycleStateEnum, bool) { + enum, ok := mappingShardedDatabaseLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ShardedDatabaseDbDeploymentTypeEnum Enum with underlying type: string +type ShardedDatabaseDbDeploymentTypeEnum string + +// Set of constants representing the allowable values for ShardedDatabaseDbDeploymentTypeEnum +const ( + ShardedDatabaseDbDeploymentTypeDedicated ShardedDatabaseDbDeploymentTypeEnum = "DEDICATED" +) + +var mappingShardedDatabaseDbDeploymentTypeEnum = map[string]ShardedDatabaseDbDeploymentTypeEnum{ + "DEDICATED": ShardedDatabaseDbDeploymentTypeDedicated, +} + +var mappingShardedDatabaseDbDeploymentTypeEnumLowerCase = map[string]ShardedDatabaseDbDeploymentTypeEnum{ + "dedicated": ShardedDatabaseDbDeploymentTypeDedicated, +} + +// GetShardedDatabaseDbDeploymentTypeEnumValues Enumerates the set of values for ShardedDatabaseDbDeploymentTypeEnum +func GetShardedDatabaseDbDeploymentTypeEnumValues() []ShardedDatabaseDbDeploymentTypeEnum { + values := make([]ShardedDatabaseDbDeploymentTypeEnum, 0) + for _, v := range mappingShardedDatabaseDbDeploymentTypeEnum { + values = append(values, v) + } + return values +} + +// GetShardedDatabaseDbDeploymentTypeEnumStringValues Enumerates the set of values in String for ShardedDatabaseDbDeploymentTypeEnum +func GetShardedDatabaseDbDeploymentTypeEnumStringValues() []string { + return []string{ + "DEDICATED", + } +} + +// GetMappingShardedDatabaseDbDeploymentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShardedDatabaseDbDeploymentTypeEnum(val string) (ShardedDatabaseDbDeploymentTypeEnum, bool) { + enum, ok := mappingShardedDatabaseDbDeploymentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database_collection.go new file mode 100644 index 00000000000..b9a29d0ec6b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database_collection.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShardedDatabaseCollection Collection of sharded databases. +type ShardedDatabaseCollection struct { + + // Array of sharded databases summaries. + Items []ShardedDatabaseSummary `mandatory:"true" json:"items"` +} + +func (m ShardedDatabaseCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShardedDatabaseCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ShardedDatabaseCollection) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []shardeddatabasesummary `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]ShardedDatabaseSummary, len(model.Items)) + for i, n := range model.Items { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Items[i] = nn.(ShardedDatabaseSummary) + } else { + m.Items[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database_summary.go new file mode 100644 index 00000000000..8b324ab4c8f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sharded_database_summary.go @@ -0,0 +1,221 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShardedDatabaseSummary Sharded Database resource summary. +type ShardedDatabaseSummary interface { + + // Sharded Database identifier + GetId() *string + + // Identifier of the compartment where sharded database exists. + GetCompartmentId() *string + + // Oracle sharded database display name. + GetDisplayName() *string + + // The time the the Sharded Database was created. An RFC3339 formatted datetime string + GetTimeCreated() *common.SDKTime + + // The time the Sharded Database was last updated. An RFC3339 formatted datetime string + GetTimeUpdated() *common.SDKTime + + // Lifecycle state of sharded database. + GetLifecycleState() ShardedDatabaseLifecycleStateEnum + + // Detailed message for the lifecycle state. + GetLifecycleStateDetails() *string + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + GetSystemTags() map[string]map[string]interface{} +} + +type shardeddatabasesummary struct { + JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + DisplayName *string `mandatory:"true" json:"displayName"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + LifecycleState ShardedDatabaseLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + LifecycleStateDetails *string `mandatory:"true" json:"lifecycleStateDetails"` + DbDeploymentType string `json:"dbDeploymentType"` +} + +// UnmarshalJSON unmarshals json +func (m *shardeddatabasesummary) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalershardeddatabasesummary shardeddatabasesummary + s := struct { + Model Unmarshalershardeddatabasesummary + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.CompartmentId = s.Model.CompartmentId + m.DisplayName = s.Model.DisplayName + m.TimeCreated = s.Model.TimeCreated + m.TimeUpdated = s.Model.TimeUpdated + m.LifecycleState = s.Model.LifecycleState + m.LifecycleStateDetails = s.Model.LifecycleStateDetails + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.SystemTags = s.Model.SystemTags + m.DbDeploymentType = s.Model.DbDeploymentType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *shardeddatabasesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.DbDeploymentType { + case "DEDICATED": + mm := DedicatedShardedDatabaseSummary{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ShardedDatabaseSummary: %s.", m.DbDeploymentType) + return *m, nil + } +} + +// GetFreeformTags returns FreeformTags +func (m shardeddatabasesummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m shardeddatabasesummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m shardeddatabasesummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id +func (m shardeddatabasesummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m shardeddatabasesummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m shardeddatabasesummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m shardeddatabasesummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m shardeddatabasesummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m shardeddatabasesummary) GetLifecycleState() ShardedDatabaseLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleStateDetails returns LifecycleStateDetails +func (m shardeddatabasesummary) GetLifecycleStateDetails() *string { + return m.LifecycleStateDetails +} + +func (m shardeddatabasesummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m shardeddatabasesummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingShardedDatabaseLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetShardedDatabaseLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ShardedDatabaseSummaryDbDeploymentTypeEnum Enum with underlying type: string +type ShardedDatabaseSummaryDbDeploymentTypeEnum string + +// Set of constants representing the allowable values for ShardedDatabaseSummaryDbDeploymentTypeEnum +const ( + ShardedDatabaseSummaryDbDeploymentTypeDedicated ShardedDatabaseSummaryDbDeploymentTypeEnum = "DEDICATED" +) + +var mappingShardedDatabaseSummaryDbDeploymentTypeEnum = map[string]ShardedDatabaseSummaryDbDeploymentTypeEnum{ + "DEDICATED": ShardedDatabaseSummaryDbDeploymentTypeDedicated, +} + +var mappingShardedDatabaseSummaryDbDeploymentTypeEnumLowerCase = map[string]ShardedDatabaseSummaryDbDeploymentTypeEnum{ + "dedicated": ShardedDatabaseSummaryDbDeploymentTypeDedicated, +} + +// GetShardedDatabaseSummaryDbDeploymentTypeEnumValues Enumerates the set of values for ShardedDatabaseSummaryDbDeploymentTypeEnum +func GetShardedDatabaseSummaryDbDeploymentTypeEnumValues() []ShardedDatabaseSummaryDbDeploymentTypeEnum { + values := make([]ShardedDatabaseSummaryDbDeploymentTypeEnum, 0) + for _, v := range mappingShardedDatabaseSummaryDbDeploymentTypeEnum { + values = append(values, v) + } + return values +} + +// GetShardedDatabaseSummaryDbDeploymentTypeEnumStringValues Enumerates the set of values in String for ShardedDatabaseSummaryDbDeploymentTypeEnum +func GetShardedDatabaseSummaryDbDeploymentTypeEnumStringValues() []string { + return []string{ + "DEDICATED", + } +} + +// GetMappingShardedDatabaseSummaryDbDeploymentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingShardedDatabaseSummaryDbDeploymentTypeEnum(val string) (ShardedDatabaseSummaryDbDeploymentTypeEnum, bool) { + enum, ok := mappingShardedDatabaseSummaryDbDeploymentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sort_order.go new file mode 100644 index 00000000000..f1b94cea963 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/sort_order.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "strings" +) + +// SortOrderEnum Enum with underlying type: string +type SortOrderEnum string + +// Set of constants representing the allowable values for SortOrderEnum +const ( + SortOrderAsc SortOrderEnum = "ASC" + SortOrderDesc SortOrderEnum = "DESC" +) + +var mappingSortOrderEnum = map[string]SortOrderEnum{ + "ASC": SortOrderAsc, + "DESC": SortOrderDesc, +} + +var mappingSortOrderEnumLowerCase = map[string]SortOrderEnum{ + "asc": SortOrderAsc, + "desc": SortOrderDesc, +} + +// GetSortOrderEnumValues Enumerates the set of values for SortOrderEnum +func GetSortOrderEnumValues() []SortOrderEnum { + values := make([]SortOrderEnum, 0) + for _, v := range mappingSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSortOrderEnumStringValues Enumerates the set of values in String for SortOrderEnum +func GetSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSortOrderEnum(val string) (SortOrderEnum, bool) { + enum, ok := mappingSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/start_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/start_sharded_database_request_response.go new file mode 100644 index 00000000000..d9f575de8cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/start_sharded_database_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StartShardedDatabaseRequest wrapper for the StartShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/StartShardedDatabase.go.html to see an example of how to use StartShardedDatabaseRequest. +type StartShardedDatabaseRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request StartShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StartShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request StartShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StartShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request StartShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StartShardedDatabaseResponse wrapper for the StartShardedDatabase operation +type StartShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StartShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StartShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/stop_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/stop_sharded_database_request_response.go new file mode 100644 index 00000000000..91799b5a5db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/stop_sharded_database_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StopShardedDatabaseRequest wrapper for the StopShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/StopShardedDatabase.go.html to see an example of how to use StopShardedDatabaseRequest. +type StopShardedDatabaseRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request StopShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StopShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request StopShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StopShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request StopShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StopShardedDatabaseResponse wrapper for the StopShardedDatabase operation +type StopShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StopShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StopShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_private_endpoint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_private_endpoint_details.go new file mode 100644 index 00000000000..a6bef65cb50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_private_endpoint_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePrivateEndpointDetails The details of private endpoint to be updated. +type UpdatePrivateEndpointDetails struct { + + // Display name for PrivateEndpoint + DisplayName *string `mandatory:"false" json:"displayName"` + + // PrivateEndpoint description. + Description *string `mandatory:"false" json:"description"` + + // The OCIDs of the network security groups that the private endpoint belongs to. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdatePrivateEndpointDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePrivateEndpointDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_private_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_private_endpoint_request_response.go new file mode 100644 index 00000000000..db5ed0cf059 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_private_endpoint_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePrivateEndpointRequest wrapper for the UpdatePrivateEndpoint operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/UpdatePrivateEndpoint.go.html to see an example of how to use UpdatePrivateEndpointRequest. +type UpdatePrivateEndpointRequest struct { + + // Oracle Sharded Database PrivateEndpoint identifier + PrivateEndpointId *string `mandatory:"true" contributesTo:"path" name:"privateEndpointId"` + + // The configuration of private endpoint to be updated. + UpdatePrivateEndpointDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePrivateEndpointRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePrivateEndpointRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePrivateEndpointRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePrivateEndpointRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePrivateEndpointRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePrivateEndpointResponse wrapper for the UpdatePrivateEndpoint operation +type UpdatePrivateEndpointResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrivateEndpoint instance + PrivateEndpoint `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdatePrivateEndpointResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePrivateEndpointResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_sharded_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_sharded_database_details.go new file mode 100644 index 00000000000..aa253525f69 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_sharded_database_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateShardedDatabaseDetails The details of sharded database to be updated. +type UpdateShardedDatabaseDetails struct { + + // Display name of the sharded database. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateShardedDatabaseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateShardedDatabaseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_sharded_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_sharded_database_request_response.go new file mode 100644 index 00000000000..c21b3fd68c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/update_sharded_database_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateShardedDatabaseRequest wrapper for the UpdateShardedDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/UpdateShardedDatabase.go.html to see an example of how to use UpdateShardedDatabaseRequest. +type UpdateShardedDatabaseRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // The configuration of Sharded database to be updated. + UpdateShardedDatabaseDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateShardedDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateShardedDatabaseRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateShardedDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateShardedDatabaseRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateShardedDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateShardedDatabaseResponse wrapper for the UpdateShardedDatabase operation +type UpdateShardedDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ShardedDatabase instance + ShardedDatabase `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateShardedDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateShardedDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/upload_signed_certificate_and_generate_wallet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/upload_signed_certificate_and_generate_wallet_details.go new file mode 100644 index 00000000000..184804e3510 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/upload_signed_certificate_and_generate_wallet_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UploadSignedCertificateAndGenerateWalletDetails Details of the request to upload the CA signed certificates to GSMs and generate wallets for +// GSMs of the sharded database. +type UploadSignedCertificateAndGenerateWalletDetails struct { + + // The CA signed certificate key.. + CaSignedCertificate *string `mandatory:"true" json:"caSignedCertificate"` +} + +func (m UploadSignedCertificateAndGenerateWalletDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UploadSignedCertificateAndGenerateWalletDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/upload_signed_certificate_and_generate_wallet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/upload_signed_certificate_and_generate_wallet_request_response.go new file mode 100644 index 00000000000..98982e9e835 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/upload_signed_certificate_and_generate_wallet_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UploadSignedCertificateAndGenerateWalletRequest wrapper for the UploadSignedCertificateAndGenerateWallet operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/UploadSignedCertificateAndGenerateWallet.go.html to see an example of how to use UploadSignedCertificateAndGenerateWalletRequest. +type UploadSignedCertificateAndGenerateWalletRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // Details required to upload the CA signed certificates to GSM instances of sharded database and generate + // the wallets. + UploadSignedCertificateAndGenerateWalletDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UploadSignedCertificateAndGenerateWalletRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UploadSignedCertificateAndGenerateWalletRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UploadSignedCertificateAndGenerateWalletRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UploadSignedCertificateAndGenerateWalletRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UploadSignedCertificateAndGenerateWalletRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UploadSignedCertificateAndGenerateWalletResponse wrapper for the UploadSignedCertificateAndGenerateWallet operation +type UploadSignedCertificateAndGenerateWalletResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UploadSignedCertificateAndGenerateWalletResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UploadSignedCertificateAndGenerateWalletResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/validate_network_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/validate_network_request_response.go new file mode 100644 index 00000000000..699514f2c51 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/validate_network_request_response.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ValidateNetworkRequest wrapper for the ValidateNetwork operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/globallydistributeddatabase/ValidateNetwork.go.html to see an example of how to use ValidateNetworkRequest. +type ValidateNetworkRequest struct { + + // Sharded Database identifier + ShardedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"shardedDatabaseId"` + + // Determines the surrogates check. Default is true. + IsSurrogate *bool `mandatory:"false" contributesTo:"query" name:"isSurrogate"` + + // Specify the name of shard or catalog. + ResourceName *string `mandatory:"false" contributesTo:"query" name:"resourceName"` + + // Determines if the given resource name is for primary or not. + IsPrimary *bool `mandatory:"false" contributesTo:"query" name:"isPrimary"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ValidateNetworkRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ValidateNetworkRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ValidateNetworkRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ValidateNetworkRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ValidateNetworkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ValidateNetworkResponse wrapper for the ValidateNetwork operation +type ValidateNetworkResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ValidateNetworkResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ValidateNetworkResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request.go new file mode 100644 index 00000000000..a7722659e81 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequest A description of workrequest status +type WorkRequest struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that contains the work request. Work requests should be scoped to + // the same compartment as the resource the work request affects. If the work request affects multiple resources, + // and those resources are not in the same compartment, it is up to the service team to pick the primary + // resource whose compartment should be used + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_error.go new file mode 100644 index 00000000000..30b88578e50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_error.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestError An error encountered while executing a work request. +type WorkRequestError struct { + + // A machine-usable code for the error that occured. Error codes are listed on + // (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + Code *string `mandatory:"true" json:"code"` + + // A human readable description of the issue encountered. + Message *string `mandatory:"true" json:"message"` + + // The time the error occured. An RFC3339 formatted datetime string. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_error_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_error_collection.go new file mode 100644 index 00000000000..78ec7cecd61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_error_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestErrorCollection Results of a workRequestError search. Contains both WorkRequestError items and other information, such as metadata. +type WorkRequestErrorCollection struct { + + // List of workRequestError objects. + Items []WorkRequestError `mandatory:"true" json:"items"` +} + +func (m WorkRequestErrorCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestErrorCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_log_entry.go new file mode 100644 index 00000000000..e098cb20995 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_log_entry.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntry A log message from the execution of a work request. +type WorkRequestLogEntry struct { + + // Human-readable log message. + Message *string `mandatory:"true" json:"message"` + + // The time the log message was written. An RFC3339 formatted datetime string + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestLogEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_log_entry_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_log_entry_collection.go new file mode 100644 index 00000000000..a370d02df87 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_log_entry_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntryCollection Results of a workRequestLog search. Contains both workRequestLog items and other information, such as metadata. +type WorkRequestLogEntryCollection struct { + + // List of workRequestLogEntries. + Items []WorkRequestLogEntry `mandatory:"true" json:"items"` +} + +func (m WorkRequestLogEntryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_resource.go new file mode 100644 index 00000000000..747104a6bae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_resource.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestResource A resource created or operated on by a work request. +type WorkRequestResource struct { + + // The resource type the work request affects. + EntityType *string `mandatory:"true" json:"entityType"` + + // The way in which this resource is affected by the work tracked in the work request. + // A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + // work is complete for that resource at which point it will transition to CREATED, UPDATED, + // or DELETED, respectively. + ActionType ActionTypeEnum `mandatory:"true" json:"actionType"` + + // The identifier of the resource the work request affects. + Identifier *string `mandatory:"true" json:"identifier"` + + // The URI path that the user can do a GET on to access the resource metadata + EntityUri *string `mandatory:"false" json:"entityUri"` + + // Additional information that helps to explain the resource. + Metadata map[string]string `mandatory:"false" json:"metadata"` +} + +func (m WorkRequestResource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingActionTypeEnum(string(m.ActionType)); !ok && m.ActionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionType: %s. Supported values are: %s.", m.ActionType, strings.Join(GetActionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_resource_metadata_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_resource_metadata_key.go new file mode 100644 index 00000000000..1ba56b63488 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_resource_metadata_key.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "strings" +) + +// WorkRequestResourceMetadataKeyEnum Enum with underlying type: string +type WorkRequestResourceMetadataKeyEnum string + +// Set of constants representing the allowable values for WorkRequestResourceMetadataKeyEnum +const ( + WorkRequestResourceMetadataKeyIsDryRun WorkRequestResourceMetadataKeyEnum = "IS_DRY_RUN" +) + +var mappingWorkRequestResourceMetadataKeyEnum = map[string]WorkRequestResourceMetadataKeyEnum{ + "IS_DRY_RUN": WorkRequestResourceMetadataKeyIsDryRun, +} + +var mappingWorkRequestResourceMetadataKeyEnumLowerCase = map[string]WorkRequestResourceMetadataKeyEnum{ + "is_dry_run": WorkRequestResourceMetadataKeyIsDryRun, +} + +// GetWorkRequestResourceMetadataKeyEnumValues Enumerates the set of values for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumValues() []WorkRequestResourceMetadataKeyEnum { + values := make([]WorkRequestResourceMetadataKeyEnum, 0) + for _, v := range mappingWorkRequestResourceMetadataKeyEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestResourceMetadataKeyEnumStringValues Enumerates the set of values in String for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumStringValues() []string { + return []string{ + "IS_DRY_RUN", + } +} + +// GetMappingWorkRequestResourceMetadataKeyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestResourceMetadataKeyEnum(val string) (WorkRequestResourceMetadataKeyEnum, bool) { + enum, ok := mappingWorkRequestResourceMetadataKeyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_summary.go new file mode 100644 index 00000000000..1aefd814b92 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_summary.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummary A summary of the status of a work request. +type WorkRequestSummary struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that contains the work request. Work requests should be scoped to + // the same compartment as the resource the work request affects. If the work request affects multiple resources, + // and those resources are not in the same compartment, it is up to the service team to pick the primary + // resource whose compartment should be used + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_summary_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_summary_collection.go new file mode 100644 index 00000000000..a67ee57584c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase/work_request_summary_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Globally Distributed Database +// +// Use the Globally Distributed Database service APIs to create and manage distributed databases. +// + +package globallydistributeddatabase + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummaryCollection Results of a workRequest search. Contains both WorkRequest items and other information, such as metadata. +type WorkRequestSummaryCollection struct { + + // List of workRequestSummary objects. + Items []WorkRequestSummary `mandatory:"true" json:"items"` +} + +func (m WorkRequestSummaryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummaryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_database_insight_details.go index ca5b29da8b6..9ec4dd04c8a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_database_insight_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_database_insight_details.go @@ -69,6 +69,10 @@ func (m *createdatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in var err error switch m.EntitySource { + case "MDS_MYSQL_DATABASE_SYSTEM": + mm := CreateMdsMySqlDatabaseInsightDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "EM_MANAGED_EXTERNAL_DATABASE": mm := CreateEmManagedExternalDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_mds_my_sql_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_mds_my_sql_database_insight_details.go new file mode 100644 index 00000000000..c784b534134 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_mds_my_sql_database_insight_details.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateMdsMySqlDatabaseInsightDetails The information about database to be analyzed. +type CreateMdsMySqlDatabaseInsightDetails struct { + + // Compartment Identifier of database + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + DatabaseId *string `mandatory:"true" json:"databaseId"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +// GetCompartmentId returns CompartmentId +func (m CreateMdsMySqlDatabaseInsightDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetFreeformTags returns FreeformTags +func (m CreateMdsMySqlDatabaseInsightDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateMdsMySqlDatabaseInsightDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateMdsMySqlDatabaseInsightDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateMdsMySqlDatabaseInsightDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateMdsMySqlDatabaseInsightDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateMdsMySqlDatabaseInsightDetails CreateMdsMySqlDatabaseInsightDetails + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeCreateMdsMySqlDatabaseInsightDetails + }{ + "MDS_MYSQL_DATABASE_SYSTEM", + (MarshalTypeCreateMdsMySqlDatabaseInsightDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_configuration_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_configuration_summary.go index f58aa02306c..024b9a15f7d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_configuration_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_configuration_summary.go @@ -120,6 +120,10 @@ func (m *databaseconfigurationsummary) UnmarshalPolymorphicJSON(data []byte) (in mm := PeComanagedManagedExternalDatabaseConfigurationSummary{} err = json.Unmarshal(data, &mm) return mm, err + case "MDS_MYSQL_DATABASE_SYSTEM": + mm := MdsMysqlDatabaseConfigurationSummary{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for DatabaseConfigurationSummary: %s.", m.EntitySource) return *m, nil diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source.go index 2779a04919c..8420eb6944b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source.go @@ -22,16 +22,19 @@ type DatabaseEntitySourceEnum string const ( DatabaseEntitySourceEmManagedExternalDatabase DatabaseEntitySourceEnum = "EM_MANAGED_EXTERNAL_DATABASE" DatabaseEntitySourcePeComanagedDatabase DatabaseEntitySourceEnum = "PE_COMANAGED_DATABASE" + DatabaseEntitySourceMdsMysqlDatabaseSystem DatabaseEntitySourceEnum = "MDS_MYSQL_DATABASE_SYSTEM" ) var mappingDatabaseEntitySourceEnum = map[string]DatabaseEntitySourceEnum{ "EM_MANAGED_EXTERNAL_DATABASE": DatabaseEntitySourceEmManagedExternalDatabase, "PE_COMANAGED_DATABASE": DatabaseEntitySourcePeComanagedDatabase, + "MDS_MYSQL_DATABASE_SYSTEM": DatabaseEntitySourceMdsMysqlDatabaseSystem, } var mappingDatabaseEntitySourceEnumLowerCase = map[string]DatabaseEntitySourceEnum{ "em_managed_external_database": DatabaseEntitySourceEmManagedExternalDatabase, "pe_comanaged_database": DatabaseEntitySourcePeComanagedDatabase, + "mds_mysql_database_system": DatabaseEntitySourceMdsMysqlDatabaseSystem, } // GetDatabaseEntitySourceEnumValues Enumerates the set of values for DatabaseEntitySourceEnum @@ -48,6 +51,7 @@ func GetDatabaseEntitySourceEnumStringValues() []string { return []string{ "EM_MANAGED_EXTERNAL_DATABASE", "PE_COMANAGED_DATABASE", + "MDS_MYSQL_DATABASE_SYSTEM", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source_all.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source_all.go index 98bdad61df8..c6daebfa8b3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source_all.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_entity_source_all.go @@ -24,6 +24,7 @@ const ( DatabaseEntitySourceAllEmManagedExternalDatabase DatabaseEntitySourceAllEnum = "EM_MANAGED_EXTERNAL_DATABASE" DatabaseEntitySourceAllMacsManagedExternalDatabase DatabaseEntitySourceAllEnum = "MACS_MANAGED_EXTERNAL_DATABASE" DatabaseEntitySourceAllPeComanagedDatabase DatabaseEntitySourceAllEnum = "PE_COMANAGED_DATABASE" + DatabaseEntitySourceAllMdsMysqlDatabaseSystem DatabaseEntitySourceAllEnum = "MDS_MYSQL_DATABASE_SYSTEM" ) var mappingDatabaseEntitySourceAllEnum = map[string]DatabaseEntitySourceAllEnum{ @@ -31,6 +32,7 @@ var mappingDatabaseEntitySourceAllEnum = map[string]DatabaseEntitySourceAllEnum{ "EM_MANAGED_EXTERNAL_DATABASE": DatabaseEntitySourceAllEmManagedExternalDatabase, "MACS_MANAGED_EXTERNAL_DATABASE": DatabaseEntitySourceAllMacsManagedExternalDatabase, "PE_COMANAGED_DATABASE": DatabaseEntitySourceAllPeComanagedDatabase, + "MDS_MYSQL_DATABASE_SYSTEM": DatabaseEntitySourceAllMdsMysqlDatabaseSystem, } var mappingDatabaseEntitySourceAllEnumLowerCase = map[string]DatabaseEntitySourceAllEnum{ @@ -38,6 +40,7 @@ var mappingDatabaseEntitySourceAllEnumLowerCase = map[string]DatabaseEntitySourc "em_managed_external_database": DatabaseEntitySourceAllEmManagedExternalDatabase, "macs_managed_external_database": DatabaseEntitySourceAllMacsManagedExternalDatabase, "pe_comanaged_database": DatabaseEntitySourceAllPeComanagedDatabase, + "mds_mysql_database_system": DatabaseEntitySourceAllMdsMysqlDatabaseSystem, } // GetDatabaseEntitySourceAllEnumValues Enumerates the set of values for DatabaseEntitySourceAllEnum @@ -56,6 +59,7 @@ func GetDatabaseEntitySourceAllEnumStringValues() []string { "EM_MANAGED_EXTERNAL_DATABASE", "MACS_MANAGED_EXTERNAL_DATABASE", "PE_COMANAGED_DATABASE", + "MDS_MYSQL_DATABASE_SYSTEM", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight.go index 3e76c2dfd7e..4986ab73b60 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight.go @@ -141,6 +141,10 @@ func (m *databaseinsight) UnmarshalPolymorphicJSON(data []byte) (interface{}, er mm := AutonomousDatabaseInsight{} err = json.Unmarshal(data, &mm) return mm, err + case "MDS_MYSQL_DATABASE_SYSTEM": + mm := MdsMySqlDatabaseInsight{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for DatabaseInsight: %s.", m.EntitySource) return *m, nil diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight_summary.go index dc134666be5..e842a1d71ed 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/database_insight_summary.go @@ -153,6 +153,10 @@ func (m *databaseinsightsummary) UnmarshalPolymorphicJSON(data []byte) (interfac mm := AutonomousDatabaseInsightSummary{} err = json.Unmarshal(data, &mm) return mm, err + case "MDS_MYSQL_DATABASE_SYSTEM": + mm := MdsMySqlDatabaseInsightSummary{} + err = json.Unmarshal(data, &mm) + return mm, err case "PE_COMANAGED_DATABASE": mm := PeComanagedDatabaseInsightSummary{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_database_insight_details.go index 68d36aee4ee..b1cd6d66c77 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_database_insight_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_database_insight_details.go @@ -56,6 +56,10 @@ func (m *enabledatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in mm := EnableEmManagedExternalDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "MDS_MYSQL_DATABASE_SYSTEM": + mm := EnableMdsMySqlDatabaseInsightDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "PE_COMANAGED_DATABASE": mm := EnablePeComanagedDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_mds_my_sql_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_mds_my_sql_database_insight_details.go new file mode 100644 index 00000000000..85a43e009c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_mds_my_sql_database_insight_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnableMdsMySqlDatabaseInsightDetails The information about database to be analyzed. +type EnableMdsMySqlDatabaseInsightDetails struct { +} + +func (m EnableMdsMySqlDatabaseInsightDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnableMdsMySqlDatabaseInsightDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m EnableMdsMySqlDatabaseInsightDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEnableMdsMySqlDatabaseInsightDetails EnableMdsMySqlDatabaseInsightDetails + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeEnableMdsMySqlDatabaseInsightDetails + }{ + "MDS_MYSQL_DATABASE_SYSTEM", + (MarshalTypeEnableMdsMySqlDatabaseInsightDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_containers.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_containers.go new file mode 100644 index 00000000000..1346fe8e951 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_containers.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HostContainers Host Containers details +type HostContainers struct { + + // Collection timestamp + // Example: `"2020-05-06T00:00:00.000Z"` + TimeCollected *common.SDKTime `mandatory:"true" json:"timeCollected"` + + // Container Id (full) + ContainerId *string `mandatory:"false" json:"containerId"` + + // Container Name + ContainerName *string `mandatory:"false" json:"containerName"` + + // Container Image (may include tag version) + ContainerImage *string `mandatory:"false" json:"containerImage"` + + // Container open ports + ContainerPorts *string `mandatory:"false" json:"containerPorts"` +} + +// GetTimeCollected returns TimeCollected +func (m HostContainers) GetTimeCollected() *common.SDKTime { + return m.TimeCollected +} + +func (m HostContainers) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HostContainers) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HostContainers) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHostContainers HostContainers + s := struct { + DiscriminatorParam string `json:"metricName"` + MarshalTypeHostContainers + }{ + "HOST_CONTAINERS", + (MarshalTypeHostContainers)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_filesystem_usage.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_filesystem_usage.go index db7a0d8e3e7..95703010f3c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_filesystem_usage.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_filesystem_usage.go @@ -31,6 +31,8 @@ type HostFilesystemUsage struct { FileSystemUsageInGB *float64 `mandatory:"false" json:"fileSystemUsageInGB"` FileSystemAvailInPercent *float64 `mandatory:"false" json:"fileSystemAvailInPercent"` + + FileSystemAvailInGBs *float64 `mandatory:"false" json:"fileSystemAvailInGBs"` } // GetTimeCollected returns TimeCollected diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_io_usage.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_io_usage.go new file mode 100644 index 00000000000..3e1077ffb8c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_io_usage.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HostIoUsage Host IO Performance Metrics +type HostIoUsage struct { + + // Collection timestamp + // Example: `"2020-05-06T00:00:00.000Z"` + TimeCollected *common.SDKTime `mandatory:"true" json:"timeCollected"` + + // Mount point + MountPoint *string `mandatory:"false" json:"mountPoint"` + + // Bytes Read + DiskBytesRead *float64 `mandatory:"false" json:"diskBytesRead"` + + // Bytes Written + DiskBytesWritten *float64 `mandatory:"false" json:"diskBytesWritten"` + + // Read transactions per second + DiskIopsRead *float64 `mandatory:"false" json:"diskIopsRead"` + + // Write transactions per second + DiskIopsWritten *float64 `mandatory:"false" json:"diskIopsWritten"` + + // IO Transactions per second + DiskIops *float64 `mandatory:"false" json:"diskIops"` +} + +// GetTimeCollected returns TimeCollected +func (m HostIoUsage) GetTimeCollected() *common.SDKTime { + return m.TimeCollected +} + +func (m HostIoUsage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HostIoUsage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HostIoUsage) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHostIoUsage HostIoUsage + s := struct { + DiscriminatorParam string `json:"metricName"` + MarshalTypeHostIoUsage + }{ + "HOST_IO_USAGE", + (MarshalTypeHostIoUsage)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go index a6ef3b1b8eb..f5c40596ced 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go @@ -70,6 +70,10 @@ func (m *hostperformancemetricgroup) UnmarshalPolymorphicJSON(data []byte) (inte mm := HostCpuUsage{} err = json.Unmarshal(data, &mm) return mm, err + case "HOST_CONTAINERS": + mm := HostContainers{} + err = json.Unmarshal(data, &mm) + return mm, err case "HOST_GPU_USAGE": mm := HostGpuUsage{} err = json.Unmarshal(data, &mm) @@ -82,6 +86,10 @@ func (m *hostperformancemetricgroup) UnmarshalPolymorphicJSON(data []byte) (inte mm := HostFilesystemUsage{} err = json.Unmarshal(data, &mm) return mm, err + case "HOST_IO_USAGE": + mm := HostIoUsage{} + err = json.Unmarshal(data, &mm) + return mm, err case "HOST_NETWORK_ACTIVITY_SUMMARY": mm := HostNetworkActivitySummary{} err = json.Unmarshal(data, &mm) @@ -125,6 +133,8 @@ const ( HostPerformanceMetricGroupMetricNameFilesystemUsage HostPerformanceMetricGroupMetricNameEnum = "HOST_FILESYSTEM_USAGE" HostPerformanceMetricGroupMetricNameGpuUsage HostPerformanceMetricGroupMetricNameEnum = "HOST_GPU_USAGE" HostPerformanceMetricGroupMetricNameGpuProcesses HostPerformanceMetricGroupMetricNameEnum = "HOST_GPU_PROCESSES" + HostPerformanceMetricGroupMetricNameIoUsage HostPerformanceMetricGroupMetricNameEnum = "HOST_IO_USAGE" + HostPerformanceMetricGroupMetricNameContainers HostPerformanceMetricGroupMetricNameEnum = "HOST_CONTAINERS" ) var mappingHostPerformanceMetricGroupMetricNameEnum = map[string]HostPerformanceMetricGroupMetricNameEnum{ @@ -135,6 +145,8 @@ var mappingHostPerformanceMetricGroupMetricNameEnum = map[string]HostPerformance "HOST_FILESYSTEM_USAGE": HostPerformanceMetricGroupMetricNameFilesystemUsage, "HOST_GPU_USAGE": HostPerformanceMetricGroupMetricNameGpuUsage, "HOST_GPU_PROCESSES": HostPerformanceMetricGroupMetricNameGpuProcesses, + "HOST_IO_USAGE": HostPerformanceMetricGroupMetricNameIoUsage, + "HOST_CONTAINERS": HostPerformanceMetricGroupMetricNameContainers, } var mappingHostPerformanceMetricGroupMetricNameEnumLowerCase = map[string]HostPerformanceMetricGroupMetricNameEnum{ @@ -145,6 +157,8 @@ var mappingHostPerformanceMetricGroupMetricNameEnumLowerCase = map[string]HostPe "host_filesystem_usage": HostPerformanceMetricGroupMetricNameFilesystemUsage, "host_gpu_usage": HostPerformanceMetricGroupMetricNameGpuUsage, "host_gpu_processes": HostPerformanceMetricGroupMetricNameGpuProcesses, + "host_io_usage": HostPerformanceMetricGroupMetricNameIoUsage, + "host_containers": HostPerformanceMetricGroupMetricNameContainers, } // GetHostPerformanceMetricGroupMetricNameEnumValues Enumerates the set of values for HostPerformanceMetricGroupMetricNameEnum @@ -166,6 +180,8 @@ func GetHostPerformanceMetricGroupMetricNameEnumStringValues() []string { "HOST_FILESYSTEM_USAGE", "HOST_GPU_USAGE", "HOST_GPU_PROCESSES", + "HOST_IO_USAGE", + "HOST_CONTAINERS", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_top_processes.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_top_processes.go index 7bdd3159e6f..69833c17824 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_top_processes.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_top_processes.go @@ -58,6 +58,21 @@ type HostTopProcesses struct { // Container id if this process corresponds to a running container in the host ContainerId *string `mandatory:"false" json:"containerId"` + + // Bytes Read + DiskBytesRead *float64 `mandatory:"false" json:"diskBytesRead"` + + // Bytes Written + DiskBytesWritten *float64 `mandatory:"false" json:"diskBytesWritten"` + + // Read transactions per second + DiskIopsRead *float64 `mandatory:"false" json:"diskIopsRead"` + + // Write transactions per second + DiskIopsWritten *float64 `mandatory:"false" json:"diskIopsWritten"` + + // IO Transactions per second + DiskIops *float64 `mandatory:"false" json:"diskIops"` } // GetTimeCollected returns TimeCollected diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_details.go new file mode 100644 index 00000000000..867d96ae276 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IngestMySqlSqlStatsDetails Collection of MySql SQL Stats Metric Entries +type IngestMySqlSqlStatsDetails struct { + + // List of MySql SQL Stats Metric Entries. + Items []MySqlSqlStats `mandatory:"false" json:"items"` +} + +func (m IngestMySqlSqlStatsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IngestMySqlSqlStatsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_request_response.go new file mode 100644 index 00000000000..a167ed7cc56 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_request_response.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// IngestMySqlSqlStatsRequest wrapper for the IngestMySqlSqlStats operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/IngestMySqlSqlStats.go.html to see an example of how to use IngestMySqlSqlStatsRequest. +type IngestMySqlSqlStatsRequest struct { + + // Collection of MySql SQL stats objects for a particular database. + IngestMySqlSqlStatsDetails `contributesTo:"body"` + + // Optional OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId *string `mandatory:"false" contributesTo:"query" name:"databaseId"` + + // OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + // parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request that can be retried in case of a timeout or + // server error without risk of executing the same action again. Retry tokens expire after 24 + // hours. + // *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + // operations, such as a resource being deleted or purged from the system. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request IngestMySqlSqlStatsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request IngestMySqlSqlStatsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request IngestMySqlSqlStatsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request IngestMySqlSqlStatsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request IngestMySqlSqlStatsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IngestMySqlSqlStatsResponse wrapper for the IngestMySqlSqlStats operation +type IngestMySqlSqlStatsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IngestMySqlSqlStatsResponseDetails instance + IngestMySqlSqlStatsResponseDetails `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response IngestMySqlSqlStatsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response IngestMySqlSqlStatsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_response_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_response_details.go new file mode 100644 index 00000000000..3dc32df9ce4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_stats_response_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IngestMySqlSqlStatsResponseDetails The response object returned from IngestMySqlSqlStats operation. +type IngestMySqlSqlStatsResponseDetails struct { + + // Success message returned as a result of the upload. + Message *string `mandatory:"true" json:"message"` +} + +func (m IngestMySqlSqlStatsResponseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IngestMySqlSqlStatsResponseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_text_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_text_request_response.go new file mode 100644 index 00000000000..1e7b1e94060 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/ingest_my_sql_sql_text_request_response.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// IngestMySqlSqlTextRequest wrapper for the IngestMySqlSqlText operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/IngestMySqlSqlText.go.html to see an example of how to use IngestMySqlSqlTextRequest. +type IngestMySqlSqlTextRequest struct { + + // Collection of SQL text objects for a particular database. + IngestMySqlSqlTextDetails `contributesTo:"body"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Optional OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId *string `mandatory:"false" contributesTo:"query" name:"databaseId"` + + // OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + // parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request that can be retried in case of a timeout or + // server error without risk of executing the same action again. Retry tokens expire after 24 + // hours. + // *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + // operations, such as a resource being deleted or purged from the system. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request IngestMySqlSqlTextRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request IngestMySqlSqlTextRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request IngestMySqlSqlTextRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request IngestMySqlSqlTextRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request IngestMySqlSqlTextRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IngestMySqlSqlTextResponse wrapper for the IngestMySqlSqlText operation +type IngestMySqlSqlTextResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IngestMySqlSqlTextResponseDetails instance + IngestMySqlSqlTextResponseDetails `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response IngestMySqlSqlTextResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response IngestMySqlSqlTextResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_configurations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_configurations_request_response.go index 78bf5ce11e1..4536b2f5a28 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_configurations_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_configurations_request_response.go @@ -201,6 +201,7 @@ const ( ListDatabaseConfigurationsDatabaseTypeComanagedExacsCdb ListDatabaseConfigurationsDatabaseTypeEnum = "COMANAGED-EXACS-CDB" ListDatabaseConfigurationsDatabaseTypeComanagedExacsPdb ListDatabaseConfigurationsDatabaseTypeEnum = "COMANAGED-EXACS-PDB" ListDatabaseConfigurationsDatabaseTypeComanagedExacsNoncdb ListDatabaseConfigurationsDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + ListDatabaseConfigurationsDatabaseTypeMdsMysql ListDatabaseConfigurationsDatabaseTypeEnum = "MDS-MYSQL" ) var mappingListDatabaseConfigurationsDatabaseTypeEnum = map[string]ListDatabaseConfigurationsDatabaseTypeEnum{ @@ -219,6 +220,7 @@ var mappingListDatabaseConfigurationsDatabaseTypeEnum = map[string]ListDatabaseC "COMANAGED-EXACS-CDB": ListDatabaseConfigurationsDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": ListDatabaseConfigurationsDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": ListDatabaseConfigurationsDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": ListDatabaseConfigurationsDatabaseTypeMdsMysql, } var mappingListDatabaseConfigurationsDatabaseTypeEnumLowerCase = map[string]ListDatabaseConfigurationsDatabaseTypeEnum{ @@ -237,6 +239,7 @@ var mappingListDatabaseConfigurationsDatabaseTypeEnumLowerCase = map[string]List "comanaged-exacs-cdb": ListDatabaseConfigurationsDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": ListDatabaseConfigurationsDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": ListDatabaseConfigurationsDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": ListDatabaseConfigurationsDatabaseTypeMdsMysql, } // GetListDatabaseConfigurationsDatabaseTypeEnumValues Enumerates the set of values for ListDatabaseConfigurationsDatabaseTypeEnum @@ -266,6 +269,7 @@ func GetListDatabaseConfigurationsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_insights_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_insights_request_response.go index e9bfbb5b61d..ba3a18977e1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_insights_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/list_database_insights_request_response.go @@ -197,6 +197,7 @@ const ( ListDatabaseInsightsDatabaseTypeComanagedExacsCdb ListDatabaseInsightsDatabaseTypeEnum = "COMANAGED-EXACS-CDB" ListDatabaseInsightsDatabaseTypeComanagedExacsPdb ListDatabaseInsightsDatabaseTypeEnum = "COMANAGED-EXACS-PDB" ListDatabaseInsightsDatabaseTypeComanagedExacsNoncdb ListDatabaseInsightsDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + ListDatabaseInsightsDatabaseTypeMdsMysql ListDatabaseInsightsDatabaseTypeEnum = "MDS-MYSQL" ) var mappingListDatabaseInsightsDatabaseTypeEnum = map[string]ListDatabaseInsightsDatabaseTypeEnum{ @@ -215,6 +216,7 @@ var mappingListDatabaseInsightsDatabaseTypeEnum = map[string]ListDatabaseInsight "COMANAGED-EXACS-CDB": ListDatabaseInsightsDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": ListDatabaseInsightsDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": ListDatabaseInsightsDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": ListDatabaseInsightsDatabaseTypeMdsMysql, } var mappingListDatabaseInsightsDatabaseTypeEnumLowerCase = map[string]ListDatabaseInsightsDatabaseTypeEnum{ @@ -233,6 +235,7 @@ var mappingListDatabaseInsightsDatabaseTypeEnumLowerCase = map[string]ListDataba "comanaged-exacs-cdb": ListDatabaseInsightsDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": ListDatabaseInsightsDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": ListDatabaseInsightsDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": ListDatabaseInsightsDatabaseTypeMdsMysql, } // GetListDatabaseInsightsDatabaseTypeEnumValues Enumerates the set of values for ListDatabaseInsightsDatabaseTypeEnum @@ -262,6 +265,7 @@ func GetListDatabaseInsightsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_my_sql_database_insight.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_my_sql_database_insight.go new file mode 100644 index 00000000000..57fc83631df --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_my_sql_database_insight.go @@ -0,0 +1,196 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MdsMySqlDatabaseInsight Database insight resource. +type MdsMySqlDatabaseInsight struct { + + // Database insight identifier + Id *string `mandatory:"true" json:"id"` + + // Compartment identifier of the database + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // The time the the database insight was first enabled. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + DatabaseId *string `mandatory:"true" json:"databaseId"` + + // Name of database + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // OCI database resource type + DatabaseResourceType *string `mandatory:"true" json:"databaseResourceType"` + + // Ops Insights internal representation of the database type. + DatabaseType *string `mandatory:"false" json:"databaseType"` + + // The version of the database. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // Processor count. This is the OCPU count for Autonomous Database and CPU core count for other database types. + ProcessorCount *int `mandatory:"false" json:"processorCount"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The time the database insight was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // A message describing the status of the database connection of this resource. For example, it can be used to provide actionable information about the permission and content validity of the database connection. + DatabaseConnectionStatusDetails *string `mandatory:"false" json:"databaseConnectionStatusDetails"` + + // Display name of database + DatabaseDisplayName *string `mandatory:"false" json:"databaseDisplayName"` + + // Specifies if MYSQL DB System is highly available. + IsHighlyAvailable *bool `mandatory:"false" json:"isHighlyAvailable"` + + // Specifies if MYSQL DB System has heatwave cluster attached. + IsHeatWaveClusterAttached *bool `mandatory:"false" json:"isHeatWaveClusterAttached"` + + // Additional details of a db system in JSON format. + // For MySQL DB System, this is the DbSystem object serialized as a JSON string as defined in https://docs.oracle.com/en-us/iaas/api/#/en/mysql/20190415/DbSystem/. + DbAdditionalDetails *interface{} `mandatory:"false" json:"dbAdditionalDetails"` + + // Indicates the status of a database insight in Operations Insights + Status ResourceStatusEnum `mandatory:"true" json:"status"` + + // The current state of the database. + LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m MdsMySqlDatabaseInsight) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m MdsMySqlDatabaseInsight) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetStatus returns Status +func (m MdsMySqlDatabaseInsight) GetStatus() ResourceStatusEnum { + return m.Status +} + +// GetDatabaseType returns DatabaseType +func (m MdsMySqlDatabaseInsight) GetDatabaseType() *string { + return m.DatabaseType +} + +// GetDatabaseVersion returns DatabaseVersion +func (m MdsMySqlDatabaseInsight) GetDatabaseVersion() *string { + return m.DatabaseVersion +} + +// GetProcessorCount returns ProcessorCount +func (m MdsMySqlDatabaseInsight) GetProcessorCount() *int { + return m.ProcessorCount +} + +// GetFreeformTags returns FreeformTags +func (m MdsMySqlDatabaseInsight) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m MdsMySqlDatabaseInsight) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m MdsMySqlDatabaseInsight) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetTimeCreated returns TimeCreated +func (m MdsMySqlDatabaseInsight) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m MdsMySqlDatabaseInsight) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m MdsMySqlDatabaseInsight) GetLifecycleState() LifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m MdsMySqlDatabaseInsight) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails +func (m MdsMySqlDatabaseInsight) GetDatabaseConnectionStatusDetails() *string { + return m.DatabaseConnectionStatusDetails +} + +func (m MdsMySqlDatabaseInsight) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MdsMySqlDatabaseInsight) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingResourceStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetResourceStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m MdsMySqlDatabaseInsight) MarshalJSON() (buff []byte, e error) { + type MarshalTypeMdsMySqlDatabaseInsight MdsMySqlDatabaseInsight + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeMdsMySqlDatabaseInsight + }{ + "MDS_MYSQL_DATABASE_SYSTEM", + (MarshalTypeMdsMySqlDatabaseInsight)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_my_sql_database_insight_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_my_sql_database_insight_summary.go new file mode 100644 index 00000000000..d6133f6d70b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_my_sql_database_insight_summary.go @@ -0,0 +1,209 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MdsMySqlDatabaseInsightSummary Summary of a database insight resource. +type MdsMySqlDatabaseInsightSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + DatabaseId *string `mandatory:"true" json:"databaseId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The database name. The database name is unique within the tenancy. + DatabaseName *string `mandatory:"false" json:"databaseName"` + + // The user-friendly name for the database. The name does not have to be unique. + DatabaseDisplayName *string `mandatory:"false" json:"databaseDisplayName"` + + // Ops Insights internal representation of the database type. + DatabaseType *string `mandatory:"false" json:"databaseType"` + + // The version of the database. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // The hostnames for the database. + DatabaseHostNames []string `mandatory:"false" json:"databaseHostNames"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Processor count. This is the OCPU count for Autonomous Database and CPU core count for other database types. + ProcessorCount *int `mandatory:"false" json:"processorCount"` + + // The time the the database insight was first enabled. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time the database insight was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // A message describing the status of the database connection of this resource. For example, it can be used to provide actionable information about the permission and content validity of the database connection. + DatabaseConnectionStatusDetails *string `mandatory:"false" json:"databaseConnectionStatusDetails"` + + // OCI database resource type + DatabaseResourceType *string `mandatory:"false" json:"databaseResourceType"` + + // Indicates the status of a database insight in Operations Insights + Status ResourceStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The current state of the database. + LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +// GetId returns Id +func (m MdsMySqlDatabaseInsightSummary) GetId() *string { + return m.Id +} + +// GetDatabaseId returns DatabaseId +func (m MdsMySqlDatabaseInsightSummary) GetDatabaseId() *string { + return m.DatabaseId +} + +// GetCompartmentId returns CompartmentId +func (m MdsMySqlDatabaseInsightSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDatabaseName returns DatabaseName +func (m MdsMySqlDatabaseInsightSummary) GetDatabaseName() *string { + return m.DatabaseName +} + +// GetDatabaseDisplayName returns DatabaseDisplayName +func (m MdsMySqlDatabaseInsightSummary) GetDatabaseDisplayName() *string { + return m.DatabaseDisplayName +} + +// GetDatabaseType returns DatabaseType +func (m MdsMySqlDatabaseInsightSummary) GetDatabaseType() *string { + return m.DatabaseType +} + +// GetDatabaseVersion returns DatabaseVersion +func (m MdsMySqlDatabaseInsightSummary) GetDatabaseVersion() *string { + return m.DatabaseVersion +} + +// GetDatabaseHostNames returns DatabaseHostNames +func (m MdsMySqlDatabaseInsightSummary) GetDatabaseHostNames() []string { + return m.DatabaseHostNames +} + +// GetFreeformTags returns FreeformTags +func (m MdsMySqlDatabaseInsightSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m MdsMySqlDatabaseInsightSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m MdsMySqlDatabaseInsightSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetProcessorCount returns ProcessorCount +func (m MdsMySqlDatabaseInsightSummary) GetProcessorCount() *int { + return m.ProcessorCount +} + +// GetStatus returns Status +func (m MdsMySqlDatabaseInsightSummary) GetStatus() ResourceStatusEnum { + return m.Status +} + +// GetTimeCreated returns TimeCreated +func (m MdsMySqlDatabaseInsightSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m MdsMySqlDatabaseInsightSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m MdsMySqlDatabaseInsightSummary) GetLifecycleState() LifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m MdsMySqlDatabaseInsightSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails +func (m MdsMySqlDatabaseInsightSummary) GetDatabaseConnectionStatusDetails() *string { + return m.DatabaseConnectionStatusDetails +} + +func (m MdsMySqlDatabaseInsightSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MdsMySqlDatabaseInsightSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingResourceStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetResourceStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m MdsMySqlDatabaseInsightSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeMdsMySqlDatabaseInsightSummary MdsMySqlDatabaseInsightSummary + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeMdsMySqlDatabaseInsightSummary + }{ + "MDS_MYSQL_DATABASE_SYSTEM", + (MarshalTypeMdsMySqlDatabaseInsightSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_mysql_database_configuration_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_mysql_database_configuration_summary.go new file mode 100644 index 00000000000..1fcf9c6348e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/mds_mysql_database_configuration_summary.go @@ -0,0 +1,148 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MdsMysqlDatabaseConfigurationSummary Configuration Summary of a MDS MYSQL database. +type MdsMysqlDatabaseConfigurationSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + DatabaseInsightId *string `mandatory:"true" json:"databaseInsightId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The database name. The database name is unique within the tenancy. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The user-friendly name for the database. The name does not have to be unique. + DatabaseDisplayName *string `mandatory:"true" json:"databaseDisplayName"` + + // Ops Insights internal representation of the database type. + DatabaseType *string `mandatory:"true" json:"databaseType"` + + // The version of the database. + DatabaseVersion *string `mandatory:"true" json:"databaseVersion"` + + // Name of the CDB.Only applies to PDB. + CdbName *string `mandatory:"true" json:"cdbName"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. + DatabaseId *string `mandatory:"true" json:"databaseId"` + + // Specifies if MYSQL DB System has heatwave cluster attached. + IsHeatWaveClusterAttached *bool `mandatory:"true" json:"isHeatWaveClusterAttached"` + + // Specifies if MYSQL DB System is highly available. + IsHighlyAvailable *bool `mandatory:"true" json:"isHighlyAvailable"` + + // The shape of the primary instances of MYSQL DB system. The shape determines resources allocated to a DB System - CPU cores + // and memory for VM shapes; CPU cores, memory and storage for non-VM shapes. + ShapeName *string `mandatory:"true" json:"shapeName"` + + // Processor count. This is the OCPU count for Autonomous Database and CPU core count for other database types. + ProcessorCount *int `mandatory:"false" json:"processorCount"` +} + +// GetDatabaseInsightId returns DatabaseInsightId +func (m MdsMysqlDatabaseConfigurationSummary) GetDatabaseInsightId() *string { + return m.DatabaseInsightId +} + +// GetCompartmentId returns CompartmentId +func (m MdsMysqlDatabaseConfigurationSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDatabaseName returns DatabaseName +func (m MdsMysqlDatabaseConfigurationSummary) GetDatabaseName() *string { + return m.DatabaseName +} + +// GetDatabaseDisplayName returns DatabaseDisplayName +func (m MdsMysqlDatabaseConfigurationSummary) GetDatabaseDisplayName() *string { + return m.DatabaseDisplayName +} + +// GetDatabaseType returns DatabaseType +func (m MdsMysqlDatabaseConfigurationSummary) GetDatabaseType() *string { + return m.DatabaseType +} + +// GetDatabaseVersion returns DatabaseVersion +func (m MdsMysqlDatabaseConfigurationSummary) GetDatabaseVersion() *string { + return m.DatabaseVersion +} + +// GetCdbName returns CdbName +func (m MdsMysqlDatabaseConfigurationSummary) GetCdbName() *string { + return m.CdbName +} + +// GetDefinedTags returns DefinedTags +func (m MdsMysqlDatabaseConfigurationSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetFreeformTags returns FreeformTags +func (m MdsMysqlDatabaseConfigurationSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetProcessorCount returns ProcessorCount +func (m MdsMysqlDatabaseConfigurationSummary) GetProcessorCount() *int { + return m.ProcessorCount +} + +func (m MdsMysqlDatabaseConfigurationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MdsMysqlDatabaseConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m MdsMysqlDatabaseConfigurationSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeMdsMysqlDatabaseConfigurationSummary MdsMysqlDatabaseConfigurationSummary + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeMdsMysqlDatabaseConfigurationSummary + }{ + "MDS_MYSQL_DATABASE_SYSTEM", + (MarshalTypeMdsMysqlDatabaseConfigurationSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/my_sql_sql_stats.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/my_sql_sql_stats.go new file mode 100644 index 00000000000..093a3820a73 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/my_sql_sql_stats.go @@ -0,0 +1,142 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MySqlSqlStats MySql Sql Stats type object. +type MySqlSqlStats struct { + + // Unique SQL ID Digest for a MySql Statement. + // Example: `"c20fcea11911be36651b7ca7bd3712d4ed9ac1134cee9c6620039e1fb13b5eff"` + Digest *string `mandatory:"true" json:"digest"` + + // Collection timestamp. + // Example: `"2020-03-31T00:00:00.000Z"` + TimeCollected *common.SDKTime `mandatory:"true" json:"timeCollected"` + + // Type of statement such as select, update or delete. + CommandType *string `mandatory:"false" json:"commandType"` + + // Total number of SQL statements used in collection ranking calculation. + TotalRows *int64 `mandatory:"false" json:"totalRows"` + + // Percent of SQL statements in the perf schema table relative to max or overflow count set in @@GLOBAL.performance_schema_digests_size. + PerfSchemaUsedPercent *int64 `mandatory:"false" json:"perfSchemaUsedPercent"` + + // Name of Database Schema. + // Example: `"performance_schema"` + SchemaName *string `mandatory:"false" json:"schemaName"` + + // The total number of times the statement has executed. + ExecCount *int64 `mandatory:"false" json:"execCount"` + + // The total wait time (in picoseconds) of timed occurrences of the statement. + TotalLatencyInPs *int64 `mandatory:"false" json:"totalLatencyInPs"` + + // The total time waiting (in picoseconds) for locks by timed occurrences of the statement. + LockLatencyInPs *int64 `mandatory:"false" json:"lockLatencyInPs"` + + // The total number of errors produced by occurrences of the statement. + ErrCount *int64 `mandatory:"false" json:"errCount"` + + // The total number of warnings produced by occurrences of the statement. + WarnCount *int64 `mandatory:"false" json:"warnCount"` + + // The total number of rows affected by occurrences of the statement. + RowsAffected *int64 `mandatory:"false" json:"rowsAffected"` + + // The total number of rows returned by occurrences of the statement. + RowsSent *int64 `mandatory:"false" json:"rowsSent"` + + // The total number of rows read from storage engines by occurrences of the statement. + RowsExamined *int64 `mandatory:"false" json:"rowsExamined"` + + // The total number of internal on-disk temporary tables created by occurrences of the statement. + TmpDiskTables *int64 `mandatory:"false" json:"tmpDiskTables"` + + // The total number of internal in-memory temporary tables created by occurrences of the statement Count + TmpTables *int64 `mandatory:"false" json:"tmpTables"` + + // The total number of joins that perform table scans because they do not use indexes by occurrences of the statement. If this value is not 0 + SelectFullJoin *int64 `mandatory:"false" json:"selectFullJoin"` + + // The total number of joins that used a range search on a reference table by occurrences of the statement + SelectFullRangeJoin *int64 `mandatory:"false" json:"selectFullRangeJoin"` + + // The total number of joins that used ranges on the first table by occurrences of the statement. This is normally not a critical issue even if the value is quite large. Count + SelectRange *int64 `mandatory:"false" json:"selectRange"` + + // The total number of joins without keys that check for key usage after each row by occurrences of the statement. If this is not 0 + SelectRangeCheck *int64 `mandatory:"false" json:"selectRangeCheck"` + + // The total number of joins that did a full scan of the first table by occurrences of the statement Count + SelectScan *int64 `mandatory:"false" json:"selectScan"` + + // The total number of sort merge passes by occurrences of the statement. + SortMergePasses *int64 `mandatory:"false" json:"sortMergePasses"` + + // The total number of sorts that were done using ranges by occurrences of the statement. + SortRange *int64 `mandatory:"false" json:"sortRange"` + + // The total number of rows sorted by occurrences of the statement. + RowsSorted *int64 `mandatory:"false" json:"rowsSorted"` + + // The total number of sorts that were done by scanning the table by occurrences of the statement. + SortScan *int64 `mandatory:"false" json:"sortScan"` + + // The number of occurences of the statement which performed a table scan without using an index Count + NoIndexUsedCount *int64 `mandatory:"false" json:"noIndexUsedCount"` + + // The number of occurences of the statement where the server found no good index to use Count + NoGoodIndexUsedCount *int64 `mandatory:"false" json:"noGoodIndexUsedCount"` + + // The total time spent on CPU (in picoseconds) for the current thread. + CpuLatencyInPs *int64 `mandatory:"false" json:"cpuLatencyInPs"` + + // The maximum amount of controlled memory (in bytes) used by the statement. + MaxControlledMemoryInBytes *int64 `mandatory:"false" json:"maxControlledMemoryInBytes"` + + // The maximum amount of memory (in bytes) used by the statement. + MaxTotalMemoryInBytes *int64 `mandatory:"false" json:"maxTotalMemoryInBytes"` + + // The total number of times a query was processed on the secondary engine (HEATWAVE) for occurrences of this statement Count. + ExecCountSecondary *int64 `mandatory:"false" json:"execCountSecondary"` + + // The time at which statement was first seen. + // Example: `"2023-01-16 08:04:31.533577"` + TimeFirstSeen *common.SDKTime `mandatory:"false" json:"timeFirstSeen"` + + // The time at which statement was most recently seen for all occurrences of the statement. + // Example: `"2023-01-30 02:17:08.067961"` + TimeLastSeen *common.SDKTime `mandatory:"false" json:"timeLastSeen"` +} + +func (m MySqlSqlStats) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MySqlSqlStats) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go index 1222ad04688..c5c291decb3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go @@ -4233,6 +4233,135 @@ func (client OperationsInsightsClient) ingestHostMetrics(ctx context.Context, re return response, err } +// IngestMySqlSqlStats The MySql SQL Stats endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. +// Either databaseId or id must be specified. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/IngestMySqlSqlStats.go.html to see an example of how to use IngestMySqlSqlStats API. +// A default retry strategy applies to this operation IngestMySqlSqlStats() +func (client OperationsInsightsClient) IngestMySqlSqlStats(ctx context.Context, request IngestMySqlSqlStatsRequest) (response IngestMySqlSqlStatsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.ingestMySqlSqlStats, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = IngestMySqlSqlStatsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = IngestMySqlSqlStatsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(IngestMySqlSqlStatsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into IngestMySqlSqlStatsResponse") + } + return +} + +// ingestMySqlSqlStats implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) ingestMySqlSqlStats(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databaseInsights/actions/ingestMySqlSqlStatsMetric", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response IngestMySqlSqlStatsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestMySqlSqlStats" + err = common.PostProcessServiceError(err, "OperationsInsights", "IngestMySqlSqlStats", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// IngestMySqlSqlText The SqlText endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. +// Either databaseId or id must be specified. +// Disclaimer: SQL text being uploaded explicitly via APIs is already masked. All sensitive literals contained in the sqlFullText column are masked prior to ingestion. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/IngestMySqlSqlText.go.html to see an example of how to use IngestMySqlSqlText API. +// A default retry strategy applies to this operation IngestMySqlSqlText() +func (client OperationsInsightsClient) IngestMySqlSqlText(ctx context.Context, request IngestMySqlSqlTextRequest) (response IngestMySqlSqlTextResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.ingestMySqlSqlText, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = IngestMySqlSqlTextResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = IngestMySqlSqlTextResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(IngestMySqlSqlTextResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into IngestMySqlSqlTextResponse") + } + return +} + +// ingestMySqlSqlText implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) ingestMySqlSqlText(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databaseInsights/actions/ingestMySqlSqlText", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response IngestMySqlSqlTextResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestMySqlSqlText" + err = common.PostProcessServiceError(err, "OperationsInsights", "IngestMySqlSqlText", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // IngestSqlBucket The sqlbucket endpoint takes in a JSON payload, persists it in Ops Insights ingest pipeline. // Either databaseId or id must be specified. // diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/resource_statistics.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/resource_statistics.go index be25f4dc0f2..d2af25f916b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/resource_statistics.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/resource_statistics.go @@ -43,6 +43,12 @@ type ResourceStatistics struct { // The maximum host CPUs (cores x threads/core) on the underlying infrastructure. This only applies to CPU and does not not apply for Autonomous Databases. TotalHostCapacity *float64 `mandatory:"false" json:"totalHostCapacity"` + + // Specifies if MYSQL DB System has heatwave cluster attached. + IsHeatWaveClusterAttached *bool `mandatory:"false" json:"isHeatWaveClusterAttached"` + + // Specifies if MYSQL DB System is highly available. + IsHighlyAvailable *bool `mandatory:"false" json:"isHighlyAvailable"` } func (m ResourceStatistics) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_capacity_trend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_capacity_trend_request_response.go index 275451dd563..05750dc5447 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_capacity_trend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_capacity_trend_request_response.go @@ -235,6 +235,7 @@ const ( SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsCdb SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsPdb SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsNoncdb SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum{ @@ -253,6 +254,7 @@ var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = map[s "COMANAGED-EXACS-CDB": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeMdsMysql, } var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum{ @@ -271,6 +273,7 @@ var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumLowerCas "comanaged-exacs-cdb": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeMdsMysql, } // GetSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum @@ -300,6 +303,7 @@ func GetSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumStringValue "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_forecast_trend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_forecast_trend_request_response.go index f2cffca033d..2ea50f9c9a4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_forecast_trend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_forecast_trend_request_response.go @@ -249,6 +249,7 @@ const ( SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsCdb SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsPdb SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsNoncdb SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum{ @@ -267,6 +268,7 @@ var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = map[s "COMANAGED-EXACS-CDB": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeMdsMysql, } var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum{ @@ -285,6 +287,7 @@ var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumLowerCas "comanaged-exacs-cdb": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeMdsMysql, } // GetSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum @@ -314,6 +317,7 @@ func GetSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumStringValue "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_statistics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_statistics_request_response.go index 29676b64a3d..28f7d5ea99f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_statistics_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_statistics_request_response.go @@ -240,6 +240,7 @@ const ( SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsCdb SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsPdb SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsNoncdb SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeDatabaseInsightResourceStatisticsDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum{ @@ -258,6 +259,7 @@ var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = map[stri "COMANAGED-EXACS-CDB": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeMdsMysql, } var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum{ @@ -276,6 +278,7 @@ var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumLowerCase = "comanaged-exacs-cdb": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeMdsMysql, } // GetSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum @@ -305,6 +308,7 @@ func GetSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumStringValues() "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_request_response.go index 887d29fc493..c3b9b47a542 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_request_response.go @@ -207,6 +207,7 @@ const ( SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsCdb SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsPdb SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsNoncdb SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeDatabaseInsightResourceUsageDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum{ @@ -225,6 +226,7 @@ var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = map[string]Su "COMANAGED-EXACS-CDB": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeDatabaseInsightResourceUsageDatabaseTypeMdsMysql, } var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum{ @@ -243,6 +245,7 @@ var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumLowerCase = map[ "comanaged-exacs-cdb": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeDatabaseInsightResourceUsageDatabaseTypeMdsMysql, } // GetSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum @@ -272,6 +275,7 @@ func GetSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumStringValues() []st "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_trend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_trend_request_response.go index 6022a4cfc35..53969aab55a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_trend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_usage_trend_request_response.go @@ -216,6 +216,7 @@ const ( SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsCdb SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsPdb SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsNoncdb SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum{ @@ -234,6 +235,7 @@ var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = map[stri "COMANAGED-EXACS-CDB": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeMdsMysql, } var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum{ @@ -252,6 +254,7 @@ var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumLowerCase = "comanaged-exacs-cdb": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeMdsMysql, } // GetSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum @@ -281,6 +284,7 @@ func GetSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumStringValues() "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_utilization_insight_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_utilization_insight_request_response.go index df81866cd2c..4e719bb7383 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_utilization_insight_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_database_insight_resource_utilization_insight_request_response.go @@ -213,6 +213,7 @@ const ( SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsCdb SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsPdb SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsNoncdb SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum{ @@ -231,6 +232,7 @@ var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "COMANAGED-EXACS-CDB": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeMdsMysql, } var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum{ @@ -249,6 +251,7 @@ var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumLow "comanaged-exacs-cdb": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeMdsMysql, } // GetSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum @@ -278,6 +281,7 @@ func GetSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumString "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go index c0692129e9b..f0595338b8c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go @@ -105,27 +105,33 @@ type SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum string // Set of constants representing the allowable values for SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum const ( - SummarizeHostInsightHostRecommendationAggregationResourceMetricCpu SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "CPU" - SummarizeHostInsightHostRecommendationAggregationResourceMetricMemory SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "MEMORY" - SummarizeHostInsightHostRecommendationAggregationResourceMetricLogicalMemory SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "LOGICAL_MEMORY" - SummarizeHostInsightHostRecommendationAggregationResourceMetricStorage SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "STORAGE" - SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightHostRecommendationAggregationResourceMetricCpu SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "CPU" + SummarizeHostInsightHostRecommendationAggregationResourceMetricMemory SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "MEMORY" + SummarizeHostInsightHostRecommendationAggregationResourceMetricLogicalMemory SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "LOGICAL_MEMORY" + SummarizeHostInsightHostRecommendationAggregationResourceMetricStorage SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "STORAGE" + SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuUtilization SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "GPU_UTILIZATION" + SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" ) var mappingSummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = map[string]SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum{ - "CPU": SummarizeHostInsightHostRecommendationAggregationResourceMetricCpu, - "MEMORY": SummarizeHostInsightHostRecommendationAggregationResourceMetricMemory, - "LOGICAL_MEMORY": SummarizeHostInsightHostRecommendationAggregationResourceMetricLogicalMemory, - "STORAGE": SummarizeHostInsightHostRecommendationAggregationResourceMetricStorage, - "NETWORK": SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork, + "CPU": SummarizeHostInsightHostRecommendationAggregationResourceMetricCpu, + "MEMORY": SummarizeHostInsightHostRecommendationAggregationResourceMetricMemory, + "LOGICAL_MEMORY": SummarizeHostInsightHostRecommendationAggregationResourceMetricLogicalMemory, + "STORAGE": SummarizeHostInsightHostRecommendationAggregationResourceMetricStorage, + "NETWORK": SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork, + "GPU_UTILIZATION": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuUtilization, + "GPU_MEMORY_USAGE": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuMemoryUsage, } var mappingSummarizeHostInsightHostRecommendationAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum{ - "cpu": SummarizeHostInsightHostRecommendationAggregationResourceMetricCpu, - "memory": SummarizeHostInsightHostRecommendationAggregationResourceMetricMemory, - "logical_memory": SummarizeHostInsightHostRecommendationAggregationResourceMetricLogicalMemory, - "storage": SummarizeHostInsightHostRecommendationAggregationResourceMetricStorage, - "network": SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork, + "cpu": SummarizeHostInsightHostRecommendationAggregationResourceMetricCpu, + "memory": SummarizeHostInsightHostRecommendationAggregationResourceMetricMemory, + "logical_memory": SummarizeHostInsightHostRecommendationAggregationResourceMetricLogicalMemory, + "storage": SummarizeHostInsightHostRecommendationAggregationResourceMetricStorage, + "network": SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork, + "gpu_utilization": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuUtilization, + "gpu_memory_usage": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuMemoryUsage, } // GetSummarizeHostInsightHostRecommendationAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum @@ -145,6 +151,8 @@ func GetSummarizeHostInsightHostRecommendationAggregationResourceMetricEnumStrin "LOGICAL_MEMORY", "STORAGE", "NETWORK", + "GPU_UTILIZATION", + "GPU_MEMORY_USAGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go index 8e7d816cc6a..dc65e64c31c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go @@ -72,27 +72,33 @@ type SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetri // Set of constants representing the allowable values for SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum const ( - SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricCpu SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "CPU" - SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricMemory SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "MEMORY" - SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricLogicalMemory SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "LOGICAL_MEMORY" - SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricStorage SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "STORAGE" - SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricCpu SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "CPU" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricMemory SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "MEMORY" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricLogicalMemory SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "LOGICAL_MEMORY" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricStorage SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "STORAGE" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuUtilization SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "GPU_UTILIZATION" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuMemoryUsage SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "GPU_MEMORY_USAGE" ) var mappingSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = map[string]SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum{ - "CPU": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricCpu, - "MEMORY": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricMemory, - "LOGICAL_MEMORY": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricLogicalMemory, - "STORAGE": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricStorage, - "NETWORK": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork, + "CPU": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricCpu, + "MEMORY": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricMemory, + "LOGICAL_MEMORY": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricLogicalMemory, + "STORAGE": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricStorage, + "NETWORK": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork, + "GPU_UTILIZATION": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuUtilization, + "GPU_MEMORY_USAGE": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuMemoryUsage, } var mappingSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum{ - "cpu": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricCpu, - "memory": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricMemory, - "logical_memory": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricLogicalMemory, - "storage": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricStorage, - "network": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork, + "cpu": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricCpu, + "memory": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricMemory, + "logical_memory": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricLogicalMemory, + "storage": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricStorage, + "network": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork, + "gpu_utilization": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuUtilization, + "gpu_memory_usage": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuMemoryUsage, } // GetSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum @@ -112,6 +118,8 @@ func GetSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMe "LOGICAL_MEMORY", "STORAGE", "NETWORK", + "GPU_UTILIZATION", + "GPU_MEMORY_USAGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go index b0b63d3c9b0..ed660a5438c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go @@ -81,27 +81,33 @@ type SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum stri // Set of constants representing the allowable values for SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum const ( - SummarizeHostInsightResourceForecastTrendAggregationResourceMetricCpu SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "CPU" - SummarizeHostInsightResourceForecastTrendAggregationResourceMetricMemory SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "MEMORY" - SummarizeHostInsightResourceForecastTrendAggregationResourceMetricLogicalMemory SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "LOGICAL_MEMORY" - SummarizeHostInsightResourceForecastTrendAggregationResourceMetricStorage SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "STORAGE" - SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricCpu SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "CPU" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricMemory SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "MEMORY" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricLogicalMemory SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "LOGICAL_MEMORY" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricStorage SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "STORAGE" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuUtilization SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "GPU_UTILIZATION" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" ) var mappingSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = map[string]SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum{ - "CPU": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricCpu, - "MEMORY": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricMemory, - "LOGICAL_MEMORY": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricLogicalMemory, - "STORAGE": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricStorage, - "NETWORK": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork, + "CPU": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricCpu, + "MEMORY": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricMemory, + "LOGICAL_MEMORY": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricLogicalMemory, + "STORAGE": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricStorage, + "NETWORK": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork, + "GPU_UTILIZATION": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuUtilization, + "GPU_MEMORY_USAGE": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuMemoryUsage, } var mappingSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum{ - "cpu": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricCpu, - "memory": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricMemory, - "logical_memory": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricLogicalMemory, - "storage": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricStorage, - "network": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork, + "cpu": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricCpu, + "memory": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricMemory, + "logical_memory": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricLogicalMemory, + "storage": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricStorage, + "network": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork, + "gpu_utilization": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuUtilization, + "gpu_memory_usage": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuMemoryUsage, } // GetSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum @@ -121,6 +127,8 @@ func GetSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnumSt "LOGICAL_MEMORY", "STORAGE", "NETWORK", + "GPU_UTILIZATION", + "GPU_MEMORY_USAGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_request_response.go index 47e54ee7ead..b466e825971 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_request_response.go @@ -142,6 +142,9 @@ type SummarizeHostInsightResourceForecastTrendRequest struct { // Name of the network interface. InterfaceName *string `mandatory:"false" contributesTo:"query" name:"interfaceName"` + // GPU identifier. + GpuId *int `mandatory:"false" contributesTo:"query" name:"gpuId"` + // Resource Status Status []ResourceStatusEnum `contributesTo:"query" name:"status" omitEmpty:"true" collectionFormat:"multi"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go index caa6f38d914..87bb0bbfc13 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go @@ -69,27 +69,33 @@ type SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEn // Set of constants representing the allowable values for SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum const ( - SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricCpu SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "CPU" - SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricMemory SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "MEMORY" - SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricLogicalMemory SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "LOGICAL_MEMORY" - SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricStorage SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "STORAGE" - SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricCpu SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "CPU" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricMemory SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "MEMORY" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricLogicalMemory SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "LOGICAL_MEMORY" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricStorage SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "STORAGE" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuUtilization SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "GPU_UTILIZATION" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuMemoryUsage SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "GPU_MEMORY_USAGE" ) var mappingSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = map[string]SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum{ - "CPU": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricCpu, - "MEMORY": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricMemory, - "LOGICAL_MEMORY": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricLogicalMemory, - "STORAGE": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricStorage, - "NETWORK": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork, + "CPU": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricCpu, + "MEMORY": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricMemory, + "LOGICAL_MEMORY": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricLogicalMemory, + "STORAGE": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricStorage, + "NETWORK": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork, + "GPU_UTILIZATION": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuUtilization, + "GPU_MEMORY_USAGE": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuMemoryUsage, } var mappingSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum{ - "cpu": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricCpu, - "memory": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricMemory, - "logical_memory": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricLogicalMemory, - "storage": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricStorage, - "network": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork, + "cpu": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricCpu, + "memory": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricMemory, + "logical_memory": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricLogicalMemory, + "storage": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricStorage, + "network": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork, + "gpu_utilization": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuUtilization, + "gpu_memory_usage": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuMemoryUsage, } // GetSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum @@ -109,6 +115,8 @@ func GetSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetri "LOGICAL_MEMORY", "STORAGE", "NETWORK", + "GPU_UTILIZATION", + "GPU_MEMORY_USAGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go index bb57b45dcbb..64bcd6d0f22 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go @@ -69,27 +69,33 @@ type SummarizeHostInsightResourceUsageAggregationResourceMetricEnum string // Set of constants representing the allowable values for SummarizeHostInsightResourceUsageAggregationResourceMetricEnum const ( - SummarizeHostInsightResourceUsageAggregationResourceMetricCpu SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "CPU" - SummarizeHostInsightResourceUsageAggregationResourceMetricMemory SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "MEMORY" - SummarizeHostInsightResourceUsageAggregationResourceMetricLogicalMemory SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "LOGICAL_MEMORY" - SummarizeHostInsightResourceUsageAggregationResourceMetricStorage SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "STORAGE" - SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceUsageAggregationResourceMetricCpu SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "CPU" + SummarizeHostInsightResourceUsageAggregationResourceMetricMemory SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "MEMORY" + SummarizeHostInsightResourceUsageAggregationResourceMetricLogicalMemory SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "LOGICAL_MEMORY" + SummarizeHostInsightResourceUsageAggregationResourceMetricStorage SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "STORAGE" + SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceUsageAggregationResourceMetricGpuUtilization SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "GPU_UTILIZATION" + SummarizeHostInsightResourceUsageAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" ) var mappingSummarizeHostInsightResourceUsageAggregationResourceMetricEnum = map[string]SummarizeHostInsightResourceUsageAggregationResourceMetricEnum{ - "CPU": SummarizeHostInsightResourceUsageAggregationResourceMetricCpu, - "MEMORY": SummarizeHostInsightResourceUsageAggregationResourceMetricMemory, - "LOGICAL_MEMORY": SummarizeHostInsightResourceUsageAggregationResourceMetricLogicalMemory, - "STORAGE": SummarizeHostInsightResourceUsageAggregationResourceMetricStorage, - "NETWORK": SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork, + "CPU": SummarizeHostInsightResourceUsageAggregationResourceMetricCpu, + "MEMORY": SummarizeHostInsightResourceUsageAggregationResourceMetricMemory, + "LOGICAL_MEMORY": SummarizeHostInsightResourceUsageAggregationResourceMetricLogicalMemory, + "STORAGE": SummarizeHostInsightResourceUsageAggregationResourceMetricStorage, + "NETWORK": SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork, + "GPU_UTILIZATION": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuUtilization, + "GPU_MEMORY_USAGE": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuMemoryUsage, } var mappingSummarizeHostInsightResourceUsageAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceUsageAggregationResourceMetricEnum{ - "cpu": SummarizeHostInsightResourceUsageAggregationResourceMetricCpu, - "memory": SummarizeHostInsightResourceUsageAggregationResourceMetricMemory, - "logical_memory": SummarizeHostInsightResourceUsageAggregationResourceMetricLogicalMemory, - "storage": SummarizeHostInsightResourceUsageAggregationResourceMetricStorage, - "network": SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork, + "cpu": SummarizeHostInsightResourceUsageAggregationResourceMetricCpu, + "memory": SummarizeHostInsightResourceUsageAggregationResourceMetricMemory, + "logical_memory": SummarizeHostInsightResourceUsageAggregationResourceMetricLogicalMemory, + "storage": SummarizeHostInsightResourceUsageAggregationResourceMetricStorage, + "network": SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork, + "gpu_utilization": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuUtilization, + "gpu_memory_usage": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuMemoryUsage, } // GetSummarizeHostInsightResourceUsageAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceUsageAggregationResourceMetricEnum @@ -109,6 +115,8 @@ func GetSummarizeHostInsightResourceUsageAggregationResourceMetricEnumStringValu "LOGICAL_MEMORY", "STORAGE", "NETWORK", + "GPU_UTILIZATION", + "GPU_MEMORY_USAGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go index 5e8f12100a9..e79bd13d3f4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go @@ -66,27 +66,33 @@ type SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEn // Set of constants representing the allowable values for SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum const ( - SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricCpu SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "CPU" - SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricMemory SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "MEMORY" - SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricLogicalMemory SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "LOGICAL_MEMORY" - SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricStorage SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "STORAGE" - SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricCpu SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "CPU" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricMemory SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "MEMORY" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricLogicalMemory SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "LOGICAL_MEMORY" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricStorage SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "STORAGE" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuUtilization SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "GPU_UTILIZATION" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuMemoryUsage SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "GPU_MEMORY_USAGE" ) var mappingSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = map[string]SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum{ - "CPU": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricCpu, - "MEMORY": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricMemory, - "LOGICAL_MEMORY": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricLogicalMemory, - "STORAGE": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricStorage, - "NETWORK": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork, + "CPU": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricCpu, + "MEMORY": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricMemory, + "LOGICAL_MEMORY": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricLogicalMemory, + "STORAGE": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricStorage, + "NETWORK": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork, + "GPU_UTILIZATION": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuUtilization, + "GPU_MEMORY_USAGE": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuMemoryUsage, } var mappingSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum{ - "cpu": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricCpu, - "memory": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricMemory, - "logical_memory": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricLogicalMemory, - "storage": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricStorage, - "network": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork, + "cpu": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricCpu, + "memory": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricMemory, + "logical_memory": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricLogicalMemory, + "storage": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricStorage, + "network": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork, + "gpu_utilization": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuUtilization, + "gpu_memory_usage": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuMemoryUsage, } // GetSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum @@ -106,6 +112,8 @@ func GetSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetri "LOGICAL_MEMORY", "STORAGE", "NETWORK", + "GPU_UTILIZATION", + "GPU_MEMORY_USAGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go index fe757af4d4f..0097a6b5108 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go @@ -64,27 +64,33 @@ type SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum // Set of constants representing the allowable values for SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum const ( - SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricCpu SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "CPU" - SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricMemory SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "MEMORY" - SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricLogicalMemory SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "LOGICAL_MEMORY" - SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricStorage SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "STORAGE" - SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricCpu SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "CPU" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricMemory SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "MEMORY" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricLogicalMemory SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "LOGICAL_MEMORY" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricStorage SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "STORAGE" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "NETWORK" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuUtilization SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "GPU_UTILIZATION" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" ) var mappingSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = map[string]SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum{ - "CPU": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricCpu, - "MEMORY": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricMemory, - "LOGICAL_MEMORY": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricLogicalMemory, - "STORAGE": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricStorage, - "NETWORK": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork, + "CPU": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricCpu, + "MEMORY": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricMemory, + "LOGICAL_MEMORY": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricLogicalMemory, + "STORAGE": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricStorage, + "NETWORK": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork, + "GPU_UTILIZATION": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuUtilization, + "GPU_MEMORY_USAGE": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuMemoryUsage, } var mappingSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum{ - "cpu": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricCpu, - "memory": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricMemory, - "logical_memory": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricLogicalMemory, - "storage": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricStorage, - "network": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork, + "cpu": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricCpu, + "memory": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricMemory, + "logical_memory": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricLogicalMemory, + "storage": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricStorage, + "network": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork, + "gpu_utilization": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuUtilization, + "gpu_memory_usage": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuMemoryUsage, } // GetSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum @@ -104,6 +110,8 @@ func GetSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricE "LOGICAL_MEMORY", "STORAGE", "NETWORK", + "GPU_UTILIZATION", + "GPU_MEMORY_USAGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_insights_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_insights_request_response.go index 42314d57f80..6424a5cc06d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_insights_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_insights_request_response.go @@ -198,6 +198,7 @@ const ( SummarizeSqlInsightsDatabaseTypeComanagedExacsCdb SummarizeSqlInsightsDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeSqlInsightsDatabaseTypeComanagedExacsPdb SummarizeSqlInsightsDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeSqlInsightsDatabaseTypeComanagedExacsNoncdb SummarizeSqlInsightsDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeSqlInsightsDatabaseTypeMdsMysql SummarizeSqlInsightsDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeSqlInsightsDatabaseTypeEnum = map[string]SummarizeSqlInsightsDatabaseTypeEnum{ @@ -216,6 +217,7 @@ var mappingSummarizeSqlInsightsDatabaseTypeEnum = map[string]SummarizeSqlInsight "COMANAGED-EXACS-CDB": SummarizeSqlInsightsDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeSqlInsightsDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeSqlInsightsDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeSqlInsightsDatabaseTypeMdsMysql, } var mappingSummarizeSqlInsightsDatabaseTypeEnumLowerCase = map[string]SummarizeSqlInsightsDatabaseTypeEnum{ @@ -234,6 +236,7 @@ var mappingSummarizeSqlInsightsDatabaseTypeEnumLowerCase = map[string]SummarizeS "comanaged-exacs-cdb": SummarizeSqlInsightsDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeSqlInsightsDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeSqlInsightsDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeSqlInsightsDatabaseTypeMdsMysql, } // GetSummarizeSqlInsightsDatabaseTypeEnumValues Enumerates the set of values for SummarizeSqlInsightsDatabaseTypeEnum @@ -263,6 +266,7 @@ func GetSummarizeSqlInsightsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_statistics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_statistics_request_response.go index b259d20aea9..0ab9adcf450 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_statistics_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_statistics_request_response.go @@ -231,6 +231,7 @@ const ( SummarizeSqlStatisticsDatabaseTypeComanagedExacsCdb SummarizeSqlStatisticsDatabaseTypeEnum = "COMANAGED-EXACS-CDB" SummarizeSqlStatisticsDatabaseTypeComanagedExacsPdb SummarizeSqlStatisticsDatabaseTypeEnum = "COMANAGED-EXACS-PDB" SummarizeSqlStatisticsDatabaseTypeComanagedExacsNoncdb SummarizeSqlStatisticsDatabaseTypeEnum = "COMANAGED-EXACS-NONCDB" + SummarizeSqlStatisticsDatabaseTypeMdsMysql SummarizeSqlStatisticsDatabaseTypeEnum = "MDS-MYSQL" ) var mappingSummarizeSqlStatisticsDatabaseTypeEnum = map[string]SummarizeSqlStatisticsDatabaseTypeEnum{ @@ -249,6 +250,7 @@ var mappingSummarizeSqlStatisticsDatabaseTypeEnum = map[string]SummarizeSqlStati "COMANAGED-EXACS-CDB": SummarizeSqlStatisticsDatabaseTypeComanagedExacsCdb, "COMANAGED-EXACS-PDB": SummarizeSqlStatisticsDatabaseTypeComanagedExacsPdb, "COMANAGED-EXACS-NONCDB": SummarizeSqlStatisticsDatabaseTypeComanagedExacsNoncdb, + "MDS-MYSQL": SummarizeSqlStatisticsDatabaseTypeMdsMysql, } var mappingSummarizeSqlStatisticsDatabaseTypeEnumLowerCase = map[string]SummarizeSqlStatisticsDatabaseTypeEnum{ @@ -267,6 +269,7 @@ var mappingSummarizeSqlStatisticsDatabaseTypeEnumLowerCase = map[string]Summariz "comanaged-exacs-cdb": SummarizeSqlStatisticsDatabaseTypeComanagedExacsCdb, "comanaged-exacs-pdb": SummarizeSqlStatisticsDatabaseTypeComanagedExacsPdb, "comanaged-exacs-noncdb": SummarizeSqlStatisticsDatabaseTypeComanagedExacsNoncdb, + "mds-mysql": SummarizeSqlStatisticsDatabaseTypeMdsMysql, } // GetSummarizeSqlStatisticsDatabaseTypeEnumValues Enumerates the set of values for SummarizeSqlStatisticsDatabaseTypeEnum @@ -296,6 +299,7 @@ func GetSummarizeSqlStatisticsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACS-CDB", "COMANAGED-EXACS-PDB", "COMANAGED-EXACS-NONCDB", + "MDS-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_database_insight_details.go index ef2587fcd59..a06728efb8a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_database_insight_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_database_insight_details.go @@ -80,6 +80,10 @@ func (m *updatedatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in mm := UpdateAutonomousDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "MDS_MYSQL_DATABASE_SYSTEM": + mm := UpdateMdsMySqlDatabaseInsight{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for UpdateDatabaseInsightDetails: %s.", m.EntitySource) return *m, nil diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_macs_managed_external_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_macs_managed_external_database_insight_details.go index 1c1b2fc8a26..4bcce7535a9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_macs_managed_external_database_insight_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_macs_managed_external_database_insight_details.go @@ -18,7 +18,7 @@ import ( "strings" ) -// UpdateMacsManagedExternalDatabaseInsightDetails The information to be updated. +// UpdateMacsManagedExternalDatabaseInsightDetails The freeformTags and definedTags to be updated. type UpdateMacsManagedExternalDatabaseInsightDetails struct { // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_mds_my_sql_database_insight.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_mds_my_sql_database_insight.go new file mode 100644 index 00000000000..83940c890b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_mds_my_sql_database_insight.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMdsMySqlDatabaseInsight Database insight resource. +type UpdateMdsMySqlDatabaseInsight struct { + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +// GetFreeformTags returns FreeformTags +func (m UpdateMdsMySqlDatabaseInsight) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateMdsMySqlDatabaseInsight) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateMdsMySqlDatabaseInsight) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMdsMySqlDatabaseInsight) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateMdsMySqlDatabaseInsight) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateMdsMySqlDatabaseInsight UpdateMdsMySqlDatabaseInsight + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeUpdateMdsMySqlDatabaseInsight + }{ + "MDS_MYSQL_DATABASE_SYSTEM", + (MarshalTypeUpdateMdsMySqlDatabaseInsight)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_pe_comanaged_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_pe_comanaged_database_insight_details.go index 1173f5419f7..014d95cbae8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_pe_comanaged_database_insight_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_pe_comanaged_database_insight_details.go @@ -18,7 +18,7 @@ import ( "strings" ) -// UpdatePeComanagedDatabaseInsightDetails The information to be updated. +// UpdatePeComanagedDatabaseInsightDetails The freeformTags and definedTags to be updated. type UpdatePeComanagedDatabaseInsightDetails struct { // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/vendor/modules.txt b/vendor/modules.txt index 99c22c734bd..21cb1463d00 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -225,7 +225,7 @@ github.com/mitchellh/reflectwalk # github.com/oklog/run v1.0.0 ## explicit github.com/oklog/run -# github.com/oracle/oci-go-sdk/v65 v65.69.2 +# github.com/oracle/oci-go-sdk/v65 v65.69.3 ## explicit; go 1.13 github.com/oracle/oci-go-sdk/v65/adm github.com/oracle/oci-go-sdk/v65/aianomalydetection @@ -283,6 +283,7 @@ github.com/oracle/oci-go-sdk/v65/functions github.com/oracle/oci-go-sdk/v65/fusionapps github.com/oracle/oci-go-sdk/v65/generativeai github.com/oracle/oci-go-sdk/v65/genericartifactscontent +github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase github.com/oracle/oci-go-sdk/v65/goldengate github.com/oracle/oci-go-sdk/v65/healthchecks github.com/oracle/oci-go-sdk/v65/identity diff --git a/website/docs/d/apm_synthetics_monitor.html.markdown b/website/docs/d/apm_synthetics_monitor.html.markdown index 987fbe0fb82..70b7670f717 100644 --- a/website/docs/d/apm_synthetics_monitor.html.markdown +++ b/website/docs/d/apm_synthetics_monitor.html.markdown @@ -47,9 +47,32 @@ The following attributes are exported: * `content` - Content of the private key file. * `file_name` - Name of the private key file. * `config_type` - Type of configuration. + * `connection_string` - Database connection string. + * `database_authentication_details` - Details for basic authentication. + * `password` - Password. + * `password` - Password. + * `password_type` - Type of method to pass password. + * `vault_secret_id` - Vault secret OCID. + * `username` - Username for authentication. + * `database_connection_type` - Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + * `database_role` - Database role. + * `database_type` - Database type. + * `database_wallet_details` - Details for database wallet. + * `database_wallet` - The database wallet configuration zip file. + * `service_name` - Service name of the database. * `dns_configuration` - Information about the DNS settings. * `is_override_dns` - If isOverrideDns is true, then DNS settings will be overridden. * `override_dns_ip` - Attribute to override the DNS IP value. This value will be honored only if isOverrideDns is set to true. + * `download_size_limit_in_bytes` - Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + * `ftp_basic_authentication_details` - Details for basic authentication. + * `password` - Password. + * `password` - Password. + * `password_type` - Type of method to pass password. + * `vault_secret_id` - Vault secret OCID. + * `username` - Username for authentication. + * `ftp_protocol` - FTP protocol type. + * `ftp_request_type` - FTP monitor request type. + * `is_active_mode` - If enabled, Active mode will be used for the FTP connection. * `is_certificate_validation_enabled` - If certificate validation is enabled, then the call will fail in case of certification errors. * `is_default_snapshot_enabled` - If disabled, auto snapshots are not collected. * `is_failure_retried` - If isFailureRetried is enabled, then a failed call will be retried. @@ -63,6 +86,7 @@ The following attributes are exported: * `protocol` - Type of protocol. * `transmission_rate` - Number of probe packets sent out simultaneously. * `protocol` - Type of protocol. + * `query` - SQL query to be executed. * `record_type` - DNS record type. * `req_authentication_details` - Details for request HTTP authentication. * `auth_headers` - List of authentication headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]` @@ -84,16 +108,20 @@ The following attributes are exported: * `request_query_params` - List of request query params. Example: `[{"paramName": "sortOrder", "paramValue": "asc"}]` * `param_name` - Name of request query parameter. * `param_value` - Value of request query parameter. + * `upload_file_size_in_bytes` - File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. * `verify_response_codes` - Expected HTTP response codes. For status code range, set values such as 2xx, 3xx. * `verify_response_content` - Verify response content against regular expression based string. If response content does not match the verifyResponseContent value, then it will be considered a failure. * `verify_texts` - Verifies all the search strings present in the response. If any search string is not present in the response, then it will be considered as a failure. * `text` - Verification text in the response. +* `created_by` - Name of the user that created the monitor. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `display_name` - Unique name that can be edited. The name should not contain any confidential information. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the monitor. +* `is_ipv6` - If enabled, domain name will resolve to an IPv6 address. * `is_run_now` - If isRunNow is enabled, then the monitor will run immediately. * `is_run_once` - If runOnce is enabled, then the monitor will run once. +* `last_updated_by` - Name of the user that recently updated the monitor. * `maintenance_window_schedule` - Details required to schedule maintenance window. * `time_ended` - End time of the maintenance window, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` * `time_started` - Start time of the maintenance window, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` @@ -109,12 +137,13 @@ The following attributes are exported: * `param_name` - Name of the parameter. * `param_value` - Value of the parameter. * `status` - Enables or disables the monitor. -* `target` - Specify the endpoint on which to run the monitor. For BROWSER, REST and NETWORK monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 +* `target` - Specify the endpoint on which to run the monitor. For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * `time_created` - The time the resource was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` * `time_updated` - The time the resource was updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-13T22:47:12.613Z` * `timeout_in_seconds` - Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. * `vantage_point_count` - Number of vantage points where monitor is running. -* `vantage_points` - List of public and dedicated vantage points where the monitor is running. +* `vantage_points` - List of public, dedicated and onPremise vantage points where the monitor is running. * `display_name` - Unique name that can be edited. The name should not contain any confidential information. * `name` - Name of the vantage point. + * `worker_list` - List of workers running the assigned monitor. diff --git a/website/docs/d/apm_synthetics_monitors.html.markdown b/website/docs/d/apm_synthetics_monitors.html.markdown index e7aa7352539..f58dd230e14 100644 --- a/website/docs/d/apm_synthetics_monitors.html.markdown +++ b/website/docs/d/apm_synthetics_monitors.html.markdown @@ -39,7 +39,7 @@ The following arguments are supported: * `display_name` - (Optional) A filter to return only the resources that match the entire display name. * `is_maintenance_window_active` - (Optional) A filter to return the monitors whose maintenance window is currently active. * `is_maintenance_window_set` - (Optional) A filter to return the monitors whose maintenance window is set. -* `monitor_type` - (Optional) A filter to return only monitors that match the given monitor type. Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST and NETWORK. +* `monitor_type` - (Optional) A filter to return only monitors that match the given monitor type. Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST, REST, NETWORK, DNS, FTP and SQL. * `script_id` - (Optional) A filter to return only monitors using scriptId. * `status` - (Optional) A filter to return only monitors that match the status given. * `vantage_point` - (Optional) The name of the public or dedicated vantage point. @@ -68,9 +68,32 @@ The following attributes are exported: * `content` - Content of the private key file. * `file_name` - Name of the private key file. * `config_type` - Type of configuration. + * `connection_string` - Database connection string. + * `database_authentication_details` - Details for basic authentication. + * `password` - Password. + * `password` - Password. + * `password_type` - Type of method to pass password. + * `vault_secret_id` - Vault secret OCID. + * `username` - Username for authentication. + * `database_connection_type` - Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + * `database_role` - Database role. + * `database_type` - Database type. + * `database_wallet_details` - Details for database wallet. + * `database_wallet` - The database wallet configuration zip file. + * `service_name` - Service name of the database. * `dns_configuration` - Information about the DNS settings. * `is_override_dns` - If isOverrideDns is true, then DNS settings will be overridden. * `override_dns_ip` - Attribute to override the DNS IP value. This value will be honored only if isOverrideDns is set to true. + * `download_size_limit_in_bytes` - Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + * `ftp_basic_authentication_details` - Details for basic authentication. + * `password` - Password. + * `password` - Password. + * `password_type` - Type of method to pass password. + * `vault_secret_id` - Vault secret OCID. + * `username` - Username for authentication. + * `ftp_protocol` - FTP protocol type. + * `ftp_request_type` - FTP monitor request type. + * `is_active_mode` - If enabled, Active mode will be used for the FTP connection. * `is_certificate_validation_enabled` - If certificate validation is enabled, then the call will fail in case of certification errors. * `is_default_snapshot_enabled` - If disabled, auto snapshots are not collected. * `is_failure_retried` - If isFailureRetried is enabled, then a failed call will be retried. @@ -84,6 +107,7 @@ The following attributes are exported: * `protocol` - Type of protocol. * `transmission_rate` - Number of probe packets sent out simultaneously. * `protocol` - Type of protocol. + * `query` - SQL query to be executed. * `record_type` - DNS record type. * `req_authentication_details` - Details for request HTTP authentication. * `auth_headers` - List of authentication headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]` @@ -105,16 +129,20 @@ The following attributes are exported: * `request_query_params` - List of request query params. Example: `[{"paramName": "sortOrder", "paramValue": "asc"}]` * `param_name` - Name of request query parameter. * `param_value` - Value of request query parameter. + * `upload_file_size_in_bytes` - File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. * `verify_response_codes` - Expected HTTP response codes. For status code range, set values such as 2xx, 3xx. * `verify_response_content` - Verify response content against regular expression based string. If response content does not match the verifyResponseContent value, then it will be considered a failure. * `verify_texts` - Verifies all the search strings present in the response. If any search string is not present in the response, then it will be considered as a failure. * `text` - Verification text in the response. +* `created_by` - Name of the user that created the monitor. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `display_name` - Unique name that can be edited. The name should not contain any confidential information. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the monitor. +* `is_ipv6` - If enabled, domain name will resolve to an IPv6 address. * `is_run_now` - If isRunNow is enabled, then the monitor will run immediately. * `is_run_once` - If runOnce is enabled, then the monitor will run once. +* `last_updated_by` - Name of the user that recently updated the monitor. * `maintenance_window_schedule` - Details required to schedule maintenance window. * `time_ended` - End time of the maintenance window, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` * `time_started` - Start time of the maintenance window, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` @@ -130,12 +158,13 @@ The following attributes are exported: * `param_name` - Name of the parameter. * `param_value` - Value of the parameter. * `status` - Enables or disables the monitor. -* `target` - Specify the endpoint on which to run the monitor. For BROWSER, REST and NETWORK monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 +* `target` - Specify the endpoint on which to run the monitor. For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * `time_created` - The time the resource was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` * `time_updated` - The time the resource was updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-13T22:47:12.613Z` * `timeout_in_seconds` - Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. * `vantage_point_count` - Number of vantage points where monitor is running. -* `vantage_points` - List of public and dedicated vantage points where the monitor is running. +* `vantage_points` - List of public, dedicated and onPremise vantage points where the monitor is running. * `display_name` - Unique name that can be edited. The name should not contain any confidential information. * `name` - Name of the vantage point. + * `worker_list` - List of workers running the assigned monitor. diff --git a/website/docs/d/core_cluster_network.html.markdown b/website/docs/d/core_cluster_network.html.markdown index 3f06258837b..9f539853919 100644 --- a/website/docs/d/core_cluster_network.html.markdown +++ b/website/docs/d/core_cluster_network.html.markdown @@ -66,7 +66,6 @@ The following attributes are exported: To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. -<<<<<<< HEAD Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. * `primary_vnic_subnets` - Details about the IPv6 primary subnet. @@ -74,10 +73,6 @@ The following attributes are exported: * `ipv6subnet_cidr` - Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. * `is_assign_ipv6ip` - Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` is not provided then an IPv6 prefix is chosen for you. * `subnet_id` - The subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. -======= - Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` - * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `secondary_vnic_subnets` - The set of secondary VNIC data for instances in the pool. * `display_name` - The display name of the VNIC. This is also used to match against the instance configuration defined secondary VNIC. * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. diff --git a/website/docs/d/core_cluster_networks.html.markdown b/website/docs/d/core_cluster_networks.html.markdown index 7d6bb5e69a9..a4144b1d869 100644 --- a/website/docs/d/core_cluster_networks.html.markdown +++ b/website/docs/d/core_cluster_networks.html.markdown @@ -79,17 +79,8 @@ The following attributes are exported: To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. - Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` -<<<<<<< HEAD - * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. - * `primary_vnic_subnets` - Details about the IPv6 primary subnet. - * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. - * `ipv6subnet_cidr` - Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. - * `is_assign_ipv6ip` - Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` is not provided then an IPv6 prefix is chosen for you. - * `subnet_id` - The subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. -======= + Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `secondary_vnic_subnets` - The set of secondary VNIC data for instances in the pool. * `display_name` - The display name of the VNIC. This is also used to match against the instance configuration defined secondary VNIC. * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. diff --git a/website/docs/d/core_compute_capacity_reservation.html.markdown b/website/docs/d/core_compute_capacity_reservation.html.markdown index 4d61441611e..79ca92337ea 100644 --- a/website/docs/d/core_compute_capacity_reservation.html.markdown +++ b/website/docs/d/core_compute_capacity_reservation.html.markdown @@ -44,14 +44,9 @@ The following attributes are exported: * `cluster_config` - The HPC cluster configuration requested when launching instances in a compute capacity reservation. If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error is returned. -<<<<<<< HEAD - * `hpc_island_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HpcIsland. - * `network_block_ids` - The list of OCID of the network blocks. -======= * `hpc_island_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. * `network_block_ids` - The list of OCIDs of the network blocks. * `cluster_placement_group_id` - The OCID of the cluster placement group for this instance reservation capacity configuration. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `fault_domain` - The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see [Capacity Reservations](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm). * `instance_shape` - The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling [ListComputeCapacityReservationInstanceShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/computeCapacityReservationInstanceShapes/ListComputeCapacityReservationInstanceShapes). * `instance_shape_config` - The shape configuration requested when launching instances in a compute capacity reservation. diff --git a/website/docs/d/core_compute_capacity_reservations.html.markdown b/website/docs/d/core_compute_capacity_reservations.html.markdown index b60b8c5f867..d0991023f6e 100644 --- a/website/docs/d/core_compute_capacity_reservations.html.markdown +++ b/website/docs/d/core_compute_capacity_reservations.html.markdown @@ -62,14 +62,10 @@ The following attributes are exported: * `cluster_config` - The HPC cluster configuration requested when launching instances in a compute capacity reservation. If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error is returned. -<<<<<<< HEAD - * `hpc_island_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HpcIsland. - * `network_block_ids` - The list of OCID of the network blocks. -======= + * `hpc_island_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. * `network_block_ids` - The list of OCIDs of the network blocks. * `cluster_placement_group_id` - The OCID of the cluster placement group for this instance reservation capacity configuration. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `fault_domain` - The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see [Capacity Reservations](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm). * `instance_shape` - The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling [ListComputeCapacityReservationInstanceShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/computeCapacityReservationInstanceShapes/ListComputeCapacityReservationInstanceShapes). * `instance_shape_config` - The shape configuration requested when launching instances in a compute capacity reservation. diff --git a/website/docs/d/core_instance_pool.html.markdown b/website/docs/d/core_instance_pool.html.markdown index b48a7ce5353..bf699c75b59 100644 --- a/website/docs/d/core_instance_pool.html.markdown +++ b/website/docs/d/core_instance_pool.html.markdown @@ -59,16 +59,12 @@ The following attributes are exported: To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` -<<<<<<< HEAD * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. * `primary_vnic_subnets` - Details about the IPv6 primary subnet. * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. * `ipv6subnet_cidr` - Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. * `is_assign_ipv6ip` - Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` is not provided then an IPv6 prefix is chosen for you. * `subnet_id` - The subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. -======= - * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `secondary_vnic_subnets` - The set of secondary VNIC data for instances in the pool. * `display_name` - The display name of the VNIC. This is also used to match against the instance configuration defined secondary VNIC. * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. diff --git a/website/docs/d/core_instance_pools.html.markdown b/website/docs/d/core_instance_pools.html.markdown index 38188af41c5..073d3f5cf03 100644 --- a/website/docs/d/core_instance_pools.html.markdown +++ b/website/docs/d/core_instance_pools.html.markdown @@ -70,7 +70,6 @@ The following attributes are exported: To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. -<<<<<<< HEAD Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. * `primary_vnic_subnets` - Details about the IPv6 primary subnet. @@ -78,10 +77,6 @@ The following attributes are exported: * `ipv6subnet_cidr` - Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. * `is_assign_ipv6ip` - Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` is not provided then an IPv6 prefix is chosen for you. * `subnet_id` - The subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. -======= - Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` - * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `secondary_vnic_subnets` - The set of secondary VNIC data for instances in the pool. * `display_name` - The display name of the VNIC. This is also used to match against the instance configuration defined secondary VNIC. * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. diff --git a/website/docs/d/data_safe_audit_events.html.markdown b/website/docs/d/data_safe_audit_events.html.markdown index a4a3d8c5028..82ae0331ea1 100644 --- a/website/docs/d/data_safe_audit_events.html.markdown +++ b/website/docs/d/data_safe_audit_events.html.markdown @@ -48,7 +48,7 @@ The following arguments are supported: * `compartment_id_in_subtree` - (Optional) Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. * `scim_query` - (Optional) The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at [RFC3339](https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.) - **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + **Example:** (operationTime ge "2021-06-04T12:00:00.000Z") and (eventName eq "LOGON") ## Attributes Reference @@ -63,6 +63,7 @@ The following attributes are exported: * `items` - Array of audit event summary. * `action_taken` - The action taken for this audit event. + * `application_contexts` - Semicolon-seperated list of application context namespace, attribute, value information in (APPCTX_NSPACE,APPCTX_ATTRIBUTE=) format. * `audit_event_time` - The time that the audit event occurs in the target database. * `audit_location` - The location of the audit. Currently the value is audit table. * `audit_policies` - Comma-seperated list of audit policies that caused the current audit event. @@ -86,6 +87,7 @@ The following attributes are exported: * `error_message` - The detailed message on why the error occurred. * `event_name` - The name of the detail action executed by the user on the target database. For example ALTER SEQUENCE, CREATE TRIGGER or CREATE INDEX. * `extended_event_attributes` - List of all other attributes of the audit event seperated by a colon other than the one returned in audit record. + * `fga_policy_name` - Fine-grained auditing (FGA) policy name that generated this audit record. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` * `id` - The OCID of the audit event. * `is_alerted` - Indicates whether an alert was raised for this audit event. diff --git a/website/docs/d/data_safe_discovery_job.html.markdown b/website/docs/d/data_safe_discovery_job.html.markdown index e3d5fe37b52..62e9a59a8c1 100644 --- a/website/docs/d/data_safe_discovery_job.html.markdown +++ b/website/docs/d/data_safe_discovery_job.html.markdown @@ -47,6 +47,9 @@ The following attributes are exported: * `sensitive_type_ids_for_discovery` - The OCIDs of the sensitive types used for data discovery. * `state` - The current state of the discovery job. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `tables_for_discovery` - The data discovery jobs will scan the tables specified here, including both schemas and tables. + * `schema_name` - This contains the name of the schema. + * `table_names` - This contains an optional list of the table names. * `target_id` - The OCID of the target database associated with the discovery job. * `time_finished` - The date and time the discovery job finished, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).. * `time_started` - The date and time the discovery job started, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/d/data_safe_discovery_jobs.html.markdown b/website/docs/d/data_safe_discovery_jobs.html.markdown index 8072a76374e..6e8db57672b 100644 --- a/website/docs/d/data_safe_discovery_jobs.html.markdown +++ b/website/docs/d/data_safe_discovery_jobs.html.markdown @@ -69,6 +69,9 @@ The following attributes are exported: * `sensitive_type_ids_for_discovery` - The OCIDs of the sensitive types used for data discovery. * `state` - The current state of the discovery job. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `tables_for_discovery` - The data discovery jobs will scan the tables specified here, including both schemas and tables. + * `schema_name` - This contains the name of the schema. + * `table_names` - This contains an optional list of the table names. * `target_id` - The OCID of the target database associated with the discovery job. * `time_finished` - The date and time the discovery job finished, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).. * `time_started` - The date and time the discovery job started, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/d/data_safe_report.html.markdown b/website/docs/d/data_safe_report.html.markdown index f0273ed767d..1361dc3c292 100644 --- a/website/docs/d/data_safe_report.html.markdown +++ b/website/docs/d/data_safe_report.html.markdown @@ -38,7 +38,7 @@ The following attributes are exported: * `display_name` - Name of the report. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` * `id` - The OCID of the report. -* `mime_type` - Specifies the format of report to be .xls or .pdf +* `mime_type` - Specifies the format of report to be .xls or .pdf or .json * `report_definition_id` - The OCID of the report definition. * `state` - The current state of the audit report. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/d/data_safe_report_definition.html.markdown b/website/docs/d/data_safe_report_definition.html.markdown index fb71c5a6b9c..6ac1f1dc461 100644 --- a/website/docs/d/data_safe_report_definition.html.markdown +++ b/website/docs/d/data_safe_report_definition.html.markdown @@ -65,7 +65,7 @@ The following attributes are exported: Allowed version strings - "v1" v1's version specific schedule - Each of the above fields potentially introduce constraints. A workrequest is created only when clock time satisfies all the constraints. Constraints introduced: 1. seconds = (So, the allowed range for is [0, 59]) 2. minutes = (So, the allowed range for is [0, 59]) 3. hours = (So, the allowed range for is [0, 23]) 4. can be either '*' (without quotes or a number between 1(Monday) and 7(Sunday)) No constraint introduced when it is '*'. When not, day of week must equal the given value 5. can be either '*' (without quotes or a number between 1 and 28) No constraint introduced when it is '*'. When not, day of month must equal the given value * `scheduled_report_compartment_id` - The OCID of the compartment in which the scheduled resource will be created. -* `scheduled_report_mime_type` - Specifies the format of the report ( either .xls or .pdf ) +* `scheduled_report_mime_type` - Specifies the format of the report ( either .xls or .pdf or .json) * `scheduled_report_name` - The name of the report to be scheduled. * `scheduled_report_row_limit` - Specifies the limit on the number of rows in the report. * `scim_filter` - Additional SCIM filters used to define the report. diff --git a/website/docs/d/data_safe_report_definitions.html.markdown b/website/docs/d/data_safe_report_definitions.html.markdown index 87f7fe65107..314b532d939 100644 --- a/website/docs/d/data_safe_report_definitions.html.markdown +++ b/website/docs/d/data_safe_report_definitions.html.markdown @@ -90,7 +90,7 @@ The following attributes are exported: Allowed version strings - "v1" v1's version specific schedule - Each of the above fields potentially introduce constraints. A workrequest is created only when clock time satisfies all the constraints. Constraints introduced: 1. seconds = (So, the allowed range for is [0, 59]) 2. minutes = (So, the allowed range for is [0, 59]) 3. hours = (So, the allowed range for is [0, 23]) 4. can be either '*' (without quotes or a number between 1(Monday) and 7(Sunday)) No constraint introduced when it is '*'. When not, day of week must equal the given value 5. can be either '*' (without quotes or a number between 1 and 28) No constraint introduced when it is '*'. When not, day of month must equal the given value * `scheduled_report_compartment_id` - The OCID of the compartment in which the scheduled resource will be created. -* `scheduled_report_mime_type` - Specifies the format of the report ( either .xls or .pdf ) +* `scheduled_report_mime_type` - Specifies the format of the report ( either .xls or .pdf or .json) * `scheduled_report_name` - The name of the report to be scheduled. * `scheduled_report_row_limit` - Specifies the limit on the number of rows in the report. * `scim_filter` - Additional SCIM filters used to define the report. diff --git a/website/docs/d/data_safe_reports.html.markdown b/website/docs/d/data_safe_reports.html.markdown index 5da18a4d2f4..ca0d5ed6ea0 100644 --- a/website/docs/d/data_safe_reports.html.markdown +++ b/website/docs/d/data_safe_reports.html.markdown @@ -25,6 +25,8 @@ data "oci_data_safe_reports" "test_reports" { display_name = var.report_display_name report_definition_id = oci_data_safe_report_definition.test_report_definition.id state = var.report_state + time_generated_greater_than_or_equal_to = var.report_time_generated_greater_than_or_equal_to + time_generated_less_than = var.report_time_generated_less_than type = var.report_type } ``` @@ -39,6 +41,12 @@ The following arguments are supported: * `display_name` - (Optional) The name of the report definition to query. * `report_definition_id` - (Optional) The ID of the report definition to filter the list of reports * `state` - (Optional) An optional filter to return only resources that match the specified lifecycle state. +* `time_generated_greater_than_or_equal_to` - (Optional) A filter to return only the resources that were generated after the specified date and time, as defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Using TimeGeneratedGreaterThanOrEqualToQueryParam parameter retrieves all resources generated after that date. + + **Example:** 2016-12-19T16:39:57.600Z +* `time_generated_less_than` - (Optional) Search for resources that were generated before a specific date. Specifying this parameter corresponding `timeGeneratedLessThan` parameter will retrieve all resources generated before the specified generated date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z * `type` - (Optional) An optional filter to return only resources that match the specified type. @@ -58,7 +66,7 @@ The following attributes are exported: * `display_name` - Name of the report. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` * `id` - The OCID of the report. -* `mime_type` - Specifies the format of report to be .xls or .pdf +* `mime_type` - Specifies the format of report to be .xls or .pdf or .json * `report_definition_id` - The OCID of the report definition. * `state` - The current state of the audit report. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/d/data_safe_security_assessment.html.markdown b/website/docs/d/data_safe_security_assessment.html.markdown index 254b0ef9915..4a7e7e788a0 100644 --- a/website/docs/d/data_safe_security_assessment.html.markdown +++ b/website/docs/d/data_safe_security_assessment.html.markdown @@ -40,6 +40,7 @@ The following attributes are exported: * `id` - The OCID of the security assessment. * `ignored_assessment_ids` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` * `ignored_targets` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` +* `is_assessment_scheduled` - Indicates whether the assessment is scheduled to run. * `is_baseline` - Indicates whether or not the security assessment is set as a baseline. This is applicable only for saved security assessments. * `is_deviated_from_baseline` - Indicates whether or not the security assessment deviates from the baseline. * `last_compared_baseline_id` - The OCID of the baseline against which the latest security assessment was compared. diff --git a/website/docs/d/data_safe_security_assessment_comparison.html.markdown b/website/docs/d/data_safe_security_assessment_comparison.html.markdown index c30678bd325..52d8ffbd636 100644 --- a/website/docs/d/data_safe_security_assessment_comparison.html.markdown +++ b/website/docs/d/data_safe_security_assessment_comparison.html.markdown @@ -52,6 +52,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -73,6 +74,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -99,6 +101,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -120,6 +123,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -148,6 +152,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -169,6 +174,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -195,6 +201,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -216,6 +223,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -242,6 +250,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -263,6 +272,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -289,6 +299,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -310,6 +321,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -336,6 +348,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. @@ -357,6 +370,7 @@ The following attributes are exported: * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, STIG rule, or related to a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding. diff --git a/website/docs/d/data_safe_security_assessment_findings.html.markdown b/website/docs/d/data_safe_security_assessment_findings.html.markdown index 9d84e55b136..499947b1689 100644 --- a/website/docs/d/data_safe_security_assessment_findings.html.markdown +++ b/website/docs/d/data_safe_security_assessment_findings.html.markdown @@ -29,6 +29,7 @@ data "oci_data_safe_security_assessment_findings" "test_security_assessment_find } severity = var.security_assessment_finding_severity state = var.security_assessment_finding_state + target_id = oci_cloud_guard_target.test_target.id } ``` @@ -44,6 +45,7 @@ The following arguments are supported: * `security_assessment_id` - (Required) The OCID of the security assessment. * `severity` - (Optional) A filter to return only findings of a particular risk level. * `state` - (Optional) A filter to return only the findings that match the specified lifecycle states. +* `target_id` - (Optional) A filter to return only items related to a specific target OCID. ## Attributes Reference @@ -64,10 +66,12 @@ The following attributes are exported: * `justification` - User provided reason for accepting or modifying this finding if they choose to do so. * `key` - The unique finding key. This is a system-generated identifier. To get the finding key for a finding, use ListFindings. * `lifecycle_details` - Details about the current state of the finding. +* `oneline` - Provides a recommended approach to take to remediate the finding reported. * `oracle_defined_severity` - The severity of the finding as determined by security assessment. This cannot be modified by user. * `references` - Provides information on whether the finding is related to a CIS Oracle Database Benchmark recommendation, a STIG rule, or a GDPR Article/Recital. * `cis` - Relevant section from CIS. * `gdpr` - Relevant section from GDPR. + * `obp` - Relevant section from OBP. * `stig` - Relevant section from STIG. * `remarks` - The explanation of the issue in this finding. It explains the reason for the rule and, if a risk is reported, it may also explain the recommended actions for remediation. * `severity` - The severity of the finding as determined by security assessment and is same as oracleDefinedSeverity, unless modified by user. diff --git a/website/docs/d/data_safe_security_assessments.html.markdown b/website/docs/d/data_safe_security_assessments.html.markdown index 22bdf56fd7c..db847b56c6f 100644 --- a/website/docs/d/data_safe_security_assessments.html.markdown +++ b/website/docs/d/data_safe_security_assessments.html.markdown @@ -91,6 +91,7 @@ The following attributes are exported: * `id` - The OCID of the security assessment. * `ignored_assessment_ids` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` * `ignored_targets` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` +* `is_assessment_scheduled` - Indicates whether the assessment is scheduled to run. * `is_baseline` - Indicates whether or not the security assessment is set as a baseline. This is applicable only for saved security assessments. * `is_deviated_from_baseline` - Indicates whether or not the security assessment deviates from the baseline. * `last_compared_baseline_id` - The OCID of the baseline against which the latest security assessment was compared. diff --git a/website/docs/d/data_safe_sensitive_data_model.html.markdown b/website/docs/d/data_safe_sensitive_data_model.html.markdown index ada3b76a6d6..bf49e3d7427 100644 --- a/website/docs/d/data_safe_sensitive_data_model.html.markdown +++ b/website/docs/d/data_safe_sensitive_data_model.html.markdown @@ -47,6 +47,9 @@ The following attributes are exported: * `sensitive_type_ids_for_discovery` - The OCIDs of the sensitive types to be used by data discovery jobs. * `state` - The current state of the sensitive data model. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `tables_for_discovery` - The data discovery jobs will scan the tables specified here, including both schemas and tables. For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: "OE", tableName : ["T3", "T4"]}]. + * `schema_name` - This contains the name of the schema. + * `table_names` - This contains an optional list of the table names. * `target_id` - The OCID of the reference target database associated with the sensitive data model. All operations such as performing data discovery and adding columns manually are done in the context of the associated target database. * `time_created` - The date and time the sensitive data model was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * `time_updated` - The date and time the sensitive data model was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/d/data_safe_sensitive_data_model_sensitive_types.html.markdown b/website/docs/d/data_safe_sensitive_data_model_sensitive_types.html.markdown new file mode 100644 index 00000000000..39e5694d781 --- /dev/null +++ b/website/docs/d/data_safe_sensitive_data_model_sensitive_types.html.markdown @@ -0,0 +1,49 @@ +--- +subcategory: "Data Safe" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_data_safe_sensitive_data_model_sensitive_types" +sidebar_current: "docs-oci-datasource-data_safe-sensitive_data_model_sensitive_types" +description: |- + Provides the list of Sensitive Data Model Sensitive Types in Oracle Cloud Infrastructure Data Safe service +--- + +# Data Source: oci_data_safe_sensitive_data_model_sensitive_types +This data source provides the list of Sensitive Data Model Sensitive Types in Oracle Cloud Infrastructure Data Safe service. + +Gets a list of sensitive type Ids present in the specified sensitive data model. + + +## Example Usage + +```hcl +data "oci_data_safe_sensitive_data_model_sensitive_types" "test_sensitive_data_model_sensitive_types" { + #Required + sensitive_data_model_id = oci_data_safe_sensitive_data_model.test_sensitive_data_model.id + + #Optional + sensitive_type_id = oci_data_safe_sensitive_type.test_sensitive_type.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `sensitive_data_model_id` - (Required) The OCID of the sensitive data model. +* `sensitive_type_id` - (Optional) A filter to return only items related to a specific sensitive type OCID. + + +## Attributes Reference + +The following attributes are exported: + +* `sensitive_data_model_sensitive_type_collection` - The list of sensitive_data_model_sensitive_type_collection. + +### SensitiveDataModelSensitiveType Reference + +The following attributes are exported: + +* `items` - An array of sensitive types summary objects present in a sensitive data model. + * `sensitive_data_model_sensitive_type_count` - The total number of sensitive columns linked to this specific sensitive type . + * `sensitive_type_id` - The OCID of the sensitive type. + diff --git a/website/docs/d/data_safe_sensitive_data_models.html.markdown b/website/docs/d/data_safe_sensitive_data_models.html.markdown index f9cf40855d8..04e5d365de8 100644 --- a/website/docs/d/data_safe_sensitive_data_models.html.markdown +++ b/website/docs/d/data_safe_sensitive_data_models.html.markdown @@ -76,6 +76,9 @@ The following attributes are exported: * `sensitive_type_ids_for_discovery` - The OCIDs of the sensitive types to be used by data discovery jobs. * `state` - The current state of the sensitive data model. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `tables_for_discovery` - The data discovery jobs will scan the tables specified here, including both schemas and tables. For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: "OE", tableName : ["T3", "T4"]}]. + * `schema_name` - This contains the name of the schema. + * `table_names` - This contains an optional list of the table names. * `target_id` - The OCID of the reference target database associated with the sensitive data model. All operations such as performing data discovery and adding columns manually are done in the context of the associated target database. * `time_created` - The date and time the sensitive data model was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * `time_updated` - The date and time the sensitive data model was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/d/data_safe_sql_firewall_policy_analytics.html.markdown b/website/docs/d/data_safe_sql_firewall_policy_analytics.html.markdown index d86e13dc829..84fd569f343 100644 --- a/website/docs/d/data_safe_sql_firewall_policy_analytics.html.markdown +++ b/website/docs/d/data_safe_sql_firewall_policy_analytics.html.markdown @@ -18,7 +18,7 @@ or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to retur principal doesn't have access to even one of the child compartments. This is valid only when `compartmentIdInSubtree` is set to `true`. -The parameter `compartmentIdInSubtree` applies when you perform SummarizedSqlFirewallPolicyInfo on the specified +The parameter `compartmentIdInSubtree` applies when you perform SummarizedSqlFirewallPolicyInfo on the specified `compartmentId` and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. diff --git a/website/docs/d/data_safe_user_assessment.html.markdown b/website/docs/d/data_safe_user_assessment.html.markdown index 1313f62b090..c61c3a79665 100644 --- a/website/docs/d/data_safe_user_assessment.html.markdown +++ b/website/docs/d/data_safe_user_assessment.html.markdown @@ -40,6 +40,7 @@ The following attributes are exported: * `id` - The OCID of the user assessment. * `ignored_assessment_ids` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` * `ignored_targets` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` +* `is_assessment_scheduled` - Indicates whether the assessment is scheduled to run. * `is_baseline` - Indicates if the user assessment is set as a baseline. This is applicable only to saved user assessments. * `is_deviated_from_baseline` - Indicates if the user assessment deviates from the baseline. * `last_compared_baseline_id` - The OCID of the last user assessment baseline against which the latest assessment was compared. diff --git a/website/docs/d/data_safe_user_assessment_profile_analytics.html.markdown b/website/docs/d/data_safe_user_assessment_profile_analytics.html.markdown index bca375e0348..c9c4474f42e 100644 --- a/website/docs/d/data_safe_user_assessment_profile_analytics.html.markdown +++ b/website/docs/d/data_safe_user_assessment_profile_analytics.html.markdown @@ -10,7 +10,7 @@ description: |- # Data Source: oci_data_safe_user_assessment_profile_analytics This data source provides the list of User Assessment Profile Analytics in Oracle Cloud Infrastructure Data Safe service. -Gets a list of aggregated user profile details in the specified compartment. This provides information about the +Gets a list of aggregated user profile details in the specified compartment. This provides information about the overall profiles available. For example, the user profile details include how many users have the profile assigned and do how many use password verification function. This data is especially useful content for dashboards or to support analytics. diff --git a/website/docs/d/data_safe_user_assessment_profiles.html.markdown b/website/docs/d/data_safe_user_assessment_profiles.html.markdown index f8ec867639e..b2e2f73dcfb 100644 --- a/website/docs/d/data_safe_user_assessment_profiles.html.markdown +++ b/website/docs/d/data_safe_user_assessment_profiles.html.markdown @@ -16,8 +16,8 @@ The ListProfiles operation returns only the profiles belonging to a certain targ id is provided, then profile information for all the targets belonging to the pertaining compartment is returned. The list does not include any subcompartments of the compartment under consideration. -The parameter 'accessLevel' specifies whether to return only those compartments for which the requestor has -INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a +The parameter 'accessLevel' specifies whether to return only those compartments for which the requestor has +INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments. This is valid only when 'compartmentIdInSubtree' is set to 'true'. diff --git a/website/docs/d/data_safe_user_assessments.html.markdown b/website/docs/d/data_safe_user_assessments.html.markdown index ab5ab8b16bc..b2c1f9169fb 100644 --- a/website/docs/d/data_safe_user_assessments.html.markdown +++ b/website/docs/d/data_safe_user_assessments.html.markdown @@ -91,6 +91,7 @@ The following attributes are exported: * `id` - The OCID of the user assessment. * `ignored_assessment_ids` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` * `ignored_targets` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` +* `is_assessment_scheduled` - Indicates whether the assessment is scheduled to run. * `is_baseline` - Indicates if the user assessment is set as a baseline. This is applicable only to saved user assessments. * `is_deviated_from_baseline` - Indicates if the user assessment deviates from the baseline. * `last_compared_baseline_id` - The OCID of the last user assessment baseline against which the latest assessment was compared. diff --git a/website/docs/d/database_autonomous_database.html.markdown b/website/docs/d/database_autonomous_database.html.markdown index 5bccc98a525..267abdb052d 100644 --- a/website/docs/d/database_autonomous_database.html.markdown +++ b/website/docs/d/database_autonomous_database.html.markdown @@ -252,6 +252,7 @@ The following attributes are exported: * For Exadata and virtual machine 2-node RAC systems, do not use a subnet that overlaps with 192.168.128.0/20. * For Autonomous Database, setting this will disable public secure access to the database. +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and the backup subnet. * `supported_regions_to_clone_to` - The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). diff --git a/website/docs/d/database_autonomous_databases.html.markdown b/website/docs/d/database_autonomous_databases.html.markdown index e724032e5bb..4d37a94b568 100644 --- a/website/docs/d/database_autonomous_databases.html.markdown +++ b/website/docs/d/database_autonomous_databases.html.markdown @@ -282,6 +282,7 @@ The following attributes are exported: * For Autonomous Database, setting this will disable public secure access to the database. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and the backup subnet. +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `supported_regions_to_clone_to` - The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `time_created` - The date and time the Autonomous Database was created. diff --git a/website/docs/d/database_autonomous_databases_clones.html.markdown b/website/docs/d/database_autonomous_databases_clones.html.markdown index 94e5d3e0cbc..f084c54b5de 100644 --- a/website/docs/d/database_autonomous_databases_clones.html.markdown +++ b/website/docs/d/database_autonomous_databases_clones.html.markdown @@ -269,6 +269,7 @@ The following attributes are exported: * For Autonomous Database, setting this will disable public secure access to the database. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and the backup subnet. +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `supported_regions_to_clone_to` - The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `time_created` - The date and time the Autonomous Database was created. diff --git a/website/docs/d/database_cloud_exadata_infrastructure.html.markdown b/website/docs/d/database_cloud_exadata_infrastructure.html.markdown index bda14b1950b..584bc6c3e12 100644 --- a/website/docs/d/database_cloud_exadata_infrastructure.html.markdown +++ b/website/docs/d/database_cloud_exadata_infrastructure.html.markdown @@ -85,6 +85,7 @@ The following attributes are exported: * `state` - The current lifecycle state of the cloud Exadata infrastructure resource. * `storage_count` - The number of storage servers for the cloud Exadata infrastructure. * `storage_server_version` - The software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15 +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `time_created` - The date and time the cloud Exadata infrastructure resource was created. * `total_storage_size_in_gbs` - The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). diff --git a/website/docs/d/database_cloud_exadata_infrastructures.html.markdown b/website/docs/d/database_cloud_exadata_infrastructures.html.markdown index b366a453d48..02019755861 100644 --- a/website/docs/d/database_cloud_exadata_infrastructures.html.markdown +++ b/website/docs/d/database_cloud_exadata_infrastructures.html.markdown @@ -99,6 +99,7 @@ The following attributes are exported: * `state` - The current lifecycle state of the cloud Exadata infrastructure resource. * `storage_count` - The number of storage servers for the cloud Exadata infrastructure. * `storage_server_version` - The software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15 +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `time_created` - The date and time the cloud Exadata infrastructure resource was created. * `total_storage_size_in_gbs` - The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). diff --git a/website/docs/d/database_cloud_vm_cluster.html.markdown b/website/docs/d/database_cloud_vm_cluster.html.markdown index aeb03f6ac76..4f4b4e805bd 100644 --- a/website/docs/d/database_cloud_vm_cluster.html.markdown +++ b/website/docs/d/database_cloud_vm_cluster.html.markdown @@ -97,6 +97,7 @@ The following attributes are exported: * For Exadata and virtual machine 2-node RAC systems, do not use a subnet that overlaps with 192.168.128.0/20. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and backup subnet. +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `system_version` - Operating system version of the image. * `time_created` - The date and time that the cloud VM cluster was created. diff --git a/website/docs/d/database_cloud_vm_clusters.html.markdown b/website/docs/d/database_cloud_vm_clusters.html.markdown index 060e71398cd..b443062142d 100644 --- a/website/docs/d/database_cloud_vm_clusters.html.markdown +++ b/website/docs/d/database_cloud_vm_clusters.html.markdown @@ -103,6 +103,7 @@ The following attributes are exported: * For Exadata and virtual machine 2-node RAC systems, do not use a subnet that overlaps with 192.168.128.0/20. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and backup subnet. +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `system_version` - Operating system version of the image. * `time_created` - The date and time that the cloud VM cluster was created. diff --git a/website/docs/d/globally_distributed_database_private_endpoint.html.markdown b/website/docs/d/globally_distributed_database_private_endpoint.html.markdown new file mode 100644 index 00000000000..ae6ac1ed1fc --- /dev/null +++ b/website/docs/d/globally_distributed_database_private_endpoint.html.markdown @@ -0,0 +1,52 @@ +--- +subcategory: "Globally Distributed Database" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_globally_distributed_database_private_endpoint" +sidebar_current: "docs-oci-datasource-globally_distributed_database-private_endpoint" +description: |- + Provides details about a specific Private Endpoint in Oracle Cloud Infrastructure Globally Distributed Database service +--- + +# Data Source: oci_globally_distributed_database_private_endpoint +This data source provides details about a specific Private Endpoint resource in Oracle Cloud Infrastructure Globally Distributed Database service. + +Get the PrivateEndpoint resource. + + +## Example Usage + +```hcl +data "oci_globally_distributed_database_private_endpoint" "test_private_endpoint" { + #Required + private_endpoint_id = oci_globally_distributed_database_private_endpoint.test_private_endpoint.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `private_endpoint_id` - (Required) Oracle Sharded Database PrivateEndpoint identifier + + +## Attributes Reference + +The following attributes are exported: + +* `compartment_id` - Identifier of the compartment in which private endpoint exists. +* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - PrivateEndpoint description. +* `display_name` - PrivateEndpoint display name. +* `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `id` - The identifier of the Private Endpoint. +* `lifecycle_state_details` - Detailed message for the lifecycle state. +* `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. +* `private_ip` - IP address of the Private Endpoint. +* `sharded_databases` - The OCIDs of sharded databases that consumes the given private endpoint. +* `state` - Lifecycle states for private endpoint. +* `subnet_id` - Identifier of the subnet in which private endpoint exists. +* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `time_created` - The time the PrivateEndpoint was first created. An RFC3339 formatted datetime string +* `time_updated` - The time the Private Endpoint was last updated. An RFC3339 formatted datetime string +* `vcn_id` - Identifier of the VCN in which subnet exists. + diff --git a/website/docs/d/globally_distributed_database_private_endpoints.html.markdown b/website/docs/d/globally_distributed_database_private_endpoints.html.markdown new file mode 100644 index 00000000000..e11fda6a9b1 --- /dev/null +++ b/website/docs/d/globally_distributed_database_private_endpoints.html.markdown @@ -0,0 +1,64 @@ +--- +subcategory: "Globally Distributed Database" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_globally_distributed_database_private_endpoints" +sidebar_current: "docs-oci-datasource-globally_distributed_database-private_endpoints" +description: |- + Provides the list of Private Endpoints in Oracle Cloud Infrastructure Globally Distributed Database service +--- + +# Data Source: oci_globally_distributed_database_private_endpoints +This data source provides the list of Private Endpoints in Oracle Cloud Infrastructure Globally Distributed Database service. + +List of PrivateEndpoints. + + +## Example Usage + +```hcl +data "oci_globally_distributed_database_private_endpoints" "test_private_endpoints" { + #Required + compartment_id = var.compartment_id + + #Optional + display_name = var.private_endpoint_display_name + state = var.private_endpoint_state +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) The ID of the compartment in which to list resources. +* `display_name` - (Optional) A filter to return only private endpoint that match the entire name given. The match is not case sensitive. +* `state` - (Optional) A filter to return only resources their lifecycleState matches the given lifecycleState. + + +## Attributes Reference + +The following attributes are exported: + +* `private_endpoint_collection` - The list of private_endpoint_collection. + +### PrivateEndpoint Reference + +The following attributes are exported: + +* `compartment_id` - Identifier of the compartment in which private endpoint exists. +* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - PrivateEndpoint description. +* `display_name` - PrivateEndpoint display name. +* `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `id` - The identifier of the Private Endpoint. +* `lifecycle_state_details` - Detailed message for the lifecycle state. +* `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. +* `private_ip` - IP address of the Private Endpoint. +* `sharded_databases` - The OCIDs of sharded databases that consumes the given private endpoint. +* `state` - Lifecycle states for private endpoint. +* `subnet_id` - Identifier of the subnet in which private endpoint exists. +* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `time_created` - The time the PrivateEndpoint was first created. An RFC3339 formatted datetime string +* `time_updated` - The time the Private Endpoint was last updated. An RFC3339 formatted datetime string +* `vcn_id` - Identifier of the VCN in which subnet exists. + diff --git a/website/docs/d/globally_distributed_database_sharded_database.html.markdown b/website/docs/d/globally_distributed_database_sharded_database.html.markdown new file mode 100644 index 00000000000..62e425006b0 --- /dev/null +++ b/website/docs/d/globally_distributed_database_sharded_database.html.markdown @@ -0,0 +1,118 @@ +--- +subcategory: "Globally Distributed Database" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_globally_distributed_database_sharded_database" +sidebar_current: "docs-oci-datasource-globally_distributed_database-sharded_database" +description: |- + Provides details about a specific Sharded Database in Oracle Cloud Infrastructure Globally Distributed Database service +--- + +# Data Source: oci_globally_distributed_database_sharded_database +This data source provides details about a specific Sharded Database resource in Oracle Cloud Infrastructure Globally Distributed Database service. + +Gets the details of the Sharded database identified by given id. + + +## Example Usage + +```hcl +data "oci_globally_distributed_database_sharded_database" "test_sharded_database" { + #Required + sharded_database_id = oci_globally_distributed_database_sharded_database.test_sharded_database.id + + #Optional + metadata = var.sharded_database_metadata +} +``` + +## Argument Reference + +The following arguments are supported: + +* `metadata` - (Optional) Comma separated names of argument corresponding to which metadata need to be retrived, namely VM_CLUSTER_INFO, ADDITIONAL_RESOURCE_INFO. An example is metadata=VM_CLUSTER_INFO,ADDITIONAL_RESOURCE_INFO. +* `sharded_database_id` - (Required) Sharded Database identifier + + +## Attributes Reference + +The following attributes are exported: + +* `catalog_details` - Details of ATP-D based catalogs. + * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the catalog. + * `compute_count` - The compute amount available to the underlying autonomous database associated with shard or catalog. + * `container_database_id` - Identifier of the underlying container database. + * `container_database_parent_id` - Identifier of the underlying container database parent. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `encryption_key_details` - Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - Determines the auto-scaling mode. + * `metadata` - Additional metadata related to catalog's underlying supporting resource. + * `name` - Catalog name + * `peer_cloud_autonomous_vm_cluster_id` - Identifier of the peer cloudAutonomousVmCluster for the catalog. + * `shard_group` - Name of the shard-group to which the catalog belongs. + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the catalog was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with catalog expires. An RFC3339 formatted datetime string + * `time_updated` - The time the catalog was last created. An RFC3339 formatted datetime string +* `character_set` - The character set for the database. +* `chunks` - The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace. +* `cluster_certificate_common_name` - The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period. +* `compartment_id` - Identifier of the compartment in which sharded database exists. +* `connection_strings` - Details of sharded database connection String. + * `all_connection_strings` - Collection of connection strings. +* `db_deployment_type` - The database deployment type. +* `db_version` - Oracle Database version number. +* `db_workload` - Possible workload types. +* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `display_name` - Oracle sharded database display name. +* `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `gsms` - Details of GSM instances for the sharded database. + * `compute_count` - The compute count for the GSM instance. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `metadata` - Additional metadata related to GSM's underlying supporting resource. + * `name` - Name of the GSM instance + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the GSM instance was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with GSM expires. An RFC3339 formatted datetime string + * `time_updated` - The time the GSM instance was last updated. An RFC3339 formatted datetime string +* `id` - Sharded Database identifier +* `lifecycle_state_details` - Detailed message for the lifecycle state. +* `listener_port` - The GSM listener port number. +* `listener_port_tls` - The TLS listener port number for sharded database. +* `ncharacter_set` - The national character set for the database. +* `ons_port_local` - Ons local port number. +* `ons_port_remote` - Ons remote port number. +* `prefix` - Unique prefix for the sharded database. +* `private_endpoint` - The OCID of private endpoint being used by the sharded database. +* `shard_details` - Details of ATP-D based shards. + * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the shard. + * `compute_count` - The compute amount available to the underlying autonomous database associated with shard. + * `container_database_id` - Identifier of the underlying container database. + * `container_database_parent_id` - Identifier of the underlying container database parent. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `encryption_key_details` - Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - Determines the auto-scaling mode. + * `metadata` - Additional metadata related to shard's underlying supporting resource. + * `name` - Name of the shard. + * `peer_cloud_autonomous_vm_cluster_id` - Identifier of the peer cloudAutonomousVmCluster for the shard. + * `shard_group` - Name of the shard-group to which the shard belongs. + * `shard_space` - Shard space name. + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the the shard was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with shard expires. An RFC3339 formatted datetime string + * `time_updated` - The time the shard was last updated. An RFC3339 formatted datetime string +* `sharding_method` - Sharding Method. +* `state` - Lifecycle states for sharded databases. +* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `time_created` - The time the the Sharded Database was created. An RFC3339 formatted datetime string +* `time_updated` - The time the Sharded Database was last updated. An RFC3339 formatted datetime string +* `time_zone` - Timezone associated with the sharded database. + diff --git a/website/docs/d/globally_distributed_database_sharded_databases.html.markdown b/website/docs/d/globally_distributed_database_sharded_databases.html.markdown new file mode 100644 index 00000000000..0d551a01999 --- /dev/null +++ b/website/docs/d/globally_distributed_database_sharded_databases.html.markdown @@ -0,0 +1,126 @@ +--- +subcategory: "Globally Distributed Database" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_globally_distributed_database_sharded_databases" +sidebar_current: "docs-oci-datasource-globally_distributed_database-sharded_databases" +description: |- + Provides the list of Sharded Databases in Oracle Cloud Infrastructure Globally Distributed Database service +--- + +# Data Source: oci_globally_distributed_database_sharded_databases +This data source provides the list of Sharded Databases in Oracle Cloud Infrastructure Globally Distributed Database service. + +List of Sharded databases. + + +## Example Usage + +```hcl +data "oci_globally_distributed_database_sharded_databases" "test_sharded_databases" { + #Required + compartment_id = var.compartment_id + + #Optional + display_name = var.sharded_database_display_name + state = var.sharded_database_state +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) The ID of the compartment in which to list resources. +* `display_name` - (Optional) A filter to return only sharded databases that match the entire name given. The match is not case sensitive. +* `state` - (Optional) A filter to return only resources their lifecycleState matches the given lifecycleState. + + +## Attributes Reference + +The following attributes are exported: + +* `sharded_database_collection` - The list of sharded_database_collection. + +### ShardedDatabase Reference + +The following attributes are exported: + +* `catalog_details` - Details of ATP-D based catalogs. + * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the catalog. + * `compute_count` - The compute amount available to the underlying autonomous database associated with shard or catalog. + * `container_database_id` - Identifier of the underlying container database. + * `container_database_parent_id` - Identifier of the underlying container database parent. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `encryption_key_details` - Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - Determines the auto-scaling mode. + * `metadata` - Additional metadata related to catalog's underlying supporting resource. + * `name` - Catalog name + * `peer_cloud_autonomous_vm_cluster_id` - Identifier of the peer cloudAutonomousVmCluster for the catalog. + * `shard_group` - Name of the shard-group to which the catalog belongs. + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the catalog was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with catalog expires. An RFC3339 formatted datetime string + * `time_updated` - The time the catalog was last created. An RFC3339 formatted datetime string +* `character_set` - The character set for the database. +* `chunks` - The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace. +* `cluster_certificate_common_name` - The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period. +* `compartment_id` - Identifier of the compartment in which sharded database exists. +* `connection_strings` - Details of sharded database connection String. + * `all_connection_strings` - Collection of connection strings. +* `db_deployment_type` - The database deployment type. +* `db_version` - Oracle Database version number. +* `db_workload` - Possible workload types. +* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `display_name` - Oracle sharded database display name. +* `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `gsms` - Details of GSM instances for the sharded database. + * `compute_count` - The compute count for the GSM instance. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `metadata` - Additional metadata related to GSM's underlying supporting resource. + * `name` - Name of the GSM instance + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the GSM instance was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with GSM expires. An RFC3339 formatted datetime string + * `time_updated` - The time the GSM instance was last updated. An RFC3339 formatted datetime string +* `id` - Sharded Database identifier +* `lifecycle_state_details` - Detailed message for the lifecycle state. +* `listener_port` - The GSM listener port number. +* `listener_port_tls` - The TLS listener port number for sharded database. +* `ncharacter_set` - The national character set for the database. +* `ons_port_local` - Ons local port number. +* `ons_port_remote` - Ons remote port number. +* `prefix` - Unique prefix for the sharded database. +* `private_endpoint` - The OCID of private endpoint being used by the sharded database. +* `shard_details` - Details of ATP-D based shards. + * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the shard. + * `compute_count` - The compute amount available to the underlying autonomous database associated with shard. + * `container_database_id` - Identifier of the underlying container database. + * `container_database_parent_id` - Identifier of the underlying container database parent. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `encryption_key_details` - Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - Determines the auto-scaling mode. + * `metadata` - Additional metadata related to shard's underlying supporting resource. + * `name` - Name of the shard. + * `peer_cloud_autonomous_vm_cluster_id` - Identifier of the peer cloudAutonomousVmCluster for the shard. + * `shard_group` - Name of the shard-group to which the shard belongs. + * `shard_space` - Shard space name. + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the the shard was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with shard expires. An RFC3339 formatted datetime string + * `time_updated` - The time the shard was last updated. An RFC3339 formatted datetime string +* `sharding_method` - Sharding Method. +* `state` - Lifecycle states for sharded databases. +* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `time_created` - The time the the Sharded Database was created. An RFC3339 formatted datetime string +* `time_updated` - The time the Sharded Database was last updated. An RFC3339 formatted datetime string +* `time_zone` - Timezone associated with the sharded database. + diff --git a/website/docs/d/identity_domains_my_requests.html.markdown b/website/docs/d/identity_domains_my_requests.html.markdown index 9511d90a5a1..4ebf5cd204b 100644 --- a/website/docs/d/identity_domains_my_requests.html.markdown +++ b/website/docs/d/identity_domains_my_requests.html.markdown @@ -467,7 +467,6 @@ The following attributes are exported: * returned: default * type: string * uniqueness: none -<<<<<<< ours * `description` - Resource description **Added In:** 2307071836 @@ -480,10 +479,7 @@ The following attributes are exported: * returned: default * type: string * uniqueness: none - * `display` - Resource display name -======= * `ref` - Resource URI ->>>>>>> theirs **SCIM++ Properties:** * idcsSearchable: false diff --git a/website/docs/d/integration_integration_instance.html.markdown b/website/docs/d/integration_integration_instance.html.markdown index 10cb8d9b930..3987c804e31 100644 --- a/website/docs/d/integration_integration_instance.html.markdown +++ b/website/docs/d/integration_integration_instance.html.markdown @@ -76,17 +76,12 @@ The following attributes are exported: * `allowlisted_ips` - Source IP addresses or IP address ranges ingress rules. (ex: "168.122.59.5", "10.20.30.0/26") An invalid IP or CIDR block will result in a 400 response. * `id` - The Virtual Cloud Network OCID. * `is_integration_vcn_allowlisted` - The Integration service's VCN is allow-listed to allow integrations to call back into other integrations - * `network_endpoint_type` - The type of network endpoint. -<<<<<<< HEAD -* `shape` - Shape -||||||| parent of c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) -======= + * `network_endpoint_type` - The type of network endpoint. * `private_endpoint_outbound_connection` - Base representation for Outbound Connection (Reverse Connection). * `nsg_ids` - One or more Network security group Ids. This is an optional argument. * `outbound_connection_type` - The type of Outbound Connection. * `subnet_id` - Customer Private Network VCN Subnet OCID. This is a required argument. * `shape` - Shape ->>>>>>> c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) * `state` - The current state of the integration instance. * `state_message` - An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `time_created` - The time the the Integration Instance was created. An RFC3339 formatted datetime string. diff --git a/website/docs/d/integration_integration_instances.html.markdown b/website/docs/d/integration_integration_instances.html.markdown index 4a333575dae..8cc2b32894c 100644 --- a/website/docs/d/integration_integration_instances.html.markdown +++ b/website/docs/d/integration_integration_instances.html.markdown @@ -89,17 +89,12 @@ The following attributes are exported: * `allowlisted_ips` - Source IP addresses or IP address ranges ingress rules. (ex: "168.122.59.5", "10.20.30.0/26") An invalid IP or CIDR block will result in a 400 response. * `id` - The Virtual Cloud Network OCID. * `is_integration_vcn_allowlisted` - The Integration service's VCN is allow-listed to allow integrations to call back into other integrations - * `network_endpoint_type` - The type of network endpoint. -<<<<<<< HEAD -* `shape` - Shape -||||||| parent of c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) -======= + * `network_endpoint_type` - The type of network endpoint. * `private_endpoint_outbound_connection` - Base representation for Outbound Connection (Reverse Connection). * `nsg_ids` - One or more Network security group Ids. This is an optional argument. * `outbound_connection_type` - The type of Outbound Connection. * `subnet_id` - Customer Private Network VCN Subnet OCID. This is a required argument. * `shape` - Shape ->>>>>>> c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) * `state` - The current state of the integration instance. * `state_message` - An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `time_created` - The time the the Integration Instance was created. An RFC3339 formatted datetime string. diff --git a/website/docs/d/opsi_database_insight.html.markdown b/website/docs/d/opsi_database_insight.html.markdown index dbabab34207..41690d465a7 100644 --- a/website/docs/d/opsi_database_insight.html.markdown +++ b/website/docs/d/opsi_database_insight.html.markdown @@ -33,9 +33,9 @@ The following arguments are supported: The following attributes are exported: * `compartment_id` - Compartment identifier of the database -* `connection_credential_details` - User credential details to connect to the database. This is supplied via the External Database Service. +* `connection_credential_details` - User credential details to connect to the database. * `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - Credential type. + * `credential_type` - Credential type. * `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. * `role` - database user role. * `user_name` - database user name. @@ -48,9 +48,10 @@ The following attributes are exported: * `port` - Listener port number used for connection requests. * `protocol` - Protocol used for connection requests for private endpoint accssed database resource. * `service_name` - Database service name used for connection requests. + * `connector_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of External Database Connector * `credential_details` - User credential details to connect to the database. * `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - Credential type. + * `credential_type` - Credential type. * `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. * `role` - database user role. * `user_name` - database user name. @@ -60,7 +61,7 @@ The following attributes are exported: * `database_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `database_name` - Name of database * `database_resource_type` - Oracle Cloud Infrastructure database resource type -* `database_type` - Operations Insights internal representation of the database type. +* `database_type` - Ops Insights internal representation of the database type. * `database_version` - The version of the database. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `enterprise_manager_bridge_id` - OPSI Enterprise Manager Bridge OCID @@ -73,6 +74,9 @@ The following attributes are exported: * `exadata_insight_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata insight. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - Database insight identifier +* `is_advanced_features_enabled` - Flag is to identify if advanced features for autonomous database is enabled or not +* `is_heat_wave_cluster_attached` - Specifies if MYSQL DB System has heatwave cluster attached. +* `is_highly_available` - Specifies if MYSQL DB System is highly available. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `opsi_private_endpoint_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint * `parent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. diff --git a/website/docs/d/opsi_database_insights.html.markdown b/website/docs/d/opsi_database_insights.html.markdown index d10e6d9fa26..d5a1cf01778 100644 --- a/website/docs/d/opsi_database_insights.html.markdown +++ b/website/docs/d/opsi_database_insights.html.markdown @@ -39,14 +39,14 @@ data "oci_opsi_database_insights" "test_database_insights" { The following arguments are supported: * `compartment_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `compartment_id_in_subtree` - (Optional) A flag to search all resources within a given compartment and all sub-compartments. -* `database_id` - (Applicable when entity_source=AUTONOMOUS_DATABASE | PE_COMANAGED_DATABASE) Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. +* `compartment_id_in_subtree` - (Optional) A flag to search all resources within a given compartment and all sub-compartments. +* `database_id` - (Applicable when entity_source=AUTONOMOUS_DATABASE | MACS_MANAGED_EXTERNAL_DATABASE | MDS_MYSQL_DATABASE_SYSTEM | PE_COMANAGED_DATABASE) Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. * `database_type` - (Optional) Filter by one or more database type. Possible values are ADW-S, ATP-S, ADW-D, ATP-D, EXTERNAL-PDB, EXTERNAL-NONCDB. * `enterprise_manager_bridge_id` - (Applicable when entity_source=EM_MANAGED_EXTERNAL_DATABASE) Unique Enterprise Manager bridge identifier * `exadata_insight_id` - (Applicable when entity_source=EM_MANAGED_EXTERNAL_DATABASE) [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of exadata insight resource. * `fields` - (Optional) Specifies the fields to return in a database summary response. By default all fields are returned if omitted. * `id` - (Optional) Optional list of database insight resource [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). -* `opsi_private_endpoint_id` - (Applicable when entity_source=PE_COMANAGED_DATABASE) Unique Operations Insights PrivateEndpoint identifier +* `opsi_private_endpoint_id` - (Applicable when entity_source=AUTONOMOUS_DATABASE | PE_COMANAGED_DATABASE) Unique Operations Insights PrivateEndpoint identifier * `state` - (Optional) Lifecycle states * `status` - (Optional) Resource Status @@ -62,9 +62,9 @@ The following attributes are exported: The following attributes are exported: * `compartment_id` - Compartment identifier of the database -* `connection_credential_details` - User credential details to connect to the database. This is supplied via the External Database Service. +* `connection_credential_details` - User credential details to connect to the database. * `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - Credential type. + * `credential_type` - Credential type. * `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. * `role` - database user role. * `user_name` - database user name. @@ -77,19 +77,20 @@ The following attributes are exported: * `port` - Listener port number used for connection requests. * `protocol` - Protocol used for connection requests for private endpoint accssed database resource. * `service_name` - Database service name used for connection requests. -* `credential_details` - User credential details to connect to the database. This is supplied via the External Database Service. - * `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - Credential type. - * `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. - * `role` - database user role. - * `user_name` - database user name. - * `wallet_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. + * `connector_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of External Database Connector + * `credential_details` - User credential details to connect to the database. + * `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. + * `credential_type` - Credential type. + * `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. + * `role` - database user role. + * `user_name` - database user name. + * `wallet_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. * `database_connection_status_details` - A message describing the status of the database connection of this resource. For example, it can be used to provide actionable information about the permission and content validity of the database connection. * `database_display_name` - Display name of database * `database_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `database_name` - Name of database * `database_resource_type` - Oracle Cloud Infrastructure database resource type -* `database_type` - Operations Insights internal representation of the database type. +* `database_type` - Ops Insights internal representation of the database type. * `database_version` - The version of the database. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `enterprise_manager_bridge_id` - OPSI Enterprise Manager Bridge OCID @@ -102,6 +103,9 @@ The following attributes are exported: * `exadata_insight_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata insight. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - Database insight identifier +* `is_advanced_features_enabled` - Flag is to identify if advanced features for autonomous database is enabled or not +* `is_heat_wave_cluster_attached` - Specifies if MYSQL DB System has heatwave cluster attached. +* `is_highly_available` - Specifies if MYSQL DB System is highly available. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `opsi_private_endpoint_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint * `parent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. diff --git a/website/docs/d/opsi_enterprise_manager_bridges.html.markdown b/website/docs/d/opsi_enterprise_manager_bridges.html.markdown index 07b33eb7e68..172655da36a 100644 --- a/website/docs/d/opsi_enterprise_manager_bridges.html.markdown +++ b/website/docs/d/opsi_enterprise_manager_bridges.html.markdown @@ -10,7 +10,7 @@ description: |- # Data Source: oci_opsi_enterprise_manager_bridges This data source provides the list of Enterprise Manager Bridges in Oracle Cloud Infrastructure Opsi service. -Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. +Gets a list of Ops Insights Enterprise Manager bridges. Either compartmentId or id must be specified. When both compartmentId and compartmentIdInSubtree are specified, a list of bridges in that compartment and in all sub-compartments will be returned. diff --git a/website/docs/d/opsi_host_insight.html.markdown b/website/docs/d/opsi_host_insight.html.markdown index d3910d566fb..fc18e2e1a9d 100644 --- a/website/docs/d/opsi_host_insight.html.markdown +++ b/website/docs/d/opsi_host_insight.html.markdown @@ -47,13 +47,16 @@ The following attributes are exported: * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `host_display_name` - The user-friendly name for the host. The name does not have to be unique. * `host_name` - The host name. The host name is unique amongst the hosts managed by the same management agent. -* `host_type` - Operations Insights internal representation of the host type. Possible value is EXTERNAL-HOST. +* `host_type` - Ops Insights internal representation of the host type. Possible value is EXTERNAL-HOST. * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. +* `management_agent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent +* `opsi_private_endpoint_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint +* `parent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. * `platform_name` - Platform name. * `platform_type` - Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX]. * `platform_version` - Platform version. -* `processor_count` - Processor count. This is the OCPU count for Autonomous Database and CPU core count for other database types. +* `root_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. * `state` - The current state of the host. * `status` - Indicates the status of a host insight in Operations Insights * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/d/opsi_host_insights.html.markdown b/website/docs/d/opsi_host_insights.html.markdown index 8ad051798f3..0f7b99db312 100644 --- a/website/docs/d/opsi_host_insights.html.markdown +++ b/website/docs/d/opsi_host_insights.html.markdown @@ -39,9 +39,9 @@ The following arguments are supported: * `compartment_id_in_subtree` - (Optional) A flag to search all resources within a given compartment and all sub-compartments. * `enterprise_manager_bridge_id` - (Applicable when entity_source=EM_MANAGED_EXTERNAL_HOST) Unique Enterprise Manager bridge identifier * `exadata_insight_id` - (Applicable when entity_source=EM_MANAGED_EXTERNAL_HOST) [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of exadata insight resource. -* `host_type` - (Optional) Filter by one or more host types. Possible values are CLOUD-HOST, EXTERNAL-HOST +* `host_type` - (Optional) Filter by one or more host types. Possible values are CLOUD-HOST, EXTERNAL-HOST, COMANAGED-VM-HOST, COMANAGED-BM-HOST, COMANAGED-EXACS-HOST * `id` - (Optional) Optional list of host insight resource [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). -* `platform_type` - (Optional) Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX]. +* `platform_type` - (Applicable when entity_source=EM_MANAGED_EXTERNAL_HOST | MACS_MANAGED_CLOUD_HOST | MACS_MANAGED_EXTERNAL_HOST | PE_COMANAGED_HOST) Filter by one or more platform types. Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX]. * `state` - (Optional) Lifecycle states * `status` - (Optional) Resource Status @@ -70,14 +70,17 @@ The following attributes are exported: * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `host_display_name` - The user-friendly name for the host. The name does not have to be unique. * `host_name` - The host name. The host name is unique amongst the hosts managed by the same management agent. -* `host_type` - Operations Insights internal representation of the host type. Possible value is EXTERNAL-HOST. +* `host_type` - Ops Insights internal representation of the host type. Possible value is EXTERNAL-HOST. * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `management_agent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent +* `opsi_private_endpoint_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint +* `parent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. * `platform_name` - Platform name. * `platform_type` - Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX]. * `platform_version` - Platform version. * `processor_count` - Processor count. This is the OCPU count for Autonomous Database and CPU core count for other database types. +* `root_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. * `state` - The current state of the host. * `status` - Indicates the status of a host insight in Operations Insights * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/d/opsi_news_report.html.markdown b/website/docs/d/opsi_news_report.html.markdown index dcb11b31d72..93fbac5569e 100644 --- a/website/docs/d/opsi_news_report.html.markdown +++ b/website/docs/d/opsi_news_report.html.markdown @@ -53,7 +53,7 @@ The following attributes are exported: * `news_frequency` - News report frequency. * `ons_topic_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ONS topic. * `state` - The current state of the news report. -* `status` - Indicates the status of a news report in Operations Insights. +* `status` - Indicates the status of a news report in Ops Insights. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - The time the the news report was first enabled. An RFC3339 formatted datetime string. * `time_updated` - The time the news report was updated. An RFC3339 formatted datetime string. diff --git a/website/docs/d/opsi_news_reports.html.markdown b/website/docs/d/opsi_news_reports.html.markdown index bcb468ab5b9..2034c3fc7ae 100644 --- a/website/docs/d/opsi_news_reports.html.markdown +++ b/website/docs/d/opsi_news_reports.html.markdown @@ -33,7 +33,7 @@ The following arguments are supported: * `compartment_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. * `compartment_id_in_subtree` - (Optional) A flag to search all resources within a given compartment and all sub-compartments. -* `news_report_id` - (Optional) Unique Operations Insights news report identifier +* `news_report_id` - (Optional) Unique Ops Insights news report identifier * `state` - (Optional) Lifecycle states * `status` - (Optional) Resource Status @@ -69,7 +69,7 @@ The following attributes are exported: * `news_frequency` - News report frequency. * `ons_topic_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ONS topic. * `state` - The current state of the news report. -* `status` - Indicates the status of a news report in Operations Insights. +* `status` - Indicates the status of a news report in Ops Insights. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - The time the the news report was first enabled. An RFC3339 formatted datetime string. * `time_updated` - The time the news report was updated. An RFC3339 formatted datetime string. diff --git a/website/docs/d/opsi_operations_insights_private_endpoint.html.markdown b/website/docs/d/opsi_operations_insights_private_endpoint.html.markdown index b3d67faacd0..7ca4d5385d9 100644 --- a/website/docs/d/opsi_operations_insights_private_endpoint.html.markdown +++ b/website/docs/d/opsi_operations_insights_private_endpoint.html.markdown @@ -38,7 +38,7 @@ The following attributes are exported: * `display_name` - The display name of the private endpoint. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - The OCID of the Private service accessed database. -* `is_used_for_rac_dbs` - The flag is to identify if private endpoint is used for rac database or not +* `is_used_for_rac_dbs` - The flag is to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. * `private_endpoint_status_details` - A message describing the status of the private endpoint connection of this resource. For example, it can be used to provide actionable information about the validity of the private endpoint connection. diff --git a/website/docs/d/opsi_operations_insights_private_endpoints.html.markdown b/website/docs/d/opsi_operations_insights_private_endpoints.html.markdown index 46c7d14adfa..60c4d956c0a 100644 --- a/website/docs/d/opsi_operations_insights_private_endpoints.html.markdown +++ b/website/docs/d/opsi_operations_insights_private_endpoints.html.markdown @@ -57,7 +57,7 @@ The following attributes are exported: * `display_name` - The display name of the private endpoint. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - The OCID of the Private service accessed database. -* `is_used_for_rac_dbs` - The flag is to identify if private endpoint is used for rac database or not +* `is_used_for_rac_dbs` - The flag is to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. * `private_endpoint_status_details` - A message describing the status of the private endpoint connection of this resource. For example, it can be used to provide actionable information about the validity of the private endpoint connection. diff --git a/website/docs/d/opsi_operations_insights_warehouse.html.markdown b/website/docs/d/opsi_operations_insights_warehouse.html.markdown index 555e820bd9b..db6c195ea55 100644 --- a/website/docs/d/opsi_operations_insights_warehouse.html.markdown +++ b/website/docs/d/opsi_operations_insights_warehouse.html.markdown @@ -10,7 +10,7 @@ description: |- # Data Source: oci_opsi_operations_insights_warehouse This data source provides details about a specific Operations Insights Warehouse resource in Oracle Cloud Infrastructure Opsi service. -Gets details of an Operations Insights Warehouse. +Gets details of an Ops Insights Warehouse. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. @@ -27,7 +27,7 @@ data "oci_opsi_operations_insights_warehouse" "test_operations_insights_warehous The following arguments are supported: -* `operations_insights_warehouse_id` - (Required) Unique Operations Insights Warehouse identifier +* `operations_insights_warehouse_id` - (Required) Unique Ops Insights Warehouse identifier ## Attributes Reference @@ -38,17 +38,17 @@ The following attributes are exported: * `cpu_allocated` - Number of OCPUs allocated to OPSI Warehouse ADW. * `cpu_used` - Number of OCPUs used by OPSI Warehouse ADW. Can be fractional. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` -* `display_name` - User-friedly name of Operations Insights Warehouse that does not have to be unique. +* `display_name` - User-friedly name of Ops Insights Warehouse that does not have to be unique. * `dynamic_group_id` - OCID of the dynamic group created for the warehouse * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - OPSI Warehouse OCID * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. -* `operations_insights_tenancy_id` - Tenancy Identifier of Operations Insights service +* `operations_insights_tenancy_id` - Tenancy Identifier of Ops Insights service * `state` - Possible lifecycle states * `storage_allocated_in_gbs` - Storage allocated to OPSI Warehouse ADW. * `storage_used_in_gbs` - Storage by OPSI Warehouse ADW in GB. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - The time at which the resource was first created. An RFC3339 formatted datetime string -* `time_last_wallet_rotated` - The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string +* `time_last_wallet_rotated` - The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string * `time_updated` - The time at which the resource was last updated. An RFC3339 formatted datetime string diff --git a/website/docs/d/opsi_operations_insights_warehouse_user.html.markdown b/website/docs/d/opsi_operations_insights_warehouse_user.html.markdown index 37d8ed98d30..6c31e0fe1f5 100644 --- a/website/docs/d/opsi_operations_insights_warehouse_user.html.markdown +++ b/website/docs/d/opsi_operations_insights_warehouse_user.html.markdown @@ -33,7 +33,7 @@ The following arguments are supported: The following attributes are exported: * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `connection_password` - User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `connection_password` - User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - Hub User OCID @@ -41,7 +41,7 @@ The following attributes are exported: * `is_em_data_access` - Indicate whether user has access to EM data. * `is_opsi_data_access` - Indicate whether user has access to OPSI data. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. -* `name` - Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `name` - Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `operations_insights_warehouse_id` - OPSI Warehouse OCID * `state` - Possible lifecycle states * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/d/opsi_operations_insights_warehouse_users.html.markdown b/website/docs/d/opsi_operations_insights_warehouse_users.html.markdown index 5ea21cb91a1..fef5471777d 100644 --- a/website/docs/d/opsi_operations_insights_warehouse_users.html.markdown +++ b/website/docs/d/opsi_operations_insights_warehouse_users.html.markdown @@ -50,7 +50,7 @@ The following attributes are exported: The following attributes are exported: * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `connection_password` - User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `connection_password` - User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - Hub User OCID @@ -58,7 +58,7 @@ The following attributes are exported: * `is_em_data_access` - Indicate whether user has access to EM data. * `is_opsi_data_access` - Indicate whether user has access to OPSI data. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. -* `name` - Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `name` - Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `operations_insights_warehouse_id` - OPSI Warehouse OCID * `state` - Possible lifecycle states * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/d/opsi_operations_insights_warehouses.html.markdown b/website/docs/d/opsi_operations_insights_warehouses.html.markdown index 2e4bf572452..71ade60156b 100644 --- a/website/docs/d/opsi_operations_insights_warehouses.html.markdown +++ b/website/docs/d/opsi_operations_insights_warehouses.html.markdown @@ -10,7 +10,7 @@ description: |- # Data Source: oci_opsi_operations_insights_warehouses This data source provides the list of Operations Insights Warehouses in Oracle Cloud Infrastructure Opsi service. -Gets a list of Operations Insights warehouses. Either compartmentId or id must be specified. +Gets a list of Ops Insights warehouses. Either compartmentId or id must be specified. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. @@ -33,7 +33,7 @@ The following arguments are supported: * `compartment_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. * `display_name` - (Optional) A filter to return only resources that match the entire display name. -* `id` - (Optional) Unique Operations Insights Warehouse identifier +* `id` - (Optional) Unique Ops Insights Warehouse identifier * `state` - (Optional) Lifecycle states @@ -51,17 +51,17 @@ The following attributes are exported: * `cpu_allocated` - Number of OCPUs allocated to OPSI Warehouse ADW. * `cpu_used` - Number of OCPUs used by OPSI Warehouse ADW. Can be fractional. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` -* `display_name` - User-friedly name of Operations Insights Warehouse that does not have to be unique. +* `display_name` - User-friedly name of Ops Insights Warehouse that does not have to be unique. * `dynamic_group_id` - OCID of the dynamic group created for the warehouse * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - OPSI Warehouse OCID * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. -* `operations_insights_tenancy_id` - Tenancy Identifier of Operations Insights service +* `operations_insights_tenancy_id` - Tenancy Identifier of Ops Insights service * `state` - Possible lifecycle states * `storage_allocated_in_gbs` - Storage allocated to OPSI Warehouse ADW. * `storage_used_in_gbs` - Storage by OPSI Warehouse ADW in GB. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - The time at which the resource was first created. An RFC3339 formatted datetime string -* `time_last_wallet_rotated` - The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string +* `time_last_wallet_rotated` - The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string * `time_updated` - The time at which the resource was last updated. An RFC3339 formatted datetime string diff --git a/website/docs/guides/resource_discovery.html.markdown b/website/docs/guides/resource_discovery.html.markdown index 69dc9eb55c7..a4aa633ba36 100644 --- a/website/docs/guides/resource_discovery.html.markdown +++ b/website/docs/guides/resource_discovery.html.markdown @@ -168,6 +168,7 @@ Make sure the `output_path` is empty before running resource discovery * `functions` - Discovers functions resources within the specified compartment * `fusion_apps` - Discovers fusion_apps resources within the specified compartment * `generative_ai` - Discovers generative_ai resources within the specified compartment + * `globally_distributed_database` - Discovers globally_distributed_database resources within the specified compartment * `golden_gate` - Discovers golden_gate resources within the specified compartment * `health_checks` - Discovers health_checks resources within the specified compartment * `identity` - Discovers identity resources across the entire tenancy @@ -775,6 +776,11 @@ generative_ai * oci\_generative\_ai\_endpoint * oci\_generative\_ai\_model +globally_distributed_database + +* oci\_globally\_distributed\_database\_private\_endpoint +* oci\_globally\_distributed\_database\_sharded\_database + golden_gate * oci\_golden\_gate\_database\_registration diff --git a/website/docs/r/apm_synthetics_monitor.html.markdown b/website/docs/r/apm_synthetics_monitor.html.markdown index a50ac77239d..8f4b358d893 100644 --- a/website/docs/r/apm_synthetics_monitor.html.markdown +++ b/website/docs/r/apm_synthetics_monitor.html.markdown @@ -57,12 +57,50 @@ resource "oci_apm_synthetics_monitor" "test_monitor" { } } config_type = var.monitor_configuration_config_type + connection_string = var.monitor_configuration_connection_string + database_authentication_details { + + #Optional + password { + + #Optional + password = var.monitor_configuration_database_authentication_details_password_password + password_type = var.monitor_configuration_database_authentication_details_password_password_type + vault_secret_id = oci_vault_secret.test_secret.id + } + username = var.monitor_configuration_database_authentication_details_username + } + database_connection_type = var.monitor_configuration_database_connection_type + database_role = var.monitor_configuration_database_role + database_type = var.monitor_configuration_database_type + database_wallet_details { + + #Optional + database_wallet = var.monitor_configuration_database_wallet_details_database_wallet + service_name = oci_core_service.test_service.name + } dns_configuration { #Optional is_override_dns = var.monitor_configuration_dns_configuration_is_override_dns override_dns_ip = var.monitor_configuration_dns_configuration_override_dns_ip } + download_size_limit_in_bytes = var.monitor_configuration_download_size_limit_in_bytes + ftp_basic_authentication_details { + + #Optional + password { + + #Optional + password = var.monitor_configuration_ftp_basic_authentication_details_password_password + password_type = var.monitor_configuration_ftp_basic_authentication_details_password_password_type + vault_secret_id = oci_vault_secret.test_secret.id + } + username = var.monitor_configuration_ftp_basic_authentication_details_username + } + ftp_protocol = var.monitor_configuration_ftp_protocol + ftp_request_type = var.monitor_configuration_ftp_request_type + is_active_mode = var.monitor_configuration_is_active_mode is_certificate_validation_enabled = var.monitor_configuration_is_certificate_validation_enabled is_default_snapshot_enabled = var.monitor_configuration_is_default_snapshot_enabled is_failure_retried = var.monitor_configuration_is_failure_retried @@ -79,6 +117,7 @@ resource "oci_apm_synthetics_monitor" "test_monitor" { transmission_rate = var.monitor_configuration_network_configuration_transmission_rate } protocol = var.monitor_configuration_protocol + query = var.monitor_configuration_query record_type = var.monitor_configuration_record_type req_authentication_details { @@ -112,6 +151,7 @@ resource "oci_apm_synthetics_monitor" "test_monitor" { param_name = var.monitor_configuration_request_query_params_param_name param_value = var.monitor_configuration_request_query_params_param_value } + upload_file_size_in_bytes = var.monitor_configuration_upload_file_size_in_bytes verify_response_codes = var.monitor_configuration_verify_response_codes verify_response_content = var.monitor_configuration_verify_response_content verify_texts { @@ -122,6 +162,7 @@ resource "oci_apm_synthetics_monitor" "test_monitor" { } defined_tags = {"foo-namespace.bar-key"= "value"} freeform_tags = {"bar-key"= "value"} + is_ipv6 = var.monitor_is_ipv6 is_run_now = var.monitor_is_run_now is_run_once = var.monitor_is_run_once maintenance_window_schedule { @@ -168,22 +209,46 @@ The following arguments are supported: * `content` - (Required when config_type=REST_CONFIG) (Updatable) Content of the private key file. * `file_name` - (Required when config_type=REST_CONFIG) (Updatable) Name of the private key file. * `config_type` - (Optional) (Updatable) Type of configuration. + * `connection_string` - (Applicable when config_type=SQL_CONFIG) (Updatable) Database connection string. + * `database_authentication_details` - (Applicable when config_type=SQL_CONFIG) (Updatable) Details for basic authentication. + * `password` - (Required when config_type=SQL_CONFIG) (Updatable) Password. + * `password` - (Required when password_type=IN_TEXT) (Updatable) Password. + * `password_type` - (Optional) (Updatable) Type of method to pass password. + * `vault_secret_id` - (Required when password_type=VAULT_SECRET_ID) (Updatable) Vault secret OCID. + * `username` - (Required when config_type=SQL_CONFIG) (Updatable) Username for authentication. + * `database_connection_type` - (Applicable when config_type=SQL_CONFIG) (Updatable) Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + * `database_role` - (Applicable when config_type=SQL_CONFIG) (Updatable) Database role. + * `database_type` - (Applicable when config_type=SQL_CONFIG) (Updatable) Database type. + * `database_wallet_details` - (Applicable when config_type=SQL_CONFIG) (Updatable) Details for database wallet. + * `database_wallet` - (Required when config_type=SQL_CONFIG) (Updatable) The database wallet configuration zip file. + * `service_name` - (Required when config_type=SQL_CONFIG) (Updatable) Service name of the database. * `dns_configuration` - (Optional) (Updatable) Information about the DNS settings. * `is_override_dns` - (Optional) (Updatable) If isOverrideDns is true, then DNS settings will be overridden. * `override_dns_ip` - (Optional) (Updatable) Attribute to override the DNS IP value. This value will be honored only if isOverrideDns is set to true. + * `download_size_limit_in_bytes` - (Applicable when config_type=FTP_CONFIG) (Updatable) Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + * `ftp_basic_authentication_details` - (Applicable when config_type=FTP_CONFIG) (Updatable) Details for basic authentication. + * `password` - (Required when config_type=FTP_CONFIG) (Updatable) Password. + * `password` - (Required when password_type=IN_TEXT) (Updatable) Password. + * `password_type` - (Optional) (Updatable) Type of method to pass password. + * `vault_secret_id` - (Required when password_type=VAULT_SECRET_ID) (Updatable) Vault secret OCID. + * `username` - (Required when config_type=FTP_CONFIG) (Updatable) Username for authentication. + * `ftp_protocol` - (Applicable when config_type=FTP_CONFIG) (Updatable) FTP protocol type. + * `ftp_request_type` - (Applicable when config_type=FTP_CONFIG) (Updatable) FTP monitor request type. + * `is_active_mode` - (Applicable when config_type=FTP_CONFIG) (Updatable) If enabled, Active mode will be used for the FTP connection. * `is_certificate_validation_enabled` - (Applicable when config_type=BROWSER_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG) (Updatable) If certificate validation is enabled, then the call will fail in case of certification errors. * `is_default_snapshot_enabled` - (Applicable when config_type=BROWSER_CONFIG | SCRIPTED_BROWSER_CONFIG) (Updatable) If disabled, auto snapshots are not collected. * `is_failure_retried` - (Optional) (Updatable) If isFailureRetried is enabled, then a failed call will be retried. * `is_query_recursive` - (Applicable when config_type=DNS_SERVER_CONFIG) (Updatable) If isQueryRecursive is enabled, then queries will be sent recursively to the target server. * `is_redirection_enabled` - (Applicable when config_type=REST_CONFIG) (Updatable) If redirection is enabled, then redirects will be allowed while accessing target URL. * `name_server` - (Applicable when config_type=DNS_SERVER_CONFIG) (Updatable) Name of the server that will be used to perform DNS lookup. - * `network_configuration` - (Required when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Details of the network configuration. For NETWORK monitor type, NetworkConfiguration is mandatory. - * `number_of_hops` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Number of hops. - * `probe_mode` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Type of probe mode when TCP protocol is selected. - * `probe_per_hop` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Number of probes per hop. - * `protocol` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Type of protocol. - * `transmission_rate` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Number of probe packets sent out simultaneously. + * `network_configuration` - (Required when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | FTP_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Details of the network configuration. For NETWORK monitor type, NetworkConfiguration is mandatory. + * `number_of_hops` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | FTP_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Number of hops. + * `probe_mode` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | FTP_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Type of probe mode when TCP protocol is selected. + * `probe_per_hop` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | FTP_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Number of probes per hop. + * `protocol` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | FTP_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Type of protocol. + * `transmission_rate` - (Applicable when config_type=BROWSER_CONFIG | DNS_SERVER_CONFIG | FTP_CONFIG | NETWORK_CONFIG | REST_CONFIG | SCRIPTED_BROWSER_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Number of probe packets sent out simultaneously. * `protocol` - (Applicable when config_type=DNS_SERVER_CONFIG | DNS_TRACE_CONFIG) (Updatable) Type of protocol. + * `query` - (Applicable when config_type=SQL_CONFIG) (Updatable) SQL query to be executed. * `record_type` - (Applicable when config_type=DNSSEC_CONFIG | DNS_SERVER_CONFIG | DNS_TRACE_CONFIG) (Updatable) DNS record type. * `req_authentication_details` - (Applicable when config_type=REST_CONFIG) (Updatable) Details for request HTTP authentication. * `auth_headers` - (Applicable when config_type=REST_CONFIG) (Updatable) List of authentication headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]` @@ -205,12 +270,14 @@ The following arguments are supported: * `request_query_params` - (Applicable when config_type=REST_CONFIG) (Updatable) List of request query params. Example: `[{"paramName": "sortOrder", "paramValue": "asc"}]` * `param_name` - (Required when config_type=REST_CONFIG) (Updatable) Name of request query parameter. * `param_value` - (Applicable when config_type=REST_CONFIG) (Updatable) Value of request query parameter. - * `verify_response_codes` - (Applicable when config_type=BROWSER_CONFIG | REST_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Expected HTTP response codes. For status code range, set values such as 2xx, 3xx. - * `verify_response_content` - (Applicable when config_type=DNSSEC_CONFIG | DNS_SERVER_CONFIG | DNS_TRACE_CONFIG | REST_CONFIG) (Updatable) Verify response content against regular expression based string. If response content does not match the verifyResponseContent value, then it will be considered a failure. + * `upload_file_size_in_bytes` - (Applicable when config_type=FTP_CONFIG) (Updatable) File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. + * `verify_response_codes` - (Applicable when config_type=BROWSER_CONFIG | FTP_CONFIG | REST_CONFIG | SCRIPTED_REST_CONFIG) (Updatable) Expected HTTP response codes. For status code range, set values such as 2xx, 3xx. + * `verify_response_content` - (Applicable when config_type=DNSSEC_CONFIG | DNS_SERVER_CONFIG | DNS_TRACE_CONFIG | FTP_CONFIG | REST_CONFIG) (Updatable) Verify response content against regular expression based string. If response content does not match the verifyResponseContent value, then it will be considered a failure. * `verify_texts` - (Applicable when config_type=BROWSER_CONFIG) (Updatable) Verifies all the search strings present in the response. If any search string is not present in the response, then it will be considered as a failure. * `text` - (Applicable when config_type=BROWSER_CONFIG) (Updatable) Verification text in the response. * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `is_ipv6` - (Optional) (Updatable) If enabled, domain name will resolve to an IPv6 address. * `is_run_now` - (Optional) (Updatable) If isRunNow is enabled, then the monitor will run immediately. * `is_run_once` - (Optional) (Updatable) If runOnce is enabled, then the monitor will run once. * `maintenance_window_schedule` - (Optional) (Updatable) Details required to schedule maintenance window. @@ -224,7 +291,7 @@ The following arguments are supported: * `param_name` - (Required) (Updatable) Name of the parameter. * `param_value` - (Required) (Updatable) Value of the parameter. * `status` - (Optional) (Updatable) Enables or disables the monitor. -* `target` - (Optional) (Updatable) Specify the endpoint on which to run the monitor. For BROWSER, REST and NETWORK monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 +* `target` - (Optional) (Updatable) Specify the endpoint on which to run the monitor. For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * `timeout_in_seconds` - (Optional) (Updatable) Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. * `vantage_points` - (Required) (Updatable) A list of public and dedicated vantage points from which to execute the monitor. Use /publicVantagePoints to fetch public vantage points, and /dedicatedVantagePoints to fetch dedicated vantage points. @@ -249,9 +316,32 @@ The following attributes are exported: * `content` - Content of the private key file. * `file_name` - Name of the private key file. * `config_type` - Type of configuration. + * `connection_string` - Database connection string. + * `database_authentication_details` - Details for basic authentication. + * `password` - Password. + * `password` - Password. + * `password_type` - Type of method to pass password. + * `vault_secret_id` - Vault secret OCID. + * `username` - Username for authentication. + * `database_connection_type` - Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type. + * `database_role` - Database role. + * `database_type` - Database type. + * `database_wallet_details` - Details for database wallet. + * `database_wallet` - The database wallet configuration zip file. + * `service_name` - Service name of the database. * `dns_configuration` - Information about the DNS settings. * `is_override_dns` - If isOverrideDns is true, then DNS settings will be overridden. * `override_dns_ip` - Attribute to override the DNS IP value. This value will be honored only if isOverrideDns is set to true. + * `download_size_limit_in_bytes` - Download size limit in Bytes, at which to stop the transfer. Maximum download size limit is 5 MiB. + * `ftp_basic_authentication_details` - Details for basic authentication. + * `password` - Password. + * `password` - Password. + * `password_type` - Type of method to pass password. + * `vault_secret_id` - Vault secret OCID. + * `username` - Username for authentication. + * `ftp_protocol` - FTP protocol type. + * `ftp_request_type` - FTP monitor request type. + * `is_active_mode` - If enabled, Active mode will be used for the FTP connection. * `is_certificate_validation_enabled` - If certificate validation is enabled, then the call will fail in case of certification errors. * `is_default_snapshot_enabled` - If disabled, auto snapshots are not collected. * `is_failure_retried` - If isFailureRetried is enabled, then a failed call will be retried. @@ -265,6 +355,7 @@ The following attributes are exported: * `protocol` - Type of protocol. * `transmission_rate` - Number of probe packets sent out simultaneously. * `protocol` - Type of protocol. + * `query` - SQL query to be executed. * `record_type` - DNS record type. * `req_authentication_details` - Details for request HTTP authentication. * `auth_headers` - List of authentication headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]` @@ -286,16 +377,20 @@ The following attributes are exported: * `request_query_params` - List of request query params. Example: `[{"paramName": "sortOrder", "paramValue": "asc"}]` * `param_name` - Name of request query parameter. * `param_value` - Value of request query parameter. + * `upload_file_size_in_bytes` - File upload size in Bytes, at which to stop the transfer. Maximum upload size is 5 MiB. * `verify_response_codes` - Expected HTTP response codes. For status code range, set values such as 2xx, 3xx. * `verify_response_content` - Verify response content against regular expression based string. If response content does not match the verifyResponseContent value, then it will be considered a failure. * `verify_texts` - Verifies all the search strings present in the response. If any search string is not present in the response, then it will be considered as a failure. * `text` - Verification text in the response. +* `created_by` - Name of the user that created the monitor. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `display_name` - Unique name that can be edited. The name should not contain any confidential information. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the monitor. +* `is_ipv6` - If enabled, domain name will resolve to an IPv6 address. * `is_run_now` - If isRunNow is enabled, then the monitor will run immediately. * `is_run_once` - If runOnce is enabled, then the monitor will run once. +* `last_updated_by` - Name of the user that recently updated the monitor. * `maintenance_window_schedule` - Details required to schedule maintenance window. * `time_ended` - End time of the maintenance window, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` * `time_started` - Start time of the maintenance window, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` @@ -311,15 +406,17 @@ The following attributes are exported: * `param_name` - Name of the parameter. * `param_value` - Value of the parameter. * `status` - Enables or disables the monitor. -* `target` - Specify the endpoint on which to run the monitor. For BROWSER, REST and NETWORK monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 +* `target` - Specify the endpoint on which to run the monitor. For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80. * `time_created` - The time the resource was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-12T22:47:12.613Z` * `time_updated` - The time the resource was updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2020-02-13T22:47:12.613Z` * `timeout_in_seconds` - Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. * `vantage_point_count` - Number of vantage points where monitor is running. -* `vantage_points` - List of public and dedicated vantage points where the monitor is running. +* `vantage_points` - List of public, dedicated and onPremise vantage points where the monitor is running. * `display_name` - Unique name that can be edited. The name should not contain any confidential information. * `name` - Name of the vantage point. - + * `worker_list` - List of workers running the assigned monitor. + + ## Timeouts The `timeouts` block allows you to specify [timeouts](https://registry.terraform.io/providers/oracle/oci/latest/docs/guides/changing_timeouts) for certain operations: diff --git a/website/docs/r/core_cluster_network.html.markdown b/website/docs/r/core_cluster_network.html.markdown index 5dab858cd68..5924f5cf866 100644 --- a/website/docs/r/core_cluster_network.html.markdown +++ b/website/docs/r/core_cluster_network.html.markdown @@ -165,7 +165,6 @@ The following attributes are exported: To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. -<<<<<<< HEAD Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. * `primary_vnic_subnets` - Details about the IPv6 primary subnet. @@ -173,10 +172,6 @@ The following attributes are exported: * `ipv6subnet_cidr` - Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. * `is_assign_ipv6ip` - Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` is not provided then an IPv6 prefix is chosen for you. * `subnet_id` - The subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. -======= - Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` - * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `secondary_vnic_subnets` - The set of secondary VNIC data for instances in the pool. * `display_name` - The display name of the VNIC. This is also used to match against the instance configuration defined secondary VNIC. * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. diff --git a/website/docs/r/core_compute_capacity_reservation.html.markdown b/website/docs/r/core_compute_capacity_reservation.html.markdown index bf69bed067f..aff0cfe6cfe 100644 --- a/website/docs/r/core_compute_capacity_reservation.html.markdown +++ b/website/docs/r/core_compute_capacity_reservation.html.markdown @@ -69,16 +69,10 @@ The following arguments are supported: To use the reservation for the desired shape, specify the shape, count, and optionally the fault domain where you want this configuration. * `cluster_config` - (Optional) (Updatable) The HPC cluster configuration requested when launching instances in a compute capacity reservation. -<<<<<<< HEAD - If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error is returned. - * `hpc_island_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. - * `network_block_ids` - (Optional) (Updatable) The list of OCIDs of the network blocks. -======= If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error is returned. * `hpc_island_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. * `network_block_ids` - (Optional) (Updatable) The list of OCIDs of the network blocks. * `cluster_placement_group_id` - (Optional) (Updatable) The OCID of the cluster placement group for this instance reservation capacity configuration. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `fault_domain` - (Optional) (Updatable) The fault domain to use for instances created using this capacity configuration. For more information, see [Fault Domains](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm#fault). If you do not specify the fault domain, the capacity is available for an instance that does not specify a fault domain. To change the fault domain for a reservation, delete the reservation and create a new one in the preferred fault domain. To retrieve a list of fault domains, use the `ListFaultDomains` operation in the [Identity and Access Management Service API](/iaas/api/#/en/identity/20160918/). @@ -116,16 +110,10 @@ The following attributes are exported: To use the reservation for the desired shape, specify the shape, count, and optionally the fault domain where you want this configuration. * `cluster_config` - The HPC cluster configuration requested when launching instances in a compute capacity reservation. -<<<<<<< HEAD - If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error is returned. - * `hpc_island_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. - * `network_block_ids` - The list of OCIDs of the network blocks. -======= If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error is returned. * `hpc_island_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the HPC island. * `network_block_ids` - The list of OCIDs of the network blocks. * `cluster_placement_group_id` - The OCID of the cluster placement group for this instance reservation capacity configuration. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `fault_domain` - The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see [Capacity Reservations](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm). * `instance_shape` - The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling [ListComputeCapacityReservationInstanceShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/computeCapacityReservationInstanceShapes/ListComputeCapacityReservationInstanceShapes). * `instance_shape_config` - The shape configuration requested when launching instances in a compute capacity reservation. diff --git a/website/docs/r/core_instance_pool.html.markdown b/website/docs/r/core_instance_pool.html.markdown index 6c50e9d0dcb..83f69ff80eb 100644 --- a/website/docs/r/core_instance_pool.html.markdown +++ b/website/docs/r/core_instance_pool.html.markdown @@ -103,7 +103,6 @@ The following arguments are supported: To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. -<<<<<<< HEAD Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` * `primary_subnet_id` - (Optional) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. * `primary_vnic_subnets` - (Optional) (Updatable) Details about the IPv6 primary subnet. @@ -111,10 +110,6 @@ The following arguments are supported: * `ipv6subnet_cidr` - (Optional) (Updatable) Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. * `is_assign_ipv6ip` - (Optional) (Updatable) Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` is not provided then an IPv6 prefix is chosen for you. * `subnet_id` - (Required) (Updatable) The subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. -======= - Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` - * `primary_subnet_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `secondary_vnic_subnets` - (Optional) (Updatable) The set of secondary VNIC data for instances in the pool. * `display_name` - (Optional) (Updatable) The display name of the VNIC. This is also used to match against the instance configuration defined secondary VNIC. * `ipv6address_ipv6subnet_cidr_pair_details` - (Optional) (Updatable) A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. @@ -158,7 +153,6 @@ The following attributes are exported: To get a list of fault domains, use the [ListFaultDomains](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/FaultDomain/ListFaultDomains) operation in the Identity and Access Management Service API. -<<<<<<< HEAD Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. * `primary_vnic_subnets` - Details about the IPv6 primary subnet. @@ -166,10 +160,6 @@ The following attributes are exported: * `ipv6subnet_cidr` - Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. * `is_assign_ipv6ip` - Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` is not provided then an IPv6 prefix is chosen for you. * `subnet_id` - The subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. -======= - Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` - * `primary_subnet_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. ->>>>>>> d74e4e1fef (Added - clusterPlacementGroupId terraform implementation and tests) * `secondary_vnic_subnets` - The set of secondary VNIC data for instances in the pool. * `display_name` - The display name of the VNIC. This is also used to match against the instance configuration defined secondary VNIC. * `ipv6address_ipv6subnet_cidr_pair_details` - A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. You can provide only the prefix ranges and Oracle Cloud Infrastructure will select an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address that should be used from within that range. diff --git a/website/docs/r/data_safe_audit_policy.html.markdown b/website/docs/r/data_safe_audit_policy.html.markdown index 14284c5b274..8be709123e9 100644 --- a/website/docs/r/data_safe_audit_policy.html.markdown +++ b/website/docs/r/data_safe_audit_policy.html.markdown @@ -57,6 +57,7 @@ The following attributes are exported: * `operation_status` - The operation status that the policy must be enabled for. * `is_data_safe_service_account_audited` - Indicates whether the Data Safe user activity on the target database will be audited by the policy. * `is_priv_users_managed_by_data_safe` - Indicates whether the privileged user list is managed by Data Safe. + * `is_enabled` - Indicates whether the policy has to be enabled or disabled in the target database. Set this to true if you want the audit policy to be enabled in the target database. If the seeded audit policy is not already created in the database, the provisioning creates and enables them. If this is set to false, the policy will be disabled in the target database. * `audit_specifications` - Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to [documentation](https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827). * `audit_policy_category` - The category to which the audit policy belongs. * `audit_policy_name` - Indicates the audit policy name. Refer to the [documentation](https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827) for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. diff --git a/website/docs/r/data_safe_audit_policy_management.html.markdown b/website/docs/r/data_safe_audit_policy_management.html.markdown index c1172b3ffaf..7a904464b3b 100644 --- a/website/docs/r/data_safe_audit_policy_management.html.markdown +++ b/website/docs/r/data_safe_audit_policy_management.html.markdown @@ -49,6 +49,7 @@ The following arguments are supported: * `entity_type` - The entity type that the policy must be enabled for. * `operation_status` - The operation status that the policy must be enabled for. * `is_data_safe_service_account_audited` - Indicates whether the Data Safe user activity on the target database will be audited by the policy. + * `is_enabled` - Indicates whether the policy has to be enabled or disabled in the target database. Set this to true if you want the audit policy to be enabled in the target database. If the seeded audit policy is not already created in the database, the provisioning creates and enables them. If this is set to false, the policy will be disabled in the target database. * `is_priv_users_managed_by_data_safe` - Indicates whether the privileged user list is managed by Data Safe. @@ -67,6 +68,7 @@ The following attributes are exported: * `entity_type` - The entity type that the policy must be enabled for. * `operation_status` - The operation status that the policy must be enabled for. * `is_data_safe_service_account_audited` - Indicates whether the Data Safe user activity on the target database will be audited by the policy. + * `is_enabled` - Indicates whether the policy has to be enabled or disabled in the target database. Set this to true if you want the audit policy to be enabled in the target database. If the seeded audit policy is not already created in the database, the provisioning creates and enables them. If this is set to false, the policy will be disabled in the target database. * `is_priv_users_managed_by_data_safe` - Indicates whether the privileged user list is managed by Data Safe. * `audit_specifications` - Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to [documentation](https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827). * `audit_policy_category` - The category to which the audit policy belongs. diff --git a/website/docs/r/data_safe_discovery_job.html.markdown b/website/docs/r/data_safe_discovery_job.html.markdown index 988222e412c..41ebda0e738 100644 --- a/website/docs/r/data_safe_discovery_job.html.markdown +++ b/website/docs/r/data_safe_discovery_job.html.markdown @@ -36,6 +36,13 @@ resource "oci_data_safe_discovery_job" "test_discovery_job" { is_sample_data_collection_enabled = var.discovery_job_is_sample_data_collection_enabled schemas_for_discovery = var.discovery_job_schemas_for_discovery sensitive_type_ids_for_discovery = var.discovery_job_sensitive_type_ids_for_discovery + tables_for_discovery { + #Required + schema_name = var.discovery_job_tables_for_discovery_schema_name + + #Optional + table_names = var.discovery_job_tables_for_discovery_table_names + } } ``` @@ -55,6 +62,9 @@ The following arguments are supported: * `schemas_for_discovery` - (Optional) The schemas to be scanned by the discovery job. If not provided, the schemasForDiscovery attribute of the sensitive data model is used to get the list of schemas. * `sensitive_data_model_id` - (Required) The OCID of the sensitive data model. * `sensitive_type_ids_for_discovery` - (Optional) The OCIDs of the sensitive types to be used by the discovery job. If not provided, the sensitiveTypeIdsForDiscovery attribute of the sensitive data model is used to get the list of sensitive types. +* `tables_for_discovery` - (Optional) The data discovery jobs will scan the tables specified here, including both schemas and tables. In the absence of explicit input, the list of tables is obtained from the tablesForDiscovery attribute of the sensitive data model. + * `schema_name` - (Required) This contains the name of the schema. + * `table_names` - (Optional) This contains an optional list of the table names. ** IMPORTANT ** @@ -79,6 +89,9 @@ The following attributes are exported: * `sensitive_type_ids_for_discovery` - The OCIDs of the sensitive types used for data discovery. * `state` - The current state of the discovery job. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `tables_for_discovery` - The data discovery jobs will scan the tables specified here, including both schemas and tables. + * `schema_name` - This contains the name of the schema. + * `table_names` - This contains an optional list of the table names. * `target_id` - The OCID of the target database associated with the discovery job. * `time_finished` - The date and time the discovery job finished, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).. * `time_started` - The date and time the discovery job started, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/r/data_safe_report.html.markdown b/website/docs/r/data_safe_report.html.markdown index 510f4a2b40c..759fc7a5d30 100644 --- a/website/docs/r/data_safe_report.html.markdown +++ b/website/docs/r/data_safe_report.html.markdown @@ -48,7 +48,7 @@ The following attributes are exported: * `display_name` - Name of the report. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` * `id` - The OCID of the report. -* `mime_type` - Specifies the format of report to be excel or pdf +* `mime_type` - Specifies the format of report to be .xls or .pdf or .json * `report_definition_id` - The OCID of the report definition. * `state` - The current state of the audit report. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/r/data_safe_report_definition.html.markdown b/website/docs/r/data_safe_report_definition.html.markdown index cec0669f4d6..c3bf47cd30b 100644 --- a/website/docs/r/data_safe_report_definition.html.markdown +++ b/website/docs/r/data_safe_report_definition.html.markdown @@ -139,7 +139,7 @@ The following attributes are exported: Allowed version strings - "v1" v1's version specific schedule - Each of the above fields potentially introduce constraints. A workrequest is created only when clock time satisfies all the constraints. Constraints introduced: 1. seconds = (So, the allowed range for is [0, 59]) 2. minutes = (So, the allowed range for is [0, 59]) 3. hours = (So, the allowed range for is [0, 23]) 4. can be either '*' (without quotes or a number between 1(Monday) and 7(Sunday)) No constraint introduced when it is '*'. When not, day of week must equal the given value 5. can be either '*' (without quotes or a number between 1 and 28) No constraint introduced when it is '*'. When not, day of month must equal the given value * `scheduled_report_compartment_id` - The OCID of the compartment in which the scheduled resource will be created. -* `scheduled_report_mime_type` - Specifies the format of the report ( either .xls or .pdf ) +* `scheduled_report_mime_type` - Specifies the format of the report ( either .xls or .pdf or .json) * `scheduled_report_name` - The name of the report to be scheduled. * `scheduled_report_row_limit` - Specifies the limit on the number of rows in the report. * `scim_filter` - Additional SCIM filters used to define the report. diff --git a/website/docs/r/data_safe_security_assessment.html.markdown b/website/docs/r/data_safe_security_assessment.html.markdown index ab5657de66a..86ca4f05cd9 100644 --- a/website/docs/r/data_safe_security_assessment.html.markdown +++ b/website/docs/r/data_safe_security_assessment.html.markdown @@ -28,6 +28,7 @@ resource "oci_data_safe_security_assessment" "test_security_assessment" { description = var.security_assessment_description display_name = var.security_assessment_display_name freeform_tags = {"Department"= "Finance"} + is_assessment_scheduled = var.security_assessment_is_assessment_scheduled schedule = var.security_assessment_schedule } ``` @@ -41,6 +42,7 @@ The following arguments are supported: * `description` - (Optional) (Updatable) Description of the security assessment. * `display_name` - (Optional) (Updatable) The display name of the security assessment. * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` +* `is_assessment_scheduled` - (Optional) (Updatable) Indicates whether the assessment is scheduled to run. * `schedule` - (Optional) (Updatable) To schedule the assessment for running periodically, specify the schedule in this attribute. Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. Format - ; Allowed version strings - "v1" v1's version specific schedule - Each of the above fields potentially introduce constraints. A workrequest is created only when clock time satisfies all the constraints. Constraints introduced: 1. seconds = (So, the allowed range for is [0, 59]) 2. minutes = (So, the allowed range for is [0, 59]) 3. hours = (So, the allowed range for is [0, 23]) can be either '*' (without quotes or a number between 1(Monday) and 7(Sunday)) 4. No constraint introduced when it is '*'. When not, day of week must equal the given value can be either '*' (without quotes or a number between 1 and 28) 5. No constraint introduced when it is '*'. When not, day of month must equal the given value @@ -62,6 +64,7 @@ The following attributes are exported: * `id` - The OCID of the security assessment. * `ignored_assessment_ids` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` * `ignored_targets` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` +* `is_assessment_scheduled` - Indicates whether the assessment is scheduled to run. * `is_baseline` - Indicates whether or not the security assessment is set as a baseline. This is applicable only for saved security assessments. * `is_deviated_from_baseline` - Indicates whether or not the security assessment deviates from the baseline. * `last_compared_baseline_id` - The OCID of the baseline against which the latest security assessment was compared. diff --git a/website/docs/r/data_safe_sensitive_data_model.html.markdown b/website/docs/r/data_safe_sensitive_data_model.html.markdown index 97507361ff6..d42596faff1 100644 --- a/website/docs/r/data_safe_sensitive_data_model.html.markdown +++ b/website/docs/r/data_safe_sensitive_data_model.html.markdown @@ -35,6 +35,13 @@ resource "oci_data_safe_sensitive_data_model" "test_sensitive_data_model" { is_sample_data_collection_enabled = var.sensitive_data_model_is_sample_data_collection_enabled schemas_for_discovery = var.sensitive_data_model_schemas_for_discovery sensitive_type_ids_for_discovery = var.sensitive_data_model_sensitive_type_ids_for_discovery + tables_for_discovery { + #Required + schema_name = var.sensitive_data_model_tables_for_discovery_schema_name + + #Optional + table_names = var.sensitive_data_model_tables_for_discovery_table_names + } } ``` @@ -54,6 +61,9 @@ The following arguments are supported: * `is_sample_data_collection_enabled` - (Optional) (Updatable) Indicates if data discovery jobs should collect and store sample data values for the discovered columns. Sample data helps review the discovered columns and ensure that they actually contain sensitive data. As it collects original data from the target database, it's disabled by default and should be used only if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data values are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. * `schemas_for_discovery` - (Optional) (Updatable) The schemas to be scanned by data discovery jobs. * `sensitive_type_ids_for_discovery` - (Optional) (Updatable) The OCIDs of the sensitive types to be used by data discovery jobs. If OCID of a sensitive category is provided, all its child sensitive types are used for data discovery. +* `tables_for_discovery` - (Optional) (Updatable) The data discovery jobs will scan the tables specified here, including both schemas and tables. For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: "OE", tableName : ["T3", "T4"]}]. + * `schema_name` - (Required) (Updatable) This contains the name of the schema. + * `table_names` - (Optional) (Updatable) This contains an optional list of the table names. * `target_id` - (Required) (Updatable) The OCID of the reference target database to be associated with the sensitive data model. All operations such as performing data discovery and adding columns manually are done in the context of the associated target database. @@ -79,6 +89,9 @@ The following attributes are exported: * `sensitive_type_ids_for_discovery` - The OCIDs of the sensitive types to be used by data discovery jobs. * `state` - The current state of the sensitive data model. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `tables_for_discovery` - The data discovery jobs will scan the tables specified here, including both schemas and tables. For instance, the input could be in the format: [{schemaName: "HR", tableName: ["T1", "T2"]}, {schemaName: "OE", tableName : ["T3", "T4"]}]. + * `schema_name` - This contains the name of the schema. + * `table_names` - This contains an optional list of the table names. * `target_id` - The OCID of the reference target database associated with the sensitive data model. All operations such as performing data discovery and adding columns manually are done in the context of the associated target database. * `time_created` - The date and time the sensitive data model was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * `time_updated` - The date and time the sensitive data model was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/r/data_safe_unset_security_assessment_baseline.html.markdown b/website/docs/r/data_safe_unset_security_assessment_baseline.html.markdown index 666907dd067..9f4e9201b48 100644 --- a/website/docs/r/data_safe_unset_security_assessment_baseline.html.markdown +++ b/website/docs/r/data_safe_unset_security_assessment_baseline.html.markdown @@ -10,7 +10,8 @@ description: |- # oci_data_safe_unset_security_assessment_baseline This resource provides the Unset Security Assessment Baseline resource in Oracle Cloud Infrastructure Data Safe service. -Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. +Removes the baseline setting for the saved security assessment associated with the targetId passed via body. +If no body or empty body is passed then the baseline settings of all the saved security assessments pertaining to the baseline assessment OCID provided in the path will be removed. Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. @@ -20,6 +21,9 @@ Sets the if-match parameter to the value of the etag from a previous GET or POST resource "oci_data_safe_unset_security_assessment_baseline" "test_unset_security_assessment_baseline" { #Required security_assessment_id = oci_data_safe_security_assessment.test_security_assessment.id + + #Optional + target_ids = var.unset_security_assessment_baseline_target_ids } ``` @@ -28,6 +32,7 @@ resource "oci_data_safe_unset_security_assessment_baseline" "test_unset_security The following arguments are supported: * `security_assessment_id` - (Required) The OCID of the security assessment. +* `target_ids` - (Optional) The list of database target OCIDs for which the user intends to unset the baseline. ** IMPORTANT ** diff --git a/website/docs/r/data_safe_unset_user_assessment_baseline.html.markdown b/website/docs/r/data_safe_unset_user_assessment_baseline.html.markdown index 6a9bdf09ff3..cf9062104f2 100644 --- a/website/docs/r/data_safe_unset_user_assessment_baseline.html.markdown +++ b/website/docs/r/data_safe_unset_user_assessment_baseline.html.markdown @@ -10,7 +10,8 @@ description: |- # oci_data_safe_unset_user_assessment_baseline This resource provides the Unset User Assessment Baseline resource in Oracle Cloud Infrastructure Data Safe service. -Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. +Removes the baseline setting for the saved user assessment associated with the targetId passed via body. +If no body or empty body is passed then the baseline settings of all the saved user assessments pertaining to the baseline assessment OCID provided in the path will be removed. Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. @@ -20,6 +21,9 @@ Sets the if-match parameter to the value of the etag from a previous GET or POST resource "oci_data_safe_unset_user_assessment_baseline" "test_unset_user_assessment_baseline" { #Required user_assessment_id = oci_data_safe_user_assessment.test_user_assessment.id + + #Optional + target_ids = var.unset_user_assessment_baseline_target_ids } ``` @@ -27,6 +31,7 @@ resource "oci_data_safe_unset_user_assessment_baseline" "test_unset_user_assessm The following arguments are supported: +* `target_ids` - (Optional) The list of database target OCIDs for which the user intends to unset the baseline. * `user_assessment_id` - (Required) The OCID of the user assessment. diff --git a/website/docs/r/data_safe_user_assessment.html.markdown b/website/docs/r/data_safe_user_assessment.html.markdown index d452eac9557..4ad1da669e2 100644 --- a/website/docs/r/data_safe_user_assessment.html.markdown +++ b/website/docs/r/data_safe_user_assessment.html.markdown @@ -28,6 +28,7 @@ resource "oci_data_safe_user_assessment" "test_user_assessment" { description = var.user_assessment_description display_name = var.user_assessment_display_name freeform_tags = {"Department"= "Finance"} + is_assessment_scheduled = var.user_assessment_is_assessment_scheduled schedule = var.user_assessment_schedule } ``` @@ -41,6 +42,7 @@ The following arguments are supported: * `description` - (Optional) (Updatable) The description of the user assessment. * `display_name` - (Optional) (Updatable) The display name of the user assessment. * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` +* `is_assessment_scheduled` - (Optional) (Updatable) Indicates whether the assessment is scheduled to run. * `schedule` - (Optional) (Updatable) To schedule the assessment for saving periodically, specify the schedule in this attribute. Create or schedule one assessment per compartment. If not defined, the assessment runs immediately. Format - ; Allowed version strings - "v1" v1's version specific schedule - Each of the above fields potentially introduce constraints. A workrequest is created only when clock time satisfies all the constraints. Constraints introduced: 1. seconds = (So, the allowed range for is [0, 59]) 2. minutes = (So, the allowed range for is [0, 59]) 3. hours = (So, the allowed range for is [0, 23]) can be either '*' (without quotes or a number between 1(Monday) and 7(Sunday)) 4. No constraint introduced when it is '*'. When not, day of week must equal the given value can be either '*' (without quotes or a number between 1 and 28) 5. No constraint introduced when it is '*'. When not, day of month must equal the given value @@ -62,6 +64,7 @@ The following attributes are exported: * `id` - The OCID of the user assessment. * `ignored_assessment_ids` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` * `ignored_targets` - List containing maps as values. Example: `{"Operations": [ {"CostCenter": "42"} ] }` +* `is_assessment_scheduled` - Indicates whether the assessment is scheduled to run. * `is_baseline` - Indicates if the user assessment is set as a baseline. This is applicable only to saved user assessments. * `is_deviated_from_baseline` - Indicates if the user assessment deviates from the baseline. * `last_compared_baseline_id` - The OCID of the last user assessment baseline against which the latest assessment was compared. diff --git a/website/docs/r/database_autonomous_database.html.markdown b/website/docs/r/database_autonomous_database.html.markdown index 9d700f0dfc1..a00c2a9759d 100644 --- a/website/docs/r/database_autonomous_database.html.markdown +++ b/website/docs/r/database_autonomous_database.html.markdown @@ -104,6 +104,7 @@ resource "oci_database_autonomous_database" "test_autonomous_database" { source_id = oci_database_source.test_source.id standby_whitelisted_ips = var.autonomous_database_standby_whitelisted_ips subnet_id = oci_core_subnet.test_subnet.id + subscription_id = oci_onesubscription_subscription.test_subscription.id time_of_auto_refresh_start = var.autonomous_database_time_of_auto_refresh_start timestamp = var.autonomous_database_timestamp use_latest_available_backup_time_stamp = var.autonomous_database_use_latest_available_backup_time_stamp @@ -266,6 +267,7 @@ The following arguments are supported: * For Exadata and virtual machine 2-node RAC systems, do not use a subnet that overlaps with 192.168.128.0/20. * For Autonomous Database, setting this will disable public secure access to the database. +* `subscription_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and the backup subnet. * `timestamp` - (Applicable when source=BACKUP_FROM_TIMESTAMP) The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. * `use_latest_available_backup_time_stamp` - (Applicable when source=BACKUP_FROM_TIMESTAMP) Clone from latest available backup timestamp. @@ -521,6 +523,7 @@ The following attributes are exported: * For Exadata and virtual machine 2-node RAC systems, do not use a subnet that overlaps with 192.168.128.0/20. * For Autonomous Database, setting this will disable public secure access to the database. +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and the backup subnet. * `supported_regions_to_clone_to` - The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). diff --git a/website/docs/r/database_cloud_autonomous_vm_cluster.html.markdown b/website/docs/r/database_cloud_autonomous_vm_cluster.html.markdown index 8af560dbecf..60fe764f5b4 100644 --- a/website/docs/r/database_cloud_autonomous_vm_cluster.html.markdown +++ b/website/docs/r/database_cloud_autonomous_vm_cluster.html.markdown @@ -79,11 +79,7 @@ The following arguments are supported: * `display_name` - (Required) (Updatable) The user-friendly name for the cloud Autonomous VM cluster. The name does not need to be unique. * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `is_mtls_enabled_vm_cluster` - (Optional) Enable mutual TLS(mTLS) authentication for database at time of provisioning a VMCluster. This is applicable to database TLS Certificates only. Default is TLS -<<<<<<< HEAD * `license_model` - (Optional) (Updatable) The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. Bring your own license (BYOL) also allows you to select the DB edition using the optional parameter. -======= -* `license_model` - (Optional) (Updatable) The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. ->>>>>>> ee509575808 (Added - Support for ADB-S: Cross-Tenancy Autonomous Data Guard standby) This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. * `maintenance_window_details` - (Optional) (Updatable) The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window. @@ -145,11 +141,7 @@ The following attributes are exported: * `is_mtls_enabled_vm_cluster` - Enable mutual TLS(mTLS) authentication for database at time of provisioning a VMCluster. This is applicable to database TLS Certificates only. Default is TLS * `last_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance run. * `last_update_history_entry_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance update history. This value is updated when a maintenance update starts. -<<<<<<< HEAD * `license_model` - The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. Bring your own license (BYOL) also allows you to select the DB edition using the optional parameter. -======= -* `license_model` - The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. ->>>>>>> ee509575808 (Added - Support for ADB-S: Cross-Tenancy Autonomous Data Guard standby) This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. * `lifecycle_details` - Additional information about the current lifecycle state. diff --git a/website/docs/r/database_cloud_exadata_infrastructure.html.markdown b/website/docs/r/database_cloud_exadata_infrastructure.html.markdown index 63d23d273ad..9e7e1ffc252 100644 --- a/website/docs/r/database_cloud_exadata_infrastructure.html.markdown +++ b/website/docs/r/database_cloud_exadata_infrastructure.html.markdown @@ -54,6 +54,7 @@ resource "oci_database_cloud_exadata_infrastructure" "test_cloud_exadata_infrast weeks_of_month = var.cloud_exadata_infrastructure_maintenance_window_weeks_of_month } storage_count = var.cloud_exadata_infrastructure_storage_count + subscription_id = var.tenant_subscription_id } ``` @@ -88,6 +89,7 @@ The following arguments are supported: * `weeks_of_month` - (Optional) (Updatable) Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. * `shape` - (Required) The shape of the cloud Exadata infrastructure resource. * `storage_count` - (Optional) (Updatable) The number of storage servers for the cloud Exadata infrastructure. +* `subscription_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. ** IMPORTANT ** @@ -149,6 +151,7 @@ The following attributes are exported: * `state` - The current lifecycle state of the cloud Exadata infrastructure resource. * `storage_count` - The number of storage servers for the cloud Exadata infrastructure. * `storage_server_version` - The software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15 +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `time_created` - The date and time the cloud Exadata infrastructure resource was created. * `total_storage_size_in_gbs` - The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). diff --git a/website/docs/r/database_cloud_vm_cluster.html.markdown b/website/docs/r/database_cloud_vm_cluster.html.markdown index 364ff9e48ce..0ba20b9a55c 100644 --- a/website/docs/r/database_cloud_vm_cluster.html.markdown +++ b/website/docs/r/database_cloud_vm_cluster.html.markdown @@ -60,6 +60,7 @@ resource "oci_database_cloud_vm_cluster" "test_cloud_vm_cluster" { private_zone_id = oci_dns_zone.test_zone.id scan_listener_port_tcp = var.cloud_vm_cluster_scan_listener_port_tcp scan_listener_port_tcp_ssl = var.cloud_vm_cluster_scan_listener_port_tcp_ssl + subscription_id = var.tenant_subscription_id system_version = var.cloud_vm_cluster_system_version time_zone = var.cloud_vm_cluster_time_zone } @@ -115,6 +116,7 @@ The following arguments are supported: * `scan_listener_port_tcp_ssl` - (Optional) The TCPS Single Client Access Name (SCAN) port. The default port is 2484. * `ssh_public_keys` - (Required) (Updatable) The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. * `subnet_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the cloud VM cluster. +* `subscription_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `system_version` - (Optional) Operating system version of the image. * `time_zone` - (Optional) The time zone to use for the cloud VM cluster. For details, see [Time Zones](https://docs.cloud.oracle.com/iaas/Content/Database/References/timezones.htm). @@ -190,6 +192,7 @@ The following attributes are exported: * For Exadata and virtual machine 2-node RAC systems, do not use a subnet that overlaps with 192.168.128.0/20. These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and backup subnet. +* `subscription_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription with which resource needs to be associated with. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `system_version` - Operating system version of the image. * `time_created` - The date and time that the cloud VM cluster was created. diff --git a/website/docs/r/database_database.html.markdown b/website/docs/r/database_database.html.markdown index a20d0d21c4a..443f5cf6434 100644 --- a/website/docs/r/database_database.html.markdown +++ b/website/docs/r/database_database.html.markdown @@ -51,6 +51,7 @@ resource "oci_database_database" "test_database" { db_workload = var.database_database_db_workload defined_tags = var.database_database_defined_tags freeform_tags = var.database_database_freeform_tags + key_store_id = oci_database_key_store.test_key_store.id kms_key_id = oci_kms_key.test_key.id kms_key_version_id = oci_kms_key_version.test_key_version.id ncharacter_set = var.database_database_ncharacter_set @@ -103,6 +104,7 @@ The following arguments are supported: The database workload type. * `defined_tags` - (Applicable when source=NONE) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `freeform_tags` - (Applicable when source=NONE) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` + * `key_store_id` - (Applicable when source=NONE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. * `kms_key_id` - (Applicable when source=NONE) The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. * `kms_key_version_id` - (Applicable when source=NONE) The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. * `ncharacter_set` - (Applicable when source=NONE) The national character set for the database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8. diff --git a/website/docs/r/database_db_home.html.markdown b/website/docs/r/database_db_home.html.markdown index 00eb23bebba..a134c1e6bdb 100644 --- a/website/docs/r/database_db_home.html.markdown +++ b/website/docs/r/database_db_home.html.markdown @@ -56,6 +56,7 @@ resource "oci_database_db_home" "test_db_home" { db_workload = var.db_home_database_db_workload defined_tags = var.db_home_database_defined_tags freeform_tags = var.db_home_database_freeform_tags + key_store_id = oci_database_key_store.test_key_store.id kms_key_id = oci_kms_key.test_key.id kms_key_version_id = oci_kms_key_version.test_key_version.id ncharacter_set = var.db_home_database_ncharacter_set @@ -117,6 +118,7 @@ The following arguments are supported: * `defined_tags` - (Applicable when source=NONE | VM_CLUSTER_NEW) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `enable_database_delete` - (Optional) Defaults to false. If omitted or set to false the provider will not delete databases removed from the Db Home configuration. * `freeform_tags` - (Applicable when source=NONE | VM_CLUSTER_NEW) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` + * `key_store_id` - (Applicable when source=NONE | VM_CLUSTER_NEW) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. * `kms_key_id` - (Applicable when source=NONE | VM_CLUSTER_NEW) The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. * `kms_key_version_id` - (Applicable when source=NONE | VM_CLUSTER_NEW) The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. * `ncharacter_set` - (Applicable when source=NONE | VM_CLUSTER_NEW) The national character set for the database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8. diff --git a/website/docs/r/database_db_system.html.markdown b/website/docs/r/database_db_system.html.markdown index 7059a455802..ef3913d155b 100644 --- a/website/docs/r/database_db_system.html.markdown +++ b/website/docs/r/database_db_system.html.markdown @@ -66,6 +66,7 @@ resource "oci_database_db_system" "test_db_system" { db_workload = var.db_system_db_home_database_db_workload defined_tags = var.db_system_db_home_database_defined_tags freeform_tags = var.db_system_db_home_database_freeform_tags + key_store_id = oci_database_key_store.test_key_store.id kms_key_id = oci_kms_key.test_key.id kms_key_version_id = oci_kms_key_version.test_key_version.id ncharacter_set = var.db_system_db_home_database_ncharacter_set @@ -216,6 +217,7 @@ The following arguments are supported: The database workload type. * `defined_tags` - (Applicable when source=DB_SYSTEM | NONE) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `freeform_tags` - (Applicable when source=DB_SYSTEM | NONE) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` + * `key_store_id` - (Applicable when source=NONE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. * `kms_key_id` - (Applicable when source=NONE) The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. * `kms_key_version_id` - (Applicable when source=NONE) The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. * `ncharacter_set` - (Applicable when source=NONE) The national character set for the database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8. diff --git a/website/docs/r/globally_distributed_database_private_endpoint.html.markdown b/website/docs/r/globally_distributed_database_private_endpoint.html.markdown new file mode 100644 index 00000000000..00a4ba417c2 --- /dev/null +++ b/website/docs/r/globally_distributed_database_private_endpoint.html.markdown @@ -0,0 +1,85 @@ +--- +subcategory: "Globally Distributed Database" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_globally_distributed_database_private_endpoint" +sidebar_current: "docs-oci-resource-globally_distributed_database-private_endpoint" +description: |- + Provides the Private Endpoint resource in Oracle Cloud Infrastructure Globally Distributed Database service +--- + +# oci_globally_distributed_database_private_endpoint +This resource provides the Private Endpoint resource in Oracle Cloud Infrastructure Globally Distributed Database service. + +Creates a PrivateEndpoint. + + +## Example Usage + +```hcl +resource "oci_globally_distributed_database_private_endpoint" "test_private_endpoint" { + #Required + compartment_id = var.compartment_id + display_name = var.private_endpoint_display_name + subnet_id = oci_core_subnet.test_subnet.id + + #Optional + defined_tags = {"foo-namespace.bar-key"= "value"} + description = var.private_endpoint_description + freeform_tags = {"bar-key"= "value"} + nsg_ids = var.private_endpoint_nsg_ids +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) (Updatable) Identifier of the compartment where private endpoint is to be created. +* `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - (Optional) (Updatable) PrivateEndpoint description. +* `display_name` - (Required) (Updatable) Private endpoint display name. +* `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `nsg_ids` - (Optional) (Updatable) The OCIDs of the network security groups that the private endpoint belongs to. +* `subnet_id` - (Required) Identifier of the customer subnet against which private endpoint is to be created. + + +** IMPORTANT ** +Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values + +## Attributes Reference + +The following attributes are exported: + +* `compartment_id` - Identifier of the compartment in which private endpoint exists. +* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - PrivateEndpoint description. +* `display_name` - PrivateEndpoint display name. +* `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `id` - The identifier of the Private Endpoint. +* `lifecycle_state_details` - Detailed message for the lifecycle state. +* `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. +* `private_ip` - IP address of the Private Endpoint. +* `sharded_databases` - The OCIDs of sharded databases that consumes the given private endpoint. +* `state` - Lifecycle states for private endpoint. +* `subnet_id` - Identifier of the subnet in which private endpoint exists. +* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `time_created` - The time the PrivateEndpoint was first created. An RFC3339 formatted datetime string +* `time_updated` - The time the Private Endpoint was last updated. An RFC3339 formatted datetime string +* `vcn_id` - Identifier of the VCN in which subnet exists. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://registry.terraform.io/providers/oracle/oci/latest/docs/guides/changing_timeouts) for certain operations: + * `create` - (Defaults to 20 minutes), when creating the Private Endpoint + * `update` - (Defaults to 20 minutes), when updating the Private Endpoint + * `delete` - (Defaults to 20 minutes), when destroying the Private Endpoint + + +## Import + +PrivateEndpoints can be imported using the `id`, e.g. + +``` +$ terraform import oci_globally_distributed_database_private_endpoint.test_private_endpoint "id" +``` + diff --git a/website/docs/r/globally_distributed_database_sharded_database.html.markdown b/website/docs/r/globally_distributed_database_sharded_database.html.markdown new file mode 100644 index 00000000000..664b2ecd29d --- /dev/null +++ b/website/docs/r/globally_distributed_database_sharded_database.html.markdown @@ -0,0 +1,257 @@ +--- +subcategory: "Globally Distributed Database" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_globally_distributed_database_sharded_database" +sidebar_current: "docs-oci-resource-globally_distributed_database-sharded_database" +description: |- + Provides the Sharded Database resource in Oracle Cloud Infrastructure Globally Distributed Database service +--- + +# oci_globally_distributed_database_sharded_database +This resource provides the Sharded Database resource in Oracle Cloud Infrastructure Globally Distributed Database service. + +Creates a Sharded Database. + + Patch operation to add, remove or update shards to the sharded database topology. In single patch +operation, multiple shards can be either added, or removed or updated. Combination of inserts, update +and remove in single operation is not allowed. + + +## Example Usage + +```hcl +resource "oci_globally_distributed_database_sharded_database" "test_sharded_database" { + #Required + catalog_details { + #Required + admin_password = var.sharded_database_catalog_details_admin_password + cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id + compute_count = var.sharded_database_catalog_details_compute_count + data_storage_size_in_gbs = var.sharded_database_catalog_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.sharded_database_catalog_details_is_auto_scaling_enabled + + #Optional + encryption_key_details { + #Required + kms_key_id = oci_kms_key.test_key.id + vault_id = oci_kms_vault.test_vault.id + + #Optional + kms_key_version_id = oci_kms_key_version.test_key_version.id + } + peer_cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id + } + character_set = var.sharded_database_character_set + compartment_id = var.compartment_id + db_deployment_type = var.sharded_database_db_deployment_type + db_version = var.sharded_database_db_version + db_workload = var.sharded_database_db_workload + display_name = var.sharded_database_display_name + listener_port = var.sharded_database_listener_port + listener_port_tls = var.sharded_database_listener_port_tls + ncharacter_set = var.sharded_database_ncharacter_set + ons_port_local = var.sharded_database_ons_port_local + ons_port_remote = var.sharded_database_ons_port_remote + prefix = var.sharded_database_prefix + shard_details { + #Required + admin_password = var.sharded_database_shard_details_admin_password + cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id + compute_count = var.sharded_database_shard_details_compute_count + data_storage_size_in_gbs = var.sharded_database_shard_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.sharded_database_shard_details_is_auto_scaling_enabled + + #Optional + encryption_key_details { + #Required + kms_key_id = oci_kms_key.test_key.id + vault_id = oci_kms_vault.test_vault.id + + #Optional + kms_key_version_id = oci_kms_key_version.test_key_version.id + } + peer_cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id + shard_space = var.sharded_database_shard_details_shard_space + } + sharded_database_id = var.sharded_database_sharded_database_id + sharding_method = var.sharded_database_sharding_method + + #Optional + chunks = var.sharded_database_chunks + cluster_certificate_common_name = var.sharded_database_cluster_certificate_common_name + defined_tags = {"foo-namespace.bar-key"= "value"} + freeform_tags = {"bar-key"= "value"} + patch_operations { + #Required + operation = var.sharded_database_patch_operations_operation + selection = var.sharded_database_patch_operations_selection + + #Optional + value = var.sharded_database_patch_operations_value + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `catalog_details` - (Required) Collection of ATP-Dedicated catalogs that needs to be created. + * `admin_password` - (Required) Admin password for the catalog database. + * `cloud_autonomous_vm_cluster_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + * `compute_count` - (Required) The compute count for the catalog database. It has to be in multiple of 2. + * `data_storage_size_in_gbs` - (Required) The data disk group size to be allocated in GBs for the catalog database. + * `encryption_key_details` - (Optional) Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - (Required) Determines the auto-scaling mode for the catalog database. + * `peer_cloud_autonomous_vm_cluster_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. +* `character_set` - (Required) The character set for the new shard database being created. Use database api ListAutonomousDatabaseCharacterSets to get the list of allowed character set for autonomous dedicated database. See documentation: https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/ListAutonomousDatabaseCharacterSets +* `chunks` - (Optional) The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace. +* `cluster_certificate_common_name` - (Optional) The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period. +* `compartment_id` - (Required) (Updatable) Identifier of the compartment where sharded database is to be created. +* `db_deployment_type` - (Required) The database deployment type. +* `db_version` - (Required) Oracle Database version of the Autonomous Container Database. +* `db_workload` - (Required) Possible workload types. +* `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `display_name` - (Required) (Updatable) Oracle sharded database display name. +* `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `listener_port` - (Required) The listener port number for sharded database. +* `listener_port_tls` - (Required) The TLS listener port number for sharded database. +* `ncharacter_set` - (Required) The national character set for the new shard database being created. Use database api ListAutonomousDatabaseCharacterSets to get the list of allowed national character set for autonomous dedicated database. See documentation: https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/ListAutonomousDatabaseCharacterSets +* `ons_port_local` - (Required) Ons port local for sharded database. +* `ons_port_remote` - (Required) Ons remote port for sharded database. +* `patch_operations` - (Optional) (Updatable) + * `operation` - (Required) (Updatable) The operation can be one of these values: `INSERT`, `MERGE`, `REMOVE` + * `selection` - (Required) (Updatable) + * `value` - (Required when operation=INSERT | MERGE) (Updatable) +* `prefix` - (Required) Unique name prefix for the sharded databases. Only alpha-numeric values are allowed. First character has to be a letter followed by any combination of letter and number. +* `shard_details` - (Required) Collection of ATP-Dedicated shards that needs to be created. + * `admin_password` - (Required) Admin password for shard database. + * `cloud_autonomous_vm_cluster_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. + * `compute_count` - (Required) The compute count for the shard database. It has to be in multiples of 2. + * `data_storage_size_in_gbs` - (Required) The data disk group size to be allocated in GBs for the shard database. + * `encryption_key_details` - (Optional) Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - (Required) Determines the auto-scaling mode for the shard database. + * `peer_cloud_autonomous_vm_cluster_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the peer cloud Autonomous Exadata VM Cluster. + * `shard_space` - (Optional) The shard space name for the shard database. Shard space for existing shard cannot be changed, once shard is created. Shard space name shall be used while creation of new shards. For User defined sharding, every shard must have a unique shard space name. For system defined sharding, shard space name is not required. +* `sharded_database_id` - (Required) +* `sharding_method` - (Required) Sharding Method. +* `configure_gsms_trigger` - (Optional) (Updatable) An optional property when incremented triggers Configure Gsms. Could be set to any integer value. +* `configure_sharding_trigger` - (Optional) (Updatable) An optional property when incremented triggers Configure Sharding. Could be set to any integer value. +* `download_gsm_certificate_signing_request_trigger` - (Optional) (Updatable) An optional property when incremented triggers Download Gsm Certificate Signing Request. Could be set to any integer value. +* `generate_gsm_certificate_signing_request_trigger` - (Optional) (Updatable) An optional property when incremented triggers Generate Gsm Certificate Signing Request. Could be set to any integer value. +* `generate_wallet_trigger` - (Optional) (Updatable) An optional property when incremented triggers Generate Wallet. Could be set to any integer value. +* `get_connection_string_trigger` - (Optional) (Updatable) An optional property when incremented triggers Get Connection String. Could be set to any integer value. +* `start_database_trigger` - (Optional) (Updatable) An optional property when incremented triggers Start Database. Could be set to any integer value. +* `stop_database_trigger` - (Optional) (Updatable) An optional property when incremented triggers Stop Database. Could be set to any integer value. +* `upload_signed_certificate_and_generate_wallet_trigger` - (Optional) (Updatable) An optional property when incremented triggers Upload Signed Certificate And Generate Wallet. Could be set to any integer value. +* `validate_network_trigger` - (Optional) (Updatable) An optional property when incremented triggers Validate Network. Could be set to any integer value. + + +** IMPORTANT ** +Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values + +## Attributes Reference + +The following attributes are exported: + +* `catalog_details` - Details of ATP-D based catalogs. + * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the catalog. + * `compute_count` - The compute amount available to the underlying autonomous database associated with shard or catalog. + * `container_database_id` - Identifier of the underlying container database. + * `container_database_parent_id` - Identifier of the underlying container database parent. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `encryption_key_details` - Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - Determines the auto-scaling mode. + * `metadata` - Additional metadata related to catalog's underlying supporting resource. + * `name` - Catalog name + * `peer_cloud_autonomous_vm_cluster_id` - Identifier of the peer cloudAutonomousVmCluster for the catalog. + * `shard_group` - Name of the shard-group to which the catalog belongs. + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the catalog was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with catalog expires. An RFC3339 formatted datetime string + * `time_updated` - The time the catalog was last created. An RFC3339 formatted datetime string +* `character_set` - The character set for the database. +* `chunks` - The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace. +* `cluster_certificate_common_name` - The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period. +* `compartment_id` - Identifier of the compartment in which sharded database exists. +* `connection_strings` - Details of sharded database connection String. + * `all_connection_strings` - Collection of connection strings. +* `db_deployment_type` - The database deployment type. +* `db_version` - Oracle Database version number. +* `db_workload` - Possible workload types. +* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `display_name` - Oracle sharded database display name. +* `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `gsms` - Details of GSM instances for the sharded database. + * `compute_count` - The compute count for the GSM instance. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `metadata` - Additional metadata related to GSM's underlying supporting resource. + * `name` - Name of the GSM instance + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the GSM instance was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with GSM expires. An RFC3339 formatted datetime string + * `time_updated` - The time the GSM instance was last updated. An RFC3339 formatted datetime string +* `id` - Sharded Database identifier +* `lifecycle_state_details` - Detailed message for the lifecycle state. +* `listener_port` - The GSM listener port number. +* `listener_port_tls` - The TLS listener port number for sharded database. +* `ncharacter_set` - The national character set for the database. +* `ons_port_local` - Ons local port number. +* `ons_port_remote` - Ons remote port number. +* `prefix` - Unique prefix for the sharded database. +* `private_endpoint` - The OCID of private endpoint being used by the sharded database. +* `shard_details` - Details of ATP-D based shards. + * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the shard. + * `compute_count` - The compute amount available to the underlying autonomous database associated with shard. + * `container_database_id` - Identifier of the underlying container database. + * `container_database_parent_id` - Identifier of the underlying container database parent. + * `data_storage_size_in_gbs` - The data disk group size to be allocated in GBs. + * `encryption_key_details` - Details of encryption key to be used to encrypt data for shards and catalog for sharded database. For system-defined sharding type, all shards have to use same encryptionKeyDetails. For system-defined sharding, if encryptionKeyDetails are not specified for catalog, then Oracle managed key will be used for catalog. For user-defined sharding type, if encryptionKeyDetails are not provided for any shard or catalog, then Oracle managed key will be used for such shard or catalog. For system-defined or user-defined sharding type, if the shard or catalog has a peer in region other than primary shard or catalog region, then make sure to provide virtual vault for such shard or catalog, which is also replicated to peer region (the region where peer or standby shard or catalog exists). + * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key in vault identified by vaultId in customer tenancy that is used as the master encryption key. + * `kms_key_version_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key version for key identified by kmsKeyId that is used in data encryption (TDE) operations. + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the vault in customer tenancy where KMS key is present. For shard or catalog with cross-region data guard enabled, user needs to make sure to provide virtual private vault only, which is also replicated in the region of standby shard. + * `is_auto_scaling_enabled` - Determines the auto-scaling mode. + * `metadata` - Additional metadata related to shard's underlying supporting resource. + * `name` - Name of the shard. + * `peer_cloud_autonomous_vm_cluster_id` - Identifier of the peer cloudAutonomousVmCluster for the shard. + * `shard_group` - Name of the shard-group to which the shard belongs. + * `shard_space` - Shard space name. + * `status` - Status of shard or catalog or gsm for the sharded database. + * `supporting_resource_id` - Identifier of the underlying supporting resource. + * `time_created` - The time the the shard was created. An RFC3339 formatted datetime string + * `time_ssl_certificate_expires` - The time the ssl certificate associated with shard expires. An RFC3339 formatted datetime string + * `time_updated` - The time the shard was last updated. An RFC3339 formatted datetime string +* `sharding_method` - Sharding Method. +* `state` - Lifecycle states for sharded databases. +* `system_tags` - Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}` +* `time_created` - The time the the Sharded Database was created. An RFC3339 formatted datetime string +* `time_updated` - The time the Sharded Database was last updated. An RFC3339 formatted datetime string +* `time_zone` - Timezone associated with the sharded database. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://registry.terraform.io/providers/oracle/oci/latest/docs/guides/changing_timeouts) for certain operations: + * `create` - (Defaults to 20 minutes), when creating the Sharded Database + * `update` - (Defaults to 20 minutes), when updating the Sharded Database + * `delete` - (Defaults to 20 minutes), when destroying the Sharded Database + + +## Import + +ShardedDatabases can be imported using the `id`, e.g. + +``` +$ terraform import oci_globally_distributed_database_sharded_database.test_sharded_database "id" +``` + diff --git a/website/docs/r/integration_integration_instance.html.markdown b/website/docs/r/integration_integration_instance.html.markdown index 246361f0bec..92dc8b33af0 100644 --- a/website/docs/r/integration_integration_instance.html.markdown +++ b/website/docs/r/integration_integration_instance.html.markdown @@ -94,16 +94,8 @@ The following arguments are supported: * `allowlisted_ips` - (Optional) Source IP addresses or IP address ranges ingress rules. (ex: "168.122.59.5", "10.20.30.0/26") An invalid IP or CIDR block will result in a 400 response. * `id` - (Required) The Virtual Cloud Network OCID. * `is_integration_vcn_allowlisted` - (Optional) The Integration service's VCN is allow-listed to allow integrations to call back into other integrations -<<<<<<< HEAD * `network_endpoint_type` - (Required) The type of network endpoint. * `shape` - (Optional) Shape -* `enable_process_automation_trigger` - (Optional) (Updatable) An optional property when incremented triggers Enable Process Automation. Could be set to any integer value. -||||||| parent of c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) - * `network_endpoint_type` - (Required) The type of network endpoint. -======= - * `network_endpoint_type` - (Required) The type of network endpoint. -* `shape` - (Optional) Shape ->>>>>>> c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) * `state` - (Optional) (Updatable) The target state for the instance. Could be set to ACTIVE or INACTIVE @@ -158,19 +150,12 @@ The following attributes are exported: * `allowlisted_ips` - Source IP addresses or IP address ranges ingress rules. (ex: "168.122.59.5", "10.20.30.0/26") An invalid IP or CIDR block will result in a 400 response. * `id` - The Virtual Cloud Network OCID. * `is_integration_vcn_allowlisted` - The Integration service's VCN is allow-listed to allow integrations to call back into other integrations -<<<<<<< HEAD - * `network_endpoint_type` - The type of network endpoint. -* `shape` - Shape -||||||| parent of c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) - * `network_endpoint_type` - The type of network endpoint. -======= * `network_endpoint_type` - The type of network endpoint. * `private_endpoint_outbound_connection` - Base representation for Outbound Connection (Reverse Connection). * `nsg_ids` - One or more Network security group Ids. This is an optional argument. * `outbound_connection_type` - The type of Outbound Connection. * `subnet_id` - Customer Private Network VCN Subnet OCID. This is a required argument. * `shape` - Shape ->>>>>>> c689349fc7 (Added - Support for Enabling outbound private access using PE RCE for OIC Gen3 customers) * `state` - The current state of the integration instance. * `state_message` - An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `time_created` - The time the the Integration Instance was created. An RFC3339 formatted datetime string. diff --git a/website/docs/r/kms_key.html.markdown b/website/docs/r/kms_key.html.markdown index 2ce3f7ee28d..8bf87b558d6 100644 --- a/website/docs/r/kms_key.html.markdown +++ b/website/docs/r/kms_key.html.markdown @@ -52,12 +52,8 @@ resource "oci_kms_key" "test_key" { external_key_id = oci_kms_key.test_key.id } freeform_tags = {"Department"= "Finance"} -<<<<<<< ours is_auto_rotation_enabled = var.key_is_auto_rotation_enabled protection_mode = var.key_protection_mode -======= - protection_mode = "${var.key_protection_mode}" ->>>>>>> theirs } ``` diff --git a/website/docs/r/opsi_database_insight.html.markdown b/website/docs/r/opsi_database_insight.html.markdown index 906345f39b0..03a9331717b 100644 --- a/website/docs/r/opsi_database_insight.html.markdown +++ b/website/docs/r/opsi_database_insight.html.markdown @@ -36,10 +36,10 @@ resource "oci_opsi_database_insight" "test_database_insight" { } credential_details { #Required + credential_source_name = var.database_insight_credential_details_credential_source_name credential_type = var.database_insight_credential_details_credential_type #Optional - credential_source_name = var.database_insight_credential_details_credential_source_name password_secret_id = oci_vault_secret.test_secret.id role = var.database_insight_credential_details_role user_name = oci_identity_user.test_user.name @@ -70,17 +70,17 @@ The following arguments are supported: * `hosts` - (Required when entity_source=PE_COMANAGED_DATABASE) List of hosts and port for private endpoint accessed database resource. * `host_ip` - (Applicable when entity_source=PE_COMANAGED_DATABASE) Host IP used for connection requests for Cloud DB resource. * `port` - (Applicable when entity_source=PE_COMANAGED_DATABASE) Listener port number used for connection requests for rivate endpoint accessed db resource. - * `protocol` - (Optional) Protocol used for connection requests for private endpoint accssed database resource. - * `service_name` - (Optional) Database service name used for connection requests. -* `credential_details` - (Required when entity_source=PE_COMANAGED_DATABASE) User credential details to connect to the database. This is supplied via the External Database Service. - * `credential_source_name` - (Required when entity_source=PE_COMANAGED_DATABASE) Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - (Required) Credential type. - * `password_secret_id` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. - * `role` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) database user role. - * `user_name` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) database user name. - * `wallet_secret_id` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. -* `database_id` - (Required when entity_source=AUTONOMOUS_DATABASE | MACS_MANAGED_EXTERNAL_DATABASE | PE_COMANAGED_DATABASE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. -* `database_resource_type` - (Required when entity_source=AUTONOMOUS_DATABASE | MACS_MANAGED_EXTERNAL_DATABASE | PE_COMANAGED_DATABASE) Oracle Cloud Infrastructure database resource type +* `protocol` - (Optional) Protocol used for connection requests for private endpoint accssed database resource. +* `service_name` - (Optional) Database service name used for connection requests. +* `credential_details` - (Required when entity_source=AUTONOMOUS_DATABASE | PE_COMANAGED_DATABASE) User credential details to connect to the database. +* `credential_source_name` - (Required) Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. +* `credential_type` - (Required) Credential type. +* `password_secret_id` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. +* `role` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) database user role. +* `user_name` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) database user name. +* `wallet_secret_id` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. This is used for TCPS support in BM/VM/ExaCS cases. +* `database_id` - (Required when entity_source=AUTONOMOUS_DATABASE | MACS_MANAGED_EXTERNAL_DATABASE | MDS_MYSQL_DATABASE_SYSTEM | PE_COMANAGED_DATABASE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. +* `database_resource_type` - (Required when entity_source=AUTONOMOUS_DATABASE | MACS_MANAGED_EXTERNAL_DATABASE | MDS_MYSQL_DATABASE_SYSTEM | PE_COMANAGED_DATABASE) Oracle Cloud Infrastructure database resource type * `dbm_private_endpoint_id` - (Applicable when entity_source=PE_COMANAGED_DATABASE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Management private endpoint * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `deployment_type` - (Required when entity_source=PE_COMANAGED_DATABASE) Database Deployment Type @@ -90,7 +90,7 @@ The following arguments are supported: * `entity_source` - (Required) (Updatable) Source of the database entity. * `exadata_insight_id` - (Applicable when entity_source=EM_MANAGED_EXTERNAL_DATABASE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata insight. * `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` -* `opsi_private_endpoint_id` - (Applicable when entity_source=PE_COMANAGED_DATABASE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint +* `opsi_private_endpoint_id` - (Applicable when entity_source=AUTONOMOUS_DATABASE | PE_COMANAGED_DATABASE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint * `dbm_private_endpoint_id` - (Applicable when entity_source=PE_COMANAGED_DATABASE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Management private endpoint. This field and opsi_private_endpoint_id are mutually exclusive. If DBM private endpoint ID is provided, a new OPSI private endpoint ID will be created. * `service_name` - (Required when entity_source=PE_COMANAGED_DATABASE) Database service name used for connection requests. * `system_tags` - (Applicable when entity_source=PE_COMANAGED_DATABASE) System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` @@ -105,32 +105,34 @@ The following attributes are exported: * `compartment_id` - Compartment identifier of the database * `connection_credential_details` - User credential details to connect to the database. This is supplied via the External Database Service. - * `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - Credential type. - * `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. - * `role` - database user role. - * `user_name` - database user name. - * `wallet_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. +* `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. +* `credential_type` - Credential type. +* `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. +* `role` - database user role. +* `user_name` - database user name. +* `wallet_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. * `connection_details` - Connection details to connect to the database. HostName, protocol, and port should be specified. - * `host_name` - Name of the listener host that will be used to create the connect string to the database. - * `hosts` - List of hosts and port for private endpoint accessed database resource. - * `host_ip` - Host IP used for connection requests for Cloud DB resource. - * `port` - Listener port number used for connection requests for rivate endpoint accessed db resource. - * `port` - Listener port number used for connection requests. - * `protocol` - Protocol used for connection requests for private endpoint accssed database resource. - * `service_name` - Database service name used for connection requests. -* `credential_details` - User credential details to connect to the database. This is supplied via the External Database Service. - * `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - Credential type. - * `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. - * `role` - database user role. - * `user_name` - database user name. - * `wallet_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. +* `host_name` - Name of the listener host that will be used to create the connect string to the database. +* `hosts` - List of hosts and port for private endpoint accessed database resource. + * `host_ip` - Host IP used for connection requests for Cloud DB resource. + * `port` - Listener port number used for connection requests for rivate endpoint accessed db resource. +* `port` - Listener port number used for connection requests. +* `protocol` - Protocol used for connection requests for private endpoint accssed database resource. +* `service_name` - Database service name used for connection requests. +* `connector_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of External Database Connector +* `credential_details` - User credential details to connect to the database. +* `credential_source_name` - Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. +* `credential_type` - Credential type. +* `password_secret_id` - The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. +* `role` - database user role. +* `user_name` - database user name. +* `wallet_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the database keystore contents are stored. * `database_connection_status_details` - A message describing the status of the database connection of this resource. For example, it can be used to provide actionable information about the permission and content validity of the database connection. * `database_display_name` - Display name of database * `database_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `database_name` - Name of database -* `database_type` - Operations Insights internal representation of the database type. +* `database_resource_type` - Oracle Cloud Infrastructure database resource type +* `database_type` - Ops Insights internal representation of the database type. * `database_version` - The version of the database. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `enterprise_manager_bridge_id` - OPSI Enterprise Manager Bridge OCID @@ -143,6 +145,9 @@ The following attributes are exported: * `exadata_insight_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata insight. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - Database insight identifier +* `is_advanced_features_enabled` - Flag is to identify if advanced features for autonomous database is enabled or not +* `is_heat_wave_cluster_attached` - Specifies if MYSQL DB System has heatwave cluster attached. +* `is_highly_available` - Specifies if MYSQL DB System is highly available. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `opsi_private_endpoint_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint * `parent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. @@ -151,7 +156,7 @@ The following attributes are exported: * `state` - The current state of the database. * `status` - Indicates the status of a database insight in Operations Insights * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` -* `time_created` - The time the the database insight was first enabled. An RFC3339 formatted datetime string +* `time_created` - The time the database insight was first enabled. An RFC3339 formatted datetime string * `time_updated` - The time the database insight was updated. An RFC3339 formatted datetime string ## Timeouts diff --git a/website/docs/r/opsi_exadata_insight.html.markdown b/website/docs/r/opsi_exadata_insight.html.markdown index 8362a177ea9..53ad804db56 100644 --- a/website/docs/r/opsi_exadata_insight.html.markdown +++ b/website/docs/r/opsi_exadata_insight.html.markdown @@ -100,9 +100,9 @@ The following arguments are supported: * `port` - (Applicable when entity_source=PE_COMANAGED_EXADATA) Listener port number used for connection requests for rivate endpoint accessed db resource. * `protocol` - (Applicable when entity_source=PE_COMANAGED_EXADATA) Protocol used for connection requests for private endpoint accssed database resource. * `service_name` - (Applicable when entity_source=PE_COMANAGED_EXADATA) Database service name used for connection requests. - * `credential_details` - (Required when entity_source=PE_COMANAGED_EXADATA) User credential details to connect to the database. This is supplied via the External Database Service. + * `credential_details` - (Required when entity_source=PE_COMANAGED_EXADATA) User credential details to connect to the database. * `credential_source_name` - (Required when entity_source=PE_COMANAGED_EXADATA) Credential source name that had been added in Management Agent wallet. This is supplied in the External Database Service. - * `credential_type` - (Required) Credential type. + * `credential_type` - (Required) Credential type. * `password_secret_id` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) The secret [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) mapping to the database credentials. * `role` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) database user role. * `user_name` - (Applicable when credential_type=CREDENTIALS_BY_VAULT) database user name. diff --git a/website/docs/r/opsi_host_insight.html.markdown b/website/docs/r/opsi_host_insight.html.markdown index d645bbeb37e..e6710b29ef0 100644 --- a/website/docs/r/opsi_host_insight.html.markdown +++ b/website/docs/r/opsi_host_insight.html.markdown @@ -10,7 +10,7 @@ description: |- # oci_opsi_host_insight This resource provides the Host Insight resource in Oracle Cloud Infrastructure Opsi service. -Create a Host Insight resource for a host in Operations Insights. The host will be enabled in Operations Insights. Host metric collection and analysis will be started. +Create a Host Insight resource for a host in Ops Insights. The host will be enabled in Ops Insights. Host metric collection and analysis will be started. ## Example Usage @@ -72,14 +72,16 @@ The following attributes are exported: * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `host_display_name` - The user-friendly name for the host. The name does not have to be unique. * `host_name` - The host name. The host name is unique amongst the hosts managed by the same management agent. -* `host_type` - Operations Insights internal representation of the host type. Possible value is EXTERNAL-HOST. +* `host_type` - Ops Insights internal representation of the host type. Possible value is EXTERNAL-HOST. * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `management_agent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent +* `opsi_private_endpoint_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OPSI private endpoint +* `parent_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VM Cluster or DB System ID, depending on which configuration the resource belongs to. * `platform_name` - Platform name. * `platform_type` - Platform type. Supported platformType(s) for MACS-managed external host insight: [LINUX, SOLARIS, WINDOWS]. Supported platformType(s) for MACS-managed cloud host insight: [LINUX]. Supported platformType(s) for EM-managed external host insight: [LINUX, SOLARIS, SUNOS, ZLINUX, WINDOWS, AIX]. * `platform_version` - Platform version. -* `processor_count` - Processor count. +* `root_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Infrastructure. * `state` - The current state of the host. * `status` - Indicates the status of a host insight in Operations Insights * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/docs/r/opsi_news_report.html.markdown b/website/docs/r/opsi_news_report.html.markdown index b156e6cc1df..48d673347e1 100644 --- a/website/docs/r/opsi_news_report.html.markdown +++ b/website/docs/r/opsi_news_report.html.markdown @@ -10,7 +10,7 @@ description: |- # oci_opsi_news_report This resource provides the News Report resource in Oracle Cloud Infrastructure Opsi service. -Create a news report in Operations Insights. The report will be enabled in Operations Insights. Insights will be emailed as per selected frequency. +Create a news report in Ops Insights. The report will be enabled in Ops Insights. Insights will be emailed as per selected frequency. ## Example Usage @@ -98,7 +98,7 @@ The following attributes are exported: * `news_frequency` - News report frequency. * `ons_topic_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ONS topic. * `state` - The current state of the news report. -* `status` - Indicates the status of a news report in Operations Insights. +* `status` - Indicates the status of a news report in Ops Insights. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - The time the the news report was first enabled. An RFC3339 formatted datetime string. * `time_updated` - The time the news report was updated. An RFC3339 formatted datetime string. diff --git a/website/docs/r/opsi_operations_insights_private_endpoint.html.markdown b/website/docs/r/opsi_operations_insights_private_endpoint.html.markdown index 60dea9c52a4..03f401e5f81 100644 --- a/website/docs/r/opsi_operations_insights_private_endpoint.html.markdown +++ b/website/docs/r/opsi_operations_insights_private_endpoint.html.markdown @@ -10,7 +10,7 @@ description: |- # oci_opsi_operations_insights_private_endpoint This resource provides the Operations Insights Private Endpoint resource in Oracle Cloud Infrastructure Opsi service. -Create a private endpoint resource for the tenant in Operations Insights. +Create a private endpoint resource for the tenant in Ops Insights. This resource will be created in customer compartment. @@ -42,7 +42,7 @@ The following arguments are supported: * `description` - (Optional) (Updatable) The description of the private endpoint. * `display_name` - (Required) (Updatable) The display name for the private endpoint. It is changeable. * `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` -* `is_used_for_rac_dbs` - (Required) The flag to identify if private endpoint is used for rac database or not +* `is_used_for_rac_dbs` - (Required) This flag was previously used to create a private endpoint with scan proxy. Setting this to true will now create a private endpoint with a DNS proxy causing `isProxyEnabled` flag to be true; this is used exclusively for full feature support for dedicated Autonomous Databases. * `nsg_ids` - (Optional) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups that the private endpoint belongs to. * `subnet_id` - (Required) The Subnet [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Private service accessed database. * `vcn_id` - (Required) The VCN [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Private service accessed database. @@ -61,7 +61,7 @@ The following attributes are exported: * `display_name` - The display name of the private endpoint. * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - The OCID of the Private service accessed database. -* `is_used_for_rac_dbs` - The flag is to identify if private endpoint is used for rac database or not +* `is_used_for_rac_dbs` - The flag is to identify if private endpoint is used for rac database or not. This flag is deprecated and no longer is used. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. * `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. * `private_endpoint_status_details` - A message describing the status of the private endpoint connection of this resource. For example, it can be used to provide actionable information about the validity of the private endpoint connection. diff --git a/website/docs/r/opsi_operations_insights_warehouse.html.markdown b/website/docs/r/opsi_operations_insights_warehouse.html.markdown index 6a178b4d56c..0800f909955 100644 --- a/website/docs/r/opsi_operations_insights_warehouse.html.markdown +++ b/website/docs/r/opsi_operations_insights_warehouse.html.markdown @@ -10,7 +10,7 @@ description: |- # oci_opsi_operations_insights_warehouse This resource provides the Operations Insights Warehouse resource in Oracle Cloud Infrastructure Opsi service. -Create a Operations Insights Warehouse resource for the tenant in Operations Insights. New ADW will be provisioned for this tenant. +Create a Ops Insights Warehouse resource for the tenant in Ops Insights. New ADW will be provisioned for this tenant. There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. If the 'opsi-warehouse-type' header is passed to the API, a warehouse resource without ADW or Schema provisioning is created. @@ -38,7 +38,7 @@ The following arguments are supported: * `compartment_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. * `cpu_allocated` - (Required) (Updatable) Number of OCPUs allocated to OPSI Warehouse ADW. * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` -* `display_name` - (Required) (Updatable) User-friedly name of Operations Insights Warehouse that does not have to be unique. +* `display_name` - (Required) (Updatable) User-friedly name of Ops Insights Warehouse that does not have to be unique. * `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `storage_allocated_in_gbs` - (Optional) (Updatable) Storage allocated to OPSI Warehouse ADW. @@ -54,18 +54,18 @@ The following attributes are exported: * `cpu_allocated` - Number of OCPUs allocated to OPSI Warehouse ADW. * `cpu_used` - Number of OCPUs used by OPSI Warehouse ADW. Can be fractional. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` -* `display_name` - User-friedly name of Operations Insights Warehouse that does not have to be unique. +* `display_name` - User-friedly name of Ops Insights Warehouse that does not have to be unique. * `dynamic_group_id` - OCID of the dynamic group created for the warehouse * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - OPSI Warehouse OCID * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. -* `operations_insights_tenancy_id` - Tenancy Identifier of Operations Insights service +* `operations_insights_tenancy_id` - Tenancy Identifier of Ops Insights service * `state` - Possible lifecycle states * `storage_allocated_in_gbs` - Storage allocated to OPSI Warehouse ADW. * `storage_used_in_gbs` - Storage by OPSI Warehouse ADW in GB. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - The time at which the resource was first created. An RFC3339 formatted datetime string -* `time_last_wallet_rotated` - The time at which the ADW wallet was last rotated for the Operations Insights Warehouse. An RFC3339 formatted datetime string +* `time_last_wallet_rotated` - The time at which the ADW wallet was last rotated for the Ops Insights Warehouse. An RFC3339 formatted datetime string * `time_updated` - The time at which the resource was last updated. An RFC3339 formatted datetime string ## Timeouts diff --git a/website/docs/r/opsi_operations_insights_warehouse_download_warehouse_wallet.html.markdown b/website/docs/r/opsi_operations_insights_warehouse_download_warehouse_wallet.html.markdown index 31543959659..621bee8f3b6 100644 --- a/website/docs/r/opsi_operations_insights_warehouse_download_warehouse_wallet.html.markdown +++ b/website/docs/r/opsi_operations_insights_warehouse_download_warehouse_wallet.html.markdown @@ -26,8 +26,8 @@ resource "oci_opsi_operations_insights_warehouse_download_warehouse_wallet" "tes The following arguments are supported: -* `operations_insights_warehouse_id` - (Required) Unique Operations Insights Warehouse identifier -* `operations_insights_warehouse_wallet_password` - (Required) User provided ADW wallet password for the Operations Insights Warehouse. +* `operations_insights_warehouse_id` - (Required) Unique Ops Insights Warehouse identifier +* `operations_insights_warehouse_wallet_password` - (Required) User provided ADW wallet password for the Ops Insights Warehouse. ** IMPORTANT ** diff --git a/website/docs/r/opsi_operations_insights_warehouse_rotate_warehouse_wallet.html.markdown b/website/docs/r/opsi_operations_insights_warehouse_rotate_warehouse_wallet.html.markdown index dab4a03f747..452cec29bc8 100644 --- a/website/docs/r/opsi_operations_insights_warehouse_rotate_warehouse_wallet.html.markdown +++ b/website/docs/r/opsi_operations_insights_warehouse_rotate_warehouse_wallet.html.markdown @@ -25,7 +25,7 @@ resource "oci_opsi_operations_insights_warehouse_rotate_warehouse_wallet" "test_ The following arguments are supported: -* `operations_insights_warehouse_id` - (Required) Unique Operations Insights Warehouse identifier +* `operations_insights_warehouse_id` - (Required) Unique Ops Insights Warehouse identifier ** IMPORTANT ** diff --git a/website/docs/r/opsi_operations_insights_warehouse_user.html.markdown b/website/docs/r/opsi_operations_insights_warehouse_user.html.markdown index e455a24a2f0..eb430e1e804 100644 --- a/website/docs/r/opsi_operations_insights_warehouse_user.html.markdown +++ b/website/docs/r/opsi_operations_insights_warehouse_user.html.markdown @@ -38,13 +38,13 @@ resource "oci_opsi_operations_insights_warehouse_user" "test_operations_insights The following arguments are supported: * `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `connection_password` - (Required) (Updatable) User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `connection_password` - (Required) (Updatable) User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `is_awr_data_access` - (Required) (Updatable) Indicate whether user has access to AWR data. * `is_em_data_access` - (Optional) (Updatable) Indicate whether user has access to EM data. * `is_opsi_data_access` - (Optional) (Updatable) Indicate whether user has access to OPSI data. -* `name` - (Required) Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `name` - (Required) Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `operations_insights_warehouse_id` - (Required) OPSI Warehouse OCID @@ -56,7 +56,7 @@ Any change to a property that does not support update will force the destruction The following attributes are exported: * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `connection_password` - User provided connection password for the AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `connection_password` - User provided connection password for the AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `freeform_tags` - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `id` - Hub User OCID @@ -64,7 +64,7 @@ The following attributes are exported: * `is_em_data_access` - Indicate whether user has access to EM data. * `is_opsi_data_access` - Indicate whether user has access to OPSI data. * `lifecycle_details` - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. -* `name` - Username for schema which would have access to AWR Data, Enterprise Manager Data and Operations Insights OPSI Hub. +* `name` - Username for schema which would have access to AWR Data, Enterprise Manager Data and Ops Insights OPSI Hub. * `operations_insights_warehouse_id` - OPSI Warehouse OCID * `state` - Possible lifecycle states * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` diff --git a/website/oci.erb b/website/oci.erb index 1cd675a0c14..9966273e8ac 100644 --- a/website/oci.erb +++ b/website/oci.erb @@ -2707,6 +2707,9 @@
  • oci_data_safe_sensitive_data_model_sensitive_schemas
  • +
  • + oci_data_safe_sensitive_data_model_sensitive_types +
  • oci_data_safe_sensitive_data_models
  • @@ -4480,29 +4483,14 @@ > Data Sources > Resources @@ -4867,6 +4855,39 @@ + > + Globally Distributed Database + + > Golden Gate