diff --git a/CHANGELOG.md b/CHANGELOG.md index 15745ee558d..803b681771b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ -## 6.23.0 (Unreleased) +## 6.24.0 (January 29, 2025) + +### Added +- Support for External HSM Support ExaDB-C@C +- Support for Ops Insights : Support External MySQL Databases +- Support for DBM : Support External MySQL Databases +- Support for OPSI News Reports - Actionable Insights +- Support DR for cloud native applications running on OKE +### Bug Fix +to use the correct Id for updating options config resource + +## 6.23.0 (January 29, 2025) ### Added - Support for VCNIP - BYOASN (Bring Your Own ASN) diff --git a/GNUmakefile b/GNUmakefile index 0855ba850eb..a49fb921be3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -164,4 +164,13 @@ check-module-name: @sh -c "'$(CURDIR)/scripts/gomodnamecheck.sh'" buildpyEnv: - cd ./terraform-test-resources/dev_tools/teamcity_scripts/python_script; @echo $(SCRIPT_ARG) ; sh run_python_script.sh \ No newline at end of file + cd ./terraform-test-resources/dev_tools/teamcity_scripts/python_script; @echo $(SCRIPT_ARG) ; sh run_python_script.sh + +buildpyEnv: + @if [ -d "./terraform-test-resources" ]; then \ + cd ./terraform-test-resources/dev_tools/teamcity_scripts/python_script; \ + echo $(SCRIPT_ARG); \ + sh run_python_script.sh; \ + else \ + echo "Skipping script execution: terraform-test-resources submodule not found."; \ + fi \ No newline at end of file diff --git a/examples/database/exadata_cc/vm_cluster.tf b/examples/database/exadata_cc/vm_cluster.tf index 7d5773721e3..977bfa4dc44 100644 --- a/examples/database/exadata_cc/vm_cluster.tf +++ b/examples/database/exadata_cc/vm_cluster.tf @@ -187,7 +187,7 @@ resource "oci_database_vm_cluster" "test_vm_cluster" { cpu_core_count = "4" display_name = "testVmCluster" exadata_infrastructure_id = oci_database_exadata_infrastructure.test_exadata_infrastructure.id - gi_version = data.oci_database_gi_versions.gi_version.gi_versions.0.version + gi_version = "23.0.0.0.0" ssh_public_keys = [var.ssh_public_key] vm_cluster_network_id = oci_database_vm_cluster_network.test_vm_cluster_network.id db_servers = [data.oci_database_db_servers.test_db_servers.db_servers.0.id, data.oci_database_db_servers.test_db_servers.db_servers.1.id] @@ -269,7 +269,7 @@ data "oci_database_vm_cluster_recommended_network" "test_vm_cluster_recommended_ resource "oci_database_db_home" "test_db_home_vm_cluster" { vm_cluster_id = oci_database_vm_cluster.test_vm_cluster.id source = "VM_CLUSTER_NEW" - db_version = "12.1.0.2" + db_version = "19.0.0.0" display_name = "createdDbHome" } @@ -295,6 +295,11 @@ resource "oci_database_database" "test_exacc_database"{ type = "NFS" } } + encryption_key_location_details { + #Required + hsm_password = "hsmPassword" + provider_type = "EXTERNAL" + } } db_home_id = oci_database_db_home.test_db_home_vm_cluster.id source = "NONE" @@ -339,9 +344,9 @@ data "oci_database_vm_clusters" "test_vm_clusters" { #Optional exadata_infrastructure_id = oci_database_exadata_infrastructure.test_exadata_infrastructure.id } - +/* resource "local_file" "test_vm_cluster_network_downloaded_config_file" { content = data.oci_database_vm_cluster_network_download_config_file.test_vm_cluster_network_download_config_file.content filename = "${path.module}/vm_cluster_config.txt" } - +*/ diff --git a/examples/databasemanagement/mysql/external/main.tf b/examples/databasemanagement/mysql/external/main.tf new file mode 100644 index 00000000000..07e58aa72c7 --- /dev/null +++ b/examples/databasemanagement/mysql/external/main.tf @@ -0,0 +1,73 @@ +variable "tenancy_ocid" {} +variable "user_ocid" {} +variable "fingerprint" {} +variable "private_key_path" {} +variable "region" {} + +provider "oci" { + //version = "5.36.0" + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +variable "compartment_id" { + default = "ocid1.test.oc1..EXAMPLE-compartmentId-Value" +} + +/*Creates an external MySQL database resource */ +resource "oci_database_management_external_my_sql_database" "test_external_my_sql_database" { + #Required + compartment_id = var.compartment_id + db_name = "ExampleNameTest" +} + +data "oci_database_management_external_my_sql_databases" "test_external_my_sql_databases" { + #Required + compartment_id = var.compartment_id + + #Optional + name = "ExampleNameTest" +} + +/*Creates a database connecotor resource. Connector requires an external MySQL database to associate with. */ +resource "oci_database_management_external_my_sql_database_connector" "test_external_my_sql_database_connector" { + #Required + compartment_id = "ocid1.test.oc1..EXAMPLE-compartmentId-Value" + connector_details { + #Required + credential_type = "MYSQL_EXTERNAL_NON_SSL_CREDENTIALS" + display_name = "EXAMPLE-Name-Test" + external_database_id = "ocid1.test.oc1..EXAMPLE-externalDatabase-Value" + host_name = "exampleHost" + macs_agent_id = "ocid1.test.oc1..EXAMPLE-agent-Value" + network_protocol = "TCP" + port = "10" + ssl_secret_id = "ocid1.test.oc1..EXAMPLE-secret-Value" + } + is_test_connection_param = "false" +} + +data "oci_database_management_external_my_sql_database_connectors" "test_external_my_sql_database_connectors" { + #Required + compartment_id = var.compartment_id + + #Optional + name = "ExampleTest" +} + +/*To enable/disable database management, provide an external MySQL database OCID and connector OCID. + "true" to enable and "false" to disable. In this example database management is being enabled for the external MySQL database + using the given connector.*/ +resource "oci_database_management_external_my_sql_database_external_mysql_databases_management" "test_external_my_sql_database_external_mysql_databases_management" { + #Required + + external_my_sql_database_id = "ocid1.test.oc1..EXAMPLE-database-Value" + + enable_external_mysql_database = "true" + + #Optional + connector_id ="ocid1.test.oc1..EXAMPLE-connector-Value" +} diff --git a/examples/databasemanagement/mysql/main.tf b/examples/databasemanagement/mysql/main.tf index 8832c26d866..f98f377b24a 100644 --- a/examples/databasemanagement/mysql/main.tf +++ b/examples/databasemanagement/mysql/main.tf @@ -1,13 +1,16 @@ // Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. // Licensed under the Mozilla Public License v2.0 - + variable "tenancy_ocid" {} +variable "start_time" {} +variable "end_time" {} variable "user_ocid" {} variable "fingerprint" {} variable "private_key_path" {} variable "region" {} provider "oci" { + // version = "5.36.0" tenancy_ocid = var.tenancy_ocid user_ocid = var.user_ocid fingerprint = var.fingerprint @@ -16,7 +19,8 @@ provider "oci" { } variable "compartment_id" { - default = "" + + default = "ocid1.test.oc1..EXAMPLE-compartment-Value" } # List managed MySQL database resources in a compartment @@ -42,6 +46,14 @@ data "oci_database_management_managed_my_sql_database_sql_data" "test_managed_my #Required managed_my_sql_database_id = data.oci_database_management_managed_my_sql_databases.test_managed_my_sql_databases.managed_my_sql_database_collection.0.items.0.id filter_column = "COUNT_STAR" - start_time = replace(timeadd(timestamp(), "-2h"), "/Z/", ".000Z") - end_time = replace(timestamp(), "/Z/", ".000Z") -} \ No newline at end of file + + // The start_time and end_time of the time range to retrieve the SQL data of a Managed Database + //in UTC in ISO-8601 format, for example "2024-04-14T17:23:13.000Z". + start_time = var.start_time + end_time = var.end_time + + +} + + + diff --git a/examples/disaster_recovery/dr_oke/bucket.tf b/examples/disaster_recovery/dr_oke/bucket.tf new file mode 100644 index 00000000000..dd5d29b5e5a --- /dev/null +++ b/examples/disaster_recovery/dr_oke/bucket.tf @@ -0,0 +1,28 @@ +variable "bucket_name" { + default = "testBucketName_1" +} + +variable "bucket_namespace" { + default = "ansh8lvru1zp" +} + +data "oci_identity_tenancy" "test_tenancy" { + #Required + tenancy_id = var.tenancy_ocid +} + +data "oci_objectstorage_namespace" "test_namespace" { + + #Optional + compartment_id = var.compartment_id +} + +data "oci_objectstorage_bucket" "test_bucket" { + namespace = data.oci_objectstorage_namespace.test_namespace.namespace + name = var.bucket_name +} + +data "oci_objectstorage_bucket" "test_member_bucket" { + namespace = data.oci_objectstorage_namespace.test_namespace.namespace + name = "example-bucket-source" +} \ No newline at end of file diff --git a/examples/disaster_recovery/dr_oke/dr_oke.tf b/examples/disaster_recovery/dr_oke/dr_oke.tf new file mode 100644 index 00000000000..343933dccad --- /dev/null +++ b/examples/disaster_recovery/dr_oke/dr_oke.tf @@ -0,0 +1,117 @@ +// 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_id" { + default = "ocid1.tenancy.oc1..aaaaaaaahowp4zu5z3p3to5mj7vjtlo7zqi2qmbjiij73vfulltlmvtf624a" +} +variable "disassociate_trigger" { + default = 0 +} + +variable "dr_protection_group_association_peer_region" { + default = "us-ashburn-1" +} + +variable "dr_protection_group_association_role" { + default = "STANDBY" +} + +variable "dr_protection_group_defined_tags_value" { + default = "value" +} + +variable "dr_protection_group_display_name" { + default = "displayName" +} + +variable "dr_protection_group_freeform_tags" { + default = { "Department" = "Finance" } +} + +variable "dr_protection_group_members_member_type_oke_cluster" { + default = "OKE_CLUSTER" +} + +variable "dr_protection_group_state" { + default = "ACTIVE" +} + +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_disaster_recovery_dr_protection_group" "test_peer" { + #Required + compartment_id = var.compartment_id + display_name = var.dr_protection_group_display_name + log_location { + #Required + bucket = data.oci_objectstorage_bucket.test_bucket.name + namespace = data.oci_objectstorage_namespace.test_namespace.namespace + } + + # Add OKE as a member + members { + #Required + member_id = data.oci_containerengine_clusters.test_clusters.clusters[0].id + member_type = var.dr_protection_group_members_member_type_oke_cluster + peer_cluster_id = data.oci_containerengine_clusters.peer_clusters.clusters[0].id + } +} + +resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" { + #Required + compartment_id = var.compartment_id + display_name = var.dr_protection_group_display_name + log_location { + #Required + bucket = data.oci_objectstorage_bucket.test_bucket.name + namespace = data.oci_objectstorage_namespace.test_namespace.namespace + } + + lifecycle { + ignore_changes = [defined_tags] + } + + #Optional + members { + #Required + member_id = data.oci_containerengine_clusters.peer_clusters.clusters[0].id + member_type = var.dr_protection_group_members_member_type_oke_cluster + peer_cluster_id = data.oci_containerengine_clusters.test_clusters.clusters[0].id + } + + association { + #Required + role = var.dr_protection_group_association_role + + #Optional + peer_id = oci_disaster_recovery_dr_protection_group.test_peer.id + peer_region = var.dr_protection_group_association_peer_region + } + + #Optional + disassociate_trigger = var.disassociate_trigger + + defined_tags = map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "${var.dr_protection_group_defined_tags_value}") + freeform_tags = var.dr_protection_group_freeform_tags +} + +data "oci_disaster_recovery_dr_protection_groups" "test_dr_protection_groups" { + #Required + compartment_id = var.compartment_id + + #Optional + display_name = var.dr_protection_group_display_name + dr_protection_group_id = oci_disaster_recovery_dr_protection_group.test_dr_protection_group.id + state = var.dr_protection_group_state +} \ No newline at end of file diff --git a/examples/disaster_recovery/dr_oke/oke_cluster.tf b/examples/disaster_recovery/dr_oke/oke_cluster.tf new file mode 100644 index 00000000000..c1a985e9cc0 --- /dev/null +++ b/examples/disaster_recovery/dr_oke/oke_cluster.tf @@ -0,0 +1,30 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "primary_cluster_name" { + description = "Primary OKE cluster" + type = string + default = "myCluster" +} + +variable "peer_cluster_name" { + description = "Peer OKE cluster" + type = string + default = "peerCluster" +} + +data "oci_containerengine_clusters" "test_clusters" { + #Required + compartment_id = var.compartment_id + + #Optional + name = var.primary_cluster_name +} + +data "oci_containerengine_clusters" "peer_clusters" { + #Required + compartment_id = var.compartment_id + + #Optional + name = var.peer_cluster_name +} diff --git a/examples/disaster_recovery/dr_oke/tag_namespace.tf b/examples/disaster_recovery/dr_oke/tag_namespace.tf new file mode 100644 index 00000000000..eb4138eaa19 --- /dev/null +++ b/examples/disaster_recovery/dr_oke/tag_namespace.tf @@ -0,0 +1,67 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "tag_namespace_defined_tags_value" { + default = "value" +} + +variable "tag_namespace_description" { + default = "This namespace contains tags that will be used in billing." +} + +variable "tag_namespace_freeform_tags" { + default = { "Department" = "Finance" } +} + +variable "tag_namespace_include_subcompartments" { + default = false +} + +variable "tag_namespace_name" { + default = "BillingTags" +} + +variable "tag_namespace_state" { + default = "ACTIVE" +} + +variable defined_tag_namespace_name { default = "" } + +resource "oci_identity_tag_namespace" "tag-namespace1" { + #Required + compartment_id = var.tenancy_ocid + description = "example tag namespace" + name = var.defined_tag_namespace_name != "" ? var.defined_tag_namespace_name : "example-tag-namespace-all" + + is_retired = false +} + +resource "oci_identity_tag" "tag1" { + #Required + description = "example tag" + name = "example-tag" + tag_namespace_id = oci_identity_tag_namespace.tag-namespace1.id + + is_retired = false +} + +resource "oci_identity_tag_namespace" "test_tag_namespace" { + #Required + compartment_id = var.compartment_id + description = var.tag_namespace_description + name = var.tag_namespace_name + + #Optional + defined_tags = map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "${var.tag_namespace_defined_tags_value}") + freeform_tags = var.tag_namespace_freeform_tags +} + +data "oci_identity_tag_namespaces" "test_tag_namespaces" { + #Required + compartment_id = var.compartment_id + + #Optional + include_subcompartments = var.tag_namespace_include_subcompartments + state = var.tag_namespace_state +} + diff --git a/examples/opsi/database_insight/external_mysql_database_insight/external_mysql_database_insight.tf b/examples/opsi/database_insight/external_mysql_database_insight/external_mysql_database_insight.tf new file mode 100644 index 00000000000..debebbc3b4e --- /dev/null +++ b/examples/opsi/database_insight/external_mysql_database_insight/external_mysql_database_insight.tf @@ -0,0 +1,101 @@ +// 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 "dbmgmt_external_mysql_database_id" {} +variable "database_connector_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 = ["EXTERNAL-MYSQL"] +} + +variable "database_insight_defined_tags_value" { + default = "value" +} + +variable "database_insight_entity_source" { + default = "EXTERNAL_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 External 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.dbmgmt_external_mysql_database_id + database_connector_id = var.database_connector_id + + #Optional + 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 External 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 External 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 c3ddcedf717..18217c037f6 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 c7477bdfacc..d6f406c8dbd 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 92c1bb231cf..af4c5dfc560 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 69755b10a59..3090057d1ed 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 b91ef1087b9..0d2fe4086dc 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 9ff6cc78738..e9ddac38737 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 352205c1453..822db765252 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 f63c98df4f7..07577b27a72 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 37f1243012e..253bd0627b9 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 ea0df1e86b5..c15d8c7774a 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 1e506728e5f..87c77f1e26b 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 136815a2e34..07febd2f54b 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 945e5963fbe..508a067e8fe 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 bfaa24245ef..15c2d3c740d 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 3afcac5524b..5ed0bddcd18 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 0df08ae9026..1ced414f4ae 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 8d7d0cf32dc..bc4218539c3 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 fe047b10b3f..9ac843d63ac 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 941ed5ce901..72751103ebb 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 c9d548a891b..5a53945e817 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 b9ac4dba9da..a857e429a11 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 b4debab24be..ad90559a07a 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 2218307ff1a..bd41d6ee4a3 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 3e80a6dfbcb..54808753848 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 214c08ada8a..6502888ab70 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 dd04d29801d..eb9d3fafb1f 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 ec6569124ac..9c91ce61b05 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 9d4aae30d95..0107f5c3d83 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 b2e3dcc62dc..192e333b84e 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 999357a0afa..07a5b3f52e3 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 aed3df2ad28..e55ec585dbc 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 db7af397a9f..54a94ab4a05 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 046e4628121..445f9040af2 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 47095a969a2..036618deb5e 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 7f1ca1584a1..b75faa93806 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 3efef96312c..8c0bdbb7346 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 93affe2e03c..e4d1bf80c6f 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 9a7acecb2a8..a71c20f6ad8 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 8f4f9efafe5..7060b8e5808 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 bc1d554d8d6..8dd1a433bfd 100644 Binary files a/examples/zips/datascience.zip and b/examples/zips/datascience.zip differ diff --git a/examples/zips/delegation_management.zip b/examples/zips/delegation_management.zip index d78487a6f03..91fe11777b6 100644 Binary files a/examples/zips/delegation_management.zip and b/examples/zips/delegation_management.zip differ diff --git a/examples/zips/demand_signal.zip b/examples/zips/demand_signal.zip index 65291faf3d0..e09ddb61348 100644 Binary files a/examples/zips/demand_signal.zip and b/examples/zips/demand_signal.zip differ diff --git a/examples/zips/desktops.zip b/examples/zips/desktops.zip index ac3c1445f6a..538b1ffb563 100644 Binary files a/examples/zips/desktops.zip and b/examples/zips/desktops.zip differ diff --git a/examples/zips/devops.zip b/examples/zips/devops.zip index ccaa12d8798..b4bc20c6edb 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 00e704d915e..e7b2c264c22 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 11619341f2a..ea08b14d481 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 6a31f32395a..4041c6f0c01 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 f8b2574023f..9a1f7a78aeb 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 b3e83c52784..f84af663e5d 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 c239d02f5fe..3aebf8254ba 100644 Binary files a/examples/zips/fast_connect.zip and b/examples/zips/fast_connect.zip differ diff --git a/examples/zips/fleet_apps_management.zip b/examples/zips/fleet_apps_management.zip index 4fa28473cf9..03ee41fc63e 100644 Binary files a/examples/zips/fleet_apps_management.zip and b/examples/zips/fleet_apps_management.zip differ diff --git a/examples/zips/fleetsoftwareupdate.zip b/examples/zips/fleetsoftwareupdate.zip index 2d88e28714d..0fdc0ae2c2c 100644 Binary files a/examples/zips/fleetsoftwareupdate.zip and b/examples/zips/fleetsoftwareupdate.zip differ diff --git a/examples/zips/functions.zip b/examples/zips/functions.zip index 23f0a4df76f..0536a5a4f2e 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 7122885bb44..a966f2035f5 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 dd0e0b959ea..d06cdb004cb 100644 Binary files a/examples/zips/generative_ai.zip and b/examples/zips/generative_ai.zip differ diff --git a/examples/zips/generative_ai_agent.zip b/examples/zips/generative_ai_agent.zip index 0de8b6570d6..4e25197667e 100644 Binary files a/examples/zips/generative_ai_agent.zip and b/examples/zips/generative_ai_agent.zip differ diff --git a/examples/zips/globally_distributed_database.zip b/examples/zips/globally_distributed_database.zip index 5f2f003544c..5b79ac6f451 100644 Binary files a/examples/zips/globally_distributed_database.zip and b/examples/zips/globally_distributed_database.zip differ diff --git a/examples/zips/goldengate.zip b/examples/zips/goldengate.zip index 963029206b3..f3839dbe563 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 92e9456a211..15cc02ec8c6 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 3bb2a2cd4e6..959369fcd56 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 3a4304fa7e4..b957503cabe 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 1b9d472740a..c37355ab52f 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 cd794dbff08..21235341d45 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 88cfa91ef8d..62a8e47577c 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 8fbdf5b04a8..a53d4fbc0b3 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 c38e96c34cb..ac5ff6e992e 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 96009c7bb3e..44840056832 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 80a6d7f1f8a..4f0325bc451 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 5a42f22dfaa..3def6f9bd4a 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 877e2519264..41905c5244d 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 2460136f8f0..abac6d376ec 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 2cef8e2d3c8..4af5dc75d16 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 953bd35debf..31564ddc57a 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 a52ed6a5bf4..1e224e0de4a 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 87f6222b208..60cfe39d7ba 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 c77f8949959..68a006a6013 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 c1cc33fc3ab..e4b86fc625a 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 d7b5d281a41..b0f38001688 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 fdcd8793077..b811c3643f7 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 5561fac6211..a5fe33d18cd 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 fe35c2d4777..bcdfe4948d5 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 d96b385dd7f..1dbd6da6d5c 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 e2d0cefe11c..e0a56d742d4 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 0a77aef9e2a..2842cc95aa8 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 5ce8ab54909..ff23406256f 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 610320efe7d..8046726dd54 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 c6e7fb03775..03c5e81a54b 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 2fdca868a23..c64a6fce488 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 8b8feecd0bf..7ea8daa578e 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 3fd681c0d8f..b20d5a197f7 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 60ead7d176e..002ba7caa4b 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 c756b4dd174..0124ee1d195 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 99874938c3a..6a1855eb110 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 570f71f2f32..2bfddbee167 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 26afa2ff71b..086dff7bcb7 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 3beb9f0bd2f..79a5b69b450 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 3d5ae7a0247..60641cab011 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 5a6ea47cb65..2ff97cf8f0e 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 8e8a4c55e0b..e8c083d7595 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 77add2b4c1b..8d579542e67 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 4e1321653ef..de594fe5f20 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 9e576e3a93b..ec9890510db 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 6daa86d5672..2546477b5ef 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 917d0a710bf..fb9813ccff4 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 48937a03d57..eeffe1ce967 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 8431c51f864..31249acba78 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 399b3591d17..af9c98466a4 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 33ecbab7541..4f5495caea2 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 946ee782f8d..0ede6654acf 100644 Binary files a/examples/zips/resourcescheduler.zip and b/examples/zips/resourcescheduler.zip differ diff --git a/examples/zips/security_attribute.zip b/examples/zips/security_attribute.zip index 383624bc176..3922352548e 100644 Binary files a/examples/zips/security_attribute.zip and b/examples/zips/security_attribute.zip differ diff --git a/examples/zips/serviceManagerProxy.zip b/examples/zips/serviceManagerProxy.zip index b798739615c..f602d380fa2 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 5bb032104a2..068978b3ce6 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 cf1d895b0c4..300b7e4912f 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 882e25cebe8..4ffd3ff0fd0 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 4db3ebacbb8..7a14d343439 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 61f971a8f0d..97253a2ae04 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 e1827ebb4a1..86097c1abf0 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 85d48caf5fd..729e123a985 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 a7a5dac791e..8ed7cbb36d9 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 f3539ba92b5..33cb9455271 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 a9c50b94204..ad1682bd1a8 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 bf5c01c6010..09b3042687e 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 558c6f530ec..66cd615d652 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 3f0b7c2271d..44f02faeeea 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 4e2da9020cb..1d13f7d91f3 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 0c777a72786..dd145e0a0dd 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/examples/zips/zpr.zip b/examples/zips/zpr.zip index f1be206f9ef..a2964a0fd94 100644 Binary files a/examples/zips/zpr.zip and b/examples/zips/zpr.zip differ diff --git a/go.mod b/go.mod index 3067b98fa08..ede87bee3a8 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.81.1 + github.com/oracle/oci-go-sdk/v65 v65.82.0 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 @@ -68,6 +68,6 @@ require ( ) // Uncomment this line to get OCI Go SDK from local source instead of github -replace github.com/oracle/oci-go-sdk/v65 v65.81.1 => ./vendor/github.com/oracle/oci-go-sdk +//replace github.com/oracle/oci-go-sdk => ../../oracle/oci-go-sdk go 1.21 diff --git a/go.sum b/go.sum index 648510a4c77..67720465142 100644 --- a/go.sum +++ b/go.sum @@ -140,6 +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.82.0 h1:42fSqE847E95ICfVPcKhRmzkvM6tucwbPdUMQydfWGc= +github.com/oracle/oci-go-sdk/v65 v65.82.0/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/globalvar/version.go b/internal/globalvar/version.go index bcf1d23651d..985a9ddee6e 100644 --- a/internal/globalvar/version.go +++ b/internal/globalvar/version.go @@ -7,8 +7,8 @@ import ( "log" ) -const Version = "6.23.0" -const ReleaseDate = "2025-01-22" +const Version = "6.24.0" +const ReleaseDate = "2025-02-02" func PrintVersion() { log.Printf("[INFO] terraform-provider-oci %s\n", Version) diff --git a/internal/integrationtest/apm_config_options_test.go b/internal/integrationtest/apm_config_options_test.go index 01416355027..934723cc894 100644 --- a/internal/integrationtest/apm_config_options_test.go +++ b/internal/integrationtest/apm_config_options_test.go @@ -76,7 +76,7 @@ func TestApmConfigOptionsResource_basic(t *testing.T) { datasourceOptionsName := "data.oci_apm_config_configs.test_optionss" singularOptionsDatasourceName := "data.oci_apm_config_config.test_options" - var resId string + 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+ApmConfigConfigResourceDependencies+ acctest.GenerateResourceFromRepresentationMap("oci_apm_config_config", "test_options", acctest.Optional, acctest.Create, configOptionsRepresentation), "apmconfig", "config", t) @@ -140,11 +140,37 @@ func TestApmConfigOptionsResource_basic(t *testing.T) { }, ), }, - // Step 4: delete Options before next create + // Step 4: verify updates to Options updatable parameters + { + Config: config + compartmentIdVariableStr + ApmConfigConfigResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_apm_config_config", "test_options", acctest.Optional, acctest.Update, configOptionsRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(optionsResourceName, "apm_domain_id"), + resource.TestCheckResourceAttrSet(optionsResourceName, "id"), + resource.TestCheckResourceAttr(optionsResourceName, "config_type", configTypeOptions), + resource.TestCheckResourceAttr(optionsResourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(optionsResourceName, "group", "group2"), + resource.TestCheckResourceAttrSet(optionsResourceName, "options"), + resource.TestCheckResourceAttr(optionsResourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttr(optionsResourceName, "defined_tags.%", "1"), + resource.TestCheckResourceAttrSet(optionsResourceName, "created_by"), + resource.TestCheckResourceAttrSet(optionsResourceName, "updated_by"), + resource.TestCheckResourceAttrSet(optionsResourceName, "etag"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, optionsResourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // Step 5: delete Options before next create { Config: config + compartmentIdVariableStr + ApmConfigConfigResourceDependencies, }, - // Step 5: verify datasource + // Step 6: verify datasource { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_apm_config_configs", "test_optionss", acctest.Optional, acctest.Update, configOptionsDataSourceRepresentation) + @@ -159,7 +185,7 @@ func TestApmConfigOptionsResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceOptionsName, "config_collection.0.items.#", "1"), ), }, - // Step 6: verify singular datasource + // Step 7: verify singular datasource { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_apm_config_config", "test_options", acctest.Required, acctest.Create, configOptionsSingularDataSourceRepresentation) + @@ -179,7 +205,7 @@ func TestApmConfigOptionsResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularOptionsDatasourceName, "updated_by"), ), }, - // Step 7 verify resource import + // Step 8 verify resource import { Config: config + ConfigOptionsRequiredOnlyResource, ImportState: true, diff --git a/internal/integrationtest/database_database_test.go b/internal/integrationtest/database_database_test.go index 4813e70e0b0..0a24d00ff0b 100644 --- a/internal/integrationtest/database_database_test.go +++ b/internal/integrationtest/database_database_test.go @@ -370,6 +370,78 @@ var ( "transport_type": acctest.Representation{RepType: acctest.Optional, Create: `ASYNC`}, } + dbHomeHsmRepresentation = map[string]interface{}{ + "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseHsmDatabaseRepresentation}, + "db_version": acctest.Representation{RepType: acctest.Optional, Create: `19.23.0.0`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `dbHomeHsm`}, + "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"}}, + "is_desupported_version": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "source": acctest.Representation{RepType: acctest.Required, Create: `VM_CLUSTER_NEW`}, + "vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDifferenceDbVersion}, + } + + dbHomeNoHsmRepresentation = map[string]interface{}{ + "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseNoHsmDatabaseRepresentation}, + "db_version": acctest.Representation{RepType: acctest.Optional, Create: `19.23.0.0`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `dbHomeHsm`}, + "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"}}, + "is_desupported_version": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "source": acctest.Representation{RepType: acctest.Required, Create: `VM_CLUSTER_NEW`}, + "vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_vm_cluster.test_vm_cluster.id}`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDifferenceDbVersion}, + } + + ignoreDifferenceDbVersion = map[string]interface{}{ + "ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`db_version`}}, + } + + databaseHsmDatabaseRepresentation = acctest.RepresentationCopyWithNewProperties(databaseNoHsmDatabaseRepresentation, map[string]interface{}{ + "encryption_key_location_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseDatabaseDatabaseEncryptionKeyLocationDetailsRepresentation}, + }) + + databaseNoHsmDatabaseRepresentation = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `BEstrO0ng_#11`}, + "db_name": acctest.Representation{RepType: acctest.Required, Create: `myHsmDb`}, + "character_set": acctest.Representation{RepType: acctest.Required, Create: `AL32UTF8`}, + "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"}}, + "ncharacter_set": acctest.Representation{RepType: acctest.Optional, Create: `AL16UTF16`}, + } + + DatabaseDatabaseHsmRepresentation2 = map[string]interface{}{ + "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseHsmDatabaseRepresentation2}, + "db_home_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_home.test_hsm_db_home.id}`}, + "source": acctest.Representation{RepType: acctest.Required, Create: `NONE`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseIgnoreDefinedTagsRepresentation}, + } + + DatabaseDatabaseNoHsmRepresentation2 = map[string]interface{}{ + "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseDatabaseNoHsmRepresentation2}, + "db_home_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_db_home.test_hsm_db_home.id}`}, + "source": acctest.Representation{RepType: acctest.Required, Create: `NONE`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: databaseIgnoreDefinedTagsRepresentation}, + } + + databaseHsmDatabaseRepresentation2 = acctest.RepresentationCopyWithNewProperties(databaseDatabaseNoHsmRepresentation2, map[string]interface{}{ + "encryption_key_location_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseDatabaseDatabaseEncryptionKeyLocationDetailsRepresentation}, + }) + + databaseDatabaseNoHsmRepresentation2 = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `BEstrO0ng_#11`}, + "db_name": acctest.Representation{RepType: acctest.Required, Create: `myHsmDb2`}, + "character_set": acctest.Representation{RepType: acctest.Optional, Create: `AL32UTF8`}, + "db_unique_name": acctest.Representation{RepType: acctest.Optional, Create: `myHsmDb_47`}, + "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"}}, + "ncharacter_set": acctest.Representation{RepType: acctest.Optional, Create: `AL16UTF16`}, + "sid_prefix": acctest.Representation{RepType: acctest.Optional, Create: `myHsmDb2`}, + } + databaseDatabaseDbrsRepresentation = acctest.GetMultipleUpdatedRepresenationCopy( []string{"db_backup_config", "lifecycle", "db_name", "admin_password"}, []interface{}{ @@ -389,6 +461,15 @@ var ( "run_immediate_full_backup": acctest.Representation{RepType: acctest.Optional, Create: `false`}, } + DatabaseDatabaseDatabaseEncryptionKeyLocationDetailsRepresentation = map[string]interface{}{ + "hsm_password": acctest.Representation{RepType: acctest.Required, Create: `hsmPassword`}, + "provider_type": acctest.Representation{RepType: acctest.Required, Create: `EXTERNAL`}, + } + DatabaseDatabaseDatabaseSourceEncryptionKeyLocationDetailsRepresentation = map[string]interface{}{ + "hsm_password": acctest.Representation{RepType: acctest.Required, Create: `hsmPassword`}, + "provider_type": acctest.Representation{RepType: acctest.Required, Create: `EXTERNAL`}, + } + DatabaseDatabaseDatabaseDbBackupConfigDbrsRepresentation = map[string]interface{}{ "auto_backup_enabled": acctest.Representation{RepType: acctest.Optional, Create: `true`}, "auto_backup_window": acctest.Representation{RepType: acctest.Optional, Create: `SLOT_TWO`}, @@ -462,6 +543,14 @@ var ( DatabaseDatabaseDatabaseResourceDbrsDependencies = DatabaseDatabaseResourceDbrsDependencies + acctest.GenerateResourceFromRepresentationMap("oci_recovery_recovery_service_subnet", "test_recovery_service_subnet", acctest.Required, acctest.Create, exaRecoveryServiceSubnetRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Required, acctest.Create, DatabaseDatabaseDbrsRepresentation2) + + DatabaseExaccHsmDbHomeResourceDependencies = DefinedTagsDependencies + AvailabilityDomainConfig + + acctest.GenerateResourceFromRepresentationMap("oci_database_backup_destination", "test_backup_destination", acctest.Optional, acctest.Create, backupDestinationNFSRepresentation) + + 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_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) ) // issue-routing-tag: database/default @@ -909,6 +998,99 @@ func TestDatabaseDatabaseResource_multipleStandby(t *testing.T) { }) } +// issue-routing-tag: database/default +func TestExaccHsmDatabaseResource_basic(t *testing.T) { + httpreplay.SetScenario("TestDatabaseDatabaseResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + dbHomeResourceName := "oci_database_db_home.test_hsm_db_home" + databaseResourceName := "oci_database_database.test_database" + + // 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+DatabaseExaccHsmDbHomeResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_hsm_db_home", acctest.Optional, acctest.Create, dbHomeNoHsmRepresentation)+ + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Create, DatabaseDatabaseHsmRepresentation2), "database", "database", t) + + acctest.ResourceTest(t, testAccCheckDatabaseDatabaseDestroy, []resource.TestStep{ + + // verify create + { + Config: config + compartmentIdVariableStr + DatabaseExaccHsmDbHomeResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_hsm_db_home", acctest.Optional, acctest.Create, dbHomeHsmRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Create, DatabaseDatabaseHsmRepresentation2), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(databaseResourceName, "database.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.admin_password", "BEstrO0ng_#11"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_name", "myHsmDb2"), + resource.TestCheckResourceAttrSet(databaseResourceName, "db_home_id"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.encryption_key_location_details.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.encryption_key_location_details.0.hsm_password", "hsmPassword"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.encryption_key_location_details.0.provider_type", "EXTERNAL"), + resource.TestCheckResourceAttr(databaseResourceName, "source", "NONE"), + + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.db_name", "myHsmDb"), + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.encryption_key_location_details.#", "1"), + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.encryption_key_location_details.0.hsm_password", "hsmPassword"), + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.encryption_key_location_details.0.provider_type", "EXTERNAL"), + ), + }, + + // delete hsm dbHome and db + { + Config: config + compartmentIdVariableStr + DatabaseExaccHsmDbHomeResourceDependencies, + }, + // create dbHome and database with no HSM + { + Config: config + compartmentIdVariableStr + DatabaseExaccHsmDbHomeResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_hsm_db_home", acctest.Optional, acctest.Create, dbHomeNoHsmRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Create, DatabaseDatabaseNoHsmRepresentation2), + }, + // test migration + { + Config: config + compartmentIdVariableStr + DatabaseExaccHsmDbHomeResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_hsm_db_home", acctest.Optional, acctest.Create, dbHomeHsmRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Create, DatabaseDatabaseHsmRepresentation2), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(databaseResourceName, "database.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.admin_password", "BEstrO0ng_#11"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_name", "myHsmDb2"), + resource.TestCheckResourceAttrSet(databaseResourceName, "db_home_id"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.encryption_key_location_details.#", "1"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.encryption_key_location_details.0.hsm_password", "hsmPassword"), + resource.TestCheckResourceAttr(databaseResourceName, "database.0.encryption_key_location_details.0.provider_type", "EXTERNAL"), + resource.TestCheckResourceAttr(databaseResourceName, "source", "NONE"), + + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.db_name", "myHsmDb"), + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.encryption_key_location_details.#", "1"), + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.encryption_key_location_details.0.hsm_password", "hsmPassword"), + resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.encryption_key_location_details.0.provider_type", "EXTERNAL"), + ), + }, + + // verify resource import + { + Config: config + DatabaseRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "database", + "db_version", + "kms_key_migration", + "kms_key_rotation", + "kms_key_version_id", + "key_store_id", + "source", + }, + ResourceName: databaseResourceName, + }, + }) +} + func testAccCheckDatabaseDatabaseDestroy(s *terraform.State) error { noResourceFound := true client := acctest.TestAccProvider.Meta().(*client.OracleClients).DatabaseClient() diff --git a/internal/integrationtest/database_management_external_my_sql_database_connector_test.go b/internal/integrationtest/database_management_external_my_sql_database_connector_test.go new file mode 100644 index 00000000000..547a378cb94 --- /dev/null +++ b/internal/integrationtest/database_management_external_my_sql_database_connector_test.go @@ -0,0 +1,315 @@ +// 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/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_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "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 ( + DatabaseManagementExternalMySqlDatabaseConnectorResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_connector", "test_external_my_sql_database_connector", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseConnectorRepresentation) + + DatabaseManagementExternalMySqlDatabaseConnectorSingularDataSourceRepresentation = map[string]interface{}{ + "external_my_sql_database_connector_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_management_external_my_sql_database_connector.test_external_my_sql_database_connector.id}`}, + } + + DatabaseManagementExternalMySqlDatabaseConnectorDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + } + + DatabaseManagementExternalMySqlDatabaseConnectorRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "connector_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: DatabaseManagementExternalMySqlDatabaseConnectorConnectorDetailsRepresentation}, + "is_test_connection_param": acctest.Representation{RepType: acctest.Required, Create: `false`}, + "check_connection_status_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + } + DatabaseManagementExternalMySqlDatabaseConnectorConnectorDetailsRepresentation = map[string]interface{}{ + "credential_type": acctest.Representation{RepType: acctest.Required, Create: `MYSQL_EXTERNAL_NON_SSL_CREDENTIALS`, Update: `MYSQL_EXTERNAL_SSL_CREDENTIALS`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `EXAMPLE-displayName1032-Value`, Update: `displayName2`}, + "external_database_id": acctest.Representation{RepType: acctest.Required, Create: `${var.test_managed_database_id}`}, + "host_name": acctest.Representation{RepType: acctest.Required, Create: `hostName`, Update: `hostName2`}, + "macs_agent_id": acctest.Representation{RepType: acctest.Required, Create: `${var.macs_agent_id}`}, + "network_protocol": acctest.Representation{RepType: acctest.Required, Create: `TCP`, Update: `TCPS`}, + "port": acctest.Representation{RepType: acctest.Required, Create: `10`, Update: `11`}, + "ssl_secret_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vault_secret_id}`}, + } +) + +// issue-routing-tag: database_management/default +func TestDatabaseManagementExternalMySqlDatabaseConnectorResource_basic(t *testing.T) { + httpreplay.SetScenario("TestDatabaseManagementExternalMySqlDatabaseConnectorResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + macs_agent_id := utils.GetEnvSettingWithBlankDefault("macs_agent_id") + macsAgentIdVariableStr := fmt.Sprintf("variable \"macs_agent_id\" { default = \"%s\" }\n", macs_agent_id) + + test_managed_database_id := utils.GetEnvSettingWithBlankDefault("test_managed_database_id") + testManagedDatabaseIdVariableStr := fmt.Sprintf("variable \"test_managed_database_id\" { default = \"%s\" }\n", test_managed_database_id) + + vault_secret_id := utils.GetEnvSettingWithBlankDefault("vault_secret_id") + sslSecretIdVariableStr := fmt.Sprintf("variable \"vault_secret_id\" { default = \"%s\" }\n", vault_secret_id) + + resourceName := "oci_database_management_external_my_sql_database_connector.test_external_my_sql_database_connector" + datasourceName := "data.oci_database_management_external_my_sql_database_connectors.test_external_my_sql_database_connectors" + singularDatasourceName := "data.oci_database_management_external_my_sql_database_connector.test_external_my_sql_database_connector" + //var resId string + var resId, resId2 string + // 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. + acctest.SaveConfigContent(config+compartmentIdVariableStr+macsAgentIdVariableStr+testManagedDatabaseIdVariableStr+sslSecretIdVariableStr+ + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_connector", "test_external_my_sql_database_connector", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseConnectorRepresentation), "databasemanagement", "externalMySqlDatabaseConnector", t) + + acctest.ResourceTest(t, testAccCheckDatabaseManagementExternalMySqlDatabaseConnectorDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + macsAgentIdVariableStr + testManagedDatabaseIdVariableStr + sslSecretIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_connector", "test_external_my_sql_database_connector", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseConnectorRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "connector_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.credential_type", "MYSQL_EXTERNAL_NON_SSL_CREDENTIALS"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.display_name", "EXAMPLE-displayName1032-Value"), + resource.TestCheckResourceAttrSet(resourceName, "connector_details.0.external_database_id"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.host_name", "hostName"), + resource.TestCheckResourceAttrSet(resourceName, "connector_details.0.macs_agent_id"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.network_protocol", "TCP"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.port", "10"), + resource.TestCheckResourceAttrSet(resourceName, "connector_details.0.ssl_secret_id"), + resource.TestCheckResourceAttr(resourceName, "is_test_connection_param", "false"), + + 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 + macsAgentIdVariableStr + testManagedDatabaseIdVariableStr + sslSecretIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_connector", "test_external_my_sql_database_connector", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseConnectorRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "connector_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.credential_type", "MYSQL_EXTERNAL_SSL_CREDENTIALS"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.display_name", "displayName2"), + resource.TestCheckResourceAttrSet(resourceName, "connector_details.0.external_database_id"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.host_name", "hostName2"), + resource.TestCheckResourceAttrSet(resourceName, "connector_details.0.macs_agent_id"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.network_protocol", "TCPS"), + resource.TestCheckResourceAttr(resourceName, "connector_details.0.port", "11"), + resource.TestCheckResourceAttrSet(resourceName, "connector_details.0.ssl_secret_id"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_test_connection_param", "false"), + + 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_database_management_external_my_sql_database_connectors", "test_external_my_sql_database_connectors", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseConnectorDataSourceRepresentation) + + compartmentIdVariableStr + macsAgentIdVariableStr + testManagedDatabaseIdVariableStr + sslSecretIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_connector", "test_external_my_sql_database_connector", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseConnectorRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + + resource.TestCheckResourceAttr(datasourceName, "my_sql_connector_collection.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_database_management_external_my_sql_database_connector", "test_external_my_sql_database_connector", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseConnectorSingularDataSourceRepresentation) + + compartmentIdVariableStr + macsAgentIdVariableStr + testManagedDatabaseIdVariableStr + sslSecretIdVariableStr + DatabaseManagementExternalMySqlDatabaseConnectorResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "external_my_sql_database_connector_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(singularDatasourceName, "connection_status"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "connector_type"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "credential_type"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "external_database_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "host_name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "macs_agent_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "network_protocol"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "port"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "source_database"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "source_database_type"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "ssl_secret_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "ssl_secret_name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_connection_status_updated"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + ), + }, + // verify resource import + { + Config: config + DatabaseManagementExternalMySqlDatabaseConnectorResourceConfig, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "connector_details", + "is_test_connection_param", + "check_connection_status_trigger", + }, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckDatabaseManagementExternalMySqlDatabaseConnectorDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).DbManagementClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_database_management_external_my_sql_database_connector" { + noResourceFound = false + request := oci_database_management.GetExternalMySqlDatabaseConnectorRequest{} + + tmp := rs.Primary.ID + request.ExternalMySqlDatabaseConnectorId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "database_management") + + response, err := client.GetExternalMySqlDatabaseConnector(context.Background(), request) + + if err == nil { + deletedLifecycleStates := map[string]bool{ + string(oci_database_management.LifecycleStatesDeleted): 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("DatabaseManagementExternalMySqlDatabaseConnector") { + resource.AddTestSweepers("DatabaseManagementExternalMySqlDatabaseConnector", &resource.Sweeper{ + Name: "DatabaseManagementExternalMySqlDatabaseConnector", + Dependencies: acctest.DependencyGraph["externalMySqlDatabaseConnector"], + F: sweepDatabaseManagementExternalMySqlDatabaseConnectorResource, + }) + } +} + +func sweepDatabaseManagementExternalMySqlDatabaseConnectorResource(compartment string) error { + dbManagementClient := acctest.GetTestClients(&schema.ResourceData{}).DbManagementClient() + externalMySqlDatabaseConnectorIds, err := getDatabaseManagementExternalMySqlDatabaseConnectorIds(compartment) + if err != nil { + return err + } + for _, externalMySqlDatabaseConnectorId := range externalMySqlDatabaseConnectorIds { + if ok := acctest.SweeperDefaultResourceId[externalMySqlDatabaseConnectorId]; !ok { + deleteExternalMySqlDatabaseConnectorRequest := oci_database_management.DeleteExternalMySqlDatabaseConnectorRequest{} + + deleteExternalMySqlDatabaseConnectorRequest.ExternalMySqlDatabaseConnectorId = &externalMySqlDatabaseConnectorId + + deleteExternalMySqlDatabaseConnectorRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "database_management") + _, error := dbManagementClient.DeleteExternalMySqlDatabaseConnector(context.Background(), deleteExternalMySqlDatabaseConnectorRequest) + if error != nil { + fmt.Printf("Error deleting ExternalMySqlDatabaseConnector %s %s, It is possible that the resource is already deleted. Please verify manually \n", externalMySqlDatabaseConnectorId, error) + continue + } + acctest.WaitTillCondition(acctest.TestAccProvider, &externalMySqlDatabaseConnectorId, DatabaseManagementExternalMySqlDatabaseConnectorSweepWaitCondition, time.Duration(3*time.Minute), + DatabaseManagementExternalMySqlDatabaseConnectorSweepResponseFetchOperation, "database_management", true) + } + } + return nil +} + +func getDatabaseManagementExternalMySqlDatabaseConnectorIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "ExternalMySqlDatabaseConnectorId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + dbManagementClient := acctest.GetTestClients(&schema.ResourceData{}).DbManagementClient() + + listMySqlDatabaseConnectorsRequest := oci_database_management.ListMySqlDatabaseConnectorsRequest{} + listMySqlDatabaseConnectorsRequest.CompartmentId = &compartmentId + listMySqlDatabaseConnectorsResponse, err := dbManagementClient.ListMySqlDatabaseConnectors(context.Background(), listMySqlDatabaseConnectorsRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting ExternalMySqlDatabaseConnector list for compartment id : %s , %s \n", compartmentId, err) + } + for _, externalMySqlDatabaseConnector := range listMySqlDatabaseConnectorsResponse.Items { + id := *externalMySqlDatabaseConnector.Id + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "ExternalMySqlDatabaseConnectorId", id) + } + return resourceIds, nil +} + +func DatabaseManagementExternalMySqlDatabaseConnectorSweepWaitCondition(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 externalMySqlDatabaseConnectorResponse, ok := response.Response.(oci_database_management.GetExternalMySqlDatabaseConnectorResponse); ok { + return externalMySqlDatabaseConnectorResponse.LifecycleState != oci_database_management.LifecycleStatesDeleted + } + return false +} + +func DatabaseManagementExternalMySqlDatabaseConnectorSweepResponseFetchOperation(client *tf_client.OracleClients, resourceId *string, retryPolicy *common.RetryPolicy) error { + _, err := client.DbManagementClient().GetExternalMySqlDatabaseConnector(context.Background(), oci_database_management.GetExternalMySqlDatabaseConnectorRequest{ + ExternalMySqlDatabaseConnectorId: resourceId, + RequestMetadata: common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + return err +} diff --git a/internal/integrationtest/database_management_external_my_sql_database_external_mysql_databases_management_test.go b/internal/integrationtest/database_management_external_my_sql_database_external_mysql_databases_management_test.go new file mode 100644 index 00000000000..a4ec6b17be4 --- /dev/null +++ b/internal/integrationtest/database_management_external_my_sql_database_external_mysql_databases_management_test.go @@ -0,0 +1,98 @@ +// 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 ( + DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementRepresentation = map[string]interface{}{ + "connector_id": acctest.Representation{RepType: acctest.Required, Create: `${var.external_my_sql_database_connector_id}`}, + "external_my_sql_database_id": acctest.Representation{RepType: acctest.Required, Create: `${var.test_managed_database_id}`}, + "enable_external_mysql_database": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `false`}, + } +) + +// issue-routing-tag: database_management/default +func TestDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResource_basic(t *testing.T) { + httpreplay.SetScenario("TestDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + external_my_sql_database_connector_id := utils.GetEnvSettingWithBlankDefault("external_my_sql_database_connector_id") + externalMySqlDatabaseconnectorIdVariableStr := fmt.Sprintf("variable \"external_my_sql_database_connector_id\" { default = \"%s\" }\n", external_my_sql_database_connector_id) + + test_managed_database_id := utils.GetEnvSettingWithBlankDefault("test_managed_database_id") + testManagedDatabaseIdVariableStr := fmt.Sprintf("variable \"test_managed_database_id\" { default = \"%s\" }\n", test_managed_database_id) + + resourceName := "oci_database_management_external_my_sql_database_external_mysql_databases_management.test_external_my_sql_database_external_mysql_databases_management" + parentResourceName := "oci_database_management_external_my_sql_database_external_mysql_databases_management.test_external_my_sql_database_external_mysql_databases_management" + // 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. + acctest.SaveConfigContent(config+compartmentIdVariableStr+testManagedDatabaseIdVariableStr+externalMySqlDatabaseconnectorIdVariableStr+ + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_external_mysql_databases_management", "test_external_my_sql_database_external_mysql_databases_management", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementRepresentation), "databasemanagement", "externalMySqlDatabaseExternalMysqlDatabasesManagement", t) + + acctest.ResourceTest(t, nil, []resource.TestStep{ + // create with enable + { + Config: config + compartmentIdVariableStr + testManagedDatabaseIdVariableStr + externalMySqlDatabaseconnectorIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_external_mysql_databases_management", "test_external_my_sql_database_external_mysql_databases_management", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "connector_id"), + resource.TestCheckResourceAttrSet(resourceName, "external_my_sql_database_id"), + ), + }, + // verify enable + { + Config: config + compartmentIdVariableStr + testManagedDatabaseIdVariableStr + externalMySqlDatabaseconnectorIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_external_mysql_databases_management", "test_external_my_sql_database_external_mysql_databases_management", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(parentResourceName, "enable_external_mysql_database", "true"), + ), + }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + testManagedDatabaseIdVariableStr + externalMySqlDatabaseconnectorIdVariableStr, + }, + // create with enable and optional fields + { + Config: config + compartmentIdVariableStr + testManagedDatabaseIdVariableStr + externalMySqlDatabaseconnectorIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_external_mysql_databases_management", "test_external_my_sql_database_external_mysql_databases_management", acctest.Optional, acctest.Create, DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementRepresentation), + + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "connector_id"), + resource.TestCheckResourceAttrSet(resourceName, "external_my_sql_database_id"), + ), + }, + // update to disable + { + Config: config + compartmentIdVariableStr + testManagedDatabaseIdVariableStr + externalMySqlDatabaseconnectorIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_external_mysql_databases_management", "test_external_my_sql_database_external_mysql_databases_management", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "connector_id"), + resource.TestCheckResourceAttrSet(resourceName, "external_my_sql_database_id"), + ), + }, + // verify disable + { + Config: config + compartmentIdVariableStr + testManagedDatabaseIdVariableStr + externalMySqlDatabaseconnectorIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database_external_mysql_databases_management", "test_external_my_sql_database_external_mysql_databases_management", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(parentResourceName, "enable_external_mysql_database", "false"), + ), + }, + }) +} diff --git a/internal/integrationtest/database_management_external_my_sql_database_test.go b/internal/integrationtest/database_management_external_my_sql_database_test.go new file mode 100644 index 00000000000..e4d6f49bf56 --- /dev/null +++ b/internal/integrationtest/database_management_external_my_sql_database_test.go @@ -0,0 +1,228 @@ +// 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" + + "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_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "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 ( + DatabaseManagementExternalMySqlDatabaseResourceConfig = DatabaseManagementExternalMySqlDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database", "test_external_my_sql_database", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseRepresentation) + + DatabaseManagementExternalMySqlDatabaseSingularDataSourceRepresentation = map[string]interface{}{ + "external_my_sql_database_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_management_external_my_sql_database.test_external_my_sql_database.id}`}, + } + + DatabaseManagementExternalMySqlDatabaseDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}} + + DatabaseManagementExternalMySqlDatabaseRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "db_name": acctest.Representation{RepType: acctest.Required, Create: `ExternalDB45`, Update: `dbName44`}, + } + + DatabaseManagementExternalMySqlDatabaseResourceDependencies = "" +) + +// issue-routing-tag: database_management/default +func TestDatabaseManagementExternalMySqlDatabaseResource_basic(t *testing.T) { + httpreplay.SetScenario("TestDatabaseManagementExternalMySqlDatabaseResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + resourceName := "oci_database_management_external_my_sql_database.test_external_my_sql_database" + datasourceName := "data.oci_database_management_external_my_sql_databases.test_external_my_sql_databases" + singularDatasourceName := "data.oci_database_management_external_my_sql_database.test_external_my_sql_database" + + var resId, resId2 string + // 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. + acctest.SaveConfigContent(config+compartmentIdVariableStr+DatabaseManagementExternalMySqlDatabaseResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database", "test_external_my_sql_database", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseRepresentation), "databasemanagement", "externalMySqlDatabase", t) + + acctest.ResourceTest(t, testAccCheckDatabaseManagementExternalMySqlDatabaseDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + DatabaseManagementExternalMySqlDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database", "test_external_my_sql_database", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_name", "ExternalDB45"), + + 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 + DatabaseManagementExternalMySqlDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database", "test_external_my_sql_database", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_name", "dbName44"), + + 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_database_management_external_my_sql_databases", "test_external_my_sql_databases", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseDataSourceRepresentation) + + compartmentIdVariableStr + DatabaseManagementExternalMySqlDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_management_external_my_sql_database", "test_external_my_sql_database", acctest.Optional, acctest.Update, DatabaseManagementExternalMySqlDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + + resource.TestCheckResourceAttr(datasourceName, "external_my_sql_database_collection.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_database_management_external_my_sql_database", "test_external_my_sql_database", acctest.Required, acctest.Create, DatabaseManagementExternalMySqlDatabaseSingularDataSourceRepresentation) + + compartmentIdVariableStr + DatabaseManagementExternalMySqlDatabaseResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "external_my_sql_database_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "db_name", "dbName44"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "external_database_id"), + ), + }, + // verify resource import + { + Config: config + DatabaseManagementExternalMySqlDatabaseResourceConfig, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{}, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckDatabaseManagementExternalMySqlDatabaseDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).DbManagementClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_database_management_external_my_sql_database" { + noResourceFound = false + request := oci_database_management.GetExternalMySqlDatabaseRequest{} + + tmp := rs.Primary.ID + request.ExternalMySqlDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "database_management") + + _, err := client.GetExternalMySqlDatabase(context.Background(), request) + + if err == nil { + return fmt.Errorf("resource still exists") + } + + //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("DatabaseManagementExternalMySqlDatabase") { + resource.AddTestSweepers("DatabaseManagementExternalMySqlDatabase", &resource.Sweeper{ + Name: "DatabaseManagementExternalMySqlDatabase", + Dependencies: acctest.DependencyGraph["externalMySqlDatabase"], + F: sweepDatabaseManagementExternalMySqlDatabaseResource, + }) + } +} + +func sweepDatabaseManagementExternalMySqlDatabaseResource(compartment string) error { + dbManagementClient := acctest.GetTestClients(&schema.ResourceData{}).DbManagementClient() + externalMySqlDatabaseIds, err := getDatabaseManagementExternalMySqlDatabaseIds(compartment) + if err != nil { + return err + } + for _, externalMySqlDatabaseId := range externalMySqlDatabaseIds { + if ok := acctest.SweeperDefaultResourceId[externalMySqlDatabaseId]; !ok { + deleteExternalMySqlDatabaseRequest := oci_database_management.DeleteExternalMySqlDatabaseRequest{} + + deleteExternalMySqlDatabaseRequest.ExternalMySqlDatabaseId = &externalMySqlDatabaseId + + deleteExternalMySqlDatabaseRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "database_management") + _, error := dbManagementClient.DeleteExternalMySqlDatabase(context.Background(), deleteExternalMySqlDatabaseRequest) + if error != nil { + fmt.Printf("Error deleting ExternalMySqlDatabase %s %s, It is possible that the resource is already deleted. Please verify manually \n", externalMySqlDatabaseId, error) + continue + } + } + } + return nil +} + +func getDatabaseManagementExternalMySqlDatabaseIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "ExternalMySqlDatabaseId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + dbManagementClient := acctest.GetTestClients(&schema.ResourceData{}).DbManagementClient() + + listExternalMySqlDatabasesRequest := oci_database_management.ListExternalMySqlDatabasesRequest{} + listExternalMySqlDatabasesRequest.CompartmentId = &compartmentId + listExternalMySqlDatabasesResponse, err := dbManagementClient.ListExternalMySqlDatabases(context.Background(), listExternalMySqlDatabasesRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting ExternalMySqlDatabase list for compartment id : %s , %s \n", compartmentId, err) + } + for _, externalMySqlDatabase := range listExternalMySqlDatabasesResponse.Items { + id := *externalMySqlDatabase.ExternalDatabaseId + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "ExternalMySqlDatabaseId", id) + } + return resourceIds, nil +} diff --git a/internal/integrationtest/database_management_managed_my_sql_database_test.go b/internal/integrationtest/database_management_managed_my_sql_database_test.go index 96908fbb1bf..81b82bce817 100644 --- a/internal/integrationtest/database_management_managed_my_sql_database_test.go +++ b/internal/integrationtest/database_management_managed_my_sql_database_test.go @@ -21,7 +21,8 @@ var ( } DatabaseManagementDatabaseManagementManagedMySqlDatabaseDataSourceRepresentation = map[string]interface{}{ - "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "filter_by_my_sql_database_type_param": acctest.Representation{RepType: acctest.Required, Create: `EXTERNAL`}, } DatabaseManagementManagedMySqlDatabaseResourceConfig = "" @@ -50,6 +51,7 @@ func TestDatabaseManagementManagedMySqlDatabaseResource_basic(t *testing.T) { compartmentIdVariableStr + DatabaseManagementManagedMySqlDatabaseResourceConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "filter_by_my_sql_database_type_param", "EXTERNAL"), resource.TestCheckResourceAttrSet(datasourceName, "managed_my_sql_database_collection.#"), ), @@ -66,16 +68,22 @@ func TestDatabaseManagementManagedMySqlDatabaseResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularDatasourceName, "compartment_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "db_name"), resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), + + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + + resource.TestCheckResourceAttrSet(singularDatasourceName, "name"), + /*Following heatwave related attributes are only available in response when + filter_by_my_sql_database_type_param=MDS and there is a hetwave cluster associated. In order + to test these attributes , the test needs to change the filter param to "MDS" and + uncomment the below attributes + resource.TestCheckResourceAttrSet(singularDatasourceName, "heat_wave_memory_size"), resource.TestCheckResourceAttrSet(singularDatasourceName, "heat_wave_node_shape"), resource.TestCheckResourceAttr(singularDatasourceName, "heat_wave_nodes.#", "2"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "is_heat_wave_active"), resource.TestCheckResourceAttrSet(singularDatasourceName, "is_heat_wave_enabled"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "is_lakehouse_enabled"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "is_lakehouse_enabled"),*/ resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created_heat_wave"), ), }, }) diff --git a/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go b/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go index 16b437c151c..00b476116a3 100644 --- a/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go +++ b/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go @@ -62,6 +62,7 @@ var ( } DisasterRecoveryDrPlanExecutionResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_peer", acctest.Optional, acctest.Create, DisasterRecoveryPeerDrProtectionGroupRepresentation) + + OKEClusterDependencyConfig + ObjectStorageBucketDependencyConfig + VolumeGroupDependencyConfig + AvailabilityDomainConfig + diff --git a/internal/integrationtest/disaster_recovery_dr_plan_test.go b/internal/integrationtest/disaster_recovery_dr_plan_test.go index 96eeb3361b0..fea232970b8 100644 --- a/internal/integrationtest/disaster_recovery_dr_plan_test.go +++ b/internal/integrationtest/disaster_recovery_dr_plan_test.go @@ -97,6 +97,7 @@ var ( ` DisasterRecoveryDrPlanResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_peer", acctest.Optional, acctest.Create, DisasterRecoveryPeerDrProtectionGroupRepresentation) + + OKEClusterDependencyConfig + ObjectStorageBucketDependencyConfig + VolumeGroupDependencyConfig + AvailabilityDomainConfig + @@ -238,7 +239,7 @@ func TestDisasterRecoveryDrPlanResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "peer_dr_protection_group_id"), resource.TestCheckResourceAttrSet(resourceName, "peer_region"), //resource.TestCheckResourceAttrSet(resourceName, "source_plan_id"), - resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "3"), + resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "4"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), resource.TestCheckResourceAttrSet(resourceName, "time_updated"), @@ -271,7 +272,7 @@ func TestDisasterRecoveryDrPlanResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "peer_dr_protection_group_id"), resource.TestCheckResourceAttrSet(resourceName, "peer_region"), //resource.TestCheckResourceAttrSet(resourceName, "source_plan_id"), - resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "3"), + resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "4"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), resource.TestCheckResourceAttrSet(resourceName, "time_updated"), @@ -338,7 +339,7 @@ func TestDisasterRecoveryDrPlanResource_basic(t *testing.T) { }, // Disassociate DrProtectionGroup { - Config: config + compartmentIdVariableStr + DisasterRecoveryDrPlanExecutionResourceDependencies + + Config: config + compartmentIdVariableStr + DisasterRecoveryDrPlanResourceDependencies + DrProtectionGroupWithDisassociateTriggerConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( func(s *terraform.State) (err error) { diff --git a/internal/integrationtest/disaster_recovery_dr_protection_group_test.go b/internal/integrationtest/disaster_recovery_dr_protection_group_test.go index 0c935062291..a642c300c6f 100644 --- a/internal/integrationtest/disaster_recovery_dr_protection_group_test.go +++ b/internal/integrationtest/disaster_recovery_dr_protection_group_test.go @@ -42,6 +42,7 @@ var ( "role": acctest.Representation{RepType: acctest.Optional, Create: `PRIMARY`}, "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupDataSourceFilterRepresentation}} + DisasterRecoveryDrProtectionGroupDataSourceFilterRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_disaster_recovery_dr_protection_group.test_dr_protection_group.id}`}}, @@ -63,6 +64,7 @@ var ( "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "display_name": acctest.Representation{RepType: acctest.Required, Create: `peerDisplayName`}, "log_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupLogLocationRepresentation}, + "members": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryPeerDrProtectionGroupMembersRepresentation}, } DefinedTagsIgnoreRepresentation = map[string]interface{}{ @@ -80,10 +82,31 @@ var ( } DisasterRecoveryDrProtectionGroupMembersRepresentation = map[string]interface{}{ - "member_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_bucket.test_member_bucket.bucket_id}`}, - "member_type": acctest.Representation{RepType: acctest.Required, Create: `OBJECT_STORAGE_BUCKET`}, - "bucket": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_bucket.test_member_bucket.name}`}, - "namespace": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_namespace.test_namespace.namespace}`}, + "member_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.test_clusters.clusters[0].id}`}, + "member_type": acctest.Representation{RepType: acctest.Required, Create: `OKE_CLUSTER`}, + "peer_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.peer_clusters.clusters[0].id}`}, + "backup_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupLocationRep}, + "backup_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupConfigRep}, + } + + DisasterRecoveryPeerDrProtectionGroupMembersRepresentation = map[string]interface{}{ + "member_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.peer_clusters.clusters[0].id}`}, + "member_type": acctest.Representation{RepType: acctest.Required, Create: `OKE_CLUSTER`}, + "peer_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.test_clusters.clusters[0].id}`}, + "backup_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupLocationRep}, + "backup_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupConfigRep}, + } + + OKEClusterBackupLocationRep = map[string]interface{}{ + "bucket": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_bucket.oke_test_bucket.name}`}, + "namespace": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_namespace.test_namespace.namespace}`}, + } + + OKEClusterBackupConfigRep = map[string]interface{}{ + "backup_schedule": acctest.Representation{RepType: acctest.Required, Create: `FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=1`, Update: `FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=2`}, + "namespaces": acctest.Representation{RepType: acctest.Required, Create: []string{}}, + "max_number_of_backups_retained": acctest.Representation{RepType: acctest.Required, Create: `10`, Update: `11`}, + "replicate_images": acctest.Representation{RepType: acctest.Required, Create: `DISABLE`, Update: `ENABLE`}, } DisasterRecoveryDrProtectionGroupWithComputeMemberConfig = ` @@ -120,6 +143,10 @@ var ( namespace = data.oci_objectstorage_namespace.test_namespace.namespace name = "example-bucket-source" } + data "oci_objectstorage_bucket" "oke_test_bucket" { + namespace = data.oci_objectstorage_namespace.test_namespace.namespace + name = "oke-backup-bucket" + } ` VolumeGroupDependencyConfig = ` @@ -133,6 +160,25 @@ var ( state = "AVAILABLE" } ` + + OKEClusterDependencyConfig = ` + data "oci_containerengine_clusters" "test_clusters" { + #Required + compartment_id = var.compartment_id + + #Optional + name = "myCluster" + } + + data "oci_containerengine_clusters" "peer_clusters" { + #Required + compartment_id = var.compartment_id + + #Optional + name = "peerCluster" + } + ` + ComputeInstanceDependencyConfig = ` data "oci_core_instances" "dr_instances" { #Required @@ -145,6 +191,7 @@ var ( DisasterRecoveryDrProtectionGroupResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_peer", acctest.Optional, acctest.Create, DisasterRecoveryPeerDrProtectionGroupRepresentation) + ObjectStorageBucketDependencyConfig + + OKEClusterDependencyConfig + VolumeGroupDependencyConfig + ComputeInstanceDependencyConfig + AvailabilityDomainConfig + @@ -200,7 +247,7 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { }, ), }, - // verify Create with Volume Group as member of DR Protection Group + // Create with OKE { Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Required, acctest.Create, DisasterRecoveryDrProtectionGroupRepresentation), @@ -212,7 +259,7 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -220,7 +267,7 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { }, ), }, - // Update member of DR Protection Group: Remove Volume Group, Add Compute Instance + // Update member of DR Protection Group: Remove OKE Cluster, Add Compute Instance { Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + DisasterRecoveryDrProtectionGroupWithComputeMemberConfig, @@ -271,24 +318,37 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Create, DisasterRecoveryDrProtectionGroupRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttr(resourceName, "association.#", "1"), - resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), - resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), - resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), + // Basic Resource Configuration resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + // Association Configuration + resource.TestCheckResourceAttr(resourceName, "association.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), + resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), + resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), + resource.TestCheckResourceAttrSet(resourceName, "role"), + + // Log Location Configuration resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName"), resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), + + // Members Configuration resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), - resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), + + // Backup Configuration + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=1"), + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "10"), + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.replicate_images", "DISABLE"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -304,30 +364,43 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { // verify Update to the compartment (the compartment will be switched back in the next step) { + // Test configuration for compartment update verification Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithNewProperties(DisasterRecoveryDrProtectionGroupRepresentation, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, })), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttr(resourceName, "association.#", "1"), - resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), - resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), - resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), + // Basic Resource Configuration resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + // Association Configuration + resource.TestCheckResourceAttr(resourceName, "association.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), + resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), + resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), + resource.TestCheckResourceAttrSet(resourceName, "role"), + + // Log Location Configuration resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName"), resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), + + // Members Configuration resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), - resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), + + // Backup Configuration + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=1"), + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "10"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -341,27 +414,40 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { // verify updates to updatable parameters { + // Test configuration for general property updates Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Update, DisasterRecoveryDrProtectionGroupRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + // Basic Resource Configuration + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), // Updated + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + // Association Configuration resource.TestCheckResourceAttr(resourceName, "association.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), - resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "role"), + + // Log Location Configuration - Updated Values resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), - resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName_1"), + resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName_1"), // Updated resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), + + // Members Configuration resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), - resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), + + // Backup Configuration + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=2"), // Updated + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "11"), // Updated func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -391,27 +477,43 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { }, // verify singular datasource { + // Test configuration for singular data source Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Required, acctest.Create, DisasterRecoveryDisasterRecoveryDrProtectionGroupSingularDataSourceRepresentation) + + acctest.GenerateDataSourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", + acctest.Required, acctest.Create, DisasterRecoveryDisasterRecoveryDrProtectionGroupSingularDataSourceRepresentation) + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( + // Basic Data Source Attributes resource.TestCheckResourceAttrSet(singularDatasourceName, "dr_protection_group_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckNoResourceAttr(singularDatasourceName, "life_cycle_details"), + + // Log Location Configuration resource.TestCheckResourceAttr(singularDatasourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "log_location.0.bucket", "testBucketName_1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "log_location.0.namespace"), - resource.TestCheckResourceAttr(singularDatasourceName, "members.#", "1"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "members.0.member_type"), + + // Association and Role Configuration resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_region"), resource.TestCheckResourceAttrSet(singularDatasourceName, "role"), + + // Members Configuration + resource.TestCheckResourceAttr(singularDatasourceName, "members.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "members.0.member_type"), + + // Lifecycle Attributes resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + + // Backup Configuration + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=2"), // Updated + resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "11"), ), }, // verify resource import diff --git a/internal/integrationtest/opsi_external_mysql_database_insight_resource_test.go b/internal/integrationtest/opsi_external_mysql_database_insight_resource_test.go new file mode 100644 index 00000000000..a8685adc393 --- /dev/null +++ b/internal/integrationtest/opsi_external_mysql_database_insight_resource_test.go @@ -0,0 +1,75 @@ +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 ( + externalMySqlDatabaseInsightRequiredRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "database_id": acctest.Representation{RepType: acctest.Required, Create: `${var.dbmgmt_external_mysql_database_id}`}, + "database_connector_id": acctest.Representation{RepType: acctest.Required, Create: `${var.database_connector_id}`}, + "status": acctest.Representation{RepType: acctest.Required, Create: `DISABLED`}, + "entity_source": acctest.Representation{RepType: acctest.Required, Create: `EXTERNAL_MYSQL_DATABASE_SYSTEM`, Update: `EXTERNAL_MYSQL_DATABASE_SYSTEM`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ignoreChangesExternalMySqlDatabaseInsightRepresentation}, + } +) + +// issue-routing-tag: opsi/controlPlane +func TestOpsiResourceExternalMySqlDatabaseInsight(t *testing.T) { + httpreplay.SetScenario("TestOpsiResourceExternalMySqlDatabaseInsight") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + dbmgmtExternalMySqlDatabaseId := utils.GetEnvSettingWithBlankDefault("dbmgmt_external_mysql_database_id") + dbmgmtExternalMySqlDatabaseIdVariableStr := fmt.Sprintf("variable \"dbmgmt_external_mysql_database_id\" { default = \"%s\" }\n", dbmgmtExternalMySqlDatabaseId) + + databaseConnectorId := utils.GetEnvSettingWithBlankDefault("database_connector_id") + databaseConnectorIdVariableStr := fmt.Sprintf("variable \"database_connector_id\" { default = \"%s\" }\n", databaseConnectorId) + + 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+dbmgmtExternalMySqlDatabaseIdVariableStr+databaseConnectorIdVariableStr+ExternalMySqlDatabaseInsightResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, externalMySqlDatabaseInsightRequiredRepresentation), "opsi", "databaseInsight", t) + + acctest.ResourceTest(t, testAccCheckOpsiDatabaseInsightDestroy, []resource.TestStep{ + // verify Create with Required + { + Config: config + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdVariableStr + ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, externalMySqlDatabaseInsightRequiredRepresentation), + 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 + ExternalMySqlDatabaseInsightRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "database_connector_id", + }, + ResourceName: resourceName, + }, + }) +} diff --git a/internal/integrationtest/opsi_external_mysql_database_insight_test.go b/internal/integrationtest/opsi_external_mysql_database_insight_test.go new file mode 100644 index 00000000000..45e6e591bcd --- /dev/null +++ b/internal/integrationtest/opsi_external_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 ( + ExternalMySqlDatabaseInsightRequiredOnlyResource = ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, externalMySqlDatabaseInsightRepresentation) + + ExternalMySqlDatabaseInsightResourceConfig = ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, externalMySqlDatabaseInsightRepresentation) + + ExternalMySqlDatabaseInsightSingularDataSourceRepresentation = map[string]interface{}{ + "database_insight_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_opsi_database_insight.test_database_insight.id}`}, + } + + externalMySqlDatabaseInsightDataSourceRepresentation = 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{`EXTERNAL-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: ExternalMySqlDatabaseInsightDataSourceFilterRepresentation}, + } + + ExternalMySqlDatabaseInsightDataSourceFilterRepresentation = 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}`}}, + } + + externalMySqlDatabaseInsightRepresentation = map[string]interface{}{ + "database_id": acctest.Representation{RepType: acctest.Required, Create: `${var.dbmgmt_external_mysql_database_id}`}, + "database_connector_id": acctest.Representation{RepType: acctest.Required, Create: `${var.database_connector_id}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "entity_source": acctest.Representation{RepType: acctest.Required, Create: `EXTERNAL_MYSQL_DATABASE_SYSTEM`, Update: `EXTERNAL_MYSQL_DATABASE_SYSTEM`}, + "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")}`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreChangesExternalMySqlDatabaseInsightRepresentation}, + } + + ignoreChangesExternalMySqlDatabaseInsightRepresentation = map[string]interface{}{ + "ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`}}, + } + + ExternalMySqlDatabaseInsightResourceDependencies = DefinedTagsDependencies +) + +// issue-routing-tag: opsi/controlPlane +func TestOpsiExternalMySqlDatabaseInsightResource_basic(t *testing.T) { + httpreplay.SetScenario("TestOpsiExternalMySqlDatabaseInsightResource_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) + + dbmgmtExternalMySqlDatabaseId := utils.GetEnvSettingWithBlankDefault("dbmgmt_external_mysql_database_id") + dbmgmtExternalMySqlDatabaseIdVariableStr := fmt.Sprintf("variable \"dbmgmt_external_mysql_database_id\" { default = \"%s\" }\n", dbmgmtExternalMySqlDatabaseId) + + databaseConnectorId := utils.GetEnvSettingWithBlankDefault("database_connector_id") + databaseConnectorIdVariableStr := fmt.Sprintf("variable \"database_connector_id\" { default = \"%s\" }\n", databaseConnectorId) + + databaseConnectorIdUpdate := utils.GetEnvSettingWithBlankDefault("database_connector_id_for_update") + databaseConnectorIdUpdateVariableStr := fmt.Sprintf("variable \"database_connector_id_for_update\" { default = \"%s\" }\n", databaseConnectorIdUpdate) + + 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+dbmgmtExternalMySqlDatabaseIdVariableStr+databaseConnectorIdVariableStr+ExternalMySqlDatabaseInsightResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Create, externalMySqlDatabaseInsightRepresentation), "opsi", "databaseInsight", t) + + acctest.ResourceTest(t, testAccCheckOpsiExternalMySqlDatabaseInsightDestroy, []resource.TestStep{ + // verify create with optionals - Step 0 + { + Config: config + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdVariableStr + ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Create, externalMySqlDatabaseInsightRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "database_id"), + resource.TestCheckResourceAttrSet(resourceName, "database_name"), + resource.TestCheckResourceAttr(resourceName, "entity_source", "EXTERNAL_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 and database connector id (the compartment and database connector id will be switched back in the next step) - Step 1 + { + Config: config + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdUpdateVariableStr + compartmentIdUVariableStr + ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(externalMySqlDatabaseInsightRepresentation, map[string]interface{}{ + "database_connector_id": acctest.Representation{RepType: acctest.Required, Create: `${var.database_connector_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, "entity_source", "EXTERNAL_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 - Step 2 (Update causes status to go to disabled) + { + Config: config + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdVariableStr + ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, externalMySqlDatabaseInsightRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "database_id"), + resource.TestCheckResourceAttrSet(resourceName, "database_name"), + resource.TestCheckResourceAttr(resourceName, "entity_source", "EXTERNAL_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 - Step 3 + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_opsi_database_insights", "test_database_insights", acctest.Optional, acctest.Update, externalMySqlDatabaseInsightDataSourceRepresentation) + + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdVariableStr + ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, externalMySqlDatabaseInsightRepresentation), + 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 - Step 4 + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Required, acctest.Create, ExternalMySqlDatabaseInsightSingularDataSourceRepresentation) + + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdVariableStr + ExternalMySqlDatabaseInsightResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(singularDatasourceName, "database_display_name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "database_name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "database_type"), + resource.TestCheckResourceAttr(singularDatasourceName, "entity_source", "EXTERNAL_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 - Step 5 + { + Config: config + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdVariableStr + ExternalMySqlDatabaseInsightResourceConfig, + }, + // verify enable - Step 6 + { + Config: config + compartmentIdVariableStr + dbmgmtExternalMySqlDatabaseIdVariableStr + databaseConnectorIdVariableStr + ExternalMySqlDatabaseInsightResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_database_insight", "test_database_insight", acctest.Optional, acctest.Update, + acctest.RepresentationCopyWithNewProperties(externalMySqlDatabaseInsightRepresentation, 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 - Step 7 + { + Config: config + ExternalMySqlDatabaseInsightRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "database_connector_id", + }, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckOpsiExternalMySqlDatabaseInsightDestroy(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("OpsiExternalMySqlDatabaseInsight") { + resource.AddTestSweepers("OpsiExternalMySqlDatabaseInsight", &resource.Sweeper{ + Name: "OpsiExternalMySqlDatabaseInsight", + Dependencies: acctest.DependencyGraph["databaseInsight"], + F: sweepOpsiExternalMySqlDatabaseInsightResource, + }) + } +} + +func sweepOpsiExternalMySqlDatabaseInsightResource(compartment string) error { + operationsInsightsClient := acctest.GetTestClients(&schema.ResourceData{}).OperationsInsightsClient() + databaseInsightIds, err := getExternalMySqlDatabaseInsightIds(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, OpsiExternalMySqlDatabaseInsightSweepWaitCondition, time.Duration(3*time.Minute), + OpsiExternalMySqlDatabaseInsightSweepResponseFetchOperation, "opsi", true) + } + } + return nil +} + +func getExternalMySqlDatabaseInsightIds(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 OpsiExternalMySqlDatabaseInsightSweepWaitCondition(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 OpsiExternalMySqlDatabaseInsightSweepResponseFetchOperation(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/integrationtest/opsi_news_report_test.go b/internal/integrationtest/opsi_news_report_test.go index 22e66e70e8e..627a7fd87d9 100644 --- a/internal/integrationtest/opsi_news_report_test.go +++ b/internal/integrationtest/opsi_news_report_test.go @@ -61,7 +61,9 @@ var ( "day_of_week": acctest.Representation{RepType: acctest.Optional, Create: `MONDAY`, Update: `TUESDAY`}, "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"}}, + "match_rule": acctest.Representation{RepType: acctest.Optional, Create: `MATCH_ANY`, Update: `MATCH_ALL`}, "status": acctest.Representation{RepType: acctest.Optional, Create: `ENABLED`, Update: `DISABLED`}, + "tag_filters": acctest.Representation{RepType: acctest.Optional, Create: []string{`tagNamespace.tagKey=tagValue`}, Update: []string{`tagNamespace2.tagKey2=tagValue2`}}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreChangesNewsReportRepresentation}, } @@ -189,6 +191,26 @@ var ( "sql_insights_top_sql_resources": acctest.Representation{RepType: acctest.Required, Create: []string{`DATABASE`}, Update: []string{`DATABASE`, `EXADATA`}}, } + OpsiNewsReportActionableInsightsRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "content_types": acctest.RepresentationGroup{RepType: acctest.Required, Group: OpsiNewsReportActionableInsightsContentTypesRepresentation}, + "description": acctest.Representation{RepType: acctest.Required, Create: `TF_TEST_REPORT_DESCRIPTION`, Update: `TF_TEST_REPORT_DESCRIPTION_2`}, + "locale": acctest.Representation{RepType: acctest.Required, Create: `EN`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `TF_TEST_REPORT_NAME`, Update: `TF_TEST_REPORT_NAME_2`}, + "news_frequency": acctest.Representation{RepType: acctest.Required, Create: `WEEKLY`}, + "ons_topic_id": acctest.Representation{RepType: acctest.Required, Create: `${var.topic_id}`}, + "are_child_compartments_included": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "day_of_week": acctest.Representation{RepType: acctest.Optional, Create: `MONDAY`, Update: `TUESDAY`}, + "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`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreChangesNewsReportRepresentation}, + } + + OpsiNewsReportActionableInsightsContentTypesRepresentation = map[string]interface{}{ + "actionable_insights_resources": acctest.Representation{RepType: acctest.Required, Create: []string{`NEW_HIGHS`}, Update: []string{`BIG_CHANGES`, `CURRENT_INVENTORY`}}, + } + ignoreChangesNewsReportRepresentation = map[string]interface{}{ "ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`}}, } @@ -463,6 +485,40 @@ func TestOpsiNewsReportResource_basic(t *testing.T) { Config: config + compartmentIdVariableStr + OpsiNewsReportResourceDependencies, }, + //Step - Verify Create with Required for SqlInsightsTopSqlByInsights + { + Config: config + compartmentIdVariableStr + topicIdVariableStr + OpsiNewsReportResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_opsi_news_report", "test_news_report", acctest.Required, acctest.Create, OpsiNewsReportActionableInsightsRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "content_types.#", "1"), + resource.TestCheckResourceAttr(resourceName, "content_types.0.actionable_insights_resources.#", "1"), + resource.TestCheckResourceAttr(resourceName, "description", "TF_TEST_REPORT_DESCRIPTION"), + //resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locale", "EN"), + resource.TestCheckResourceAttr(resourceName, "name", "TF_TEST_REPORT_NAME"), + resource.TestCheckResourceAttr(resourceName, "news_frequency", "WEEKLY"), + resource.TestCheckResourceAttrSet(resourceName, "ons_topic_id"), + //resource.TestCheckResourceAttr(resourceName, "status", "ENABLED"), + + 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 + }, + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + OpsiNewsReportResourceDependencies, + }, + //Step - Verify Create with Optionals { Config: config + compartmentIdVariableStr + topicIdVariableStr + OpsiNewsReportResourceDependencies + @@ -481,6 +537,8 @@ func TestOpsiNewsReportResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "news_frequency", "WEEKLY"), resource.TestCheckResourceAttrSet(resourceName, "ons_topic_id"), resource.TestCheckResourceAttr(resourceName, "status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "match_rule", "MATCH_ANY"), + resource.TestCheckResourceAttr(resourceName, "tag_filters.#", "1"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -515,6 +573,8 @@ func TestOpsiNewsReportResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "news_frequency", "WEEKLY"), resource.TestCheckResourceAttrSet(resourceName, "ons_topic_id"), resource.TestCheckResourceAttr(resourceName, "status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "match_rule", "MATCH_ANY"), + resource.TestCheckResourceAttr(resourceName, "tag_filters.#", "1"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") diff --git a/internal/service/apm_config/apm_config_config_resource.go b/internal/service/apm_config/apm_config_config_resource.go index b069fef437d..c9faf9fdd9f 100644 --- a/internal/service/apm_config/apm_config_config_resource.go +++ b/internal/service/apm_config/apm_config_config_resource.go @@ -1299,8 +1299,6 @@ func (s *ApmConfigConfigResourceCrud) populateTopLevelPolymorphicUpdateConfigReq tmp := apmDomainId.(string) request.ApmDomainId = &tmp } - tmp := s.D.Id() - request.ConfigId = &tmp if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) if err != nil { diff --git a/internal/service/database/database_backup_resource.go b/internal/service/database/database_backup_resource.go index f5bb67f1391..ea5ab933e49 100644 --- a/internal/service/database/database_backup_resource.go +++ b/internal/service/database/database_backup_resource.go @@ -62,6 +62,28 @@ func DatabaseBackupResource() *schema.Resource { Type: schema.TypeFloat, Computed: true, }, + "encryption_key_location_details": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "hsm_password": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + "provider_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "key_store_id": { Type: schema.TypeString, Computed: true, @@ -261,6 +283,10 @@ func (s *DatabaseBackupResourceCrud) SetData() error { s.D.Set("display_name", *s.Res.DisplayName) } + if s.Res.EncryptionKeyLocationDetails != nil { + s.D.Set("encryption_key_location_details", []interface{}{EncryptionKeyLocationDetailsToMap(&s.Res.EncryptionKeyLocationDetails, "")}) + } + if s.Res.KeyStoreId != nil { s.D.Set("key_store_id", *s.Res.KeyStoreId) } diff --git a/internal/service/database/database_backups_data_source.go b/internal/service/database/database_backups_data_source.go index 51a75174fd8..ea99d9033f8 100644 --- a/internal/service/database/database_backups_data_source.go +++ b/internal/service/database/database_backups_data_source.go @@ -131,6 +131,10 @@ func (s *DatabaseBackupsDataSourceCrud) SetData() error { backup["display_name"] = *r.DisplayName } + if r.EncryptionKeyLocationDetails != nil { + backup["encryption_key_location_details"] = []interface{}{EncryptionKeyLocationDetailsToMap(&r.EncryptionKeyLocationDetails, "")} + } + if r.Id != nil { backup["id"] = *r.Id } diff --git a/internal/service/database/database_database_data_source.go b/internal/service/database/database_database_data_source.go index 788e67fec50..49b0cbaaa51 100644 --- a/internal/service/database/database_database_data_source.go +++ b/internal/service/database/database_database_data_source.go @@ -126,6 +126,10 @@ func (s *DatabaseDatabaseDataSourceCrud) SetData() error { s.D.Set("defined_tags", tfresource.DefinedTagsToMap(s.Res.DefinedTags)) } + if s.Res.EncryptionKeyLocationDetails != nil { + s.D.Set("encryption_key_location_details", []interface{}{EncryptionKeyLocationDetailsToMap(&s.Res.EncryptionKeyLocationDetails, "")}) + } + s.D.Set("freeform_tags", s.Res.FreeformTags) if s.Res.IsCdb != nil { diff --git a/internal/service/database/database_database_resource.go b/internal/service/database/database_database_resource.go index fe59afc5ec3..be27f5a38dc 100644 --- a/internal/service/database/database_database_resource.go +++ b/internal/service/database/database_database_resource.go @@ -206,6 +206,35 @@ func DatabaseDatabaseResource() *schema.Resource { DiffSuppressFunc: tfresource.DefinedTagsDiffSuppressFunction, Elem: schema.TypeString, }, + "encryption_key_location_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "hsm_password": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "provider_type": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "EXTERNAL", + }, true), + }, + + // Optional + + // Computed + }, + }, + }, "freeform_tags": { Type: schema.TypeMap, Optional: true, @@ -261,6 +290,35 @@ func DatabaseDatabaseResource() *schema.Resource { Computed: true, ForceNew: true, }, + "source_encryption_key_location_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "hsm_password": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "provider_type": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "EXTERNAL", + }, true), + }, + + // Optional + + // Computed + }, + }, + }, "source_database_id": { Type: schema.TypeString, Optional: true, @@ -915,6 +973,37 @@ func (s *DatabaseDatabaseResourceCrud) SetData() error { return nil } +func (s *DatabaseDatabaseResourceCrud) ChangeEncryptionKeyLocation(fieldKeyFormat string) error { + request := oci_database.ChangeEncryptionKeyLocationRequest{} + + idTmp := s.D.Id() + request.DatabaseId = &idTmp + + if encryptionKeyLocationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")); ok { + if tmpList := encryptionKeyLocationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details"), 0) + tmp, err := s.mapToEncryptionKeyLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return fmt.Errorf("unable to convert encryption_key_location_details, encountered error: %v", err) + } + request.EncryptionKeyLocationDetails = tmp + } + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") + + _, err := s.Client.ChangeEncryptionKeyLocation(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + return nil +} + func (s *DatabaseDatabaseResourceCrud) ChangeKeyStoreType() error { if _, ok := s.D.GetOkExists("key_store_id"); ok && s.D.HasChange("key_store_id") { request := oci_database.ChangeKeyStoreTypeRequest{} @@ -1058,6 +1147,17 @@ func (s *DatabaseDatabaseResourceCrud) mapToCreateDatabaseDetails(fieldKeyFormat result.DefinedTags = tmp } + if encryptionKeyLocationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")); ok { + if tmpList := encryptionKeyLocationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details"), 0) + tmp, err := s.mapToEncryptionKeyLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert encryption_key_location_details, encountered error: %v", err) + } + result.EncryptionKeyLocationDetails = tmp + } + } + if freeformTags, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "freeform_tags")); ok { result.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -1151,6 +1251,17 @@ func (s *DatabaseDatabaseResourceCrud) mapToCreateDatabaseFromBackupDetails(fiel result.SidPrefix = &tmp } + if sourceEncryptionKeyLocationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_encryption_key_location_details")); ok { + if tmpList := sourceEncryptionKeyLocationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "source_encryption_key_location_details"), 0) + tmp, err := s.mapToEncryptionKeyLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert source_encryption_key_location_details, encountered error: %v", err) + } + result.SourceEncryptionKeyLocationDetails = tmp + } + } + return result, nil } @@ -1320,6 +1431,45 @@ func (s *DatabaseDatabaseResourceCrud) mapToDbBackupConfig(fieldKeyFormat string return result, nil } +func (s *DatabaseDatabaseResourceCrud) mapToEncryptionKeyLocationDetails(fieldKeyFormat string) (oci_database.EncryptionKeyLocationDetails, error) { + var baseObject oci_database.EncryptionKeyLocationDetails + //discriminator + providerTypeRaw, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "provider_type")) + var providerType string + if ok { + providerType = providerTypeRaw.(string) + } else { + providerType = "" // default value + } + switch strings.ToLower(providerType) { + case strings.ToLower("EXTERNAL"): + details := oci_database.ExternalHsmEncryptionDetails{} + if hsmPassword, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "hsm_password")); ok { + tmp := hsmPassword.(string) + details.HsmPassword = &tmp + } + baseObject = details + default: + return nil, fmt.Errorf("unknown provider_type '%v' was specified", providerType) + } + return baseObject, nil +} + +func EncryptionKeyLocationDetailsToMap(obj *oci_database.EncryptionKeyLocationDetails, hsmPassword string) map[string]interface{} { + result := map[string]interface{}{} + switch (*obj).(type) { + case oci_database.ExternalHsmEncryptionDetails: + result["provider_type"] = "EXTERNAL" + result["hsm_password"] = hsmPassword + + default: + log.Printf("[WARN] Received 'provider_type' of unknown type %v", *obj) + return nil + } + + return result +} + func (s *DatabaseDatabaseResourceCrud) populateTopLevelPolymorphicCreateDatabaseRequest(request *oci_database.CreateDatabaseRequest) error { //discriminator sourceRaw, ok := s.D.GetOkExists("source") @@ -1503,7 +1653,6 @@ func (s *DatabaseDatabaseResourceCrud) Update() error { return fmt.Errorf("[ERROR] no support for migrate to Oracle now") } } - errKms := s.setDbKeyVersion(tmp) if errKms != nil { return errKms @@ -1581,6 +1730,25 @@ func (s *DatabaseDatabaseResourceCrud) mapToUpdateDbBackupConfig(fieldKeyFormat func (s *DatabaseDatabaseResourceCrud) mapToUpdateDatabaseDetails(fieldKeyFormat string) (oci_database.UpdateDatabaseDetails, error) { result := oci_database.UpdateDatabaseDetails{} + if _, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")); ok && s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")) { + oldRaw, newRaw := s.D.GetChange(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")) + oldList := oldRaw.([]interface{}) + newList := newRaw.([]interface{}) + + if len(oldList) > 0 && len(newList) > 0 { + return result, fmt.Errorf("[ERROR] no support for updating External HSM now") + } + if len(oldList) == 0 { + err := s.ChangeEncryptionKeyLocation(fieldKeyFormat) + if err != nil { + return result, err + } + } + if len(newList) == 0 && len(oldList) > 0 { + return result, fmt.Errorf("[ERROR] no support for migrate from External HSM now") + } + } + if dbBackupConfig, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "db_backup_config")); ok { if tmpList := dbBackupConfig.([]interface{}); len(tmpList) > 0 { fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "db_backup_config"), 0) @@ -1681,6 +1849,18 @@ func (s *DatabaseDatabaseResourceCrud) DatabaseToMap(obj *oci_database.Database) result["sid_prefix"] = string(*obj.SidPrefix) } + if hsmPassword, ok := s.D.GetOkExists("database.0.encryption_key_location_details.0.hsm_password"); ok && hsmPassword != nil { + if s.Res.EncryptionKeyLocationDetails != nil { + result["encryption_key_location_details"] = []interface{}{EncryptionKeyLocationDetailsToMap(&s.Res.EncryptionKeyLocationDetails, hsmPassword.(string))} + } + } + + if sourceHsmPassword, ok := s.D.GetOkExists("database.0.source_encryption_key_location_details.0.hsm_password"); ok && sourceHsmPassword != nil { + if s.Res.EncryptionKeyLocationDetails != nil { + result["source_encryption_key_location_details"] = []interface{}{EncryptionKeyLocationDetailsToMap(&s.Res.EncryptionKeyLocationDetails, sourceHsmPassword.(string))} + } + } + return result } diff --git a/internal/service/database/database_databases_data_source.go b/internal/service/database/database_databases_data_source.go index 97a185e7e0f..bf9f7c76c2d 100644 --- a/internal/service/database/database_databases_data_source.go +++ b/internal/service/database/database_databases_data_source.go @@ -184,6 +184,10 @@ func (s *DatabaseDatabasesDataSourceCrud) SetData() error { database["defined_tags"] = tfresource.DefinedTagsToMap(r.DefinedTags) } + if r.EncryptionKeyLocationDetails != nil { + database["encryption_key_location_details"] = []interface{}{EncryptionKeyLocationDetailsToMap(&r.EncryptionKeyLocationDetails, "")} + } + database["freeform_tags"] = r.FreeformTags if r.Id != nil { diff --git a/internal/service/database/database_db_home_resource.go b/internal/service/database/database_db_home_resource.go index a8efea23b1b..0fe7c80b5f2 100644 --- a/internal/service/database/database_db_home_resource.go +++ b/internal/service/database/database_db_home_resource.go @@ -193,6 +193,35 @@ func DatabaseDbHomeResource() *schema.Resource { DiffSuppressFunc: tfresource.DefinedTagsDiffSuppressFunction, Elem: schema.TypeString, }, + "encryption_key_location_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "hsm_password": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "provider_type": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "EXTERNAL", + }, true), + }, + + // Optional + + // Computed + }, + }, + }, "freeform_tags": { Type: schema.TypeMap, Optional: true, @@ -602,11 +631,6 @@ func (s *DatabaseDbHomeResourceCrud) Update() error { updateDbHomeRequest.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } - errKms := s.setDbKeyVersion(s.Database.Id) - if errKms != nil { - return errKms - } - updateDbHomeRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") if oneOffPatches, ok := s.D.GetOkExists("one_off_patches"); ok { @@ -697,6 +721,11 @@ func (s *DatabaseDbHomeResourceCrud) Update() error { return fmt.Errorf("could not perform an Update as we could not get the databaseId in the dbHome: %v", err) } } + errKms := s.setDbKeyVersion(s.Database.Id) + if errKms != nil { + return errKms + } + request := oci_database.UpdateDatabaseRequest{} request.DatabaseId = s.Database.Id @@ -781,30 +810,28 @@ func (s *DatabaseDbHomeResourceCrud) Update() error { } func (s *DatabaseDbHomeResourceCrud) setDbKeyVersion(databaseId *string) error { - setDbKeyVersionRequest := oci_database.SetDbKeyVersionRequest{} - setDbKeyVersionRequest.DatabaseId = databaseId - setDbKeyVersionRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") - details := oci_database.OciProviderSetKeyVersionDetails{} - if kmsKeyVersionId, ok := s.D.GetOkExists("kms_key_version_id"); ok && s.D.HasChange("kms_key_version_id") { oldRaw, newRaw := s.D.GetChange("kms_key_version_id") if oldRaw == "" && newRaw != "" { + setDbKeyVersionRequest := oci_database.SetDbKeyVersionRequest{} + setDbKeyVersionRequest.DatabaseId = databaseId + setDbKeyVersionRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") + details := oci_database.OciProviderSetKeyVersionDetails{} + temp := kmsKeyVersionId.(string) details.KmsKeyVersionId = &temp setDbKeyVersionRequest.SetKeyVersionDetails = details - } else { - return nil - } - } - response, err := s.Client.SetDbKeyVersion(context.Background(), setDbKeyVersionRequest) - if err != nil { - return err - } - workId := response.OpcWorkRequestId - if workId != nil { - _, err = tfresource.WaitForWorkRequestWithErrorHandling(s.WorkRequestClient, workId, "database", oci_work_requests.WorkRequestResourceActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries) - if err != nil { + response, err := s.Client.SetDbKeyVersion(context.Background(), setDbKeyVersionRequest) + if err != nil { + return err + } + workId := response.OpcWorkRequestId + if workId != nil { + _, err = tfresource.WaitForWorkRequestWithErrorHandling(s.WorkRequestClient, workId, "database", oci_work_requests.WorkRequestResourceActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate), s.DisableNotFoundRetries) + if err != nil { + } + } } } return nil @@ -982,6 +1009,36 @@ func (s *DatabaseDbHomeResourceCrud) ChangeKeyStoreType() error { return nil } +func (s *DatabaseDbHomeResourceCrud) ChangeEncryptionKeyLocation(fieldKeyFormat string) error { + request := oci_database.ChangeEncryptionKeyLocationRequest{} + + request.DatabaseId = s.Database.Id + + if encryptionKeyLocationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")); ok { + if tmpList := encryptionKeyLocationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details"), 0) + tmp, err := s.mapToEncryptionKeyLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return fmt.Errorf("unable to convert encryption_key_location_details, encountered error: %v", err) + } + request.EncryptionKeyLocationDetails = tmp + } + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database") + + _, err := s.Client.ChangeEncryptionKeyLocation(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + return nil +} + func (s *DatabaseDbHomeResourceCrud) mapToBackupDestinationDetails(fieldKeyFormat string) (oci_database.BackupDestinationDetails, error) { result := oci_database.BackupDestinationDetails{} @@ -1079,6 +1136,17 @@ func (s *DatabaseDbHomeResourceCrud) mapToCreateDatabaseDetails(fieldKeyFormat s result.DefinedTags = tmp } + if encryptionKeyLocationDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")); ok { + if tmpList := encryptionKeyLocationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details"), 0) + tmp, err := s.mapToEncryptionKeyLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert encryption_key_location_details, encountered error: %v", err) + } + result.EncryptionKeyLocationDetails = tmp + } + } + if freeformTags, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "freeform_tags")); ok { result.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -1284,6 +1352,30 @@ func (s *DatabaseDbHomeResourceCrud) mapToDbBackupConfig(fieldKeyFormat string) return result, nil } +func (s *DatabaseDbHomeResourceCrud) mapToEncryptionKeyLocationDetails(fieldKeyFormat string) (oci_database.EncryptionKeyLocationDetails, error) { + var baseObject oci_database.EncryptionKeyLocationDetails + //discriminator + providerTypeRaw, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "provider_type")) + var providerType string + if ok { + providerType = providerTypeRaw.(string) + } else { + providerType = "" // default value + } + switch strings.ToLower(providerType) { + case strings.ToLower("EXTERNAL"): + details := oci_database.ExternalHsmEncryptionDetails{} + if hsmPassword, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "hsm_password")); ok { + tmp := hsmPassword.(string) + details.HsmPassword = &tmp + } + baseObject = details + default: + return nil, fmt.Errorf("unknown provider_type '%v' was specified", providerType) + } + return baseObject, nil +} + func (s *DatabaseDbHomeResourceCrud) populateTopLevelPolymorphicCreateDbHomeRequest(request *oci_database.CreateDbHomeRequest) error { //discriminator sourceRaw, ok := s.D.GetOkExists("source") @@ -1756,12 +1848,37 @@ func (s *DatabaseDbHomeResourceCrud) DatabaseToMap(obj *oci_database.Database) m result["time_stamp_for_point_in_time_recovery"] = timeStampForPointInTimeRecovery } + if hsmPassword, ok := s.D.GetOkExists("database.0.encryption_key_location_details.0.hsm_password"); ok && hsmPassword != nil { + if obj.EncryptionKeyLocationDetails != nil { + result["encryption_key_location_details"] = []interface{}{EncryptionKeyLocationDetailsToMap(&obj.EncryptionKeyLocationDetails, hsmPassword.(string))} + } + } + return result } func (s *DatabaseDbHomeResourceCrud) mapToUpdateDatabaseDetails(fieldKeyFormat string) (oci_database.UpdateDatabaseDetails, error) { result := oci_database.UpdateDatabaseDetails{} + if _, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")); ok && s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")) { + oldRaw, newRaw := s.D.GetChange(fmt.Sprintf(fieldKeyFormat, "encryption_key_location_details")) + oldList := oldRaw.([]interface{}) + newList := newRaw.([]interface{}) + + if len(oldList) > 0 && len(newList) > 0 { + return result, fmt.Errorf("[ERROR] no support for updating External HSM now") + } + if len(oldList) == 0 { + err := s.ChangeEncryptionKeyLocation(fieldKeyFormat) + if err != nil { + return result, err + } + } + if len(newList) == 0 && len(oldList) > 0 { + return result, fmt.Errorf("[ERROR] no support for migrate from External HSM now") + } + } + if dbBackupConfig, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "db_backup_config")); ok { if tmpList := dbBackupConfig.([]interface{}); len(tmpList) > 0 { fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "db_backup_config"), 0) diff --git a/internal/service/database_management/database_management_external_my_sql_database_connector_data_source.go b/internal/service/database_management/database_management_external_my_sql_database_connector_data_source.go new file mode 100644 index 00000000000..bfd4ef8c3be --- /dev/null +++ b/internal/service/database_management/database_management_external_my_sql_database_connector_data_source.go @@ -0,0 +1,136 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package database_management + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DatabaseManagementExternalMySqlDatabaseConnectorDataSource() *schema.Resource { + fieldMap := make(map[string]*schema.Schema) + fieldMap["external_my_sql_database_connector_id"] = &schema.Schema{ + Type: schema.TypeString, + Required: true, + } + return tfresource.GetSingularDataSourceItemSchema(DatabaseManagementExternalMySqlDatabaseConnectorResource(), fieldMap, readSingularDatabaseManagementExternalMySqlDatabaseConnector) +} + +func readSingularDatabaseManagementExternalMySqlDatabaseConnector(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseConnectorDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.ReadResource(sync) +} + +type DatabaseManagementExternalMySqlDatabaseConnectorDataSourceCrud struct { + D *schema.ResourceData + Client *oci_database_management.DbManagementClient + Res *oci_database_management.GetExternalMySqlDatabaseConnectorResponse +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorDataSourceCrud) Get() error { + request := oci_database_management.GetExternalMySqlDatabaseConnectorRequest{} + + if externalMySqlDatabaseConnectorId, ok := s.D.GetOkExists("external_my_sql_database_connector_id"); ok { + tmp := externalMySqlDatabaseConnectorId.(string) + request.ExternalMySqlDatabaseConnectorId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "database_management") + + response, err := s.Client.GetExternalMySqlDatabaseConnector(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(*s.Res.Id) + + if s.Res.AssociatedServices != nil { + s.D.Set("associated_services", *s.Res.AssociatedServices) + } + + if s.Res.CompartmentId != nil { + s.D.Set("compartment_id", *s.Res.CompartmentId) + } + + if s.Res.ConnectionStatus != nil { + s.D.Set("connection_status", *s.Res.ConnectionStatus) + } + + s.D.Set("connector_type", s.Res.ConnectorType) + + s.D.Set("credential_type", s.Res.CredentialType) + + if s.Res.ExternalDatabaseId != nil { + s.D.Set("external_database_id", *s.Res.ExternalDatabaseId) + } + + if s.Res.HostName != nil { + s.D.Set("host_name", *s.Res.HostName) + } + + if s.Res.MacsAgentId != nil { + s.D.Set("macs_agent_id", *s.Res.MacsAgentId) + } + + if s.Res.Name != nil { + s.D.Set("name", *s.Res.Name) + } + + s.D.Set("network_protocol", s.Res.NetworkProtocol) + + if s.Res.Port != nil { + s.D.Set("port", *s.Res.Port) + } + + if s.Res.SourceDatabase != nil { + s.D.Set("source_database", *s.Res.SourceDatabase) + } + + s.D.Set("source_database_type", s.Res.SourceDatabaseType) + + if s.Res.SslSecretId != nil { + s.D.Set("ssl_secret_id", *s.Res.SslSecretId) + } + + if s.Res.SslSecretName != nil { + s.D.Set("ssl_secret_name", *s.Res.SslSecretName) + } + + s.D.Set("state", s.Res.LifecycleState) + + if s.Res.TimeConnectionStatusUpdated != nil { + s.D.Set("time_connection_status_updated", s.Res.TimeConnectionStatusUpdated.String()) + } + + 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()) + } + + return nil +} diff --git a/internal/service/database_management/database_management_external_my_sql_database_connector_resource.go b/internal/service/database_management/database_management_external_my_sql_database_connector_resource.go new file mode 100644 index 00000000000..0fa6d49669d --- /dev/null +++ b/internal/service/database_management/database_management_external_my_sql_database_connector_resource.go @@ -0,0 +1,775 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package database_management + +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_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DatabaseManagementExternalMySqlDatabaseConnectorResource() *schema.Resource { + return &schema.Resource{ + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: tfresource.DefaultTimeout, + Create: createDatabaseManagementExternalMySqlDatabaseConnector, + Read: readDatabaseManagementExternalMySqlDatabaseConnector, + Update: updateDatabaseManagementExternalMySqlDatabaseConnector, + Delete: deleteDatabaseManagementExternalMySqlDatabaseConnector, + Schema: map[string]*schema.Schema{ + // Required + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "connector_details": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "credential_type": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Required: true, + }, + "external_database_id": { + Type: schema.TypeString, + Required: true, + }, + "host_name": { + Type: schema.TypeString, + Required: true, + }, + "macs_agent_id": { + Type: schema.TypeString, + Required: true, + }, + "network_protocol": { + Type: schema.TypeString, + Required: true, + }, + "port": { + Type: schema.TypeInt, + Required: true, + }, + "ssl_secret_id": { + Type: schema.TypeString, + Required: true, + }, + + // Optional + + // Computed + }, + }, + }, + "is_test_connection_param": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + + // Optional + "check_connection_status_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + + // Computed + "associated_services": { + Type: schema.TypeString, + Computed: true, + }, + "connection_status": { + Type: schema.TypeString, + Computed: true, + }, + "connector_type": { + Type: schema.TypeString, + Computed: true, + }, + "credential_type": { + Type: schema.TypeString, + Computed: true, + }, + "external_database_id": { + Type: schema.TypeString, + Computed: true, + }, + "host_name": { + Type: schema.TypeString, + Computed: true, + }, + "macs_agent_id": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "network_protocol": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "source_database": { + Type: schema.TypeString, + Computed: true, + }, + "source_database_type": { + Type: schema.TypeString, + Computed: true, + }, + "ssl_secret_id": { + Type: schema.TypeString, + Computed: true, + }, + "ssl_secret_name": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "time_connection_status_updated": { + Type: schema.TypeString, + Computed: true, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func createDatabaseManagementExternalMySqlDatabaseConnector(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + if e := tfresource.CreateResource(d, sync); e != nil { + return e + } + + if _, ok := sync.D.GetOkExists("check_connection_status_trigger"); ok { + err := sync.CheckExternalMySqlDatabaseConnectorConnectionStatus() + if err != nil { + return err + } + } + return nil + +} + +func readDatabaseManagementExternalMySqlDatabaseConnector(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.ReadResource(sync) +} + +func updateDatabaseManagementExternalMySqlDatabaseConnector(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + if _, ok := sync.D.GetOkExists("check_connection_status_trigger"); ok && sync.D.HasChange("check_connection_status_trigger") { + oldRaw, newRaw := sync.D.GetChange("check_connection_status_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.CheckExternalMySqlDatabaseConnectorConnectionStatus() + + if err != nil { + return err + } + } else { + sync.D.Set("check_connection_status_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 deleteDatabaseManagementExternalMySqlDatabaseConnector(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + sync.DisableNotFoundRetries = true + + return tfresource.DeleteResource(d, sync) +} + +type DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud struct { + tfresource.BaseCrud + Client *oci_database_management.DbManagementClient + Res *oci_database_management.ExternalMySqlDatabaseConnector + DisableNotFoundRetries bool +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) ID() string { + return *s.Res.Id +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) CreatedPending() []string { + return []string{ + string(oci_database_management.LifecycleStatesCreating), + } +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) CreatedTarget() []string { + return []string{ + string(oci_database_management.LifecycleStatesActive), + } +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) DeletedPending() []string { + return []string{ + string(oci_database_management.LifecycleStatesDeleting), + } +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) DeletedTarget() []string { + return []string{ + string(oci_database_management.LifecycleStatesDeleted), + } +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) Create() error { + request := oci_database_management.CreateExternalMySqlDatabaseConnectorRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if connectorDetails, ok := s.D.GetOkExists("connector_details"); ok { + if tmpList := connectorDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "connector_details", 0) + tmp, err := s.mapToCreateMySqlDatabaseConnectorDetails(fieldKeyFormat) + if err != nil { + return err + } + request.ConnectorDetails = &tmp + } + } + + if isTestConnectionParam, ok := s.D.GetOkExists("is_test_connection_param"); ok { + tmp := isTestConnectionParam.(bool) + request.IsTestConnectionParam = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.CreateExternalMySqlDatabaseConnector(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.ExternalMySqlDatabaseConnector + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) getExternalMySqlDatabaseConnectorFromWorkRequest(workId *string, retryPolicy *oci_common.RetryPolicy, + actionTypeEnum oci_database_management.WorkRequestResourceActionTypeEnum, timeout time.Duration) error { + + // Wait until it finishes + externalMySqlDatabaseConnectorId, err := externalMySqlDatabaseConnectorWaitForWorkRequest(workId, "connector", + actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) + + if err != nil { + return err + } + s.D.SetId(*externalMySqlDatabaseConnectorId) + + return s.Get() +} + +func externalMySqlDatabaseConnectorWorkRequestShouldRetryFunc(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, "database_management", startTime) { + return true + } + + // Only stop if the time Finished is set + if workRequestResponse, ok := response.Response.(oci_database_management.GetWorkRequestResponse); ok { + return workRequestResponse.TimeFinished == nil + } + return false + } +} + +func externalMySqlDatabaseConnectorWaitForWorkRequest(wId *string, entityType string, action oci_database_management.WorkRequestResourceActionTypeEnum, + timeout time.Duration, disableFoundRetries bool, client *oci_database_management.DbManagementClient) (*string, error) { + retryPolicy := tfresource.GetRetryPolicy(disableFoundRetries, "database_management") + retryPolicy.ShouldRetryOperation = externalMySqlDatabaseConnectorWorkRequestShouldRetryFunc(timeout) + + response := oci_database_management.GetWorkRequestResponse{} + stateConf := &resource.StateChangeConf{ + Pending: []string{ + string(oci_database_management.WorkRequestStatusInProgress), + string(oci_database_management.WorkRequestStatusAccepted), + string(oci_database_management.WorkRequestStatusCanceling), + }, + Target: []string{ + string(oci_database_management.WorkRequestStatusSucceeded), + string(oci_database_management.WorkRequestStatusFailed), + string(oci_database_management.WorkRequestStatusCanceled), + }, + Refresh: func() (interface{}, string, error) { + var err error + response, err = client.GetWorkRequest(context.Background(), + oci_database_management.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_database_management.WorkRequestStatusFailed || response.Status == oci_database_management.WorkRequestStatusCanceled { + return nil, getErrorFromDatabaseManagementExternalMySqlDatabaseConnectorWorkRequest(client, wId, retryPolicy, entityType, action) + } + + return identifier, nil +} + +func getErrorFromDatabaseManagementExternalMySqlDatabaseConnectorWorkRequest(client *oci_database_management.DbManagementClient, workId *string, retryPolicy *oci_common.RetryPolicy, entityType string, action oci_database_management.WorkRequestResourceActionTypeEnum) error { + response, err := client.ListWorkRequestErrors(context.Background(), + oci_database_management.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 *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) Get() error { + request := oci_database_management.GetExternalMySqlDatabaseConnectorRequest{} + + tmp := s.D.Id() + request.ExternalMySqlDatabaseConnectorId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.GetExternalMySqlDatabaseConnector(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.ExternalMySqlDatabaseConnector + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) Update() error { + request := oci_database_management.UpdateExternalMysqlDatabaseConnectorRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if connectorDetails, ok := s.D.GetOkExists("connector_details"); ok { + if tmpList := connectorDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "connector_details", 0) + tmp, err := s.mapToUpdateMySqlDatabaseConnectorDetails(fieldKeyFormat) + if err != nil { + return err + } + request.ConnectorDetails = &tmp + } + } + + tmp := s.D.Id() + request.ExternalMySqlDatabaseConnectorId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.UpdateExternalMysqlDatabaseConnector(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getExternalMySqlDatabaseConnectorFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management"), oci_database_management.WorkRequestResourceActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) Delete() error { + request := oci_database_management.DeleteExternalMySqlDatabaseConnectorRequest{} + + tmp := s.D.Id() + request.ExternalMySqlDatabaseConnectorId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.DeleteExternalMySqlDatabaseConnector(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, delWorkRequestErr := externalMySqlDatabaseConnectorWaitForWorkRequest(workId, "connector", + oci_database_management.WorkRequestResourceActionTypeDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries, s.Client) + return delWorkRequestErr +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) SetData() error { + if s.Res.AssociatedServices != nil { + s.D.Set("associated_services", *s.Res.AssociatedServices) + } + + if s.Res.CompartmentId != nil { + s.D.Set("compartment_id", *s.Res.CompartmentId) + } + + if s.Res.ConnectionStatus != nil { + s.D.Set("connection_status", *s.Res.ConnectionStatus) + } + + s.D.Set("connector_type", s.Res.ConnectorType) + + s.D.Set("credential_type", s.Res.CredentialType) + + if s.Res.ExternalDatabaseId != nil { + s.D.Set("external_database_id", *s.Res.ExternalDatabaseId) + } + + if s.Res.HostName != nil { + s.D.Set("host_name", *s.Res.HostName) + } + + if s.Res.MacsAgentId != nil { + s.D.Set("macs_agent_id", *s.Res.MacsAgentId) + } + + if s.Res.Name != nil { + s.D.Set("name", *s.Res.Name) + } + + s.D.Set("network_protocol", s.Res.NetworkProtocol) + + if s.Res.Port != nil { + s.D.Set("port", *s.Res.Port) + } + + if s.Res.SourceDatabase != nil { + s.D.Set("source_database", *s.Res.SourceDatabase) + } + + s.D.Set("source_database_type", s.Res.SourceDatabaseType) + + if s.Res.SslSecretId != nil { + s.D.Set("ssl_secret_id", *s.Res.SslSecretId) + } + + if s.Res.SslSecretName != nil { + s.D.Set("ssl_secret_name", *s.Res.SslSecretName) + } + + s.D.Set("state", s.Res.LifecycleState) + + if s.Res.TimeConnectionStatusUpdated != nil { + s.D.Set("time_connection_status_updated", s.Res.TimeConnectionStatusUpdated.String()) + } + + 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()) + } + + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) CheckExternalMySqlDatabaseConnectorConnectionStatus() error { + request := oci_database_management.CheckExternalMySqlDatabaseConnectorConnectionStatusRequest{} + + idTmp := s.D.Id() + request.ExternalMySqlDatabaseConnectorId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + _, err := s.Client.CheckExternalMySqlDatabaseConnectorConnectionStatus(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("check_connection_status_trigger") + s.D.Set("check_connection_status_trigger", val) + + //s.Res = &response.ExternalMySqlDatabaseConnector + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) mapToCreateMySqlDatabaseConnectorDetails(fieldKeyFormat string) (oci_database_management.CreateMySqlDatabaseConnectorDetails, error) { + result := oci_database_management.CreateMySqlDatabaseConnectorDetails{} + + if credentialType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "credential_type")); ok { + result.CredentialType = oci_database_management.MySqlCredTypeEnum(credentialType.(string)) + } + + if displayName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "display_name")); ok { + tmp := displayName.(string) + result.DisplayName = &tmp + } + + if externalDatabaseId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "external_database_id")); ok { + tmp := externalDatabaseId.(string) + result.ExternalDatabaseId = &tmp + } + + if hostName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "host_name")); ok { + tmp := hostName.(string) + result.HostName = &tmp + } + + if macsAgentId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "macs_agent_id")); ok { + tmp := macsAgentId.(string) + result.MacsAgentId = &tmp + } + + if networkProtocol, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "network_protocol")); ok { + result.NetworkProtocol = oci_database_management.MySqlNetworkProtocolTypeEnum(networkProtocol.(string)) + } + + if port, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "port")); ok { + tmp := port.(int) + result.Port = &tmp + } + + if sslSecretId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "ssl_secret_id")); ok { + tmp := sslSecretId.(string) + result.SslSecretId = &tmp + } + + return result, nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorResourceCrud) mapToUpdateMySqlDatabaseConnectorDetails(fieldKeyFormat string) (oci_database_management.UpdateMySqlDatabaseConnectorDetails, error) { + result := oci_database_management.UpdateMySqlDatabaseConnectorDetails{} + + if credentialType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "credential_type")); ok { + result.CredentialType = oci_database_management.MySqlCredTypeEnum(credentialType.(string)) + } + + if displayName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "display_name")); ok { + tmp := displayName.(string) + result.DisplayName = &tmp + } + + if externalDatabaseId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "external_database_id")); ok { + tmp := externalDatabaseId.(string) + result.ExternalDatabaseId = &tmp + } + + if hostName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "host_name")); ok { + tmp := hostName.(string) + result.HostName = &tmp + } + + if macsAgentId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "macs_agent_id")); ok { + tmp := macsAgentId.(string) + result.MacsAgentId = &tmp + } + + if networkProtocol, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "network_protocol")); ok { + result.NetworkProtocol = oci_database_management.MySqlNetworkProtocolTypeEnum(networkProtocol.(string)) + } + + if port, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "port")); ok { + tmp := port.(int) + result.Port = &tmp + } + + if sslSecretId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "ssl_secret_id")); ok { + tmp := sslSecretId.(string) + result.SslSecretId = &tmp + } + + return result, nil +} + +func CreateMySqlDatabaseConnectorDetailsToMap(obj *oci_database_management.CreateMySqlDatabaseConnectorDetails) map[string]interface{} { + result := map[string]interface{}{} + + result["credential_type"] = string(obj.CredentialType) + + if obj.DisplayName != nil { + result["display_name"] = string(*obj.DisplayName) + } + + if obj.ExternalDatabaseId != nil { + result["external_database_id"] = string(*obj.ExternalDatabaseId) + } + + if obj.HostName != nil { + result["host_name"] = string(*obj.HostName) + } + + if obj.MacsAgentId != nil { + result["macs_agent_id"] = string(*obj.MacsAgentId) + } + + result["network_protocol"] = string(obj.NetworkProtocol) + + if obj.Port != nil { + result["port"] = int(*obj.Port) + } + + if obj.SslSecretId != nil { + result["ssl_secret_id"] = string(*obj.SslSecretId) + } + + return result +} + +func MySqlDatabaseConnectorSummaryToMap(obj oci_database_management.MySqlDatabaseConnectorSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.AssociatedServices != nil { + result["associated_services"] = string(*obj.AssociatedServices) + } + + if obj.CompartmentId != nil { + result["compartment_id"] = string(*obj.CompartmentId) + } + + if obj.ConnectionStatus != nil { + result["connection_status"] = string(*obj.ConnectionStatus) + } + + result["connector_type"] = string(obj.ConnectorType) + + result["credential_type"] = string(obj.CredentialType) + + if obj.HostName != nil { + result["host_name"] = string(*obj.HostName) + } + + if obj.Id != nil { + result["id"] = string(*obj.Id) + } + + if obj.MacsAgentId != nil { + result["macs_agent_id"] = string(*obj.MacsAgentId) + } + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + result["network_protocol"] = string(obj.NetworkProtocol) + + if obj.Port != nil { + result["port"] = int(*obj.Port) + } + + if obj.SourceDatabase != nil { + result["source_database"] = string(*obj.SourceDatabase) + } + + result["source_database_type"] = string(obj.SourceDatabaseType) + + result["state"] = string(obj.LifecycleState) + + if obj.SystemTags != nil { + result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags) + } + + if obj.TimeConnectionStatusUpdated != nil { + result["time_connection_status_updated"] = obj.TimeConnectionStatusUpdated.String() + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.String() + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.String() + } + + return result +} diff --git a/internal/service/database_management/database_management_external_my_sql_database_connectors_data_source.go b/internal/service/database_management/database_management_external_my_sql_database_connectors_data_source.go new file mode 100644 index 00000000000..748b82effbe --- /dev/null +++ b/internal/service/database_management/database_management_external_my_sql_database_connectors_data_source.go @@ -0,0 +1,127 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package database_management + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DatabaseManagementExternalMySqlDatabaseConnectorsDataSource() *schema.Resource { + return &schema.Resource{ + Read: readDatabaseManagementExternalMySqlDatabaseConnectors, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + }, + "my_sql_connector_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + + "items": { + Type: schema.TypeList, + Computed: true, + Elem: tfresource.GetDataSourceItemSchema(DatabaseManagementExternalMySqlDatabaseConnectorResource()), + }, + }, + }, + }, + }, + } +} + +func readDatabaseManagementExternalMySqlDatabaseConnectors(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseConnectorsDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.ReadResource(sync) +} + +type DatabaseManagementExternalMySqlDatabaseConnectorsDataSourceCrud struct { + D *schema.ResourceData + Client *oci_database_management.DbManagementClient + Res *oci_database_management.ListMySqlDatabaseConnectorsResponse +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorsDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *DatabaseManagementExternalMySqlDatabaseConnectorsDataSourceCrud) Get() error { + request := oci_database_management.ListMySqlDatabaseConnectorsRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if name, ok := s.D.GetOkExists("name"); ok { + tmp := name.(string) + request.Name = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "database_management") + + response, err := s.Client.ListMySqlDatabaseConnectors(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListMySqlDatabaseConnectors(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 *DatabaseManagementExternalMySqlDatabaseConnectorsDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("DatabaseManagementExternalMySqlDatabaseConnectorsDataSource-", DatabaseManagementExternalMySqlDatabaseConnectorsDataSource(), s.D)) + resources := []map[string]interface{}{} + externalMySqlDatabaseConnector := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, MySqlDatabaseConnectorSummaryToMap(item)) + } + externalMySqlDatabaseConnector["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, DatabaseManagementExternalMySqlDatabaseConnectorsDataSource().Schema["my_sql_connector_collection"].Elem.(*schema.Resource).Schema) + externalMySqlDatabaseConnector["items"] = items + } + + resources = append(resources, externalMySqlDatabaseConnector) + if err := s.D.Set("my_sql_connector_collection", resources); err != nil { + return err + } + + return nil +} diff --git a/internal/service/database_management/database_management_external_my_sql_database_data_source.go b/internal/service/database_management/database_management_external_my_sql_database_data_source.go new file mode 100644 index 00000000000..da1bba303ae --- /dev/null +++ b/internal/service/database_management/database_management_external_my_sql_database_data_source.go @@ -0,0 +1,82 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package database_management + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DatabaseManagementExternalMySqlDatabaseDataSource() *schema.Resource { + fieldMap := make(map[string]*schema.Schema) + fieldMap["external_my_sql_database_id"] = &schema.Schema{ + Type: schema.TypeString, + Required: true, + } + return tfresource.GetSingularDataSourceItemSchema(DatabaseManagementExternalMySqlDatabaseResource(), fieldMap, readSingularDatabaseManagementExternalMySqlDatabase) +} + +func readSingularDatabaseManagementExternalMySqlDatabase(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.ReadResource(sync) +} + +type DatabaseManagementExternalMySqlDatabaseDataSourceCrud struct { + D *schema.ResourceData + Client *oci_database_management.DbManagementClient + Res *oci_database_management.GetExternalMySqlDatabaseResponse +} + +func (s *DatabaseManagementExternalMySqlDatabaseDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *DatabaseManagementExternalMySqlDatabaseDataSourceCrud) Get() error { + request := oci_database_management.GetExternalMySqlDatabaseRequest{} + + if externalMySqlDatabaseId, ok := s.D.GetOkExists("external_my_sql_database_id"); ok { + tmp := externalMySqlDatabaseId.(string) + request.ExternalMySqlDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "database_management") + + response, err := s.Client.GetExternalMySqlDatabase(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("DatabaseManagementExternalMySqlDatabaseDataSource-", DatabaseManagementExternalMySqlDatabaseDataSource(), s.D)) + + if s.Res.CompartmentId != nil { + s.D.Set("compartment_id", *s.Res.CompartmentId) + } + + if s.Res.DbName != nil { + s.D.Set("db_name", *s.Res.DbName) + } + + if s.Res.ExternalDatabaseId != nil { + s.D.Set("external_database_id", *s.Res.ExternalDatabaseId) + } + + return nil +} diff --git a/internal/service/database_management/database_management_external_my_sql_database_external_mysql_databases_management_resource.go b/internal/service/database_management/database_management_external_my_sql_database_external_mysql_databases_management_resource.go new file mode 100644 index 00000000000..f6d0b91e533 --- /dev/null +++ b/internal/service/database_management/database_management_external_my_sql_database_external_mysql_databases_management_resource.go @@ -0,0 +1,368 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package database_management + +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_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResource() *schema.Resource { + return &schema.Resource{ + Timeouts: tfresource.DefaultTimeout, + Create: createDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement, + Read: readDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement, + Update: updateDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement, + Delete: deleteDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement, + Schema: map[string]*schema.Schema{ + // Required + "external_my_sql_database_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "enable_external_mysql_database": { + Type: schema.TypeBool, + Required: true, + }, + + // Optional + "connector_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // Computed + }, + } +} + +func createDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + sync.Res = &DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResponse{} + + return tfresource.CreateResource(d, sync) +} + +func readDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement(d *schema.ResourceData, m interface{}) error { + return nil +} + +func updateDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + sync.Res = &DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResponse{} + + return tfresource.UpdateResource(d, sync) +} + +func deleteDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagement(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + sync.Res = &DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResponse{} + sync.DisableNotFoundRetries = true + + return tfresource.DeleteResource(d, sync) +} + +type DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResponse struct { + enableResponse *oci_database_management.EnableExternalMySqlDatabaseManagementResponse + disableResponse *oci_database_management.DisableExternalMySqlDatabaseManagementResponse +} + +type DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud struct { + tfresource.BaseCrud + Client *oci_database_management.DbManagementClient + Res *DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResponse + DisableNotFoundRetries bool +} + +func (s *DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud) ID() string { + return tfresource.GenerateDataSourceHashID("DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResource-", DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResource(), s.D) +} + +func (s *DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud) Create() error { + var operation bool + if enableOperation, ok := s.D.GetOkExists("enable_external_mysql_database"); ok { + operation = enableOperation.(bool) + } + + if operation { + request := oci_database_management.EnableExternalMySqlDatabaseManagementRequest{} + + if connectorId, ok := s.D.GetOkExists("connector_id"); ok { + tmp := connectorId.(string) + request.ConnectorId = &tmp + } + + if externalMySqlDatabaseId, ok := s.D.GetOkExists("external_my_sql_database_id"); ok { + tmp := externalMySqlDatabaseId.(string) + request.ExternalMySqlDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector") + + response, err := s.Client.EnableExternalMySqlDatabaseManagement(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + err = s.getExternalMySqlDatabaseExternalMysqlDatabasesManagementFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector"), oci_database_management.WorkRequestResourceActionTypeCreated, s.D.Timeout(schema.TimeoutUpdate)) + if err != nil { + return err + } + s.Res.enableResponse = &response + return nil + } + + request := oci_database_management.DisableExternalMySqlDatabaseManagementRequest{} + + if externalMySqlDatabaseId, ok := s.D.GetOkExists("external_my_sql_database_id"); ok { + tmp := externalMySqlDatabaseId.(string) + request.ExternalMySqlDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector") + + response, err := s.Client.DisableExternalMySqlDatabaseManagement(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + err = s.getExternalMySqlDatabaseExternalMysqlDatabasesManagementFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector"), oci_database_management.WorkRequestResourceActionTypeDeleted, s.D.Timeout(schema.TimeoutUpdate)) + if err != nil { + return err + } + s.Res.disableResponse = &response + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud) getExternalMySqlDatabaseExternalMysqlDatabasesManagementFromWorkRequest(workId *string, retryPolicy *oci_common.RetryPolicy, + actionTypeEnum oci_database_management.WorkRequestResourceActionTypeEnum, timeout time.Duration) error { + + // Wait until it finishes + _, err := externalMySqlDatabaseExternalMysqlDatabasesManagementWaitForWorkRequest(workId, "connector", + actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) + + if err != nil { + return err + } + + return nil +} + +func externalMySqlDatabaseExternalMysqlDatabasesManagementWorkRequestShouldRetryFunc(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, "connector", startTime) { + return true + } + + // Only stop if the time Finished is set + if workRequestResponse, ok := response.Response.(oci_database_management.GetWorkRequestResponse); ok { + return workRequestResponse.TimeFinished == nil + } + return false + } +} + +func externalMySqlDatabaseExternalMysqlDatabasesManagementWaitForWorkRequest(wId *string, entityType string, action oci_database_management.WorkRequestResourceActionTypeEnum, + timeout time.Duration, disableFoundRetries bool, client *oci_database_management.DbManagementClient) (*string, error) { + retryPolicy := tfresource.GetRetryPolicy(disableFoundRetries, "connector") + retryPolicy.ShouldRetryOperation = externalMySqlDatabaseExternalMysqlDatabasesManagementWorkRequestShouldRetryFunc(timeout) + + response := oci_database_management.GetWorkRequestResponse{} + stateConf := &resource.StateChangeConf{ + Pending: []string{ + string(oci_database_management.WorkRequestStatusInProgress), + string(oci_database_management.WorkRequestStatusAccepted), + string(oci_database_management.WorkRequestStatusCanceling), + }, + Target: []string{ + string(oci_database_management.WorkRequestStatusSucceeded), + string(oci_database_management.WorkRequestStatusFailed), + string(oci_database_management.WorkRequestStatusCanceled), + }, + Refresh: func() (interface{}, string, error) { + var err error + response, err = client.GetWorkRequest(context.Background(), + oci_database_management.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_database_management.WorkRequestStatusFailed || response.Status == oci_database_management.WorkRequestStatusCanceled { + return nil, getErrorFromDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementWorkRequest(client, wId, retryPolicy, entityType, action) + } + + return identifier, nil +} + +func getErrorFromDatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementWorkRequest(client *oci_database_management.DbManagementClient, workId *string, retryPolicy *oci_common.RetryPolicy, entityType string, action oci_database_management.WorkRequestResourceActionTypeEnum) error { + response, err := client.ListWorkRequestErrors(context.Background(), + oci_database_management.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 *DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud) Update() error { + var operation bool + if enableOperation, ok := s.D.GetOkExists("enable_external_mysql_database"); ok { + operation = enableOperation.(bool) + } + + if operation { + request := oci_database_management.EnableExternalMySqlDatabaseManagementRequest{} + + if connectorId, ok := s.D.GetOkExists("connector_id"); ok { + tmp := connectorId.(string) + request.ConnectorId = &tmp + } + + if externalMySqlDatabaseId, ok := s.D.GetOkExists("external_my_sql_database_id"); ok { + tmp := externalMySqlDatabaseId.(string) + request.ExternalMySqlDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector") + + response, err := s.Client.EnableExternalMySqlDatabaseManagement(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + err = s.getExternalMySqlDatabaseExternalMysqlDatabasesManagementFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector"), oci_database_management.WorkRequestResourceActionTypeCreated, s.D.Timeout(schema.TimeoutUpdate)) + if err != nil { + return err + } + s.Res.enableResponse = &response + return nil + } + + request := oci_database_management.DisableExternalMySqlDatabaseManagementRequest{} + + if externalMySqlDatabaseId, ok := s.D.GetOkExists("external_my_sql_database_id"); ok { + tmp := externalMySqlDatabaseId.(string) + request.ExternalMySqlDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector") + + response, err := s.Client.DisableExternalMySqlDatabaseManagement(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + err = s.getExternalMySqlDatabaseExternalMysqlDatabasesManagementFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector"), oci_database_management.WorkRequestResourceActionTypeDeleted, s.D.Timeout(schema.TimeoutUpdate)) + if err != nil { + return err + } + s.Res.disableResponse = &response + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud) Delete() error { + var operation bool + if enableOperation, ok := s.D.GetOkExists("enable_external_mysql_database"); ok { + operation = enableOperation.(bool) + } + + if !operation { + return nil + } + + request := oci_database_management.DisableExternalMySqlDatabaseManagementRequest{} + + if externalMySqlDatabaseId, ok := s.D.GetOkExists("external_my_sql_database_id"); ok { + tmp := externalMySqlDatabaseId.(string) + request.ExternalMySqlDatabaseId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector") + + response, err := s.Client.DisableExternalMySqlDatabaseManagement(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + err = s.getExternalMySqlDatabaseExternalMysqlDatabasesManagementFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "connector"), oci_database_management.WorkRequestResourceActionTypeDeleted, s.D.Timeout(schema.TimeoutUpdate)) + if err != nil { + return err + } + + s.Res.disableResponse = &response + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResourceCrud) SetData() error { + return nil +} diff --git a/internal/service/database_management/database_management_external_my_sql_database_resource.go b/internal/service/database_management/database_management_external_my_sql_database_resource.go new file mode 100644 index 00000000000..91ccd124a5b --- /dev/null +++ b/internal/service/database_management/database_management_external_my_sql_database_resource.go @@ -0,0 +1,343 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package database_management + +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_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DatabaseManagementExternalMySqlDatabaseResource() *schema.Resource { + return &schema.Resource{ + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: tfresource.DefaultTimeout, + Create: createDatabaseManagementExternalMySqlDatabase, + Read: readDatabaseManagementExternalMySqlDatabase, + Update: updateDatabaseManagementExternalMySqlDatabase, + Delete: deleteDatabaseManagementExternalMySqlDatabase, + Schema: map[string]*schema.Schema{ + // Required + "compartment_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "db_name": { + Type: schema.TypeString, + Required: true, + }, + + // Optional + + // Computed + "external_database_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func createDatabaseManagementExternalMySqlDatabase(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.CreateResource(d, sync) +} + +func readDatabaseManagementExternalMySqlDatabase(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.ReadResource(sync) +} + +func updateDatabaseManagementExternalMySqlDatabase(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.UpdateResource(d, sync) +} + +func deleteDatabaseManagementExternalMySqlDatabase(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabaseResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + sync.DisableNotFoundRetries = true + + return tfresource.DeleteResource(d, sync) +} + +type DatabaseManagementExternalMySqlDatabaseResourceCrud struct { + tfresource.BaseCrud + Client *oci_database_management.DbManagementClient + Res *oci_database_management.ExternalMySqlDatabase + DisableNotFoundRetries bool +} + +func (s *DatabaseManagementExternalMySqlDatabaseResourceCrud) ID() string { + return *s.Res.ExternalDatabaseId +} + +func (s *DatabaseManagementExternalMySqlDatabaseResourceCrud) Create() error { + request := oci_database_management.CreateExternalMySqlDatabaseRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if dbName, ok := s.D.GetOkExists("db_name"); ok { + tmp := dbName.(string) + request.DbName = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.CreateExternalMySqlDatabase(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.ExternalMySqlDatabase + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseResourceCrud) getExternalMySqlDatabaseFromWorkRequest(workId *string, retryPolicy *oci_common.RetryPolicy, + actionTypeEnum oci_database_management.WorkRequestResourceActionTypeEnum, timeout time.Duration) error { + + // Wait until it finishes + externalMySqlDatabaseId, err := externalMySqlDatabaseWaitForWorkRequest(workId, "dbsystem", + actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) + + if err != nil { + return err + } + s.D.SetId(*externalMySqlDatabaseId) + + return s.Get() +} + +func externalMySqlDatabaseWorkRequestShouldRetryFunc(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, "database_management", startTime) { + return true + } + + // Only stop if the time Finished is set + if workRequestResponse, ok := response.Response.(oci_database_management.GetWorkRequestResponse); ok { + return workRequestResponse.TimeFinished == nil + } + return false + } +} + +func externalMySqlDatabaseWaitForWorkRequest(wId *string, entityType string, action oci_database_management.WorkRequestResourceActionTypeEnum, + timeout time.Duration, disableFoundRetries bool, client *oci_database_management.DbManagementClient) (*string, error) { + retryPolicy := tfresource.GetRetryPolicy(disableFoundRetries, "database_management") + retryPolicy.ShouldRetryOperation = externalMySqlDatabaseWorkRequestShouldRetryFunc(timeout) + + response := oci_database_management.GetWorkRequestResponse{} + stateConf := &resource.StateChangeConf{ + Pending: []string{ + string(oci_database_management.WorkRequestStatusInProgress), + string(oci_database_management.WorkRequestStatusAccepted), + string(oci_database_management.WorkRequestStatusCanceling), + }, + Target: []string{ + string(oci_database_management.WorkRequestStatusSucceeded), + string(oci_database_management.WorkRequestStatusFailed), + string(oci_database_management.WorkRequestStatusCanceled), + }, + Refresh: func() (interface{}, string, error) { + var err error + response, err = client.GetWorkRequest(context.Background(), + oci_database_management.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_database_management.WorkRequestStatusFailed || response.Status == oci_database_management.WorkRequestStatusCanceled { + return nil, getErrorFromDatabaseManagementExternalMySqlDatabaseWorkRequest(client, wId, retryPolicy, entityType, action) + } + + return identifier, nil +} + +func getErrorFromDatabaseManagementExternalMySqlDatabaseWorkRequest(client *oci_database_management.DbManagementClient, workId *string, retryPolicy *oci_common.RetryPolicy, entityType string, action oci_database_management.WorkRequestResourceActionTypeEnum) error { + response, err := client.ListWorkRequestErrors(context.Background(), + oci_database_management.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 *DatabaseManagementExternalMySqlDatabaseResourceCrud) Get() error { + request := oci_database_management.GetExternalMySqlDatabaseRequest{} + + tmp := s.D.Id() + request.ExternalMySqlDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.GetExternalMySqlDatabase(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.ExternalMySqlDatabase + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseResourceCrud) Update() error { + request := oci_database_management.UpdateExternalMysqlDatabaseRequest{} + + if dbName, ok := s.D.GetOkExists("db_name"); ok { + tmp := dbName.(string) + request.DbName = &tmp + } + + tmp := s.D.Id() + request.ExternalMySqlDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.UpdateExternalMysqlDatabase(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.ExternalMySqlDatabase + return nil +} + +func (s *DatabaseManagementExternalMySqlDatabaseResourceCrud) Delete() error { + request := oci_database_management.DeleteExternalMySqlDatabaseRequest{} + + tmp := s.D.Id() + request.ExternalMySqlDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "database_management") + + response, err := s.Client.DeleteExternalMySqlDatabase(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, delWorkRequestErr := externalMySqlDatabaseWaitForWorkRequest(workId, "dbsystem", + oci_database_management.WorkRequestResourceActionTypeDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries, s.Client) + return delWorkRequestErr +} + +func (s *DatabaseManagementExternalMySqlDatabaseResourceCrud) SetData() error { + if s.Res.CompartmentId != nil { + s.D.Set("compartment_id", *s.Res.CompartmentId) + } + + if s.Res.DbName != nil { + s.D.Set("db_name", *s.Res.DbName) + } + + if s.Res.ExternalDatabaseId != nil { + s.D.Set("external_database_id", *s.Res.ExternalDatabaseId) + } + + return nil +} + +func ExternalMySqlDatabaseSummaryToMap(obj oci_database_management.ExternalMySqlDatabaseSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.CompartmentId != nil { + result["compartment_id"] = string(*obj.CompartmentId) + } + + //if obj.ConnectorId != nil { + // result["connector_id"] = string(*obj.ConnectorId) + //} + + if obj.DbName != nil { + result["db_name"] = string(*obj.DbName) + } + + //result["deployment_type"] = string(obj.DeploymentType) + + if obj.ExternalDatabaseId != nil { + result["external_database_id"] = string(*obj.ExternalDatabaseId) + } + + //result["management_state"] = string(obj.ManagementState) + + //result["state"] = string(obj.LifecycleState) + + if obj.SystemTags != nil { + result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags) + } + + return result +} diff --git a/internal/service/database_management/database_management_external_my_sql_databases_data_source.go b/internal/service/database_management/database_management_external_my_sql_databases_data_source.go new file mode 100644 index 00000000000..7e20990dd6f --- /dev/null +++ b/internal/service/database_management/database_management_external_my_sql_databases_data_source.go @@ -0,0 +1,127 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package database_management + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func DatabaseManagementExternalMySqlDatabasesDataSource() *schema.Resource { + return &schema.Resource{ + Read: readDatabaseManagementExternalMySqlDatabases, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + }, + "external_my_sql_database_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + + "items": { + Type: schema.TypeList, + Computed: true, + Elem: DatabaseManagementExternalMySqlDatabaseResource(), + }, + }, + }, + }, + }, + } +} + +func readDatabaseManagementExternalMySqlDatabases(d *schema.ResourceData, m interface{}) error { + sync := &DatabaseManagementExternalMySqlDatabasesDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).DbManagementClient() + + return tfresource.ReadResource(sync) +} + +type DatabaseManagementExternalMySqlDatabasesDataSourceCrud struct { + D *schema.ResourceData + Client *oci_database_management.DbManagementClient + Res *oci_database_management.ListExternalMySqlDatabasesResponse +} + +func (s *DatabaseManagementExternalMySqlDatabasesDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *DatabaseManagementExternalMySqlDatabasesDataSourceCrud) Get() error { + request := oci_database_management.ListExternalMySqlDatabasesRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if name, ok := s.D.GetOkExists("name"); ok { + tmp := name.(string) + request.Name = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "database_management") + + response, err := s.Client.ListExternalMySqlDatabases(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListExternalMySqlDatabases(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 *DatabaseManagementExternalMySqlDatabasesDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("DatabaseManagementExternalMySqlDatabasesDataSource-", DatabaseManagementExternalMySqlDatabasesDataSource(), s.D)) + resources := []map[string]interface{}{} + externalMySqlDatabase := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, ExternalMySqlDatabaseSummaryToMap(item)) + } + externalMySqlDatabase["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, DatabaseManagementExternalMySqlDatabasesDataSource().Schema["external_my_sql_database_collection"].Elem.(*schema.Resource).Schema) + externalMySqlDatabase["items"] = items + } + + resources = append(resources, externalMySqlDatabase) + if err := s.D.Set("external_my_sql_database_collection", resources); err != nil { + return err + } + + return nil +} diff --git a/internal/service/database_management/database_management_managed_my_sql_database_data_source.go b/internal/service/database_management/database_management_managed_my_sql_database_data_source.go index 9e96ff9cb4b..2577d4ebbf6 100644 --- a/internal/service/database_management/database_management_managed_my_sql_database_data_source.go +++ b/internal/service/database_management/database_management_managed_my_sql_database_data_source.go @@ -26,6 +26,10 @@ func DatabaseManagementManagedMySqlDatabaseDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "database_type": { + Type: schema.TypeString, + Computed: true, + }, "db_name": { Type: schema.TypeString, Computed: true, @@ -83,20 +87,34 @@ func DatabaseManagementManagedMySqlDatabaseDataSource() *schema.Resource { Type: schema.TypeBool, Computed: true, }, + "management_state": { + Type: schema.TypeString, + Computed: true, + }, "name": { Type: schema.TypeString, Computed: true, }, + "state": { + Type: schema.TypeString, + Computed: true, + }, "time_created": { Type: schema.TypeString, Computed: true, }, "time_created_heat_wave": { + + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { Type: schema.TypeString, Computed: true, }, }, } + } func readSingularDatabaseManagementManagedMySqlDatabase(d *schema.ResourceData, m interface{}) error { @@ -147,6 +165,8 @@ func (s *DatabaseManagementManagedMySqlDatabaseDataSourceCrud) SetData() error { s.D.Set("compartment_id", *s.Res.CompartmentId) } + s.D.Set("database_type", s.Res.DatabaseType) + if s.Res.DbName != nil { s.D.Set("db_name", *s.Res.DbName) } @@ -184,18 +204,24 @@ func (s *DatabaseManagementManagedMySqlDatabaseDataSourceCrud) SetData() error { if s.Res.IsLakehouseEnabled != nil { s.D.Set("is_lakehouse_enabled", *s.Res.IsLakehouseEnabled) } + s.D.Set("management_state", s.Res.ManagementState) if s.Res.Name != nil { s.D.Set("name", *s.Res.Name) } + s.D.Set("state", s.Res.LifecycleState) + if s.Res.TimeCreated != nil { s.D.Set("time_created", s.Res.TimeCreated.String()) } if s.Res.TimeCreatedHeatWave != nil { s.D.Set("time_created_heat_wave", s.Res.TimeCreatedHeatWave.String()) + if s.Res.TimeUpdated != nil { + s.D.Set("time_updated", s.Res.TimeUpdated.String()) + } } - return nil + //} } diff --git a/internal/service/database_management/database_management_managed_my_sql_database_sql_data_data_source.go b/internal/service/database_management/database_management_managed_my_sql_database_sql_data_data_source.go index 06e2e08a64d..6eb60b82b0b 100644 --- a/internal/service/database_management/database_management_managed_my_sql_database_sql_data_data_source.go +++ b/internal/service/database_management/database_management_managed_my_sql_database_sql_data_data_source.go @@ -5,6 +5,7 @@ package database_management import ( "context" + "strconv" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oci_database_management "github.com/oracle/oci-go-sdk/v65/databasemanagement" @@ -86,10 +87,18 @@ func DatabaseManagementManagedMySqlDatabaseSqlDataDataSource() *schema.Resource Type: schema.TypeString, Computed: true, }, + "max_controlled_memory": { + Type: schema.TypeString, + Computed: true, + }, "max_timer_wait": { Type: schema.TypeFloat, Computed: true, }, + "max_total_memory": { + Type: schema.TypeString, + Computed: true, + }, "min_timer_wait": { Type: schema.TypeFloat, Computed: true, @@ -110,6 +119,10 @@ func DatabaseManagementManagedMySqlDatabaseSqlDataDataSource() *schema.Resource Type: schema.TypeString, Computed: true, }, + "sum_cpu_time": { + Type: schema.TypeString, + Computed: true, + }, "sum_created_temp_disk_tables": { Type: schema.TypeFloat, Computed: true, @@ -327,10 +340,18 @@ func MySqlDataSummaryToMap(obj oci_database_management.MySqlDataSummary) map[str result["last_seen"] = obj.LastSeen.String() } + if obj.MaxControlledMemory != nil { + result["max_controlled_memory"] = strconv.FormatInt(*obj.MaxControlledMemory, 10) + } + if obj.MaxTimerWait != nil { result["max_timer_wait"] = float32(*obj.MaxTimerWait) } + if obj.MaxTotalMemory != nil { + result["max_total_memory"] = strconv.FormatInt(*obj.MaxTotalMemory, 10) + } + if obj.MinTimerWait != nil { result["min_timer_wait"] = float32(*obj.MinTimerWait) } @@ -351,6 +372,10 @@ func MySqlDataSummaryToMap(obj oci_database_management.MySqlDataSummary) map[str result["schema_name"] = string(*obj.SchemaName) } + if obj.SumCpuTime != nil { + result["sum_cpu_time"] = strconv.FormatInt(*obj.SumCpuTime, 10) + } + if obj.SumCreatedTempDiskTables != nil { result["sum_created_temp_disk_tables"] = float32(*obj.SumCreatedTempDiskTables) } diff --git a/internal/service/database_management/database_management_managed_my_sql_databases_data_source.go b/internal/service/database_management/database_management_managed_my_sql_databases_data_source.go index 95f745bc819..2ba5fdae076 100644 --- a/internal/service/database_management/database_management_managed_my_sql_databases_data_source.go +++ b/internal/service/database_management/database_management_managed_my_sql_databases_data_source.go @@ -22,6 +22,10 @@ func DatabaseManagementManagedMySqlDatabasesDataSource() *schema.Resource { Type: schema.TypeString, Required: true, }, + "filter_by_my_sql_database_type_param": { + Type: schema.TypeString, + Optional: true, + }, "managed_my_sql_database_collection": { Type: schema.TypeList, Computed: true, @@ -41,6 +45,10 @@ func DatabaseManagementManagedMySqlDatabasesDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "database_type": { + Type: schema.TypeString, + Computed: true, + }, "db_name": { Type: schema.TypeString, Computed: true, @@ -102,10 +110,18 @@ func DatabaseManagementManagedMySqlDatabasesDataSource() *schema.Resource { Type: schema.TypeBool, Computed: true, }, + "management_state": { + Type: schema.TypeString, + Computed: true, + }, "name": { Type: schema.TypeString, Computed: true, }, + "state": { + Type: schema.TypeString, + Computed: true, + }, "time_created": { Type: schema.TypeString, Computed: true, @@ -114,6 +130,10 @@ func DatabaseManagementManagedMySqlDatabasesDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, }, }, }, @@ -122,6 +142,7 @@ func DatabaseManagementManagedMySqlDatabasesDataSource() *schema.Resource { }, }, } + } func readDatabaseManagementManagedMySqlDatabases(d *schema.ResourceData, m interface{}) error { @@ -150,6 +171,10 @@ func (s *DatabaseManagementManagedMySqlDatabasesDataSourceCrud) Get() error { request.CompartmentId = &tmp } + if filterByMySqlDatabaseTypeParam, ok := s.D.GetOkExists("filter_by_my_sql_database_type_param"); ok { + request.FilterByMySqlDatabaseTypeParam = oci_database_management.ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum(filterByMySqlDatabaseTypeParam.(string)) + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "database_management") response, err := s.Client.ListManagedMySqlDatabases(context.Background(), request) @@ -224,6 +249,8 @@ func ManagedMySqlDatabaseSummaryToMap(obj oci_database_management.ManagedMySqlDa result["compartment_id"] = string(*obj.CompartmentId) } + result["database_type"] = string(obj.DatabaseType) + if obj.DbName != nil { result["db_name"] = string(*obj.DbName) } @@ -236,10 +263,14 @@ func ManagedMySqlDatabaseSummaryToMap(obj oci_database_management.ManagedMySqlDa result["id"] = string(*obj.Id) } + result["management_state"] = string(obj.ManagementState) + if obj.Name != nil { result["name"] = string(*obj.Name) } + result["state"] = string(obj.LifecycleState) + if obj.TimeCreated != nil { result["time_created"] = obj.TimeCreated.String() } diff --git a/internal/service/database_management/register_datasource.go b/internal/service/database_management/register_datasource.go index 29ae7534414..b69d1d555a9 100644 --- a/internal/service/database_management/register_datasource.go +++ b/internal/service/database_management/register_datasource.go @@ -45,6 +45,10 @@ func RegisterDatasource() { tfresource.RegisterDatasource("oci_database_management_external_listener", DatabaseManagementExternalListenerDataSource()) tfresource.RegisterDatasource("oci_database_management_external_listener_services", DatabaseManagementExternalListenerServicesDataSource()) tfresource.RegisterDatasource("oci_database_management_external_listeners", DatabaseManagementExternalListenersDataSource()) + tfresource.RegisterDatasource("oci_database_management_external_my_sql_database", DatabaseManagementExternalMySqlDatabaseDataSource()) + tfresource.RegisterDatasource("oci_database_management_external_my_sql_database_connector", DatabaseManagementExternalMySqlDatabaseConnectorDataSource()) + tfresource.RegisterDatasource("oci_database_management_external_my_sql_database_connectors", DatabaseManagementExternalMySqlDatabaseConnectorsDataSource()) + tfresource.RegisterDatasource("oci_database_management_external_my_sql_databases", DatabaseManagementExternalMySqlDatabasesDataSource()) tfresource.RegisterDatasource("oci_database_management_job_executions_status", DatabaseManagementJobExecutionsStatusDataSource()) tfresource.RegisterDatasource("oci_database_management_job_executions_statuses", DatabaseManagementJobExecutionsStatusesDataSource()) tfresource.RegisterDatasource("oci_database_management_managed_database", DatabaseManagementManagedDatabaseDataSource()) diff --git a/internal/service/database_management/register_resource.go b/internal/service/database_management/register_resource.go index 1f9e8107152..3f7cb472f10 100644 --- a/internal/service/database_management/register_resource.go +++ b/internal/service/database_management/register_resource.go @@ -26,6 +26,9 @@ func RegisterResource() { tfresource.RegisterResource("oci_database_management_external_exadata_storage_grid", DatabaseManagementExternalExadataStorageGridResource()) tfresource.RegisterResource("oci_database_management_external_exadata_storage_server", DatabaseManagementExternalExadataStorageServerResource()) tfresource.RegisterResource("oci_database_management_external_listener", DatabaseManagementExternalListenerResource()) + tfresource.RegisterResource("oci_database_management_external_my_sql_database", DatabaseManagementExternalMySqlDatabaseResource()) + tfresource.RegisterResource("oci_database_management_external_my_sql_database_connector", DatabaseManagementExternalMySqlDatabaseConnectorResource()) + tfresource.RegisterResource("oci_database_management_external_my_sql_database_external_mysql_databases_management", DatabaseManagementExternalMySqlDatabaseExternalMysqlDatabasesManagementResource()) tfresource.RegisterResource("oci_database_management_externalcontainerdatabase_external_container_dbm_features_management", DatabaseManagementExternalcontainerdatabaseExternalContainerDbmFeaturesManagementResource()) tfresource.RegisterResource("oci_database_management_externalnoncontainerdatabase_external_non_container_dbm_features_management", DatabaseManagementExternalnoncontainerdatabaseExternalNonContainerDbmFeaturesManagementResource()) tfresource.RegisterResource("oci_database_management_externalpluggabledatabase_external_pluggable_dbm_features_management", DatabaseManagementExternalpluggabledatabaseExternalPluggableDbmFeaturesManagementResource()) diff --git a/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go b/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go index 1cfed0d5157..fd3a27c1f17 100644 --- a/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go +++ b/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go @@ -142,6 +142,7 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { "LOAD_BALANCER", "NETWORK_LOAD_BALANCER", "OBJECT_STORAGE_BUCKET", + "OKE_CLUSTER", "VOLUME_GROUP", }, true), }, @@ -181,6 +182,80 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { }, }, }, + "backup_config": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "backup_schedule": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "image_replication_vault_secret_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "max_number_of_backups_retained": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "namespaces": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "replicate_images": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "backup_location": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "bucket": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "namespace": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + "object": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "block_volume_operations": { Type: schema.TypeList, Optional: true, @@ -392,17 +467,157 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { Optional: true, Computed: true, }, + "jump_host_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "load_balancer_mappings": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "destination_load_balancer_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "source_load_balancer_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "managed_node_pool_configs": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "maximum": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "minimum": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "namespace": { Type: schema.TypeString, Optional: true, Computed: true, }, + "network_load_balancer_mappings": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "destination_network_load_balancer_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "source_network_load_balancer_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "password_vault_secret_id": { Type: schema.TypeString, Optional: true, Computed: true, Sensitive: true, }, + "peer_cluster_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vault_mappings": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "destination_vault_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "source_vault_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "virtual_node_pool_configs": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "maximum": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "minimum": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "vnic_mapping": { Type: schema.TypeList, Optional: true, @@ -1697,6 +1912,121 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateDrProtectionG details.MemberId = &tmp } baseObject = details + case strings.ToLower("OKE_CLUSTER"): + details := oci_disaster_recovery.UpdateDrProtectionGroupMemberOkeClusterDetails{} + if backupConfig, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "backup_config")); ok { + if tmpList := backupConfig.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "backup_config"), 0) + tmp, err := s.mapToUpdateOkeClusterBackupConfigDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert backup_config, encountered error: %v", err) + } + details.BackupConfig = &tmp + } + } + if backupLocation, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "backup_location")); ok { + if tmpList := backupLocation.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "backup_location"), 0) + tmp, err := s.mapToUpdateOkeBackupLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert backup_location, encountered error: %v", err) + } + details.BackupLocation = &tmp + } + } + if jumpHostId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "jump_host_id")); ok { + tmp := jumpHostId.(string) + details.JumpHostId = &tmp + } + if loadBalancerMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "load_balancer_mappings")); ok { + interfaces := loadBalancerMappings.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterLoadBalancerMappingDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "load_balancer_mappings"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterLoadBalancerMappingDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "load_balancer_mappings")) { + details.LoadBalancerMappings = tmp + } + } + if managedNodePoolConfigs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "managed_node_pool_configs")); ok { + interfaces := managedNodePoolConfigs.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterManagedNodePoolConfigurationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "managed_node_pool_configs"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterManagedNodePoolConfigurationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "managed_node_pool_configs")) { + details.ManagedNodePoolConfigs = tmp + } + } + if networkLoadBalancerMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "network_load_balancer_mappings")); ok { + interfaces := networkLoadBalancerMappings.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterNetworkLoadBalancerMappingDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "network_load_balancer_mappings"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterNetworkLoadBalancerMappingDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "network_load_balancer_mappings")) { + details.NetworkLoadBalancerMappings = tmp + } + } + if peerClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "peer_cluster_id")); ok { + tmp := peerClusterId.(string) + details.PeerClusterId = &tmp + } + if vaultMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_mappings")); ok { + interfaces := vaultMappings.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterVaultMappingDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "vault_mappings"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterVaultMappingDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "vault_mappings")) { + details.VaultMappings = tmp + } + } + if virtualNodePoolConfigs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "virtual_node_pool_configs")); ok { + interfaces := virtualNodePoolConfigs.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterVirtualNodePoolConfigurationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "virtual_node_pool_configs"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterVirtualNodePoolConfigurationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "virtual_node_pool_configs")) { + details.VirtualNodePoolConfigs = tmp + } + } + if memberId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "member_id")); ok { + tmp := memberId.(string) + details.MemberId = &tmp + } + baseObject = details case strings.ToLower("VOLUME_GROUP"): details := oci_disaster_recovery.CreateDrProtectionGroupMemberVolumeGroupDetails{} if memberId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "member_id")); ok { @@ -2035,21 +2365,140 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateDrProtectionG } } baseObject = details - case strings.ToLower("VOLUME_GROUP"): - details := oci_disaster_recovery.UpdateDrProtectionGroupMemberVolumeGroupDetails{} - if memberId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "member_id")); ok { - tmp := memberId.(string) + case strings.ToLower("OKE_CLUSTER"): + details := oci_disaster_recovery.UpdateDrProtectionGroupMemberOkeClusterDetails{} + if backupConfig, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "backup_config")); ok { + if tmpList := backupConfig.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "backup_config"), 0) + tmp, err := s.mapToUpdateOkeClusterBackupConfigDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert backup_config, encountered error: %v", err) + } + details.BackupConfig = &tmp + } + } + if backupLocation, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "backup_location")); ok { + if tmpList := backupLocation.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "backup_location"), 0) + tmp, err := s.mapToUpdateOkeBackupLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert backup_location, encountered error: %v", err) + } + details.BackupLocation = &tmp + } + } + if jumpHostId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "jump_host_id")); ok { + tmp := jumpHostId.(string) if tmp != "" { - details.MemberId = &tmp + details.JumpHostId = &tmp } } - baseObject = details - default: - return nil, fmt.Errorf("unknown member_type '%v' was specified", memberType) - } - return baseObject, nil -} - + if loadBalancerMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "load_balancer_mappings")); ok { + interfaces := loadBalancerMappings.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterLoadBalancerMappingDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "load_balancer_mappings"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterLoadBalancerMappingDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "load_balancer_mappings")) { + details.LoadBalancerMappings = tmp + } + } + if managedNodePoolConfigs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "managed_node_pool_configs")); ok { + interfaces := managedNodePoolConfigs.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterManagedNodePoolConfigurationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "managed_node_pool_configs"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterManagedNodePoolConfigurationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "managed_node_pool_configs")) { + details.ManagedNodePoolConfigs = tmp + } + } + if networkLoadBalancerMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "network_load_balancer_mappings")); ok { + interfaces := networkLoadBalancerMappings.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterNetworkLoadBalancerMappingDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "network_load_balancer_mappings"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterNetworkLoadBalancerMappingDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "network_load_balancer_mappings")) { + details.NetworkLoadBalancerMappings = tmp + } + } + if peerClusterId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "peer_cluster_id")); ok { + tmp := peerClusterId.(string) + if tmp != "" { + details.PeerClusterId = &tmp + } + } + if vaultMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_mappings")); ok { + interfaces := vaultMappings.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterVaultMappingDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "vault_mappings"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterVaultMappingDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "vault_mappings")) { + details.VaultMappings = tmp + } + } + if virtualNodePoolConfigs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "virtual_node_pool_configs")); ok { + interfaces := virtualNodePoolConfigs.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateOkeClusterVirtualNodePoolConfigurationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "virtual_node_pool_configs"), stateDataIndex) + converted, err := s.mapToUpdateOkeClusterVirtualNodePoolConfigurationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "virtual_node_pool_configs")) { + details.VirtualNodePoolConfigs = tmp + } + } + if memberId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "member_id")); ok { + tmp := memberId.(string) + if tmp != "" { + details.MemberId = &tmp + } + } + baseObject = details + case strings.ToLower("VOLUME_GROUP"): + details := oci_disaster_recovery.UpdateDrProtectionGroupMemberVolumeGroupDetails{} + if memberId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "member_id")); ok { + tmp := memberId.(string) + details.MemberId = &tmp + } + baseObject = details + default: + return nil, fmt.Errorf("unknown member_type '%v' was specified", memberType) + } + return baseObject, nil +} + func DrProtectionGroupMemberToMap(obj oci_disaster_recovery.DrProtectionGroupMember) map[string]interface{} { result := map[string]interface{}{} switch v := (obj).(type) { @@ -2226,6 +2675,60 @@ func DrProtectionGroupMemberToMap(obj oci_disaster_recovery.DrProtectionGroupMem if v.MemberId != nil { result["member_id"] = string(*v.MemberId) } + + case oci_disaster_recovery.DrProtectionGroupMemberOkeCluster: + result["member_type"] = "OKE_CLUSTER" + + if v.BackupConfig != nil { + result["backup_config"] = []interface{}{OkeClusterBackupConfigToMap(v.BackupConfig)} + } + + if v.BackupLocation != nil { + result["backup_location"] = []interface{}{OkeBackupLocationToMap(v.BackupLocation)} + } + + if v.JumpHostId != nil { + result["jump_host_id"] = string(*v.JumpHostId) + } + + loadBalancerMappings := []interface{}{} + for _, item := range v.LoadBalancerMappings { + loadBalancerMappings = append(loadBalancerMappings, OkeClusterLoadBalancerMappingToMap(item)) + } + result["load_balancer_mappings"] = loadBalancerMappings + + managedNodePoolConfigs := []interface{}{} + for _, item := range v.ManagedNodePoolConfigs { + managedNodePoolConfigs = append(managedNodePoolConfigs, OkeClusterManagedNodePoolConfigurationToMap(item)) + } + result["managed_node_pool_configs"] = managedNodePoolConfigs + + networkLoadBalancerMappings := []interface{}{} + for _, item := range v.NetworkLoadBalancerMappings { + networkLoadBalancerMappings = append(networkLoadBalancerMappings, OkeClusterNetworkLoadBalancerMappingToMap(item)) + } + result["network_load_balancer_mappings"] = networkLoadBalancerMappings + + if v.PeerClusterId != nil { + result["peer_cluster_id"] = string(*v.PeerClusterId) + } + + vaultMappings := []interface{}{} + for _, item := range v.VaultMappings { + vaultMappings = append(vaultMappings, OkeClusterVaultMappingToMap(item)) + } + result["vault_mappings"] = vaultMappings + + virtualNodePoolConfigs := []interface{}{} + for _, item := range v.VirtualNodePoolConfigs { + virtualNodePoolConfigs = append(virtualNodePoolConfigs, OkeClusterVirtualNodePoolConfigurationToMap(item)) + } + result["virtual_node_pool_configs"] = virtualNodePoolConfigs + + if v.MemberId != nil { + result["member_id"] = string(*v.MemberId) + } + case oci_disaster_recovery.DrProtectionGroupMemberVolumeGroup: result["member_type"] = "VOLUME_GROUP" @@ -2354,6 +2857,420 @@ func ObjectStorageLogLocationToMap(obj *oci_disaster_recovery.ObjectStorageLogLo return result } +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateOkeBackupLocationDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateOkeBackupLocationDetails, error) { + result := oci_disaster_recovery.CreateOkeBackupLocationDetails{} + + if bucket, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "bucket")); ok { + tmp := bucket.(string) + result.Bucket = &tmp + } + + if namespace, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "namespace")); ok { + tmp := namespace.(string) + result.Namespace = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateOkeBackupLocationDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateOkeBackupLocationDetails, error) { + result := oci_disaster_recovery.UpdateOkeBackupLocationDetails{} + + if bucket, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "bucket")); ok { + tmp := bucket.(string) + result.Bucket = &tmp + } + + if namespace, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "namespace")); ok { + tmp := namespace.(string) + result.Namespace = &tmp + } + + return result, nil +} + +func OkeBackupLocationToMap(obj *oci_disaster_recovery.OkeBackupLocation) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Bucket != nil { + result["bucket"] = string(*obj.Bucket) + } + + if obj.Namespace != nil { + result["namespace"] = string(*obj.Namespace) + } + + if obj.Object != nil { + result["object"] = string(*obj.Object) + } + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateOkeClusterBackupConfigDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateOkeClusterBackupConfigDetails, error) { + result := oci_disaster_recovery.CreateOkeClusterBackupConfigDetails{} + + if backupSchedule, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "backup_schedule")); ok { + tmp := backupSchedule.(string) + result.BackupSchedule = &tmp + } + + if imageReplicationVaultSecretId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "image_replication_vault_secret_id")); ok { + tmp := imageReplicationVaultSecretId.(string) + if tmp != "" { + result.ImageReplicationVaultSecretId = &tmp + } + } + + if maxNumberOfBackupsRetained, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "max_number_of_backups_retained")); ok { + tmp := maxNumberOfBackupsRetained.(int) + if tmp != 0 { + result.MaxNumberOfBackupsRetained = &tmp + } + } + + if namespaces, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "namespaces")); ok { + interfaces := namespaces.([]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, "namespaces")) { + result.Namespaces = tmp + } + } + + if replicateImages, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "replicate_images")); ok { + result.ReplicateImages = oci_disaster_recovery.OkeClusterImageReplicationEnum(replicateImages.(string)) + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateOkeClusterBackupConfigDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateOkeClusterBackupConfigDetails, error) { + result := oci_disaster_recovery.UpdateOkeClusterBackupConfigDetails{} + + if backupSchedule, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "backup_schedule")); ok { + tmp := backupSchedule.(string) + result.BackupSchedule = &tmp + } + + if imageReplicationVaultSecretId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "image_replication_vault_secret_id")); ok { + tmp := imageReplicationVaultSecretId.(string) + if tmp != "" { + result.ImageReplicationVaultSecretId = &tmp + } + } + + if maxNumberOfBackupsRetained, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "max_number_of_backups_retained")); ok { + tmp := maxNumberOfBackupsRetained.(int) + if tmp != 0 { + result.MaxNumberOfBackupsRetained = &tmp + } + } + + if namespaces, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "namespaces")); ok { + interfaces := namespaces.([]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, "namespaces")) { + result.Namespaces = tmp + } + } + + if replicateImages, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "replicate_images")); ok { + result.ReplicateImages = oci_disaster_recovery.OkeClusterImageReplicationEnum(replicateImages.(string)) + } + + return result, nil +} + +func OkeClusterBackupConfigToMap(obj *oci_disaster_recovery.OkeClusterBackupConfig) map[string]interface{} { + result := map[string]interface{}{} + + if obj.BackupSchedule != nil { + result["backup_schedule"] = string(*obj.BackupSchedule) + } + + if obj.ImageReplicationVaultSecretId != nil { + result["image_replication_vault_secret_id"] = string(*obj.ImageReplicationVaultSecretId) + } + + if obj.MaxNumberOfBackupsRetained != nil { + result["max_number_of_backups_retained"] = int(*obj.MaxNumberOfBackupsRetained) + } + + result["namespaces"] = obj.Namespaces + + result["replicate_images"] = string(obj.ReplicateImages) + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateOkeClusterLoadBalancerMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateOkeClusterLoadBalancerMappingDetails, error) { + result := oci_disaster_recovery.CreateOkeClusterLoadBalancerMappingDetails{} + + if destinationLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_load_balancer_id")); ok { + tmp := destinationLoadBalancerId.(string) + result.DestinationLoadBalancerId = &tmp + } + + if sourceLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_load_balancer_id")); ok { + tmp := sourceLoadBalancerId.(string) + result.SourceLoadBalancerId = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateOkeClusterLoadBalancerMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateOkeClusterLoadBalancerMappingDetails, error) { + result := oci_disaster_recovery.UpdateOkeClusterLoadBalancerMappingDetails{} + + if destinationLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_load_balancer_id")); ok { + tmp := destinationLoadBalancerId.(string) + result.DestinationLoadBalancerId = &tmp + } + + if sourceLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_load_balancer_id")); ok { + tmp := sourceLoadBalancerId.(string) + result.SourceLoadBalancerId = &tmp + } + + return result, nil +} + +func OkeClusterLoadBalancerMappingToMap(obj oci_disaster_recovery.OkeClusterLoadBalancerMapping) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationLoadBalancerId != nil { + result["destination_load_balancer_id"] = string(*obj.DestinationLoadBalancerId) + } + + if obj.SourceLoadBalancerId != nil { + result["source_load_balancer_id"] = string(*obj.SourceLoadBalancerId) + } + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateOkeClusterManagedNodePoolConfigurationDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateOkeClusterManagedNodePoolConfigurationDetails, error) { + result := oci_disaster_recovery.CreateOkeClusterManagedNodePoolConfigurationDetails{} + + if id, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "id")); ok { + tmp := id.(string) + result.Id = &tmp + } + + if maximum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "maximum")); ok { + tmp := maximum.(int) + result.Maximum = &tmp + } + + if minimum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "minimum")); ok { + tmp := minimum.(int) + result.Minimum = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateOkeClusterManagedNodePoolConfigurationDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateOkeClusterManagedNodePoolConfigurationDetails, error) { + result := oci_disaster_recovery.UpdateOkeClusterManagedNodePoolConfigurationDetails{} + + if id, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "id")); ok { + tmp := id.(string) + result.Id = &tmp + } + + if maximum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "maximum")); ok { + tmp := maximum.(int) + result.Maximum = &tmp + } + + if minimum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "minimum")); ok { + tmp := minimum.(int) + result.Minimum = &tmp + } + + return result, nil +} + +func OkeClusterManagedNodePoolConfigurationToMap(obj oci_disaster_recovery.OkeClusterManagedNodePoolConfiguration) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Id != nil { + result["id"] = string(*obj.Id) + } + + if obj.Maximum != nil { + result["maximum"] = int(*obj.Maximum) + } + + if obj.Minimum != nil { + result["minimum"] = int(*obj.Minimum) + } + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateOkeClusterNetworkLoadBalancerMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateOkeClusterNetworkLoadBalancerMappingDetails, error) { + result := oci_disaster_recovery.CreateOkeClusterNetworkLoadBalancerMappingDetails{} + + if destinationNetworkLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_network_load_balancer_id")); ok { + tmp := destinationNetworkLoadBalancerId.(string) + result.DestinationNetworkLoadBalancerId = &tmp + } + + if sourceNetworkLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_network_load_balancer_id")); ok { + tmp := sourceNetworkLoadBalancerId.(string) + result.SourceNetworkLoadBalancerId = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateOkeClusterNetworkLoadBalancerMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateOkeClusterNetworkLoadBalancerMappingDetails, error) { + result := oci_disaster_recovery.UpdateOkeClusterNetworkLoadBalancerMappingDetails{} + + if destinationNetworkLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_network_load_balancer_id")); ok { + tmp := destinationNetworkLoadBalancerId.(string) + result.DestinationNetworkLoadBalancerId = &tmp + } + + if sourceNetworkLoadBalancerId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_network_load_balancer_id")); ok { + tmp := sourceNetworkLoadBalancerId.(string) + result.SourceNetworkLoadBalancerId = &tmp + } + + return result, nil +} + +func OkeClusterNetworkLoadBalancerMappingToMap(obj oci_disaster_recovery.OkeClusterNetworkLoadBalancerMapping) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationNetworkLoadBalancerId != nil { + result["destination_network_load_balancer_id"] = string(*obj.DestinationNetworkLoadBalancerId) + } + + if obj.SourceNetworkLoadBalancerId != nil { + result["source_network_load_balancer_id"] = string(*obj.SourceNetworkLoadBalancerId) + } + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateOkeClusterVaultMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateOkeClusterVaultMappingDetails, error) { + result := oci_disaster_recovery.CreateOkeClusterVaultMappingDetails{} + + if destinationVaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_vault_id")); ok { + tmp := destinationVaultId.(string) + result.DestinationVaultId = &tmp + } + + if sourceVaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_vault_id")); ok { + tmp := sourceVaultId.(string) + result.SourceVaultId = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateOkeClusterVaultMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateOkeClusterVaultMappingDetails, error) { + result := oci_disaster_recovery.UpdateOkeClusterVaultMappingDetails{} + + if destinationVaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_vault_id")); ok { + tmp := destinationVaultId.(string) + result.DestinationVaultId = &tmp + } + + if sourceVaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_vault_id")); ok { + tmp := sourceVaultId.(string) + result.SourceVaultId = &tmp + } + + return result, nil +} + +func OkeClusterVaultMappingToMap(obj oci_disaster_recovery.OkeClusterVaultMapping) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationVaultId != nil { + result["destination_vault_id"] = string(*obj.DestinationVaultId) + } + + if obj.SourceVaultId != nil { + result["source_vault_id"] = string(*obj.SourceVaultId) + } + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateOkeClusterVirtualNodePoolConfigurationDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateOkeClusterVirtualNodePoolConfigurationDetails, error) { + result := oci_disaster_recovery.CreateOkeClusterVirtualNodePoolConfigurationDetails{} + + if id, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "id")); ok { + tmp := id.(string) + result.Id = &tmp + } + + if maximum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "maximum")); ok { + tmp := maximum.(int) + result.Maximum = &tmp + } + + if minimum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "minimum")); ok { + tmp := minimum.(int) + result.Minimum = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateOkeClusterVirtualNodePoolConfigurationDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateOkeClusterVirtualNodePoolConfigurationDetails, error) { + result := oci_disaster_recovery.UpdateOkeClusterVirtualNodePoolConfigurationDetails{} + + if id, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "id")); ok { + tmp := id.(string) + result.Id = &tmp + } + + if maximum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "maximum")); ok { + tmp := maximum.(int) + result.Maximum = &tmp + } + + if minimum, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "minimum")); ok { + tmp := minimum.(int) + result.Minimum = &tmp + } + + return result, nil +} + +func OkeClusterVirtualNodePoolConfigurationToMap(obj oci_disaster_recovery.OkeClusterVirtualNodePoolConfiguration) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Id != nil { + result["id"] = string(*obj.Id) + } + + if obj.Maximum != nil { + result["maximum"] = int(*obj.Maximum) + } + + if obj.Minimum != nil { + result["minimum"] = int(*obj.Minimum) + } + + return result +} + func DrProtectionGroupSummaryToMap(obj oci_disaster_recovery.DrProtectionGroupSummary) map[string]interface{} { result := map[string]interface{}{} @@ -2657,6 +3574,120 @@ func UpdateFileSystemUnmountDetailsToMap(obj *oci_disaster_recovery.UpdateFileSy return result } +func UpdateOkeBackupLocationDetailsToMap(obj *oci_disaster_recovery.UpdateOkeBackupLocationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Bucket != nil { + result["bucket"] = string(*obj.Bucket) + } + + if obj.Namespace != nil { + result["namespace"] = string(*obj.Namespace) + } + + return result +} + +func UpdateOkeClusterBackupConfigDetailsToMap(obj *oci_disaster_recovery.UpdateOkeClusterBackupConfigDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.BackupSchedule != nil { + result["backup_schedule"] = string(*obj.BackupSchedule) + } + + if obj.ImageReplicationVaultSecretId != nil { + result["image_replication_vault_secret_id"] = string(*obj.ImageReplicationVaultSecretId) + } + + if obj.MaxNumberOfBackupsRetained != nil { + result["max_number_of_backups_retained"] = int(*obj.MaxNumberOfBackupsRetained) + } + + result["namespaces"] = obj.Namespaces + + result["replicate_images"] = string(obj.ReplicateImages) + + return result +} + +func UpdateOkeClusterLoadBalancerMappingDetailsToMap(obj oci_disaster_recovery.UpdateOkeClusterLoadBalancerMappingDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationLoadBalancerId != nil { + result["destination_load_balancer_id"] = string(*obj.DestinationLoadBalancerId) + } + + if obj.SourceLoadBalancerId != nil { + result["source_load_balancer_id"] = string(*obj.SourceLoadBalancerId) + } + + return result +} + +func UpdateOkeClusterManagedNodePoolConfigurationDetailsToMap(obj oci_disaster_recovery.UpdateOkeClusterManagedNodePoolConfigurationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Id != nil { + result["id"] = string(*obj.Id) + } + + if obj.Maximum != nil { + result["maximum"] = int(*obj.Maximum) + } + + if obj.Minimum != nil { + result["minimum"] = int(*obj.Minimum) + } + + return result +} + +func UpdateOkeClusterNetworkLoadBalancerMappingDetailsToMap(obj oci_disaster_recovery.UpdateOkeClusterNetworkLoadBalancerMappingDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationNetworkLoadBalancerId != nil { + result["destination_network_load_balancer_id"] = string(*obj.DestinationNetworkLoadBalancerId) + } + + if obj.SourceNetworkLoadBalancerId != nil { + result["source_network_load_balancer_id"] = string(*obj.SourceNetworkLoadBalancerId) + } + + return result +} + +func UpdateOkeClusterVaultMappingDetailsToMap(obj oci_disaster_recovery.UpdateOkeClusterVaultMappingDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationVaultId != nil { + result["destination_vault_id"] = string(*obj.DestinationVaultId) + } + + if obj.SourceVaultId != nil { + result["source_vault_id"] = string(*obj.SourceVaultId) + } + + return result +} + +func UpdateOkeClusterVirtualNodePoolConfigurationDetailsToMap(obj oci_disaster_recovery.UpdateOkeClusterVirtualNodePoolConfigurationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Id != nil { + result["id"] = string(*obj.Id) + } + + if obj.Maximum != nil { + result["maximum"] = int(*obj.Maximum) + } + + if obj.Minimum != nil { + result["minimum"] = int(*obj.Minimum) + } + + return result +} + /*func (s *DisasterRecoveryDrProtectionGroupResourceCrud) populateTopLevelPolymorphicUpdateDrProtectionGroupRequest(request *oci_disaster_recovery.UpdateDrProtectionGroupRequest) error { //discriminator typeRaw, ok := s.D.GetOkExists("type") diff --git a/internal/service/opsi/opsi_database_insight_data_source.go b/internal/service/opsi/opsi_database_insight_data_source.go index 19b580bfcc4..ed5d03e15d8 100644 --- a/internal/service/opsi/opsi_database_insight_data_source.go +++ b/internal/service/opsi/opsi_database_insight_data_source.go @@ -220,6 +220,70 @@ 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.ExternalMysqlDatabaseInsight: + s.D.Set("entity_source", "EXTERNAL_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.CompartmentId != nil { + s.D.Set("compartment_id", *v.CompartmentId) + } + + if v.DatabaseConnectionStatusDetails != nil { + s.D.Set("database_connection_status_details", *v.DatabaseConnectionStatusDetails) + } + + if v.DatabaseId != nil { + s.D.Set("database_id", *v.DatabaseId) + } + + 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 444c77eabd5..2135f8831c7 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", + "EXTERNAL_MYSQL_DATABASE_SYSTEM", "MACS_MANAGED_CLOUD_DATABASE", "MDS_MYSQL_DATABASE_SYSTEM", "PE_COMANAGED_DATABASE", @@ -203,6 +204,11 @@ func OpsiDatabaseInsightResource() *schema.Resource { }, }, }, + "database_connector_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "database_id": { Type: schema.TypeString, Optional: true, @@ -640,6 +646,7 @@ func (s *OpsiDatabaseInsightResourceCrud) Get() error { } func (s *OpsiDatabaseInsightResourceCrud) Update() error { + if compartment, ok := s.D.GetOkExists("compartment_id"); ok && s.D.HasChange("compartment_id") { log.Printf("[DEBUG] Running Update moviing compartment (%s)", compartment) oldRaw, newRaw := s.D.GetChange("compartment_id") @@ -695,6 +702,19 @@ func (s *OpsiDatabaseInsightResourceCrud) Update() error { } } + // For EXTERNAL_MYSQL_DATABASE_SYSTEM + if strings.ToLower(entitySource) == strings.ToLower("EXTERNAL_MYSQL_DATABASE_SYSTEM") { + updateRequest := oci_opsi.ChangeExternalMysqlDatabaseInsightConnectionRequest{} + hasChanged := s.populateChangeExternalMysqlDatabaseInsightConnectionRequest(&updateRequest) + log.Printf("Running Update after change EXTERNAL_MYSQL_DATABASE_SYSTEM (%t)", hasChanged) + if hasChanged { + err := s.ChangeExternalMysqlDatabaseInsightConnection(&updateRequest) + if err != nil { + return err + } + } + } + request := oci_opsi.UpdateDatabaseInsightRequest{} err := s.populateTopLevelPolymorphicUpdateDatabaseInsightRequest(&request) if err != nil { @@ -978,7 +998,66 @@ func (s *OpsiDatabaseInsightResourceCrud) SetData() error { if v.TimeUpdated != nil { s.D.Set("time_updated", v.TimeUpdated.String()) } + case oci_opsi.ExternalMysqlDatabaseInsight: + s.D.Set("entity_source", "EXTERNAL_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.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()) + } case oci_opsi.MacsManagedCloudDatabaseInsight: s.D.Set("entity_source", "MACS_MANAGED_CLOUD_DATABASE") @@ -1745,6 +1824,83 @@ func DatabaseInsightSummaryToMap(obj oci_opsi.DatabaseInsightSummary) map[string result["database_resource_type"] = string(*v.DatabaseResourceType) } + case oci_opsi.ExternalMysqlDatabaseInsightSummary: + result["entity_source"] = "EXTERNAL_MYSQL_DATABASE_SYSTEM" + + if v.Id != nil { + result["id"] = string(*v.Id) + } + + if v.DatabaseId != nil { + result["database_id"] = string(*v.DatabaseId) + } + + if v.CompartmentId != nil { + result["compartment_id"] = string(*v.CompartmentId) + } + + if v.AgentId != nil { + result["agent_id"] = string(*v.AgentId) + } + + if v.DatabaseConnectorId != nil { + result["database_connector_id"] = string(*v.DatabaseConnectorId) + } + + 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) + } + + 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) } @@ -1930,6 +2086,18 @@ func (s *OpsiDatabaseInsightResourceCrud) populateChangeMacsCloudConnectionDetai return hasChanged } +func (s *OpsiDatabaseInsightResourceCrud) populateChangeExternalMysqlDatabaseInsightConnectionRequest(updateRequest *oci_opsi.ChangeExternalMysqlDatabaseInsightConnectionRequest) bool { + hasChanged := false + if databaseConnectorId, ok := s.D.GetOkExists("database_connector_id"); ok { + if s.D.HasChange("database_connector_id") { + hasChanged = true + } + tmp := databaseConnectorId.(string) + updateRequest.DatabaseConnectorId = &tmp + } + return hasChanged +} + func (s *OpsiDatabaseInsightResourceCrud) populateTopLevelPolymorphicCreateDatabaseInsightRequest(request *oci_opsi.CreateDatabaseInsightRequest) error { //discriminator entitySourceRaw, ok := s.D.GetOkExists("entity_source") @@ -2032,6 +2200,31 @@ func (s *OpsiDatabaseInsightResourceCrud) populateTopLevelPolymorphicCreateDatab details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } request.CreateDatabaseInsightDetails = details + case strings.ToLower("EXTERNAL_MYSQL_DATABASE_SYSTEM"): + details := oci_opsi.CreateExternalMysqlDatabaseInsightDetails{} + if databaseConnectorId, ok := s.D.GetOkExists("database_connector_id"); ok { + tmp := databaseConnectorId.(string) + details.DatabaseConnectorId = &tmp + } + 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("MACS_MANAGED_CLOUD_DATABASE"): log.Printf("[DEBUG] populate MACS Cloud database .... ") details := oci_opsi.CreateMacsManagedCloudDatabaseInsightDetails{} @@ -2239,6 +2432,21 @@ func (s *OpsiDatabaseInsightResourceCrud) populateTopLevelPolymorphicUpdateDatab details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } request.UpdateDatabaseInsightDetails = details + case strings.ToLower("EXTERNAL_MYSQL_DATABASE_SYSTEM"): + details := oci_opsi.UpdateExternalMysqlDatabaseInsightDetails{} + 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 case strings.ToLower("PE_COMANAGED_DATABASE"): details := oci_opsi.UpdatePeComanagedDatabaseInsightDetails{} tmp := s.D.Id() @@ -2431,6 +2639,13 @@ func (s *OpsiDatabaseInsightResourceCrud) populateTopLevelPolymorphicEnableDatab case strings.ToLower("MDS_MYSQL_DATABASE_SYSTEM"): details := oci_opsi.EnableMdsMySqlDatabaseInsightDetails{} request.EnableDatabaseInsightDetails = details + case strings.ToLower("EXTERNAL_MYSQL_DATABASE_SYSTEM"): + details := oci_opsi.EnableExternalMysqlDatabaseInsightDetails{} + if databaseConnectorId, ok := s.D.GetOkExists("database_connector_id"); ok { + tmp := databaseConnectorId.(string) + details.DatabaseConnectorId = &tmp + } + request.EnableDatabaseInsightDetails = details default: return fmt.Errorf("unknown entity_source '%v' was specified", entitySource) } @@ -2472,6 +2687,22 @@ func (s *OpsiDatabaseInsightResourceCrud) updatePecomanagedDetails(updateRequest return s.getDatabaseInsightFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "opsi"), oci_opsi.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) } +func (s *OpsiDatabaseInsightResourceCrud) ChangeExternalMysqlDatabaseInsightConnection(updateRequest *oci_opsi.ChangeExternalMysqlDatabaseInsightConnectionRequest) error { + idTmp := s.D.Id() + updateRequest.DatabaseInsightId = &idTmp + + updateRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "opsi") + + response, err := s.Client.ChangeExternalMysqlDatabaseInsightConnection(context.Background(), *updateRequest) + log.Printf("Running Update after change EXTERNAL_MYSQL_DATABASE_SYSTEM") + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getDatabaseInsightFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "opsi"), oci_opsi.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} + func (s *OpsiDatabaseInsightResourceCrud) updateConnectionDetails(changeConnectionRequest *oci_opsi.ChangeMacsManagedCloudDatabaseInsightConnectionRequest) error { idTmp := s.D.Id() changeConnectionRequest.DatabaseInsightId = &idTmp diff --git a/internal/service/opsi/opsi_news_report_data_source.go b/internal/service/opsi/opsi_news_report_data_source.go index 49965bd3623..ef91ea5450a 100644 --- a/internal/service/opsi/opsi_news_report_data_source.go +++ b/internal/service/opsi/opsi_news_report_data_source.go @@ -98,6 +98,8 @@ func (s *OpsiNewsReportDataSourceCrud) SetData() error { s.D.Set("locale", s.Res.Locale) + s.D.Set("match_rule", s.Res.MatchRule) + if s.Res.Name != nil { s.D.Set("name", *s.Res.Name) } @@ -116,6 +118,8 @@ func (s *OpsiNewsReportDataSourceCrud) SetData() error { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } + s.D.Set("tag_filters", s.Res.TagFilters) + if s.Res.TimeCreated != nil { s.D.Set("time_created", s.Res.TimeCreated.String()) } diff --git a/internal/service/opsi/opsi_news_report_resource.go b/internal/service/opsi/opsi_news_report_resource.go index 409e3b5c427..31f99b3b3c0 100644 --- a/internal/service/opsi/opsi_news_report_resource.go +++ b/internal/service/opsi/opsi_news_report_resource.go @@ -43,6 +43,14 @@ func OpsiNewsReportResource() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ // Optional + "actionable_insights_resources": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, "capacity_planning_resources": { Type: schema.TypeList, Optional: true, @@ -149,11 +157,24 @@ func OpsiNewsReportResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "match_rule": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "status": { Type: schema.TypeString, Optional: true, Computed: true, }, + "tag_filters": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, // Computed "lifecycle_details": { @@ -299,6 +320,10 @@ func (s *OpsiNewsReportResourceCrud) Create() error { request.Locale = oci_opsi.NewsLocaleEnum(locale.(string)) } + if matchRule, ok := s.D.GetOkExists("match_rule"); ok { + request.MatchRule = oci_opsi.MatchRuleEnum(matchRule.(string)) + } + if name, ok := s.D.GetOkExists("name"); ok { tmp := name.(string) request.Name = &tmp @@ -317,6 +342,19 @@ func (s *OpsiNewsReportResourceCrud) Create() error { request.Status = oci_opsi.ResourceStatusEnum(status.(string)) } + if tagFilters, ok := s.D.GetOkExists("tag_filters"); ok { + interfaces := tagFilters.([]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("tag_filters") { + request.TagFilters = tmp + } + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "opsi") response, err := s.Client.CreateNewsReport(context.Background(), request) @@ -513,6 +551,10 @@ func (s *OpsiNewsReportResourceCrud) Update() error { request.Locale = oci_opsi.NewsLocaleEnum(locale.(string)) } + if matchRule, ok := s.D.GetOkExists("match_rule"); ok { + request.MatchRule = oci_opsi.MatchRuleEnum(matchRule.(string)) + } + if name, ok := s.D.GetOkExists("name"); ok { tmp := name.(string) request.Name = &tmp @@ -534,6 +576,19 @@ func (s *OpsiNewsReportResourceCrud) Update() error { request.Status = oci_opsi.ResourceStatusEnum(status.(string)) } + if tagFilters, ok := s.D.GetOkExists("tag_filters"); ok { + interfaces := tagFilters.([]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("tag_filters") { + request.TagFilters = tmp + } + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "opsi") response, err := s.Client.UpdateNewsReport(context.Background(), request) @@ -598,6 +653,8 @@ func (s *OpsiNewsReportResourceCrud) SetData() error { s.D.Set("locale", s.Res.Locale) + s.D.Set("match_rule", s.Res.MatchRule) + if s.Res.Name != nil { s.D.Set("name", *s.Res.Name) } @@ -616,6 +673,8 @@ func (s *OpsiNewsReportResourceCrud) SetData() error { s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags)) } + s.D.Set("tag_filters", s.Res.TagFilters) + if s.Res.TimeCreated != nil { s.D.Set("time_created", s.Res.TimeCreated.String()) } @@ -630,6 +689,19 @@ func (s *OpsiNewsReportResourceCrud) SetData() error { func (s *OpsiNewsReportResourceCrud) mapToNewsContentTypes(fieldKeyFormat string) (oci_opsi.NewsContentTypes, error) { result := oci_opsi.NewsContentTypes{} + if actionableInsightsResources, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "actionable_insights_resources")); ok { + interfaces := actionableInsightsResources.([]interface{}) + tmp := make([]oci_opsi.ActionableInsightsContentTypesResourceEnum, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = oci_opsi.ActionableInsightsContentTypesResourceEnum(interfaces[i].(string)) + } + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "actionable_insights_resources")) { + result.ActionableInsightsResources = tmp + } + } + if capacityPlanningResources, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "capacity_planning_resources")); ok { strArray := capacityPlanningResources.([]interface{}) tmp := make([]oci_opsi.NewsContentTypesResourceEnum, len(strArray)) @@ -779,7 +851,7 @@ func NewsContentTypesToMap(obj *oci_opsi.NewsContentTypes) map[string]interface{ } result["sql_insights_top_sql_by_insights_resources"] = sqlInsightsTopSqlByInsightsResources return result - } else { + } else if obj.SqlInsightsTopSqlResources != nil && len(obj.SqlInsightsTopSqlResources) != 0 { sqlInsightsTopSqlResources := []interface{}{} for _, item := range obj.SqlInsightsTopSqlResources { @@ -787,6 +859,14 @@ func NewsContentTypesToMap(obj *oci_opsi.NewsContentTypes) map[string]interface{ } result["sql_insights_top_sql_resources"] = sqlInsightsTopSqlResources return result + } else { + actionableInsightsResources := []interface{}{} + + for _, item := range obj.ActionableInsightsResources { + actionableInsightsResources = append(actionableInsightsResources, NewsActionableInsightsContentTypesResourceToMap(item)) + } + result["actionable_insights_resources"] = obj.ActionableInsightsResources + return result } } @@ -820,6 +900,96 @@ func NewsSqlInsightsContentTypesResourceToMap(obj oci_opsi.NewsSqlInsightsConten return result } +func NewsActionableInsightsContentTypesResourceToMap(obj oci_opsi.ActionableInsightsContentTypesResourceEnum) string { + var result string + + switch obj { + case oci_opsi.ActionableInsightsContentTypesResourceNewHighs: + result = "NEW_HIGHS" + case oci_opsi.ActionableInsightsContentTypesResourceBigChanges: + result = "BIG_CHANGES" + case oci_opsi.ActionableInsightsContentTypesResourceCurrentInventory: + result = "CURRENT_INVENTORY" + case oci_opsi.ActionableInsightsContentTypesResourceInventoryChanges: + result = "INVENTORY_CHANGES" + case oci_opsi.ActionableInsightsContentTypesResourceFleetStatistics: + result = "FLEET_STATISTICS" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisSummaryDbCount: + result = "FLEET_ANALYSIS_SUMMARY_DB_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisSummarySqlAnalyzedCount: + result = "FLEET_ANALYSIS_SUMMARY_SQL_ANALYZED_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisSummaryNewSqlCount: + result = "FLEET_ANALYSIS_SUMMARY_NEW_SQL_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisSummaryBusiestDb: + result = "FLEET_ANALYSIS_SUMMARY_BUSIEST_DB" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlCount: + result = "FLEET_ANALYSIS_DEGRADING_SQL_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlByDb: + result = "FLEET_ANALYSIS_DEGRADING_SQL_BY_DB" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlBySqlId: + result = "FLEET_ANALYSIS_DEGRADING_SQL_BY_SQL_ID" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesCount: + result = "FLEET_ANALYSIS_PLAN_CHANGES_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesDbMostChanges: + result = "FLEET_ANALYSIS_PLAN_CHANGES_DB_MOST_CHANGES" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdImproved: + result = "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_IMPROVED" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdDegraded: + result = "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_DEGRADED" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsCount: + result = "FLEET_ANALYSIS_INVALIDATION_STORMS_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsHighest: + result = "FLEET_ANALYSIS_INVALIDATION_STORMS_HIGHEST" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesCount: + result = "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesByDb: + result = "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_DB" + case oci_opsi.ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesBySql: + result = "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_SQL" + case oci_opsi.ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDbCount: + result = "PERFORMANCE_DEGRADATION_SUMMARY_DB_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlAnalyzedCount: + result = "PERFORMANCE_DEGRADATION_SUMMARY_SQL_ANALYZED_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlPerformanceTrendsCount: + result = "PERFORMANCE_DEGRADATION_SUMMARY_SQL_PERFORMANCE_TRENDS_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDegradedSqlCount: + result = "PERFORMANCE_DEGRADATION_SUMMARY_DEGRADED_SQL_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePerformanceDegradationSummaryImprovedSqlCount: + result = "PERFORMANCE_DEGRADATION_SUMMARY_IMPROVED_SQL_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePerformanceDegradationDbDegradedCount: + result = "PERFORMANCE_DEGRADATION_DB_DEGRADED_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePerformanceDegradationSqlDegradedTable: + result = "PERFORMANCE_DEGRADATION_SQL_DEGRADED_TABLE" + case oci_opsi.ActionableInsightsContentTypesResourcePlanChangesSummaryDbCount: + result = "PLAN_CHANGES_SUMMARY_DB_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePlanChangesSummarySqlAnalyzedCount: + result = "PLAN_CHANGES_SUMMARY_SQL_ANALYZED_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePlanChangesSummaryPlanChangesCount: + result = "PLAN_CHANGES_SUMMARY_PLAN_CHANGES_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePlanChangesSummaryImprovementsCount: + result = "PLAN_CHANGES_SUMMARY_IMPROVEMENTS_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePlanChangesSummaryDegradationCount: + result = "PLAN_CHANGES_SUMMARY_DEGRADATION_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourcePlanChangesTopPlanChangesTable: + result = "PLAN_CHANGES_TOP_PLAN_CHANGES_TABLE" + case oci_opsi.ActionableInsightsContentTypesResourceTopDbSummaryDbCount: + result = "TOP_DB_SUMMARY_DB_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceTopDbSummarySqlAnalyzedCount: + result = "TOP_DB_SUMMARY_SQL_ANALYZED_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceTopDbSummaryBusiestDb: + result = "TOP_DB_SUMMARY_BUSIEST_DB" + case oci_opsi.ActionableInsightsContentTypesResourceTopTable: + result = "TOP_TABLE" + case oci_opsi.ActionableInsightsContentTypesResourceCollectionDelayCount: + result = "COLLECTION_DELAY_COUNT" + case oci_opsi.ActionableInsightsContentTypesResourceCollectionDelayPreviousWeekCount: + result = "COLLECTION_DELAY_PREVIOUS_WEEK_COUNT" + default: + fmt.Println("ERROR, Nota a valid resource") + } + return result +} + func NewsReportSummaryToMap(obj oci_opsi.NewsReportSummary) map[string]interface{} { result := map[string]interface{}{} @@ -857,6 +1027,8 @@ func NewsReportSummaryToMap(obj oci_opsi.NewsReportSummary) map[string]interface result["locale"] = string(obj.Locale) + result["match_rule"] = string(obj.MatchRule) + if obj.Name != nil { result["name"] = string(*obj.Name) } @@ -875,6 +1047,8 @@ func NewsReportSummaryToMap(obj oci_opsi.NewsReportSummary) map[string]interface result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags) } + result["tag_filters"] = obj.TagFilters + if obj.TimeCreated != nil { result["time_created"] = obj.TimeCreated.String() } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source.go new file mode 100644 index 00000000000..98d91488ce4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source.go @@ -0,0 +1,192 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsAssetSource AWS asset source. Used for discovery of EC2 instances and EBS volumes registered for the AWS account. +type AwsAssetSource struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + // The detailed state of the asset source. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The time when the asset source was created in the RFC3339 format. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The point in time that the asset source was last updated in the RFC3339 format. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"true" json:"discoveryCredentials"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of an attached discovery schedule. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` + + // The current state of the asset source. + LifecycleState AssetSourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m AwsAssetSource) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsAssetSource) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m AwsAssetSource) GetDisplayName() *string { + return m.DisplayName +} + +// GetEnvironmentId returns EnvironmentId +func (m AwsAssetSource) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m AwsAssetSource) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m AwsAssetSource) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m AwsAssetSource) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetLifecycleState returns LifecycleState +func (m AwsAssetSource) GetLifecycleState() AssetSourceLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m AwsAssetSource) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeCreated returns TimeCreated +func (m AwsAssetSource) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsAssetSource) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m AwsAssetSource) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsAssetSource) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsAssetSource) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsAssetSource) 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 AwsAssetSource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetSourceLifecycleStateEnum(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(GetAssetSourceLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsAssetSource) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsAssetSource AwsAssetSource + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAwsAssetSource + }{ + "AWS", + (MarshalTypeAwsAssetSource)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source_summary.go new file mode 100644 index 00000000000..21c58c1f12c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source_summary.go @@ -0,0 +1,171 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsAssetSourceSummary Summary of an AWS asset source provided in the list. +type AwsAssetSourceSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The detailed state of the asset source. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // The time when the asset source was created in RFC3339 format. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The point in time that the asset source was last updated in RFC3339 format. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The current state of the asset source. + LifecycleState AssetSourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m AwsAssetSourceSummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsAssetSourceSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m AwsAssetSourceSummary) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetDisplayName returns DisplayName +func (m AwsAssetSourceSummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetLifecycleState returns LifecycleState +func (m AwsAssetSourceSummary) GetLifecycleState() AssetSourceLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m AwsAssetSourceSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetInventoryId returns InventoryId +func (m AwsAssetSourceSummary) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m AwsAssetSourceSummary) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetTimeCreated returns TimeCreated +func (m AwsAssetSourceSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsAssetSourceSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m AwsAssetSourceSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsAssetSourceSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsAssetSourceSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsAssetSourceSummary) 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 AwsAssetSourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetSourceLifecycleStateEnum(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(GetAssetSourceLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsAssetSourceSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsAssetSourceSummary AwsAssetSourceSummary + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAwsAssetSourceSummary + }{ + "AWS", + (MarshalTypeAwsAssetSourceSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset.go new file mode 100644 index 00000000000..4efe59b9ff1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset.go @@ -0,0 +1,166 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsAsset AWS EBS type of asset. +type AwsEbsAsset struct { + + // Inventory ID to which an asset belongs to. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // Asset OCID that is immutable on creation. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment to which an asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key that the asset belongs to. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + // The time when the asset was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time when the asset was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The current state of the asset. + LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetDisplayName returns DisplayName +func (m AwsEbsAsset) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m AwsEbsAsset) GetInventoryId() *string { + return m.InventoryId +} + +// GetId returns Id +func (m AwsEbsAsset) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsEbsAsset) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m AwsEbsAsset) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m AwsEbsAsset) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetTimeCreated returns TimeCreated +func (m AwsEbsAsset) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsEbsAsset) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetAssetSourceIds returns AssetSourceIds +func (m AwsEbsAsset) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetLifecycleState returns LifecycleState +func (m AwsEbsAsset) GetLifecycleState() AssetLifecycleStateEnum { + return m.LifecycleState +} + +// GetFreeformTags returns FreeformTags +func (m AwsEbsAsset) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsEbsAsset) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsEbsAsset) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsEbsAsset) 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 AwsEbsAsset) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetLifecycleStateEnum(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(GetAssetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsEbsAsset) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsEbsAsset AwsEbsAsset + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeAwsEbsAsset + }{ + "AWS_EBS", + (MarshalTypeAwsEbsAsset)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset_details.go new file mode 100644 index 00000000000..ecc3c6802bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset_details.go @@ -0,0 +1,37 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsAssetDetails AWS EBS type of asset. +type AwsEbsAssetDetails struct { + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` +} + +func (m AwsEbsAssetDetails) 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 AwsEbsAssetDetails) 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/cloudbridge/aws_ebs_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_properties.go new file mode 100644 index 00000000000..27dbc700948 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_properties.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsProperties AWS EBS volume related properties. +type AwsEbsProperties struct { + + // Indicates whether the volume is encrypted. + IsEncrypted *bool `mandatory:"true" json:"isEncrypted"` + + // Indicates whether Amazon EBS Multi-Attach is enabled. + IsMultiAttachEnabled *bool `mandatory:"true" json:"isMultiAttachEnabled"` + + // The size of the volume, in GiBs. + SizeInGiBs *int `mandatory:"true" json:"sizeInGiBs"` + + // The ID of the volume. + VolumeKey *string `mandatory:"true" json:"volumeKey"` + + // The volume type. + VolumeType *string `mandatory:"true" json:"volumeType"` + + // Information about the volume attachments. + Attachments []VolumeAttachment `mandatory:"false" json:"attachments"` + + // The Availability Zone for the volume. + AvailabilityZone *string `mandatory:"false" json:"availabilityZone"` + + // The number of I/O operations per second. + Iops *int `mandatory:"false" json:"iops"` + + // The volume state. + Status *string `mandatory:"false" json:"status"` + + // Any tags assigned to the volume. + Tags []Tag `mandatory:"false" json:"tags"` + + // The throughput that the volume supports, in MiB/s. + Throughput *int `mandatory:"false" json:"throughput"` +} + +func (m AwsEbsProperties) 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 AwsEbsProperties) 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/cloudbridge/aws_ec2_asset.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset.go new file mode 100644 index 00000000000..086caff6b9d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset.go @@ -0,0 +1,174 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2Asset AWS EC2 type of asset. +type AwsEc2Asset struct { + + // Inventory ID to which an asset belongs to. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // Asset OCID that is immutable on creation. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment to which an asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key that the asset belongs to. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + // The time when the asset was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time when the asset was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` + + // The current state of the asset. + LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetDisplayName returns DisplayName +func (m AwsEc2Asset) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m AwsEc2Asset) GetInventoryId() *string { + return m.InventoryId +} + +// GetId returns Id +func (m AwsEc2Asset) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsEc2Asset) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m AwsEc2Asset) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m AwsEc2Asset) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetTimeCreated returns TimeCreated +func (m AwsEc2Asset) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsEc2Asset) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetAssetSourceIds returns AssetSourceIds +func (m AwsEc2Asset) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetLifecycleState returns LifecycleState +func (m AwsEc2Asset) GetLifecycleState() AssetLifecycleStateEnum { + return m.LifecycleState +} + +// GetFreeformTags returns FreeformTags +func (m AwsEc2Asset) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsEc2Asset) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsEc2Asset) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsEc2Asset) 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 AwsEc2Asset) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetLifecycleStateEnum(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(GetAssetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsEc2Asset) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsEc2Asset AwsEc2Asset + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeAwsEc2Asset + }{ + "AWS_EC2", + (MarshalTypeAwsEc2Asset)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset_details.go new file mode 100644 index 00000000000..4e5a1e9a88f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset_details.go @@ -0,0 +1,45 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2AssetDetails AWS EC2 type of asset. +type AwsEc2AssetDetails struct { + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +func (m AwsEc2AssetDetails) 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 AwsEc2AssetDetails) 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/cloudbridge/aws_ec2_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_properties.go new file mode 100644 index 00000000000..58bd09aec0b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_properties.go @@ -0,0 +1,133 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2Properties AWS virtual machine related properties. +type AwsEc2Properties struct { + + // The architecture of the image. + Architecture *string `mandatory:"true" json:"architecture"` + + // The ID of the instance. + InstanceKey *string `mandatory:"true" json:"instanceKey"` + + // The instance type. + InstanceType *string `mandatory:"true" json:"instanceType"` + + // The device name of the root device volume. + RootDeviceName *string `mandatory:"true" json:"rootDeviceName"` + + State *InstanceState `mandatory:"true" json:"state"` + + // The boot mode of the instance. + BootMode *string `mandatory:"false" json:"bootMode"` + + // The ID of the Capacity Reservation. + CapacityReservationKey *string `mandatory:"false" json:"capacityReservationKey"` + + // Indicates if the elastic inference accelerators attached to an instance + AreElasticInferenceAcceleratorsPresent *bool `mandatory:"false" json:"areElasticInferenceAcceleratorsPresent"` + + // Indicates whether the instance is enabled for AWS Nitro Enclaves. + IsEnclaveOptions *bool `mandatory:"false" json:"isEnclaveOptions"` + + // Indicates whether the instance is enabled for hibernation. + IsHibernationOptions *bool `mandatory:"false" json:"isHibernationOptions"` + + // The ID of the AMI used to launch the instance. + ImageKey *string `mandatory:"false" json:"imageKey"` + + // Indicates whether this is a Spot Instance or a Scheduled Instance. + InstanceLifecycle *string `mandatory:"false" json:"instanceLifecycle"` + + // The public IPv4 address, or the Carrier IP address assigned to the instance. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The IPv6 address assigned to the instance. + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` + + // The kernel associated with this instance, if applicable. + KernelKey *string `mandatory:"false" json:"kernelKey"` + + // The time the instance was launched. + TimeLaunch *common.SDKTime `mandatory:"false" json:"timeLaunch"` + + // The license configurations for the instance. + Licenses []string `mandatory:"false" json:"licenses"` + + // Provides information on the recovery and maintenance options of your instance. + MaintenanceOptions *string `mandatory:"false" json:"maintenanceOptions"` + + // The monitoring for the instance. + Monitoring *string `mandatory:"false" json:"monitoring"` + + // The network interfaces for the instance. + NetworkInterfaces []InstanceNetworkInterface `mandatory:"false" json:"networkInterfaces"` + + Placement *Placement `mandatory:"false" json:"placement"` + + // (IPv4 only) The private DNS hostname name assigned to the instance. + PrivateDnsName *string `mandatory:"false" json:"privateDnsName"` + + // The private IPv4 address assigned to the instance. + PrivateIpAddress *string `mandatory:"false" json:"privateIpAddress"` + + // The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. + RootDeviceType *string `mandatory:"false" json:"rootDeviceType"` + + // The security groups for the instance. + SecurityGroups []GroupIdentifier `mandatory:"false" json:"securityGroups"` + + // Indicates whether source/destination checking is enabled. + IsSourceDestCheck *bool `mandatory:"false" json:"isSourceDestCheck"` + + // If the request is a Spot Instance request, this value will be true. + IsSpotInstance *bool `mandatory:"false" json:"isSpotInstance"` + + // Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. + SriovNetSupport *string `mandatory:"false" json:"sriovNetSupport"` + + // EC2-VPC The ID of the subnet in which the instance is running. + SubnetKey *string `mandatory:"false" json:"subnetKey"` + + // Any tags assigned to the instance. + Tags []Tag `mandatory:"false" json:"tags"` + + // If the instance is configured for NitroTPM support, the value is v2.0. + TpmSupport *string `mandatory:"false" json:"tpmSupport"` + + // The virtualization type of the instance. + VirtualizationType *string `mandatory:"false" json:"virtualizationType"` + + // EC2-VPC The ID of the VPC in which the instance is running. + VpcKey *string `mandatory:"false" json:"vpcKey"` +} + +func (m AwsEc2Properties) 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 AwsEc2Properties) 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/cloudbridge/create_aws_asset_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_asset_source_details.go new file mode 100644 index 00000000000..2a458729d5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_asset_source_details.go @@ -0,0 +1,150 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsAssetSourceDetails AWS asset source creation request. +type CreateAwsAssetSourceDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"true" json:"discoveryCredentials"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. The name is generated by the service if it is not + // explicitly provided. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be attached to the created asset. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsAssetSourceDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsAssetSourceDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m CreateAwsAssetSourceDetails) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m CreateAwsAssetSourceDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m CreateAwsAssetSourceDetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m CreateAwsAssetSourceDetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsAssetSourceDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsAssetSourceDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m CreateAwsAssetSourceDetails) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m CreateAwsAssetSourceDetails) 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 CreateAwsAssetSourceDetails) 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 CreateAwsAssetSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsAssetSourceDetails CreateAwsAssetSourceDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeCreateAwsAssetSourceDetails + }{ + "AWS", + (MarshalTypeCreateAwsAssetSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ebs_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ebs_asset_details.go new file mode 100644 index 00000000000..e770cc81d3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ebs_asset_details.go @@ -0,0 +1,121 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsEbsAssetDetails Create AWS EBS type of asset. +type CreateAwsEbsAssetDetails struct { + + // Inventory ID to which an asset belongs. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID of the compartment that the asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key to which the asset belongs. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsEbsAssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m CreateAwsEbsAssetDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsEbsAssetDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m CreateAwsEbsAssetDetails) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m CreateAwsEbsAssetDetails) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetAssetSourceIds returns AssetSourceIds +func (m CreateAwsEbsAssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsEbsAssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsEbsAssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateAwsEbsAssetDetails) 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 CreateAwsEbsAssetDetails) 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 CreateAwsEbsAssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsEbsAssetDetails CreateAwsEbsAssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeCreateAwsEbsAssetDetails + }{ + "AWS_EBS", + (MarshalTypeCreateAwsEbsAssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ec2_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ec2_asset_details.go new file mode 100644 index 00000000000..5f037132ca3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ec2_asset_details.go @@ -0,0 +1,129 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsEc2AssetDetails Create AWS EC2 VM type of asset. +type CreateAwsEc2AssetDetails struct { + + // Inventory ID to which an asset belongs. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID of the compartment that the asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key to which the asset belongs. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsEc2AssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m CreateAwsEc2AssetDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsEc2AssetDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m CreateAwsEc2AssetDetails) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m CreateAwsEc2AssetDetails) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetAssetSourceIds returns AssetSourceIds +func (m CreateAwsEc2AssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsEc2AssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsEc2AssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateAwsEc2AssetDetails) 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 CreateAwsEc2AssetDetails) 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 CreateAwsEc2AssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsEc2AssetDetails CreateAwsEc2AssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeCreateAwsEc2AssetDetails + }{ + "AWS_EC2", + (MarshalTypeCreateAwsEc2AssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/group_identifier.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/group_identifier.go new file mode 100644 index 00000000000..5f6cdc984d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/group_identifier.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GroupIdentifier Describes a security group. +type GroupIdentifier struct { + + // The ID of the security group. + GroupKey *string `mandatory:"false" json:"groupKey"` + + // The name of the security group. + GroupName *string `mandatory:"false" json:"groupName"` +} + +func (m GroupIdentifier) 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 GroupIdentifier) 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/cloudbridge/instance_network_interface.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface.go new file mode 100644 index 00000000000..d081eae117d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface.go @@ -0,0 +1,78 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterface Describes a network interface. +type InstanceNetworkInterface struct { + Association *InstanceNetworkInterfaceAssociation `mandatory:"false" json:"association"` + + Attachment *InstanceNetworkInterfaceAttachment `mandatory:"false" json:"attachment"` + + // The description. + Description *string `mandatory:"false" json:"description"` + + // The security groups. + SecurityGroups []GroupIdentifier `mandatory:"false" json:"securityGroups"` + + // The type of network interface. + InterfaceType *string `mandatory:"false" json:"interfaceType"` + + // The IPv4 delegated prefixes that are assigned to the network interface. + Ipv4Prefixes []string `mandatory:"false" json:"ipv4Prefixes"` + + // The IPv6 addresses associated with the network interface. + Ipv6Addresses []string `mandatory:"false" json:"ipv6Addresses"` + + // The IPv6 delegated prefixes that are assigned to the network interface. + Ipv6Prefixes []string `mandatory:"false" json:"ipv6Prefixes"` + + // The MAC address. + MacAddress *string `mandatory:"false" json:"macAddress"` + + // The ID of the network interface. + NetworkInterfaceKey *string `mandatory:"false" json:"networkInterfaceKey"` + + // The ID of the AWS account that created the network interface. + OwnerKey *string `mandatory:"false" json:"ownerKey"` + + // The private IPv4 addresses associated with the network interface. + PrivateIpAddresses []InstancePrivateIpAddress `mandatory:"false" json:"privateIpAddresses"` + + // Indicates whether source/destination checking is enabled. + IsSourceDestCheck *bool `mandatory:"false" json:"isSourceDestCheck"` + + // The status of the network interface. + Status *string `mandatory:"false" json:"status"` + + // The ID of the subnet. + SubnetKey *string `mandatory:"false" json:"subnetKey"` +} + +func (m InstanceNetworkInterface) 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 InstanceNetworkInterface) 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/cloudbridge/instance_network_interface_association.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_association.go new file mode 100644 index 00000000000..5914e83db82 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_association.go @@ -0,0 +1,51 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterfaceAssociation Describes association information for an Elastic IP address (IPv4). +type InstanceNetworkInterfaceAssociation struct { + + // The carrier IP address associated with the network interface. + CarrierIp *string `mandatory:"false" json:"carrierIp"` + + // The customer-owned IP address associated with the network interface. + CustomerOwnedIp *string `mandatory:"false" json:"customerOwnedIp"` + + // The ID of the owner of the Elastic IP address. + IpOwnerKey *string `mandatory:"false" json:"ipOwnerKey"` + + // The public DNS name. + PublicDnsName *string `mandatory:"false" json:"publicDnsName"` + + // The public IP address or Elastic IP address bound to the network interface. + PublicIp *string `mandatory:"false" json:"publicIp"` +} + +func (m InstanceNetworkInterfaceAssociation) 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 InstanceNetworkInterfaceAssociation) 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/cloudbridge/instance_network_interface_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_attachment.go new file mode 100644 index 00000000000..c96dd9e2233 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_attachment.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterfaceAttachment Describes a network interface attachment. +type InstanceNetworkInterfaceAttachment struct { + + // The ID of the network interface attachment. + AttachmentKey *string `mandatory:"false" json:"attachmentKey"` + + // The timestamp when the attachment initiated. + TimeAttach *common.SDKTime `mandatory:"false" json:"timeAttach"` + + // Indicates whether the network interface is deleted when the instance is terminated. + IsDeleteOnTermination *bool `mandatory:"false" json:"isDeleteOnTermination"` + + // The index of the device on the instance for the network interface attachment. + DeviceIndex *int `mandatory:"false" json:"deviceIndex"` + + // The index of the network card. + NetworkCardIndex *int `mandatory:"false" json:"networkCardIndex"` + + // The attachment state. + Status *string `mandatory:"false" json:"status"` +} + +func (m InstanceNetworkInterfaceAttachment) 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 InstanceNetworkInterfaceAttachment) 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/cloudbridge/instance_private_ip_address.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_private_ip_address.go new file mode 100644 index 00000000000..d7bca8576ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_private_ip_address.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePrivateIpAddress Describes a private IPv4 address. +type InstancePrivateIpAddress struct { + Association *InstanceNetworkInterfaceAssociation `mandatory:"false" json:"association"` + + // Indicates whether this IPv4 address is the primary private IP address of the network interface. + IsPrimary *bool `mandatory:"false" json:"isPrimary"` + + // The private IPv4 DNS name. + PrivateDnsName *string `mandatory:"false" json:"privateDnsName"` + + // The private IPv4 address of the network interface. + PrivateIpAddress *string `mandatory:"false" json:"privateIpAddress"` +} + +func (m InstancePrivateIpAddress) 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 InstancePrivateIpAddress) 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/cloudbridge/instance_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_state.go new file mode 100644 index 00000000000..3686f7f462e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_state.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceState Describes the current state of an instance. +type InstanceState struct { + + // The state of the instance as a 16-bit unsigned integer. + Code *int `mandatory:"false" json:"code"` + + // The current state of the instance. + Name *string `mandatory:"false" json:"name"` +} + +func (m InstanceState) 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 InstanceState) 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/cloudbridge/list_supported_cloud_regions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/list_supported_cloud_regions_request_response.go new file mode 100644 index 00000000000..7ba5887aaa9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/list_supported_cloud_regions_request_response.go @@ -0,0 +1,241 @@ +// 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 cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSupportedCloudRegionsRequest wrapper for the ListSupportedCloudRegions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cloudbridge/ListSupportedCloudRegions.go.html to see an example of how to use ListSupportedCloudRegionsRequest. +type ListSupportedCloudRegionsRequest struct { + + // The asset source type. + AssetSourceType ListSupportedCloudRegionsAssetSourceTypeEnum `mandatory:"false" contributesTo:"query" name:"assetSourceType" omitEmpty:"true"` + + // A filter to return only supported cloud regions which name contains given nameContains as sub-string. + NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"` + + // The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + SortBy ListSupportedCloudRegionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListSupportedCloudRegionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" 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 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 ListSupportedCloudRegionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSupportedCloudRegionsRequest) 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 ListSupportedCloudRegionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSupportedCloudRegionsRequest) 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 ListSupportedCloudRegionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSupportedCloudRegionsAssetSourceTypeEnum(string(request.AssetSourceType)); !ok && request.AssetSourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssetSourceType: %s. Supported values are: %s.", request.AssetSourceType, strings.Join(GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListSupportedCloudRegionsSortByEnum(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(GetListSupportedCloudRegionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListSupportedCloudRegionsSortOrderEnum(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(GetListSupportedCloudRegionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSupportedCloudRegionsResponse wrapper for the ListSupportedCloudRegions operation +type ListSupportedCloudRegionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SupportedCloudRegionCollection instances + SupportedCloudRegionCollection `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 ListSupportedCloudRegionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSupportedCloudRegionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSupportedCloudRegionsAssetSourceTypeEnum Enum with underlying type: string +type ListSupportedCloudRegionsAssetSourceTypeEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsAssetSourceTypeEnum +const ( + ListSupportedCloudRegionsAssetSourceTypeVmware ListSupportedCloudRegionsAssetSourceTypeEnum = "VMWARE" + ListSupportedCloudRegionsAssetSourceTypeAws ListSupportedCloudRegionsAssetSourceTypeEnum = "AWS" +) + +var mappingListSupportedCloudRegionsAssetSourceTypeEnum = map[string]ListSupportedCloudRegionsAssetSourceTypeEnum{ + "VMWARE": ListSupportedCloudRegionsAssetSourceTypeVmware, + "AWS": ListSupportedCloudRegionsAssetSourceTypeAws, +} + +var mappingListSupportedCloudRegionsAssetSourceTypeEnumLowerCase = map[string]ListSupportedCloudRegionsAssetSourceTypeEnum{ + "vmware": ListSupportedCloudRegionsAssetSourceTypeVmware, + "aws": ListSupportedCloudRegionsAssetSourceTypeAws, +} + +// GetListSupportedCloudRegionsAssetSourceTypeEnumValues Enumerates the set of values for ListSupportedCloudRegionsAssetSourceTypeEnum +func GetListSupportedCloudRegionsAssetSourceTypeEnumValues() []ListSupportedCloudRegionsAssetSourceTypeEnum { + values := make([]ListSupportedCloudRegionsAssetSourceTypeEnum, 0) + for _, v := range mappingListSupportedCloudRegionsAssetSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsAssetSourceTypeEnum +func GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues() []string { + return []string{ + "VMWARE", + "AWS", + } +} + +// GetMappingListSupportedCloudRegionsAssetSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsAssetSourceTypeEnum(val string) (ListSupportedCloudRegionsAssetSourceTypeEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsAssetSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSupportedCloudRegionsSortByEnum Enum with underlying type: string +type ListSupportedCloudRegionsSortByEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsSortByEnum +const ( + ListSupportedCloudRegionsSortByName ListSupportedCloudRegionsSortByEnum = "name" +) + +var mappingListSupportedCloudRegionsSortByEnum = map[string]ListSupportedCloudRegionsSortByEnum{ + "name": ListSupportedCloudRegionsSortByName, +} + +var mappingListSupportedCloudRegionsSortByEnumLowerCase = map[string]ListSupportedCloudRegionsSortByEnum{ + "name": ListSupportedCloudRegionsSortByName, +} + +// GetListSupportedCloudRegionsSortByEnumValues Enumerates the set of values for ListSupportedCloudRegionsSortByEnum +func GetListSupportedCloudRegionsSortByEnumValues() []ListSupportedCloudRegionsSortByEnum { + values := make([]ListSupportedCloudRegionsSortByEnum, 0) + for _, v := range mappingListSupportedCloudRegionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsSortByEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsSortByEnum +func GetListSupportedCloudRegionsSortByEnumStringValues() []string { + return []string{ + "name", + } +} + +// GetMappingListSupportedCloudRegionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsSortByEnum(val string) (ListSupportedCloudRegionsSortByEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSupportedCloudRegionsSortOrderEnum Enum with underlying type: string +type ListSupportedCloudRegionsSortOrderEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsSortOrderEnum +const ( + ListSupportedCloudRegionsSortOrderAsc ListSupportedCloudRegionsSortOrderEnum = "ASC" + ListSupportedCloudRegionsSortOrderDesc ListSupportedCloudRegionsSortOrderEnum = "DESC" +) + +var mappingListSupportedCloudRegionsSortOrderEnum = map[string]ListSupportedCloudRegionsSortOrderEnum{ + "ASC": ListSupportedCloudRegionsSortOrderAsc, + "DESC": ListSupportedCloudRegionsSortOrderDesc, +} + +var mappingListSupportedCloudRegionsSortOrderEnumLowerCase = map[string]ListSupportedCloudRegionsSortOrderEnum{ + "asc": ListSupportedCloudRegionsSortOrderAsc, + "desc": ListSupportedCloudRegionsSortOrderDesc, +} + +// GetListSupportedCloudRegionsSortOrderEnumValues Enumerates the set of values for ListSupportedCloudRegionsSortOrderEnum +func GetListSupportedCloudRegionsSortOrderEnumValues() []ListSupportedCloudRegionsSortOrderEnum { + values := make([]ListSupportedCloudRegionsSortOrderEnum, 0) + for _, v := range mappingListSupportedCloudRegionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsSortOrderEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsSortOrderEnum +func GetListSupportedCloudRegionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSupportedCloudRegionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsSortOrderEnum(val string) (ListSupportedCloudRegionsSortOrderEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/monthly_cost_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/monthly_cost_summary.go new file mode 100644 index 00000000000..f8862adc49f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/monthly_cost_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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MonthlyCostSummary Cost information for monthly maintenance. +type MonthlyCostSummary struct { + + // Monthly costs for maintenance of this asset. + Amount *float64 `mandatory:"true" json:"amount"` + + // Currency code + CurrencyCode *string `mandatory:"true" json:"currencyCode"` +} + +func (m MonthlyCostSummary) 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 MonthlyCostSummary) 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/cloudbridge/placement.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/placement.go new file mode 100644 index 00000000000..a0eeeef07b2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/placement.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Placement Describes the placement of an instance. +type Placement struct { + + // The affinity setting for the instance on the Dedicated Host. + Affinity *string `mandatory:"false" json:"affinity"` + + // The Availability Zone of the instance. + AvailabilityZone *string `mandatory:"false" json:"availabilityZone"` + + // The name of the placement group the instance is in. + GroupName *string `mandatory:"false" json:"groupName"` + + // The ID of the Dedicated Host on which the instance resides. + HostKey *string `mandatory:"false" json:"hostKey"` + + // The ARN of the host resource group in which to launch the instances. + HostResourceGroupArn *string `mandatory:"false" json:"hostResourceGroupArn"` + + // The number of the partition that the instance is in. + PartitionNumber *int `mandatory:"false" json:"partitionNumber"` + + // Reserved for future use. + SpreadDomain *string `mandatory:"false" json:"spreadDomain"` + + // The tenancy of the instance (if the instance is running in a VPC). + Tenancy *string `mandatory:"false" json:"tenancy"` +} + +func (m Placement) 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 Placement) 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/cloudbridge/supported_cloud_region_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_collection.go new file mode 100644 index 00000000000..5ad3ca78a99 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SupportedCloudRegionCollection Collection of supported cloud regions. +type SupportedCloudRegionCollection struct { + + // List of supported cloud regions. + Items []SupportedCloudRegionSummary `mandatory:"true" json:"items"` +} + +func (m SupportedCloudRegionCollection) 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 SupportedCloudRegionCollection) 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/cloudbridge/supported_cloud_region_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_lifecycle_state.go new file mode 100644 index 00000000000..95577bbb378 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_lifecycle_state.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "strings" +) + +// SupportedCloudRegionLifecycleStateEnum Enum with underlying type: string +type SupportedCloudRegionLifecycleStateEnum string + +// Set of constants representing the allowable values for SupportedCloudRegionLifecycleStateEnum +const ( + SupportedCloudRegionLifecycleStateActive SupportedCloudRegionLifecycleStateEnum = "ACTIVE" + SupportedCloudRegionLifecycleStateInactive SupportedCloudRegionLifecycleStateEnum = "INACTIVE" +) + +var mappingSupportedCloudRegionLifecycleStateEnum = map[string]SupportedCloudRegionLifecycleStateEnum{ + "ACTIVE": SupportedCloudRegionLifecycleStateActive, + "INACTIVE": SupportedCloudRegionLifecycleStateInactive, +} + +var mappingSupportedCloudRegionLifecycleStateEnumLowerCase = map[string]SupportedCloudRegionLifecycleStateEnum{ + "active": SupportedCloudRegionLifecycleStateActive, + "inactive": SupportedCloudRegionLifecycleStateInactive, +} + +// GetSupportedCloudRegionLifecycleStateEnumValues Enumerates the set of values for SupportedCloudRegionLifecycleStateEnum +func GetSupportedCloudRegionLifecycleStateEnumValues() []SupportedCloudRegionLifecycleStateEnum { + values := make([]SupportedCloudRegionLifecycleStateEnum, 0) + for _, v := range mappingSupportedCloudRegionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSupportedCloudRegionLifecycleStateEnumStringValues Enumerates the set of values in String for SupportedCloudRegionLifecycleStateEnum +func GetSupportedCloudRegionLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingSupportedCloudRegionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSupportedCloudRegionLifecycleStateEnum(val string) (SupportedCloudRegionLifecycleStateEnum, bool) { + enum, ok := mappingSupportedCloudRegionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_summary.go new file mode 100644 index 00000000000..1bcfb726af7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_summary.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SupportedCloudRegionSummary Summary of the supported cloud region. +type SupportedCloudRegionSummary struct { + + // The asset source type associated with the supported cloud region. + AssetSourceType AssetSourceTypeEnum `mandatory:"true" json:"assetSourceType"` + + // The supported cloud region name. + Name *string `mandatory:"true" json:"name"` + + // The current state of the supported cloud region. + LifecycleState SupportedCloudRegionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` +} + +func (m SupportedCloudRegionSummary) 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 SupportedCloudRegionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAssetSourceTypeEnum(string(m.AssetSourceType)); !ok && m.AssetSourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssetSourceType: %s. Supported values are: %s.", m.AssetSourceType, strings.Join(GetAssetSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSupportedCloudRegionLifecycleStateEnum(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(GetSupportedCloudRegionLifecycleStateEnumStringValues(), ","))) + } + + 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/cloudbridge/tag.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/tag.go new file mode 100644 index 00000000000..334284f8ada --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/tag.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Tag Describes a tag. +type Tag struct { + + // The key of the tag. + Key *string `mandatory:"false" json:"key"` + + // The value of the tag. + Value *string `mandatory:"false" json:"value"` +} + +func (m Tag) 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 Tag) 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/cloudbridge/update_aws_asset_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_asset_source_details.go new file mode 100644 index 00000000000..3e483f60a94 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_asset_source_details.go @@ -0,0 +1,119 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsAssetSourceDetails AWS asset source update request. +type UpdateAwsAssetSourceDetails struct { + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"false" json:"assetsCompartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"false" json:"discoveryCredentials"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsAssetSourceDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m UpdateAwsAssetSourceDetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m UpdateAwsAssetSourceDetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsAssetSourceDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsAssetSourceDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m UpdateAwsAssetSourceDetails) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m UpdateAwsAssetSourceDetails) 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 UpdateAwsAssetSourceDetails) 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 UpdateAwsAssetSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsAssetSourceDetails UpdateAwsAssetSourceDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeUpdateAwsAssetSourceDetails + }{ + "AWS", + (MarshalTypeUpdateAwsAssetSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ebs_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ebs_asset_details.go new file mode 100644 index 00000000000..e00f831c633 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ebs_asset_details.go @@ -0,0 +1,89 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsEbsAssetDetails The information of AWS EBS asset to be updated. +type UpdateAwsEbsAssetDetails struct { + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + AwsEbs *AwsEbsProperties `mandatory:"false" json:"awsEbs"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsEbsAssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetSourceIds returns AssetSourceIds +func (m UpdateAwsEbsAssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsEbsAssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsEbsAssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateAwsEbsAssetDetails) 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 UpdateAwsEbsAssetDetails) 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 UpdateAwsEbsAssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsEbsAssetDetails UpdateAwsEbsAssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeUpdateAwsEbsAssetDetails + }{ + "AWS_EBS", + (MarshalTypeUpdateAwsEbsAssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ec2_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ec2_asset_details.go new file mode 100644 index 00000000000..749f1dae786 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ec2_asset_details.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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsEc2AssetDetails The information of AWS VM asset to be updated. +type UpdateAwsEc2AssetDetails struct { + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. 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"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // 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"` + + Compute *ComputeProperties `mandatory:"false" json:"compute"` + + Vm *VmProperties `mandatory:"false" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"false" json:"awsEc2"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsEc2AssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetSourceIds returns AssetSourceIds +func (m UpdateAwsEc2AssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsEc2AssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsEc2AssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateAwsEc2AssetDetails) 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 UpdateAwsEc2AssetDetails) 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 UpdateAwsEc2AssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsEc2AssetDetails UpdateAwsEc2AssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeUpdateAwsEc2AssetDetails + }{ + "AWS_EC2", + (MarshalTypeUpdateAwsEc2AssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/volume_attachment.go new file mode 100644 index 00000000000..54ffadb292a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/volume_attachment.go @@ -0,0 +1,51 @@ +// 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. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeAttachment Describes volume attachment details. +type VolumeAttachment struct { + + // Indicates whether the EBS volume is deleted on instance termination. + IsDeleteOnTermination *bool `mandatory:"false" json:"isDeleteOnTermination"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // The ID of the instance. + InstanceKey *string `mandatory:"false" json:"instanceKey"` + + // The attachment state of the volume. + Status *string `mandatory:"false" json:"status"` + + // The ID of the volume. + VolumeKey *string `mandatory:"false" json:"volumeKey"` +} + +func (m VolumeAttachment) 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 VolumeAttachment) 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/common/http.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go index ea4630b79ae..2e4fc1cf854 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/http.go @@ -526,8 +526,29 @@ func addToHeader(request *http.Request, value reflect.Value, field reflect.Struc } //Otherwise get value and set header - if headerValue, e = toStringValue(value, field); e != nil { - return + encoding := strings.ToLower(field.Tag.Get("collectionFormat")) + var collectionFormatStringValues []string + switch encoding { + case "csv", "multi": + if value.Kind() != reflect.Slice && value.Kind() != reflect.Array { + e = fmt.Errorf("header is tagged as csv or multi yet its type is neither an Array nor a Slice: %s", field.Name) + return + } + + numOfElements := value.Len() + collectionFormatStringValues = make([]string, numOfElements) + for i := 0; i < numOfElements; i++ { + collectionFormatStringValues[i], e = toStringValue(value.Index(i), field) + if e != nil { + Debugf("Header element could not be marshalled to a string: %w", e) + return + } + } + headerValue = strings.Join(collectionFormatStringValues, ",") + default: + if headerValue, e = toStringValue(value, field); e != nil { + return + } } if e = setWellKnownHeaders(request, headerName, headerValue, contentLenSpecified); e != nil { 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 eec13770a5a..83b51b6978f 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 @@ -12,8 +12,8 @@ import ( const ( major = "65" - minor = "81" - patch = "3" + minor = "82" + patch = "0" tag = "" ) 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 a154160405e..4e01db68247 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 @@ -137,6 +137,15 @@ type CloudExadataInfrastructure struct { // If true, the infrastructure is using granular maintenance scheduling preference. IsSchedulingPolicyAssociated *bool `mandatory:"false" json:"isSchedulingPolicyAssociated"` + + // The database server type of the Exadata infrastructure. + DatabaseServerType *string `mandatory:"false" json:"databaseServerType"` + + // The storage server type of the Exadata infrastructure. + StorageServerType *string `mandatory:"false" json:"storageServerType"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel CloudExadataInfrastructureComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m CloudExadataInfrastructure) String() string { @@ -152,6 +161,9 @@ func (m CloudExadataInfrastructure) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCloudExadataInfrastructureLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingCloudExadataInfrastructureComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetCloudExadataInfrastructureComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -219,3 +231,45 @@ func GetMappingCloudExadataInfrastructureLifecycleStateEnum(val string) (CloudEx enum, ok := mappingCloudExadataInfrastructureLifecycleStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// CloudExadataInfrastructureComputeModelEnum Enum with underlying type: string +type CloudExadataInfrastructureComputeModelEnum string + +// Set of constants representing the allowable values for CloudExadataInfrastructureComputeModelEnum +const ( + CloudExadataInfrastructureComputeModelEcpu CloudExadataInfrastructureComputeModelEnum = "ECPU" + CloudExadataInfrastructureComputeModelOcpu CloudExadataInfrastructureComputeModelEnum = "OCPU" +) + +var mappingCloudExadataInfrastructureComputeModelEnum = map[string]CloudExadataInfrastructureComputeModelEnum{ + "ECPU": CloudExadataInfrastructureComputeModelEcpu, + "OCPU": CloudExadataInfrastructureComputeModelOcpu, +} + +var mappingCloudExadataInfrastructureComputeModelEnumLowerCase = map[string]CloudExadataInfrastructureComputeModelEnum{ + "ecpu": CloudExadataInfrastructureComputeModelEcpu, + "ocpu": CloudExadataInfrastructureComputeModelOcpu, +} + +// GetCloudExadataInfrastructureComputeModelEnumValues Enumerates the set of values for CloudExadataInfrastructureComputeModelEnum +func GetCloudExadataInfrastructureComputeModelEnumValues() []CloudExadataInfrastructureComputeModelEnum { + values := make([]CloudExadataInfrastructureComputeModelEnum, 0) + for _, v := range mappingCloudExadataInfrastructureComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetCloudExadataInfrastructureComputeModelEnumStringValues Enumerates the set of values in String for CloudExadataInfrastructureComputeModelEnum +func GetCloudExadataInfrastructureComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingCloudExadataInfrastructureComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCloudExadataInfrastructureComputeModelEnum(val string) (CloudExadataInfrastructureComputeModelEnum, bool) { + enum, ok := mappingCloudExadataInfrastructureComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} 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 65af0bc8643..e0b6be07103 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 @@ -137,6 +137,15 @@ type CloudExadataInfrastructureSummary struct { // If true, the infrastructure is using granular maintenance scheduling preference. IsSchedulingPolicyAssociated *bool `mandatory:"false" json:"isSchedulingPolicyAssociated"` + + // The database server type of the Exadata infrastructure. + DatabaseServerType *string `mandatory:"false" json:"databaseServerType"` + + // The storage server type of the Exadata infrastructure. + StorageServerType *string `mandatory:"false" json:"storageServerType"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel CloudExadataInfrastructureSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m CloudExadataInfrastructureSummary) String() string { @@ -152,6 +161,9 @@ func (m CloudExadataInfrastructureSummary) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCloudExadataInfrastructureSummaryLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingCloudExadataInfrastructureSummaryComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetCloudExadataInfrastructureSummaryComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -219,3 +231,45 @@ func GetMappingCloudExadataInfrastructureSummaryLifecycleStateEnum(val string) ( enum, ok := mappingCloudExadataInfrastructureSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// CloudExadataInfrastructureSummaryComputeModelEnum Enum with underlying type: string +type CloudExadataInfrastructureSummaryComputeModelEnum string + +// Set of constants representing the allowable values for CloudExadataInfrastructureSummaryComputeModelEnum +const ( + CloudExadataInfrastructureSummaryComputeModelEcpu CloudExadataInfrastructureSummaryComputeModelEnum = "ECPU" + CloudExadataInfrastructureSummaryComputeModelOcpu CloudExadataInfrastructureSummaryComputeModelEnum = "OCPU" +) + +var mappingCloudExadataInfrastructureSummaryComputeModelEnum = map[string]CloudExadataInfrastructureSummaryComputeModelEnum{ + "ECPU": CloudExadataInfrastructureSummaryComputeModelEcpu, + "OCPU": CloudExadataInfrastructureSummaryComputeModelOcpu, +} + +var mappingCloudExadataInfrastructureSummaryComputeModelEnumLowerCase = map[string]CloudExadataInfrastructureSummaryComputeModelEnum{ + "ecpu": CloudExadataInfrastructureSummaryComputeModelEcpu, + "ocpu": CloudExadataInfrastructureSummaryComputeModelOcpu, +} + +// GetCloudExadataInfrastructureSummaryComputeModelEnumValues Enumerates the set of values for CloudExadataInfrastructureSummaryComputeModelEnum +func GetCloudExadataInfrastructureSummaryComputeModelEnumValues() []CloudExadataInfrastructureSummaryComputeModelEnum { + values := make([]CloudExadataInfrastructureSummaryComputeModelEnum, 0) + for _, v := range mappingCloudExadataInfrastructureSummaryComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetCloudExadataInfrastructureSummaryComputeModelEnumStringValues Enumerates the set of values in String for CloudExadataInfrastructureSummaryComputeModelEnum +func GetCloudExadataInfrastructureSummaryComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingCloudExadataInfrastructureSummaryComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCloudExadataInfrastructureSummaryComputeModelEnum(val string) (CloudExadataInfrastructureSummaryComputeModelEnum, bool) { + enum, ok := mappingCloudExadataInfrastructureSummaryComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} 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 f8b63f7d9d2..c701889ed70 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 @@ -192,6 +192,9 @@ type CloudVmCluster struct { CloudAutomationUpdateDetails *CloudAutomationUpdateDetails `mandatory:"false" json:"cloudAutomationUpdateDetails"` + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel CloudVmClusterComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` + IormConfigCache *ExadataIormConfig `mandatory:"false" json:"iormConfigCache"` } @@ -214,6 +217,9 @@ func (m CloudVmCluster) ValidateEnumValue() (bool, error) { if _, ok := GetMappingCloudVmClusterDiskRedundancyEnum(string(m.DiskRedundancy)); !ok && m.DiskRedundancy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DiskRedundancy: %s. Supported values are: %s.", m.DiskRedundancy, strings.Join(GetCloudVmClusterDiskRedundancyEnumStringValues(), ","))) } + if _, ok := GetMappingCloudVmClusterComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetCloudVmClusterComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -365,3 +371,45 @@ func GetMappingCloudVmClusterDiskRedundancyEnum(val string) (CloudVmClusterDiskR enum, ok := mappingCloudVmClusterDiskRedundancyEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// CloudVmClusterComputeModelEnum Enum with underlying type: string +type CloudVmClusterComputeModelEnum string + +// Set of constants representing the allowable values for CloudVmClusterComputeModelEnum +const ( + CloudVmClusterComputeModelEcpu CloudVmClusterComputeModelEnum = "ECPU" + CloudVmClusterComputeModelOcpu CloudVmClusterComputeModelEnum = "OCPU" +) + +var mappingCloudVmClusterComputeModelEnum = map[string]CloudVmClusterComputeModelEnum{ + "ECPU": CloudVmClusterComputeModelEcpu, + "OCPU": CloudVmClusterComputeModelOcpu, +} + +var mappingCloudVmClusterComputeModelEnumLowerCase = map[string]CloudVmClusterComputeModelEnum{ + "ecpu": CloudVmClusterComputeModelEcpu, + "ocpu": CloudVmClusterComputeModelOcpu, +} + +// GetCloudVmClusterComputeModelEnumValues Enumerates the set of values for CloudVmClusterComputeModelEnum +func GetCloudVmClusterComputeModelEnumValues() []CloudVmClusterComputeModelEnum { + values := make([]CloudVmClusterComputeModelEnum, 0) + for _, v := range mappingCloudVmClusterComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetCloudVmClusterComputeModelEnumStringValues Enumerates the set of values in String for CloudVmClusterComputeModelEnum +func GetCloudVmClusterComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingCloudVmClusterComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCloudVmClusterComputeModelEnum(val string) (CloudVmClusterComputeModelEnum, bool) { + enum, ok := mappingCloudVmClusterComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} 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 f78a2553520..1a6e53d786d 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 @@ -191,6 +191,9 @@ type CloudVmClusterSummary struct { FileSystemConfigurationDetails []FileSystemConfigurationDetail `mandatory:"false" json:"fileSystemConfigurationDetails"` CloudAutomationUpdateDetails *CloudAutomationUpdateDetails `mandatory:"false" json:"cloudAutomationUpdateDetails"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel CloudVmClusterSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m CloudVmClusterSummary) String() string { @@ -212,6 +215,9 @@ func (m CloudVmClusterSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingCloudVmClusterSummaryDiskRedundancyEnum(string(m.DiskRedundancy)); !ok && m.DiskRedundancy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DiskRedundancy: %s. Supported values are: %s.", m.DiskRedundancy, strings.Join(GetCloudVmClusterSummaryDiskRedundancyEnumStringValues(), ","))) } + if _, ok := GetMappingCloudVmClusterSummaryComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetCloudVmClusterSummaryComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -363,3 +369,45 @@ func GetMappingCloudVmClusterSummaryDiskRedundancyEnum(val string) (CloudVmClust enum, ok := mappingCloudVmClusterSummaryDiskRedundancyEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// CloudVmClusterSummaryComputeModelEnum Enum with underlying type: string +type CloudVmClusterSummaryComputeModelEnum string + +// Set of constants representing the allowable values for CloudVmClusterSummaryComputeModelEnum +const ( + CloudVmClusterSummaryComputeModelEcpu CloudVmClusterSummaryComputeModelEnum = "ECPU" + CloudVmClusterSummaryComputeModelOcpu CloudVmClusterSummaryComputeModelEnum = "OCPU" +) + +var mappingCloudVmClusterSummaryComputeModelEnum = map[string]CloudVmClusterSummaryComputeModelEnum{ + "ECPU": CloudVmClusterSummaryComputeModelEcpu, + "OCPU": CloudVmClusterSummaryComputeModelOcpu, +} + +var mappingCloudVmClusterSummaryComputeModelEnumLowerCase = map[string]CloudVmClusterSummaryComputeModelEnum{ + "ecpu": CloudVmClusterSummaryComputeModelEcpu, + "ocpu": CloudVmClusterSummaryComputeModelOcpu, +} + +// GetCloudVmClusterSummaryComputeModelEnumValues Enumerates the set of values for CloudVmClusterSummaryComputeModelEnum +func GetCloudVmClusterSummaryComputeModelEnumValues() []CloudVmClusterSummaryComputeModelEnum { + values := make([]CloudVmClusterSummaryComputeModelEnum, 0) + for _, v := range mappingCloudVmClusterSummaryComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetCloudVmClusterSummaryComputeModelEnumStringValues Enumerates the set of values in String for CloudVmClusterSummaryComputeModelEnum +func GetCloudVmClusterSummaryComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingCloudVmClusterSummaryComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCloudVmClusterSummaryComputeModelEnum(val string) (CloudVmClusterSummaryComputeModelEnum, bool) { + enum, ok := mappingCloudVmClusterSummaryComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} 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 559b73b243b..127397537e9 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 @@ -55,6 +55,12 @@ type CreateCloudExadataInfrastructureDetails struct { // Customer contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` + + // The database server type of the Exadata infrastructure. + DatabaseServerType *string `mandatory:"false" json:"databaseServerType"` + + // The storage server type of the Exadata infrastructure. + StorageServerType *string `mandatory:"false" json:"storageServerType"` } func (m CreateCloudExadataInfrastructureDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_exadata_infrastructure_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_exadata_infrastructure_details.go index 1feef9cbfd0..5ab111fd10c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_exadata_infrastructure_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_exadata_infrastructure_details.go @@ -83,6 +83,12 @@ type CreateExadataInfrastructureDetails struct { NetworkBondingModeDetails *NetworkBondingModeDetails `mandatory:"false" json:"networkBondingModeDetails"` + // The database server type of the Exadata infrastructure. + DatabaseServerType *string `mandatory:"false" json:"databaseServerType"` + + // The storage server type of the Exadata infrastructure. + StorageServerType *string `mandatory:"false" json:"storageServerType"` + // 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/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server.go index af7244a86e5..17cd44cfa21 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server.go @@ -82,6 +82,9 @@ type DbServer struct { // 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/Content/General/Concepts/resourcetags.htm). DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel DbServerComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m DbServer) String() string { @@ -97,6 +100,9 @@ func (m DbServer) ValidateEnumValue() (bool, error) { if _, ok := GetMappingDbServerLifecycleStateEnum(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(GetDbServerLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingDbServerComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetDbServerComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -160,3 +166,45 @@ func GetMappingDbServerLifecycleStateEnum(val string) (DbServerLifecycleStateEnu enum, ok := mappingDbServerLifecycleStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// DbServerComputeModelEnum Enum with underlying type: string +type DbServerComputeModelEnum string + +// Set of constants representing the allowable values for DbServerComputeModelEnum +const ( + DbServerComputeModelEcpu DbServerComputeModelEnum = "ECPU" + DbServerComputeModelOcpu DbServerComputeModelEnum = "OCPU" +) + +var mappingDbServerComputeModelEnum = map[string]DbServerComputeModelEnum{ + "ECPU": DbServerComputeModelEcpu, + "OCPU": DbServerComputeModelOcpu, +} + +var mappingDbServerComputeModelEnumLowerCase = map[string]DbServerComputeModelEnum{ + "ecpu": DbServerComputeModelEcpu, + "ocpu": DbServerComputeModelOcpu, +} + +// GetDbServerComputeModelEnumValues Enumerates the set of values for DbServerComputeModelEnum +func GetDbServerComputeModelEnumValues() []DbServerComputeModelEnum { + values := make([]DbServerComputeModelEnum, 0) + for _, v := range mappingDbServerComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetDbServerComputeModelEnumStringValues Enumerates the set of values in String for DbServerComputeModelEnum +func GetDbServerComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingDbServerComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDbServerComputeModelEnum(val string) (DbServerComputeModelEnum, bool) { + enum, ok := mappingDbServerComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server_summary.go index c3bbdc06b63..ba9dff64d05 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/db_server_summary.go @@ -82,6 +82,9 @@ type DbServerSummary struct { // 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/Content/General/Concepts/resourcetags.htm). DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel DbServerSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m DbServerSummary) String() string { @@ -97,6 +100,9 @@ func (m DbServerSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingDbServerSummaryLifecycleStateEnum(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(GetDbServerSummaryLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingDbServerSummaryComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetDbServerSummaryComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -160,3 +166,45 @@ func GetMappingDbServerSummaryLifecycleStateEnum(val string) (DbServerSummaryLif enum, ok := mappingDbServerSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// DbServerSummaryComputeModelEnum Enum with underlying type: string +type DbServerSummaryComputeModelEnum string + +// Set of constants representing the allowable values for DbServerSummaryComputeModelEnum +const ( + DbServerSummaryComputeModelEcpu DbServerSummaryComputeModelEnum = "ECPU" + DbServerSummaryComputeModelOcpu DbServerSummaryComputeModelEnum = "OCPU" +) + +var mappingDbServerSummaryComputeModelEnum = map[string]DbServerSummaryComputeModelEnum{ + "ECPU": DbServerSummaryComputeModelEcpu, + "OCPU": DbServerSummaryComputeModelOcpu, +} + +var mappingDbServerSummaryComputeModelEnumLowerCase = map[string]DbServerSummaryComputeModelEnum{ + "ecpu": DbServerSummaryComputeModelEcpu, + "ocpu": DbServerSummaryComputeModelOcpu, +} + +// GetDbServerSummaryComputeModelEnumValues Enumerates the set of values for DbServerSummaryComputeModelEnum +func GetDbServerSummaryComputeModelEnumValues() []DbServerSummaryComputeModelEnum { + values := make([]DbServerSummaryComputeModelEnum, 0) + for _, v := range mappingDbServerSummaryComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetDbServerSummaryComputeModelEnumStringValues Enumerates the set of values in String for DbServerSummaryComputeModelEnum +func GetDbServerSummaryComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingDbServerSummaryComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDbServerSummaryComputeModelEnum(val string) (DbServerSummaryComputeModelEnum, bool) { + enum, ok := mappingDbServerSummaryComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/db_system_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/db_system_shape_summary.go index 051d7f70f80..9a55e38e1bb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/db_system_shape_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/db_system_shape_summary.go @@ -78,6 +78,15 @@ type DbSystemShapeSummary struct { // The minimum data storage that need be allocated for this shape. MinDataStorageInTBs *int `mandatory:"false" json:"minDataStorageInTBs"` + // The display name of the shape used for the DB system. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel DbSystemShapeSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` + + // If true, the shape supports configurable DB and Storage Server types. + AreServerTypesSupported *bool `mandatory:"false" json:"areServerTypesSupported"` + // The minimum number of compute servers available for this shape. MinimumNodeCount *int `mandatory:"false" json:"minimumNodeCount"` @@ -101,6 +110,9 @@ func (m DbSystemShapeSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingDbSystemShapeSummaryShapeTypeEnum(string(m.ShapeType)); !ok && m.ShapeType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ShapeType: %s. Supported values are: %s.", m.ShapeType, strings.Join(GetDbSystemShapeSummaryShapeTypeEnumStringValues(), ","))) } + if _, ok := GetMappingDbSystemShapeSummaryComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetDbSystemShapeSummaryComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -156,3 +168,45 @@ func GetMappingDbSystemShapeSummaryShapeTypeEnum(val string) (DbSystemShapeSumma enum, ok := mappingDbSystemShapeSummaryShapeTypeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// DbSystemShapeSummaryComputeModelEnum Enum with underlying type: string +type DbSystemShapeSummaryComputeModelEnum string + +// Set of constants representing the allowable values for DbSystemShapeSummaryComputeModelEnum +const ( + DbSystemShapeSummaryComputeModelEcpu DbSystemShapeSummaryComputeModelEnum = "ECPU" + DbSystemShapeSummaryComputeModelOcpu DbSystemShapeSummaryComputeModelEnum = "OCPU" +) + +var mappingDbSystemShapeSummaryComputeModelEnum = map[string]DbSystemShapeSummaryComputeModelEnum{ + "ECPU": DbSystemShapeSummaryComputeModelEcpu, + "OCPU": DbSystemShapeSummaryComputeModelOcpu, +} + +var mappingDbSystemShapeSummaryComputeModelEnumLowerCase = map[string]DbSystemShapeSummaryComputeModelEnum{ + "ecpu": DbSystemShapeSummaryComputeModelEcpu, + "ocpu": DbSystemShapeSummaryComputeModelOcpu, +} + +// GetDbSystemShapeSummaryComputeModelEnumValues Enumerates the set of values for DbSystemShapeSummaryComputeModelEnum +func GetDbSystemShapeSummaryComputeModelEnumValues() []DbSystemShapeSummaryComputeModelEnum { + values := make([]DbSystemShapeSummaryComputeModelEnum, 0) + for _, v := range mappingDbSystemShapeSummaryComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetDbSystemShapeSummaryComputeModelEnumStringValues Enumerates the set of values in String for DbSystemShapeSummaryComputeModelEnum +func GetDbSystemShapeSummaryComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingDbSystemShapeSummaryComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDbSystemShapeSummaryComputeModelEnum(val string) (DbSystemShapeSummaryComputeModelEnum, bool) { + enum, ok := mappingDbSystemShapeSummaryComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure.go index 02402b60571..461d5e18cbe 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure.go @@ -174,6 +174,15 @@ type ExadataInfrastructure struct { IsSchedulingPolicyAssociated *bool `mandatory:"false" json:"isSchedulingPolicyAssociated"` ExascaleConfig *ExascaleConfigDetails `mandatory:"false" json:"exascaleConfig"` + + // The database server type of the Exadata infrastructure. + DatabaseServerType *string `mandatory:"false" json:"databaseServerType"` + + // The storage server type of the Exadata infrastructure. + StorageServerType *string `mandatory:"false" json:"storageServerType"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel ExadataInfrastructureComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m ExadataInfrastructure) String() string { @@ -195,6 +204,9 @@ func (m ExadataInfrastructure) ValidateEnumValue() (bool, error) { if _, ok := GetMappingExadataInfrastructureMaintenanceSLOStatusEnum(string(m.MaintenanceSLOStatus)); !ok && m.MaintenanceSLOStatus != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceSLOStatus: %s. Supported values are: %s.", m.MaintenanceSLOStatus, strings.Join(GetExadataInfrastructureMaintenanceSLOStatusEnumStringValues(), ","))) } + if _, ok := GetMappingExadataInfrastructureComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetExadataInfrastructureComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -293,6 +305,7 @@ const ( ExadataInfrastructureAdditionalComputeSystemModelX8m ExadataInfrastructureAdditionalComputeSystemModelEnum = "X8M" ExadataInfrastructureAdditionalComputeSystemModelX9m ExadataInfrastructureAdditionalComputeSystemModelEnum = "X9M" ExadataInfrastructureAdditionalComputeSystemModelX10m ExadataInfrastructureAdditionalComputeSystemModelEnum = "X10M" + ExadataInfrastructureAdditionalComputeSystemModelX11m ExadataInfrastructureAdditionalComputeSystemModelEnum = "X11M" ) var mappingExadataInfrastructureAdditionalComputeSystemModelEnum = map[string]ExadataInfrastructureAdditionalComputeSystemModelEnum{ @@ -301,6 +314,7 @@ var mappingExadataInfrastructureAdditionalComputeSystemModelEnum = map[string]Ex "X8M": ExadataInfrastructureAdditionalComputeSystemModelX8m, "X9M": ExadataInfrastructureAdditionalComputeSystemModelX9m, "X10M": ExadataInfrastructureAdditionalComputeSystemModelX10m, + "X11M": ExadataInfrastructureAdditionalComputeSystemModelX11m, } var mappingExadataInfrastructureAdditionalComputeSystemModelEnumLowerCase = map[string]ExadataInfrastructureAdditionalComputeSystemModelEnum{ @@ -309,6 +323,7 @@ var mappingExadataInfrastructureAdditionalComputeSystemModelEnumLowerCase = map[ "x8m": ExadataInfrastructureAdditionalComputeSystemModelX8m, "x9m": ExadataInfrastructureAdditionalComputeSystemModelX9m, "x10m": ExadataInfrastructureAdditionalComputeSystemModelX10m, + "x11m": ExadataInfrastructureAdditionalComputeSystemModelX11m, } // GetExadataInfrastructureAdditionalComputeSystemModelEnumValues Enumerates the set of values for ExadataInfrastructureAdditionalComputeSystemModelEnum @@ -328,6 +343,7 @@ func GetExadataInfrastructureAdditionalComputeSystemModelEnumStringValues() []st "X8M", "X9M", "X10M", + "X11M", } } @@ -378,3 +394,45 @@ func GetMappingExadataInfrastructureMaintenanceSLOStatusEnum(val string) (Exadat enum, ok := mappingExadataInfrastructureMaintenanceSLOStatusEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// ExadataInfrastructureComputeModelEnum Enum with underlying type: string +type ExadataInfrastructureComputeModelEnum string + +// Set of constants representing the allowable values for ExadataInfrastructureComputeModelEnum +const ( + ExadataInfrastructureComputeModelEcpu ExadataInfrastructureComputeModelEnum = "ECPU" + ExadataInfrastructureComputeModelOcpu ExadataInfrastructureComputeModelEnum = "OCPU" +) + +var mappingExadataInfrastructureComputeModelEnum = map[string]ExadataInfrastructureComputeModelEnum{ + "ECPU": ExadataInfrastructureComputeModelEcpu, + "OCPU": ExadataInfrastructureComputeModelOcpu, +} + +var mappingExadataInfrastructureComputeModelEnumLowerCase = map[string]ExadataInfrastructureComputeModelEnum{ + "ecpu": ExadataInfrastructureComputeModelEcpu, + "ocpu": ExadataInfrastructureComputeModelOcpu, +} + +// GetExadataInfrastructureComputeModelEnumValues Enumerates the set of values for ExadataInfrastructureComputeModelEnum +func GetExadataInfrastructureComputeModelEnumValues() []ExadataInfrastructureComputeModelEnum { + values := make([]ExadataInfrastructureComputeModelEnum, 0) + for _, v := range mappingExadataInfrastructureComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetExadataInfrastructureComputeModelEnumStringValues Enumerates the set of values in String for ExadataInfrastructureComputeModelEnum +func GetExadataInfrastructureComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingExadataInfrastructureComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExadataInfrastructureComputeModelEnum(val string) (ExadataInfrastructureComputeModelEnum, bool) { + enum, ok := mappingExadataInfrastructureComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure_summary.go index 31afa655997..fe400629f69 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/exadata_infrastructure_summary.go @@ -175,6 +175,15 @@ type ExadataInfrastructureSummary struct { IsSchedulingPolicyAssociated *bool `mandatory:"false" json:"isSchedulingPolicyAssociated"` ExascaleConfig *ExascaleConfigDetails `mandatory:"false" json:"exascaleConfig"` + + // The database server type of the Exadata infrastructure. + DatabaseServerType *string `mandatory:"false" json:"databaseServerType"` + + // The storage server type of the Exadata infrastructure. + StorageServerType *string `mandatory:"false" json:"storageServerType"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel ExadataInfrastructureSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m ExadataInfrastructureSummary) String() string { @@ -196,6 +205,9 @@ func (m ExadataInfrastructureSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingExadataInfrastructureSummaryMaintenanceSLOStatusEnum(string(m.MaintenanceSLOStatus)); !ok && m.MaintenanceSLOStatus != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MaintenanceSLOStatus: %s. Supported values are: %s.", m.MaintenanceSLOStatus, strings.Join(GetExadataInfrastructureSummaryMaintenanceSLOStatusEnumStringValues(), ","))) } + if _, ok := GetMappingExadataInfrastructureSummaryComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetExadataInfrastructureSummaryComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -294,6 +306,7 @@ const ( ExadataInfrastructureSummaryAdditionalComputeSystemModelX8m ExadataInfrastructureSummaryAdditionalComputeSystemModelEnum = "X8M" ExadataInfrastructureSummaryAdditionalComputeSystemModelX9m ExadataInfrastructureSummaryAdditionalComputeSystemModelEnum = "X9M" ExadataInfrastructureSummaryAdditionalComputeSystemModelX10m ExadataInfrastructureSummaryAdditionalComputeSystemModelEnum = "X10M" + ExadataInfrastructureSummaryAdditionalComputeSystemModelX11m ExadataInfrastructureSummaryAdditionalComputeSystemModelEnum = "X11M" ) var mappingExadataInfrastructureSummaryAdditionalComputeSystemModelEnum = map[string]ExadataInfrastructureSummaryAdditionalComputeSystemModelEnum{ @@ -302,6 +315,7 @@ var mappingExadataInfrastructureSummaryAdditionalComputeSystemModelEnum = map[st "X8M": ExadataInfrastructureSummaryAdditionalComputeSystemModelX8m, "X9M": ExadataInfrastructureSummaryAdditionalComputeSystemModelX9m, "X10M": ExadataInfrastructureSummaryAdditionalComputeSystemModelX10m, + "X11M": ExadataInfrastructureSummaryAdditionalComputeSystemModelX11m, } var mappingExadataInfrastructureSummaryAdditionalComputeSystemModelEnumLowerCase = map[string]ExadataInfrastructureSummaryAdditionalComputeSystemModelEnum{ @@ -310,6 +324,7 @@ var mappingExadataInfrastructureSummaryAdditionalComputeSystemModelEnumLowerCase "x8m": ExadataInfrastructureSummaryAdditionalComputeSystemModelX8m, "x9m": ExadataInfrastructureSummaryAdditionalComputeSystemModelX9m, "x10m": ExadataInfrastructureSummaryAdditionalComputeSystemModelX10m, + "x11m": ExadataInfrastructureSummaryAdditionalComputeSystemModelX11m, } // GetExadataInfrastructureSummaryAdditionalComputeSystemModelEnumValues Enumerates the set of values for ExadataInfrastructureSummaryAdditionalComputeSystemModelEnum @@ -329,6 +344,7 @@ func GetExadataInfrastructureSummaryAdditionalComputeSystemModelEnumStringValues "X8M", "X9M", "X10M", + "X11M", } } @@ -379,3 +395,45 @@ func GetMappingExadataInfrastructureSummaryMaintenanceSLOStatusEnum(val string) enum, ok := mappingExadataInfrastructureSummaryMaintenanceSLOStatusEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// ExadataInfrastructureSummaryComputeModelEnum Enum with underlying type: string +type ExadataInfrastructureSummaryComputeModelEnum string + +// Set of constants representing the allowable values for ExadataInfrastructureSummaryComputeModelEnum +const ( + ExadataInfrastructureSummaryComputeModelEcpu ExadataInfrastructureSummaryComputeModelEnum = "ECPU" + ExadataInfrastructureSummaryComputeModelOcpu ExadataInfrastructureSummaryComputeModelEnum = "OCPU" +) + +var mappingExadataInfrastructureSummaryComputeModelEnum = map[string]ExadataInfrastructureSummaryComputeModelEnum{ + "ECPU": ExadataInfrastructureSummaryComputeModelEcpu, + "OCPU": ExadataInfrastructureSummaryComputeModelOcpu, +} + +var mappingExadataInfrastructureSummaryComputeModelEnumLowerCase = map[string]ExadataInfrastructureSummaryComputeModelEnum{ + "ecpu": ExadataInfrastructureSummaryComputeModelEcpu, + "ocpu": ExadataInfrastructureSummaryComputeModelOcpu, +} + +// GetExadataInfrastructureSummaryComputeModelEnumValues Enumerates the set of values for ExadataInfrastructureSummaryComputeModelEnum +func GetExadataInfrastructureSummaryComputeModelEnumValues() []ExadataInfrastructureSummaryComputeModelEnum { + values := make([]ExadataInfrastructureSummaryComputeModelEnum, 0) + for _, v := range mappingExadataInfrastructureSummaryComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetExadataInfrastructureSummaryComputeModelEnumStringValues Enumerates the set of values in String for ExadataInfrastructureSummaryComputeModelEnum +func GetExadataInfrastructureSummaryComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingExadataInfrastructureSummaryComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExadataInfrastructureSummaryComputeModelEnum(val string) (ExadataInfrastructureSummaryComputeModelEnum, bool) { + enum, ok := mappingExadataInfrastructureSummaryComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/flex_component_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/flex_component_summary.go index 6a410b363d7..56c665d7379 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/flex_component_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/flex_component_summary.go @@ -32,6 +32,27 @@ type FlexComponentSummary struct { // The maximum storage that can be enabled on the Storage Server for this Flex Component. AvailableDbStorageInGBs *int `mandatory:"false" json:"availableDbStorageInGBs"` + + // The runtime minimum number of CPU cores that can be enabled for this Flex Component. + RuntimeMinimumCoreCount *int `mandatory:"false" json:"runtimeMinimumCoreCount"` + + // The name of the DB system shape for this Flex Component. + Shape *string `mandatory:"false" json:"shape"` + + // The maximum memory size that can be enabled on the DB Server for this Flex Component. + AvailableMemoryInGBs *int `mandatory:"false" json:"availableMemoryInGBs"` + + // The maximum local storage that can be enabled on the DB Server for this Flex Component. + AvailableLocalStorageInGBs *int `mandatory:"false" json:"availableLocalStorageInGBs"` + + // The compute model of the DB Server for this Flex Component. + ComputeModel *string `mandatory:"false" json:"computeModel"` + + // The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + HardwareType FlexComponentSummaryHardwareTypeEnum `mandatory:"false" json:"hardwareType,omitempty"` + + // The description summary for this Flex Component. + DescriptionSummary *string `mandatory:"false" json:"descriptionSummary"` } func (m FlexComponentSummary) String() string { @@ -44,8 +65,53 @@ func (m FlexComponentSummary) String() string { func (m FlexComponentSummary) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingFlexComponentSummaryHardwareTypeEnum(string(m.HardwareType)); !ok && m.HardwareType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for HardwareType: %s. Supported values are: %s.", m.HardwareType, strings.Join(GetFlexComponentSummaryHardwareTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } return false, nil } + +// FlexComponentSummaryHardwareTypeEnum Enum with underlying type: string +type FlexComponentSummaryHardwareTypeEnum string + +// Set of constants representing the allowable values for FlexComponentSummaryHardwareTypeEnum +const ( + FlexComponentSummaryHardwareTypeCompute FlexComponentSummaryHardwareTypeEnum = "COMPUTE" + FlexComponentSummaryHardwareTypeCell FlexComponentSummaryHardwareTypeEnum = "CELL" +) + +var mappingFlexComponentSummaryHardwareTypeEnum = map[string]FlexComponentSummaryHardwareTypeEnum{ + "COMPUTE": FlexComponentSummaryHardwareTypeCompute, + "CELL": FlexComponentSummaryHardwareTypeCell, +} + +var mappingFlexComponentSummaryHardwareTypeEnumLowerCase = map[string]FlexComponentSummaryHardwareTypeEnum{ + "compute": FlexComponentSummaryHardwareTypeCompute, + "cell": FlexComponentSummaryHardwareTypeCell, +} + +// GetFlexComponentSummaryHardwareTypeEnumValues Enumerates the set of values for FlexComponentSummaryHardwareTypeEnum +func GetFlexComponentSummaryHardwareTypeEnumValues() []FlexComponentSummaryHardwareTypeEnum { + values := make([]FlexComponentSummaryHardwareTypeEnum, 0) + for _, v := range mappingFlexComponentSummaryHardwareTypeEnum { + values = append(values, v) + } + return values +} + +// GetFlexComponentSummaryHardwareTypeEnumStringValues Enumerates the set of values in String for FlexComponentSummaryHardwareTypeEnum +func GetFlexComponentSummaryHardwareTypeEnumStringValues() []string { + return []string{ + "COMPUTE", + "CELL", + } +} + +// GetMappingFlexComponentSummaryHardwareTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingFlexComponentSummaryHardwareTypeEnum(val string) (FlexComponentSummaryHardwareTypeEnum, bool) { + enum, ok := mappingFlexComponentSummaryHardwareTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/list_flex_components_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/list_flex_components_request_response.go index 2b72640947e..00954fc2375 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/list_flex_components_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/list_flex_components_request_response.go @@ -24,6 +24,9 @@ type ListFlexComponentsRequest struct { // A filter to return only resources that match the entire name given. The match is not case sensitive. Name *string `mandatory:"false" contributesTo:"query" name:"name"` + // A filter to return only resources that belong to the entire shape name given. The match is not case sensitive. + Shape *string `mandatory:"false" contributesTo:"query" name:"shape"` + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). SortOrder ListFlexComponentsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_exadata_infrastructure_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_exadata_infrastructure_details.go index 5da04d4b57b..f50305dd09e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_exadata_infrastructure_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_exadata_infrastructure_details.go @@ -117,6 +117,7 @@ const ( UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX8m UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum = "X8M" UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX9m UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum = "X9M" UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX10m UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum = "X10M" + UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX11m UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum = "X11M" ) var mappingUpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum = map[string]UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum{ @@ -125,6 +126,7 @@ var mappingUpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum = "X8M": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX8m, "X9M": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX9m, "X10M": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX10m, + "X11M": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX11m, } var mappingUpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnumLowerCase = map[string]UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum{ @@ -133,6 +135,7 @@ var mappingUpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnumLow "x8m": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX8m, "x9m": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX9m, "x10m": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX10m, + "x11m": UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelX11m, } // GetUpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnumValues Enumerates the set of values for UpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnum @@ -152,6 +155,7 @@ func GetUpdateExadataInfrastructureDetailsAdditionalComputeSystemModelEnumString "X8M", "X9M", "X10M", + "X11M", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster.go index d3380594f36..72a970c3aea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster.go @@ -117,6 +117,9 @@ type VmCluster struct { // Specifies whether the type of storage management for the VM cluster is ASM or Exascale. StorageManagementType VmClusterStorageManagementTypeEnum `mandatory:"false" json:"storageManagementType,omitempty"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel VmClusterComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m VmCluster) String() string { @@ -138,6 +141,9 @@ func (m VmCluster) ValidateEnumValue() (bool, error) { if _, ok := GetMappingVmClusterStorageManagementTypeEnum(string(m.StorageManagementType)); !ok && m.StorageManagementType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageManagementType: %s. Supported values are: %s.", m.StorageManagementType, strings.Join(GetVmClusterStorageManagementTypeEnumStringValues(), ","))) } + if _, ok := GetMappingVmClusterComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetVmClusterComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -289,3 +295,45 @@ func GetMappingVmClusterStorageManagementTypeEnum(val string) (VmClusterStorageM enum, ok := mappingVmClusterStorageManagementTypeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// VmClusterComputeModelEnum Enum with underlying type: string +type VmClusterComputeModelEnum string + +// Set of constants representing the allowable values for VmClusterComputeModelEnum +const ( + VmClusterComputeModelEcpu VmClusterComputeModelEnum = "ECPU" + VmClusterComputeModelOcpu VmClusterComputeModelEnum = "OCPU" +) + +var mappingVmClusterComputeModelEnum = map[string]VmClusterComputeModelEnum{ + "ECPU": VmClusterComputeModelEcpu, + "OCPU": VmClusterComputeModelOcpu, +} + +var mappingVmClusterComputeModelEnumLowerCase = map[string]VmClusterComputeModelEnum{ + "ecpu": VmClusterComputeModelEcpu, + "ocpu": VmClusterComputeModelOcpu, +} + +// GetVmClusterComputeModelEnumValues Enumerates the set of values for VmClusterComputeModelEnum +func GetVmClusterComputeModelEnumValues() []VmClusterComputeModelEnum { + values := make([]VmClusterComputeModelEnum, 0) + for _, v := range mappingVmClusterComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetVmClusterComputeModelEnumStringValues Enumerates the set of values in String for VmClusterComputeModelEnum +func GetVmClusterComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingVmClusterComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVmClusterComputeModelEnum(val string) (VmClusterComputeModelEnum, bool) { + enum, ok := mappingVmClusterComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster_summary.go index 8e18ccfdce0..f1457ab7a74 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/vm_cluster_summary.go @@ -117,6 +117,9 @@ type VmClusterSummary struct { // Specifies whether the type of storage management for the VM cluster is ASM or Exascale. StorageManagementType VmClusterSummaryStorageManagementTypeEnum `mandatory:"false" json:"storageManagementType,omitempty"` + + // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. + ComputeModel VmClusterSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } func (m VmClusterSummary) String() string { @@ -138,6 +141,9 @@ func (m VmClusterSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingVmClusterSummaryStorageManagementTypeEnum(string(m.StorageManagementType)); !ok && m.StorageManagementType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StorageManagementType: %s. Supported values are: %s.", m.StorageManagementType, strings.Join(GetVmClusterSummaryStorageManagementTypeEnumStringValues(), ","))) } + if _, ok := GetMappingVmClusterSummaryComputeModelEnum(string(m.ComputeModel)); !ok && m.ComputeModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComputeModel: %s. Supported values are: %s.", m.ComputeModel, strings.Join(GetVmClusterSummaryComputeModelEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -289,3 +295,45 @@ func GetMappingVmClusterSummaryStorageManagementTypeEnum(val string) (VmClusterS enum, ok := mappingVmClusterSummaryStorageManagementTypeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// VmClusterSummaryComputeModelEnum Enum with underlying type: string +type VmClusterSummaryComputeModelEnum string + +// Set of constants representing the allowable values for VmClusterSummaryComputeModelEnum +const ( + VmClusterSummaryComputeModelEcpu VmClusterSummaryComputeModelEnum = "ECPU" + VmClusterSummaryComputeModelOcpu VmClusterSummaryComputeModelEnum = "OCPU" +) + +var mappingVmClusterSummaryComputeModelEnum = map[string]VmClusterSummaryComputeModelEnum{ + "ECPU": VmClusterSummaryComputeModelEcpu, + "OCPU": VmClusterSummaryComputeModelOcpu, +} + +var mappingVmClusterSummaryComputeModelEnumLowerCase = map[string]VmClusterSummaryComputeModelEnum{ + "ecpu": VmClusterSummaryComputeModelEcpu, + "ocpu": VmClusterSummaryComputeModelOcpu, +} + +// GetVmClusterSummaryComputeModelEnumValues Enumerates the set of values for VmClusterSummaryComputeModelEnum +func GetVmClusterSummaryComputeModelEnumValues() []VmClusterSummaryComputeModelEnum { + values := make([]VmClusterSummaryComputeModelEnum, 0) + for _, v := range mappingVmClusterSummaryComputeModelEnum { + values = append(values, v) + } + return values +} + +// GetVmClusterSummaryComputeModelEnumStringValues Enumerates the set of values in String for VmClusterSummaryComputeModelEnum +func GetVmClusterSummaryComputeModelEnumStringValues() []string { + return []string{ + "ECPU", + "OCPU", + } +} + +// GetMappingVmClusterSummaryComputeModelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVmClusterSummaryComputeModelEnum(val string) (VmClusterSummaryComputeModelEnum, bool) { + enum, ok := mappingVmClusterSummaryComputeModelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/alert_log_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/alert_log_summary.go index 41d29f401f7..2c8a6638c82 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/alert_log_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/alert_log_summary.go @@ -70,6 +70,7 @@ const ( AlertLogSummaryMessageLevelSevere AlertLogSummaryMessageLevelEnum = "SEVERE" AlertLogSummaryMessageLevelImportant AlertLogSummaryMessageLevelEnum = "IMPORTANT" AlertLogSummaryMessageLevelNormal AlertLogSummaryMessageLevelEnum = "NORMAL" + AlertLogSummaryMessageLevelOther AlertLogSummaryMessageLevelEnum = "OTHER" ) var mappingAlertLogSummaryMessageLevelEnum = map[string]AlertLogSummaryMessageLevelEnum{ @@ -77,6 +78,7 @@ var mappingAlertLogSummaryMessageLevelEnum = map[string]AlertLogSummaryMessageLe "SEVERE": AlertLogSummaryMessageLevelSevere, "IMPORTANT": AlertLogSummaryMessageLevelImportant, "NORMAL": AlertLogSummaryMessageLevelNormal, + "OTHER": AlertLogSummaryMessageLevelOther, } var mappingAlertLogSummaryMessageLevelEnumLowerCase = map[string]AlertLogSummaryMessageLevelEnum{ @@ -84,6 +86,7 @@ var mappingAlertLogSummaryMessageLevelEnumLowerCase = map[string]AlertLogSummary "severe": AlertLogSummaryMessageLevelSevere, "important": AlertLogSummaryMessageLevelImportant, "normal": AlertLogSummaryMessageLevelNormal, + "other": AlertLogSummaryMessageLevelOther, } // GetAlertLogSummaryMessageLevelEnumValues Enumerates the set of values for AlertLogSummaryMessageLevelEnum @@ -102,6 +105,7 @@ func GetAlertLogSummaryMessageLevelEnumStringValues() []string { "SEVERE", "IMPORTANT", "NORMAL", + "OTHER", } } @@ -122,6 +126,7 @@ const ( AlertLogSummaryMessageTypeWarning AlertLogSummaryMessageTypeEnum = "WARNING" AlertLogSummaryMessageTypeNotification AlertLogSummaryMessageTypeEnum = "NOTIFICATION" AlertLogSummaryMessageTypeTrace AlertLogSummaryMessageTypeEnum = "TRACE" + AlertLogSummaryMessageTypeOther AlertLogSummaryMessageTypeEnum = "OTHER" ) var mappingAlertLogSummaryMessageTypeEnum = map[string]AlertLogSummaryMessageTypeEnum{ @@ -131,6 +136,7 @@ var mappingAlertLogSummaryMessageTypeEnum = map[string]AlertLogSummaryMessageTyp "WARNING": AlertLogSummaryMessageTypeWarning, "NOTIFICATION": AlertLogSummaryMessageTypeNotification, "TRACE": AlertLogSummaryMessageTypeTrace, + "OTHER": AlertLogSummaryMessageTypeOther, } var mappingAlertLogSummaryMessageTypeEnumLowerCase = map[string]AlertLogSummaryMessageTypeEnum{ @@ -140,6 +146,7 @@ var mappingAlertLogSummaryMessageTypeEnumLowerCase = map[string]AlertLogSummaryM "warning": AlertLogSummaryMessageTypeWarning, "notification": AlertLogSummaryMessageTypeNotification, "trace": AlertLogSummaryMessageTypeTrace, + "other": AlertLogSummaryMessageTypeOther, } // GetAlertLogSummaryMessageTypeEnumValues Enumerates the set of values for AlertLogSummaryMessageTypeEnum @@ -160,6 +167,7 @@ func GetAlertLogSummaryMessageTypeEnumStringValues() []string { "WARNING", "NOTIFICATION", "TRACE", + "OTHER", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/attention_log_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/attention_log_summary.go index f677d831a58..5ca0ac1aca8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/attention_log_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/attention_log_summary.go @@ -82,6 +82,7 @@ const ( AttentionLogSummaryMessageUrgencySoon AttentionLogSummaryMessageUrgencyEnum = "SOON" AttentionLogSummaryMessageUrgencyDeferrable AttentionLogSummaryMessageUrgencyEnum = "DEFERRABLE" AttentionLogSummaryMessageUrgencyInfo AttentionLogSummaryMessageUrgencyEnum = "INFO" + AttentionLogSummaryMessageUrgencyOther AttentionLogSummaryMessageUrgencyEnum = "OTHER" ) var mappingAttentionLogSummaryMessageUrgencyEnum = map[string]AttentionLogSummaryMessageUrgencyEnum{ @@ -89,6 +90,7 @@ var mappingAttentionLogSummaryMessageUrgencyEnum = map[string]AttentionLogSummar "SOON": AttentionLogSummaryMessageUrgencySoon, "DEFERRABLE": AttentionLogSummaryMessageUrgencyDeferrable, "INFO": AttentionLogSummaryMessageUrgencyInfo, + "OTHER": AttentionLogSummaryMessageUrgencyOther, } var mappingAttentionLogSummaryMessageUrgencyEnumLowerCase = map[string]AttentionLogSummaryMessageUrgencyEnum{ @@ -96,6 +98,7 @@ var mappingAttentionLogSummaryMessageUrgencyEnumLowerCase = map[string]Attention "soon": AttentionLogSummaryMessageUrgencySoon, "deferrable": AttentionLogSummaryMessageUrgencyDeferrable, "info": AttentionLogSummaryMessageUrgencyInfo, + "other": AttentionLogSummaryMessageUrgencyOther, } // GetAttentionLogSummaryMessageUrgencyEnumValues Enumerates the set of values for AttentionLogSummaryMessageUrgencyEnum @@ -114,6 +117,7 @@ func GetAttentionLogSummaryMessageUrgencyEnumStringValues() []string { "SOON", "DEFERRABLE", "INFO", + "OTHER", } } @@ -134,6 +138,7 @@ const ( AttentionLogSummaryMessageTypeWarning AttentionLogSummaryMessageTypeEnum = "WARNING" AttentionLogSummaryMessageTypeNotification AttentionLogSummaryMessageTypeEnum = "NOTIFICATION" AttentionLogSummaryMessageTypeTrace AttentionLogSummaryMessageTypeEnum = "TRACE" + AttentionLogSummaryMessageTypeOther AttentionLogSummaryMessageTypeEnum = "OTHER" ) var mappingAttentionLogSummaryMessageTypeEnum = map[string]AttentionLogSummaryMessageTypeEnum{ @@ -143,6 +148,7 @@ var mappingAttentionLogSummaryMessageTypeEnum = map[string]AttentionLogSummaryMe "WARNING": AttentionLogSummaryMessageTypeWarning, "NOTIFICATION": AttentionLogSummaryMessageTypeNotification, "TRACE": AttentionLogSummaryMessageTypeTrace, + "OTHER": AttentionLogSummaryMessageTypeOther, } var mappingAttentionLogSummaryMessageTypeEnumLowerCase = map[string]AttentionLogSummaryMessageTypeEnum{ @@ -152,6 +158,7 @@ var mappingAttentionLogSummaryMessageTypeEnumLowerCase = map[string]AttentionLog "warning": AttentionLogSummaryMessageTypeWarning, "notification": AttentionLogSummaryMessageTypeNotification, "trace": AttentionLogSummaryMessageTypeTrace, + "other": AttentionLogSummaryMessageTypeOther, } // GetAttentionLogSummaryMessageTypeEnumValues Enumerates the set of values for AttentionLogSummaryMessageTypeEnum @@ -172,6 +179,7 @@ func GetAttentionLogSummaryMessageTypeEnumStringValues() []string { "WARNING", "NOTIFICATION", "TRACE", + "OTHER", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_snapshot_range_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_snapshot_range_summary.go index 2b5d941c2c4..37c76bc38e8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_snapshot_range_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_snapshot_range_summary.go @@ -28,6 +28,15 @@ type AwrDbSnapshotRangeSummary struct { // The name of the database. DbName *string `mandatory:"true" json:"dbName"` + // The unique name of the database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` + + // The internal ID of the database where the AWR snapshot data was collected. + SrcDbId *string `mandatory:"false" json:"srcDbId"` + + // The name of the database where the AWR snapshot data was collected. + SrcDbName *string `mandatory:"false" json:"srcDbName"` + // The database instance numbers. InstanceList []int `mandatory:"false" json:"instanceList"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_summary.go index 6b896f31364..74f9889dca7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/awr_db_summary.go @@ -28,6 +28,15 @@ type AwrDbSummary struct { // The name of the database. DbName *string `mandatory:"true" json:"dbName"` + // The unique name of the database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` + + // The internal ID of the database where the AWR snapshot data was collected. + SrcDbId *string `mandatory:"false" json:"srcDbId"` + + // The name of the database where the AWR snapshot data was collected. + SrcDbName *string `mandatory:"false" json:"srcDbName"` + // The database instance numbers. InstanceList []int `mandatory:"false" json:"instanceList"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/base_database_ha_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/base_database_ha_details.go new file mode 100644 index 00000000000..d5544f2d394 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/base_database_ha_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BaseDatabaseHaDetails The common database details used by all HA metrics. +type BaseDatabaseHaDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database. + DbId *string `mandatory:"true" json:"dbId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the Managed Database resides. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of Oracle Database installation. + DatabaseType DatabaseTypeEnum `mandatory:"true" json:"databaseType"` + + // The subtype of the Oracle Database. Indicates whether the database is a Container Database, + // Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database. + DatabaseSubType DatabaseSubTypeEnum `mandatory:"true" json:"databaseSubType"` + + // The infrastructure used to deploy the Oracle Database. + DeploymentType DeploymentTypeEnum `mandatory:"true" json:"deploymentType"` + + // The display name of the Managed Database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The database role of the Managed Database. + DbRole DbRoleEnum `mandatory:"true" json:"dbRole"` + + // The Oracle Database version. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // The workload type of the Autonomous Database. + WorkloadType WorkloadTypeEnum `mandatory:"false" json:"workloadType,omitempty"` + + // The database ID of the Managed Database. Every database had its own ID and that value is captured here. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The database unique name of the Managed Database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` +} + +func (m BaseDatabaseHaDetails) 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 BaseDatabaseHaDetails) 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 := GetMappingDatabaseSubTypeEnum(string(m.DatabaseSubType)); !ok && m.DatabaseSubType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseSubType: %s. Supported values are: %s.", m.DatabaseSubType, strings.Join(GetDatabaseSubTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDeploymentTypeEnum(string(m.DeploymentType)); !ok && m.DeploymentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DeploymentType: %s. Supported values are: %s.", m.DeploymentType, strings.Join(GetDeploymentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDbRoleEnum(string(m.DbRole)); !ok && m.DbRole != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbRole: %s. Supported values are: %s.", m.DbRole, strings.Join(GetDbRoleEnumStringValues(), ","))) + } + + if _, ok := GetMappingWorkloadTypeEnum(string(m.WorkloadType)); !ok && m.WorkloadType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for WorkloadType: %s. Supported values are: %s.", m.WorkloadType, strings.Join(GetWorkloadTypeEnumStringValues(), ","))) + } + 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/databasemanagement/check_external_my_sql_database_connector_connection_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/check_external_my_sql_database_connector_connection_status_request_response.go new file mode 100644 index 00000000000..5f42c0d7145 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/check_external_my_sql_database_connector_connection_status_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CheckExternalMySqlDatabaseConnectorConnectionStatusRequest wrapper for the CheckExternalMySqlDatabaseConnectorConnectionStatus operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/CheckExternalMySqlDatabaseConnectorConnectionStatus.go.html to see an example of how to use CheckExternalMySqlDatabaseConnectorConnectionStatusRequest. +type CheckExternalMySqlDatabaseConnectorConnectionStatusRequest struct { + + // The OCID of the External MySQL Database Connector. + ExternalMySqlDatabaseConnectorId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseConnectorId"` + + // 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"` + + // 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 CheckExternalMySqlDatabaseConnectorConnectionStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CheckExternalMySqlDatabaseConnectorConnectionStatusRequest) 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 CheckExternalMySqlDatabaseConnectorConnectionStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CheckExternalMySqlDatabaseConnectorConnectionStatusRequest) 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 CheckExternalMySqlDatabaseConnectorConnectionStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CheckExternalMySqlDatabaseConnectorConnectionStatusResponse wrapper for the CheckExternalMySqlDatabaseConnectorConnectionStatus operation +type CheckExternalMySqlDatabaseConnectorConnectionStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + 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 CheckExternalMySqlDatabaseConnectorConnectionStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CheckExternalMySqlDatabaseConnectorConnectionStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_connector_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_connector_details.go new file mode 100644 index 00000000000..3f10b5ef1e1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_connector_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateExternalMySqlDatabaseConnectorDetails Details for creating an external database connector. +type CreateExternalMySqlDatabaseConnectorDetails struct { + + // OCID of compartment for the External MySQL Database. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + ConnectorDetails *CreateMySqlDatabaseConnectorDetails `mandatory:"true" json:"connectorDetails"` +} + +func (m CreateExternalMySqlDatabaseConnectorDetails) 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 CreateExternalMySqlDatabaseConnectorDetails) 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/databasemanagement/create_external_my_sql_database_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_connector_request_response.go new file mode 100644 index 00000000000..ba3c1bfad49 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_connector_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateExternalMySqlDatabaseConnectorRequest wrapper for the CreateExternalMySqlDatabaseConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/CreateExternalMySqlDatabaseConnector.go.html to see an example of how to use CreateExternalMySqlDatabaseConnectorRequest. +type CreateExternalMySqlDatabaseConnectorRequest struct { + + // The details required to create an external MySQL database connector resource. + CreateExternalMySqlDatabaseConnectorDetails `contributesTo:"body"` + + // Parameter indicating whether database connection needs to be tested. + IsTestConnectionParam *bool `mandatory:"true" contributesTo:"query" name:"isTestConnectionParam"` + + // 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"` + + // 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 CreateExternalMySqlDatabaseConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateExternalMySqlDatabaseConnectorRequest) 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 CreateExternalMySqlDatabaseConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateExternalMySqlDatabaseConnectorRequest) 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 CreateExternalMySqlDatabaseConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateExternalMySqlDatabaseConnectorResponse wrapper for the CreateExternalMySqlDatabaseConnector operation +type CreateExternalMySqlDatabaseConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExternalMySqlDatabaseConnector instance + ExternalMySqlDatabaseConnector `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"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Content Location of the resource. + ContentLocation *string `presentIn:"header" name:"content-location"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateExternalMySqlDatabaseConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateExternalMySqlDatabaseConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_details.go new file mode 100644 index 00000000000..5ed4c24ca63 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateExternalMySqlDatabaseDetails Details for creating an external database. +type CreateExternalMySqlDatabaseDetails struct { + + // OCID of compartment for the External MySQL Database. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Name of the External MySQL Database. + DbName *string `mandatory:"true" json:"dbName"` +} + +func (m CreateExternalMySqlDatabaseDetails) 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 CreateExternalMySqlDatabaseDetails) 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/databasemanagement/create_external_my_sql_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_request_response.go new file mode 100644 index 00000000000..212b6ec3b79 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_external_my_sql_database_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateExternalMySqlDatabaseRequest wrapper for the CreateExternalMySqlDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/CreateExternalMySqlDatabase.go.html to see an example of how to use CreateExternalMySqlDatabaseRequest. +type CreateExternalMySqlDatabaseRequest struct { + + // The details required to create an external MySQL database resource. + CreateExternalMySqlDatabaseDetails `contributesTo:"body"` + + // 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"` + + // 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 CreateExternalMySqlDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateExternalMySqlDatabaseRequest) 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 CreateExternalMySqlDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateExternalMySqlDatabaseRequest) 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 CreateExternalMySqlDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateExternalMySqlDatabaseResponse wrapper for the CreateExternalMySqlDatabase operation +type CreateExternalMySqlDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExternalMySqlDatabase instance + ExternalMySqlDatabase `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // 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"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Content Location of the resource. + ContentLocation *string `presentIn:"header" name:"content-location"` +} + +func (response CreateExternalMySqlDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateExternalMySqlDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_my_sql_database_connector_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_my_sql_database_connector_details.go new file mode 100644 index 00000000000..f2a0ff98076 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/create_my_sql_database_connector_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateMySqlDatabaseConnectorDetails Create Details of external database connector. +type CreateMySqlDatabaseConnectorDetails struct { + + // External MySQL Database Connector Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Agent Id of the MACS agent. + MacsAgentId *string `mandatory:"true" json:"macsAgentId"` + + // Host name for Connector. + HostName *string `mandatory:"true" json:"hostName"` + + // Port number to connect to External MySQL Database. + Port *int `mandatory:"true" json:"port"` + + // Protocol to be used to connect to External MySQL Database; TCP, TCP with SSL or Socket. + NetworkProtocol MySqlNetworkProtocolTypeEnum `mandatory:"true" json:"networkProtocol"` + + // OCID of MySQL Database resource. + ExternalDatabaseId *string `mandatory:"true" json:"externalDatabaseId"` + + // Type of the credential. + CredentialType MySqlCredTypeEnum `mandatory:"true" json:"credentialType"` + + // If using existing SSL secret to connect, OCID for the secret resource. + SslSecretId *string `mandatory:"true" json:"sslSecretId"` +} + +func (m CreateMySqlDatabaseConnectorDetails) 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 CreateMySqlDatabaseConnectorDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMySqlNetworkProtocolTypeEnum(string(m.NetworkProtocol)); !ok && m.NetworkProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NetworkProtocol: %s. Supported values are: %s.", m.NetworkProtocol, strings.Join(GetMySqlNetworkProtocolTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlCredTypeEnum(string(m.CredentialType)); !ok && m.CredentialType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CredentialType: %s. Supported values are: %s.", m.CredentialType, strings.Join(GetMySqlCredTypeEnumStringValues(), ","))) + } + + 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/databasemanagement/database_backup_metrics.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_backup_metrics.go new file mode 100644 index 00000000000..3496eebaa50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_backup_metrics.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseBackupMetrics The details of the backup metrics for a single database. +type DatabaseBackupMetrics struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database. + DbId *string `mandatory:"true" json:"dbId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the Managed Database resides. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of Oracle Database installation. + DatabaseType DatabaseTypeEnum `mandatory:"true" json:"databaseType"` + + // The subtype of the Oracle Database. Indicates whether the database is a Container Database, + // Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database. + DatabaseSubType DatabaseSubTypeEnum `mandatory:"true" json:"databaseSubType"` + + // The infrastructure used to deploy the Oracle Database. + DeploymentType DeploymentTypeEnum `mandatory:"true" json:"deploymentType"` + + // The display name of the Managed Database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The database role of the Managed Database. + DbRole DbRoleEnum `mandatory:"true" json:"dbRole"` + + // Indicates whether Data Guard is enabled for the database. + IsDataguardEnabled *bool `mandatory:"true" json:"isDataguardEnabled"` + + LastBackupSummary *DatabaseBackupSummary `mandatory:"true" json:"lastBackupSummary"` + + // A list of database health metrics such as BackupDuration and BackupSize. + Metrics []HaMetricDefinition `mandatory:"true" json:"metrics"` + + // The retention period of the database. + RetentionPeriodInDays *string `mandatory:"true" json:"retentionPeriodInDays"` + + // Indicates whether automatic backup is enabled or not. This is only applicable for cloud databases. + IsAutomaticBackupEnabled *bool `mandatory:"true" json:"isAutomaticBackupEnabled"` + + // The array of metric values for different timestamps. + TimeSeriesMetrics []MetricsAggregationRange `mandatory:"true" json:"timeSeriesMetrics"` + + // The Oracle Database version. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // The workload type of the Autonomous Database. + WorkloadType WorkloadTypeEnum `mandatory:"false" json:"workloadType,omitempty"` + + // The database ID of the Managed Database. Every database had its own ID and that value is captured here. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The database unique name of the Managed Database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` +} + +func (m DatabaseBackupMetrics) 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 DatabaseBackupMetrics) 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 := GetMappingDatabaseSubTypeEnum(string(m.DatabaseSubType)); !ok && m.DatabaseSubType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseSubType: %s. Supported values are: %s.", m.DatabaseSubType, strings.Join(GetDatabaseSubTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDeploymentTypeEnum(string(m.DeploymentType)); !ok && m.DeploymentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DeploymentType: %s. Supported values are: %s.", m.DeploymentType, strings.Join(GetDeploymentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDbRoleEnum(string(m.DbRole)); !ok && m.DbRole != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbRole: %s. Supported values are: %s.", m.DbRole, strings.Join(GetDbRoleEnumStringValues(), ","))) + } + + if _, ok := GetMappingWorkloadTypeEnum(string(m.WorkloadType)); !ok && m.WorkloadType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for WorkloadType: %s. Supported values are: %s.", m.WorkloadType, strings.Join(GetWorkloadTypeEnumStringValues(), ","))) + } + 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/databasemanagement/database_backup_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_backup_summary.go new file mode 100644 index 00000000000..ed4bb56052a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_backup_summary.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseBackupSummary The summary of the High Availability (HA) and backup for a database. +type DatabaseBackupSummary struct { + + // The backup status of the database. + BackupStatus *string `mandatory:"true" json:"backupStatus"` + + // The database backup completion date and time in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'". + TimeBackupCompleted *common.SDKTime `mandatory:"true" json:"timeBackupCompleted"` + + // The backup duration of the database in seconds. + BackupDurationInSeconds *int `mandatory:"true" json:"backupDurationInSeconds"` + + // The backup type of the database (FULL/INCREMENTAL). + BackupType *string `mandatory:"true" json:"backupType"` + + // The backup destination of the database. + BackupDestination DatabaseBackupSummaryBackupDestinationEnum `mandatory:"true" json:"backupDestination"` + + // The backup size of the database. + BackupSizeInGBs *float32 `mandatory:"true" json:"backupSizeInGBs"` +} + +func (m DatabaseBackupSummary) 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 DatabaseBackupSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDatabaseBackupSummaryBackupDestinationEnum(string(m.BackupDestination)); !ok && m.BackupDestination != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BackupDestination: %s. Supported values are: %s.", m.BackupDestination, strings.Join(GetDatabaseBackupSummaryBackupDestinationEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DatabaseBackupSummaryBackupDestinationEnum Enum with underlying type: string +type DatabaseBackupSummaryBackupDestinationEnum string + +// Set of constants representing the allowable values for DatabaseBackupSummaryBackupDestinationEnum +const ( + DatabaseBackupSummaryBackupDestinationDisk DatabaseBackupSummaryBackupDestinationEnum = "DISK" + DatabaseBackupSummaryBackupDestinationTape DatabaseBackupSummaryBackupDestinationEnum = "TAPE" + DatabaseBackupSummaryBackupDestinationNfs DatabaseBackupSummaryBackupDestinationEnum = "NFS" + DatabaseBackupSummaryBackupDestinationLocal DatabaseBackupSummaryBackupDestinationEnum = "LOCAL" + DatabaseBackupSummaryBackupDestinationDbrs DatabaseBackupSummaryBackupDestinationEnum = "DBRS" + DatabaseBackupSummaryBackupDestinationObjectStore DatabaseBackupSummaryBackupDestinationEnum = "OBJECT_STORE" + DatabaseBackupSummaryBackupDestinationRecoveryAppliance DatabaseBackupSummaryBackupDestinationEnum = "RECOVERY_APPLIANCE" +) + +var mappingDatabaseBackupSummaryBackupDestinationEnum = map[string]DatabaseBackupSummaryBackupDestinationEnum{ + "DISK": DatabaseBackupSummaryBackupDestinationDisk, + "TAPE": DatabaseBackupSummaryBackupDestinationTape, + "NFS": DatabaseBackupSummaryBackupDestinationNfs, + "LOCAL": DatabaseBackupSummaryBackupDestinationLocal, + "DBRS": DatabaseBackupSummaryBackupDestinationDbrs, + "OBJECT_STORE": DatabaseBackupSummaryBackupDestinationObjectStore, + "RECOVERY_APPLIANCE": DatabaseBackupSummaryBackupDestinationRecoveryAppliance, +} + +var mappingDatabaseBackupSummaryBackupDestinationEnumLowerCase = map[string]DatabaseBackupSummaryBackupDestinationEnum{ + "disk": DatabaseBackupSummaryBackupDestinationDisk, + "tape": DatabaseBackupSummaryBackupDestinationTape, + "nfs": DatabaseBackupSummaryBackupDestinationNfs, + "local": DatabaseBackupSummaryBackupDestinationLocal, + "dbrs": DatabaseBackupSummaryBackupDestinationDbrs, + "object_store": DatabaseBackupSummaryBackupDestinationObjectStore, + "recovery_appliance": DatabaseBackupSummaryBackupDestinationRecoveryAppliance, +} + +// GetDatabaseBackupSummaryBackupDestinationEnumValues Enumerates the set of values for DatabaseBackupSummaryBackupDestinationEnum +func GetDatabaseBackupSummaryBackupDestinationEnumValues() []DatabaseBackupSummaryBackupDestinationEnum { + values := make([]DatabaseBackupSummaryBackupDestinationEnum, 0) + for _, v := range mappingDatabaseBackupSummaryBackupDestinationEnum { + values = append(values, v) + } + return values +} + +// GetDatabaseBackupSummaryBackupDestinationEnumStringValues Enumerates the set of values in String for DatabaseBackupSummaryBackupDestinationEnum +func GetDatabaseBackupSummaryBackupDestinationEnumStringValues() []string { + return []string{ + "DISK", + "TAPE", + "NFS", + "LOCAL", + "DBRS", + "OBJECT_STORE", + "RECOVERY_APPLIANCE", + } +} + +// GetMappingDatabaseBackupSummaryBackupDestinationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDatabaseBackupSummaryBackupDestinationEnum(val string) (DatabaseBackupSummaryBackupDestinationEnum, bool) { + enum, ok := mappingDatabaseBackupSummaryBackupDestinationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_fleet_backup_metrics.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_fleet_backup_metrics.go new file mode 100644 index 00000000000..4d621158d7c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_fleet_backup_metrics.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseFleetBackupMetrics The details of the backup metrics for the fleet of databases. +type DatabaseFleetBackupMetrics struct { + + // A list of backup metrics for the databases present in the fleet. + BackupMetrics []DatabaseBackupMetrics `mandatory:"true" json:"backupMetrics"` +} + +func (m DatabaseFleetBackupMetrics) 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 DatabaseFleetBackupMetrics) 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/databasemanagement/database_fleet_dataguard_metrics.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_fleet_dataguard_metrics.go new file mode 100644 index 00000000000..ae1f5716324 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_fleet_dataguard_metrics.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseFleetDataguardMetrics The list of Oracle Data Guard-enabled databases in the fleet. +type DatabaseFleetDataguardMetrics struct { + + // The Data Guard usage metrics for the Oracle Data Guard-enabled databases. + DataguardMetrics []DataguardMetrics `mandatory:"true" json:"dataguardMetrics"` +} + +func (m DatabaseFleetDataguardMetrics) 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 DatabaseFleetDataguardMetrics) 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/databasemanagement/database_fleet_ha_overview_metrics.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_fleet_ha_overview_metrics.go new file mode 100644 index 00000000000..a92f6d753a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_fleet_ha_overview_metrics.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseFleetHaOverviewMetrics The details of the HA metrics for the fleet of databases. +type DatabaseFleetHaOverviewMetrics struct { + + // A list of the databases present in the fleet and their HA usage metrics. + HaMetrics []DatabaseHaMetrics `mandatory:"true" json:"haMetrics"` +} + +func (m DatabaseFleetHaOverviewMetrics) 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 DatabaseFleetHaOverviewMetrics) 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/databasemanagement/database_ha_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_ha_backup_details.go new file mode 100644 index 00000000000..83e9fd5e105 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_ha_backup_details.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseHaBackupDetails The database HA and backup details. +type DatabaseHaBackupDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database. + DbId *string `mandatory:"true" json:"dbId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the Managed Database resides. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of Oracle Database installation. + DatabaseType DatabaseTypeEnum `mandatory:"true" json:"databaseType"` + + // The subtype of the Oracle Database. Indicates whether the database is a Container Database, + // Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database. + DatabaseSubType DatabaseSubTypeEnum `mandatory:"true" json:"databaseSubType"` + + // The infrastructure used to deploy the Oracle Database. + DeploymentType DeploymentTypeEnum `mandatory:"true" json:"deploymentType"` + + // The display name of the Managed Database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The database role of the Managed Database. + DbRole DbRoleEnum `mandatory:"true" json:"dbRole"` + + // The Oracle Database version. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // The workload type of the Autonomous Database. + WorkloadType WorkloadTypeEnum `mandatory:"false" json:"workloadType,omitempty"` + + // The database ID of the Managed Database. Every database had its own ID and that value is captured here. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The database unique name of the Managed Database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` + + // Indicates whether flashback is enabled for the database. + FlashBackOn *string `mandatory:"false" json:"flashBackOn"` + + // The oldest flashback date and time in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'". + FlashBackTime *common.SDKTime `mandatory:"false" json:"flashBackTime"` + + // The configured number of days intended to recover a protected database from a backup. + RecoveryWindowGoalInDays *int `mandatory:"false" json:"recoveryWindowGoalInDays"` + + LastFullBackupSummary *DatabaseBackupSummary `mandatory:"false" json:"lastFullBackupSummary"` + + // A list of database backups. + BackupHistory []DatabaseBackupSummary `mandatory:"false" json:"backupHistory"` + + // A list of database backup metrics such as BackupSize and BackupDuration. + Metrics []HaMetricDefinition `mandatory:"false" json:"metrics"` +} + +func (m DatabaseHaBackupDetails) 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 DatabaseHaBackupDetails) 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 := GetMappingDatabaseSubTypeEnum(string(m.DatabaseSubType)); !ok && m.DatabaseSubType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseSubType: %s. Supported values are: %s.", m.DatabaseSubType, strings.Join(GetDatabaseSubTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDeploymentTypeEnum(string(m.DeploymentType)); !ok && m.DeploymentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DeploymentType: %s. Supported values are: %s.", m.DeploymentType, strings.Join(GetDeploymentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDbRoleEnum(string(m.DbRole)); !ok && m.DbRole != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbRole: %s. Supported values are: %s.", m.DbRole, strings.Join(GetDbRoleEnumStringValues(), ","))) + } + + if _, ok := GetMappingWorkloadTypeEnum(string(m.WorkloadType)); !ok && m.WorkloadType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for WorkloadType: %s. Supported values are: %s.", m.WorkloadType, strings.Join(GetWorkloadTypeEnumStringValues(), ","))) + } + 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/databasemanagement/database_ha_metrics.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_ha_metrics.go new file mode 100644 index 00000000000..96b269b50f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_ha_metrics.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseHaMetrics The details of the HA metrics for a single database. +type DatabaseHaMetrics struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database. + DbId *string `mandatory:"true" json:"dbId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the Managed Database resides. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of Oracle Database installation. + DatabaseType DatabaseTypeEnum `mandatory:"true" json:"databaseType"` + + // The subtype of the Oracle Database. Indicates whether the database is a Container Database, + // Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database. + DatabaseSubType DatabaseSubTypeEnum `mandatory:"true" json:"databaseSubType"` + + // The infrastructure used to deploy the Oracle Database. + DeploymentType DeploymentTypeEnum `mandatory:"true" json:"deploymentType"` + + // The display name of the Managed Database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The database role of the Managed Database. + DbRole DbRoleEnum `mandatory:"true" json:"dbRole"` + + // Indicates whether Data Guard is enabled for the database. + IsDataguardEnabled *bool `mandatory:"true" json:"isDataguardEnabled"` + + LastBackupSummary *DatabaseBackupSummary `mandatory:"true" json:"lastBackupSummary"` + + // A list of database health metrics such as BackupDuration and BackupSize. + Metrics []HaMetricDefinition `mandatory:"true" json:"metrics"` + + // The Oracle Database version. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // The workload type of the Autonomous Database. + WorkloadType WorkloadTypeEnum `mandatory:"false" json:"workloadType,omitempty"` + + // The database ID of the Managed Database. Every database had its own ID and that value is captured here. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The database unique name of the Managed Database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` +} + +func (m DatabaseHaMetrics) 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 DatabaseHaMetrics) 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 := GetMappingDatabaseSubTypeEnum(string(m.DatabaseSubType)); !ok && m.DatabaseSubType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseSubType: %s. Supported values are: %s.", m.DatabaseSubType, strings.Join(GetDatabaseSubTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDeploymentTypeEnum(string(m.DeploymentType)); !ok && m.DeploymentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DeploymentType: %s. Supported values are: %s.", m.DeploymentType, strings.Join(GetDeploymentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDbRoleEnum(string(m.DbRole)); !ok && m.DbRole != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbRole: %s. Supported values are: %s.", m.DbRole, strings.Join(GetDbRoleEnumStringValues(), ","))) + } + + if _, ok := GetMappingWorkloadTypeEnum(string(m.WorkloadType)); !ok && m.WorkloadType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for WorkloadType: %s. Supported values are: %s.", m.WorkloadType, strings.Join(GetWorkloadTypeEnumStringValues(), ","))) + } + 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/databasemanagement/database_hosted_in.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_hosted_in.go new file mode 100644 index 00000000000..764d3e62372 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/database_hosted_in.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "strings" +) + +// DatabaseHostedInEnum Enum with underlying type: string +type DatabaseHostedInEnum string + +// Set of constants representing the allowable values for DatabaseHostedInEnum +const ( + DatabaseHostedInCloud DatabaseHostedInEnum = "CLOUD" + DatabaseHostedInExternal DatabaseHostedInEnum = "EXTERNAL" +) + +var mappingDatabaseHostedInEnum = map[string]DatabaseHostedInEnum{ + "CLOUD": DatabaseHostedInCloud, + "EXTERNAL": DatabaseHostedInExternal, +} + +var mappingDatabaseHostedInEnumLowerCase = map[string]DatabaseHostedInEnum{ + "cloud": DatabaseHostedInCloud, + "external": DatabaseHostedInExternal, +} + +// GetDatabaseHostedInEnumValues Enumerates the set of values for DatabaseHostedInEnum +func GetDatabaseHostedInEnumValues() []DatabaseHostedInEnum { + values := make([]DatabaseHostedInEnum, 0) + for _, v := range mappingDatabaseHostedInEnum { + values = append(values, v) + } + return values +} + +// GetDatabaseHostedInEnumStringValues Enumerates the set of values in String for DatabaseHostedInEnum +func GetDatabaseHostedInEnumStringValues() []string { + return []string{ + "CLOUD", + "EXTERNAL", + } +} + +// GetMappingDatabaseHostedInEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDatabaseHostedInEnum(val string) (DatabaseHostedInEnum, bool) { + enum, ok := mappingDatabaseHostedInEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_dbmanagement_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_dbmanagement_client.go index 49ee2d2f21c..791c544779b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_dbmanagement_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_dbmanagement_client.go @@ -1029,6 +1029,70 @@ func (client DbManagementClient) checkExternalExadataStorageConnector(ctx contex return response, err } +// CheckExternalMySqlDatabaseConnectorConnectionStatus Check the status of the external database connection specified in this connector. +// This operation will refresh the connectionStatus and timeConnectionStatusLastUpdated fields. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/CheckExternalMySqlDatabaseConnectorConnectionStatus.go.html to see an example of how to use CheckExternalMySqlDatabaseConnectorConnectionStatus API. +// A default retry strategy applies to this operation CheckExternalMySqlDatabaseConnectorConnectionStatus() +func (client DbManagementClient) CheckExternalMySqlDatabaseConnectorConnectionStatus(ctx context.Context, request CheckExternalMySqlDatabaseConnectorConnectionStatusRequest) (response CheckExternalMySqlDatabaseConnectorConnectionStatusResponse, 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.checkExternalMySqlDatabaseConnectorConnectionStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CheckExternalMySqlDatabaseConnectorConnectionStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CheckExternalMySqlDatabaseConnectorConnectionStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CheckExternalMySqlDatabaseConnectorConnectionStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CheckExternalMySqlDatabaseConnectorConnectionStatusResponse") + } + return +} + +// checkExternalMySqlDatabaseConnectorConnectionStatus implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) checkExternalMySqlDatabaseConnectorConnectionStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/externalMySqlDatabaseConnectors/{externalMySqlDatabaseConnectorId}/actions/checkConnectionStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CheckExternalMySqlDatabaseConnectorConnectionStatusResponse + 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-management/20201101/ExternalMySqlDatabaseConnector/CheckExternalMySqlDatabaseConnectorConnectionStatus" + err = common.PostProcessServiceError(err, "DbManagement", "CheckExternalMySqlDatabaseConnectorConnectionStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ConfigureAutomaticCaptureFilters Configures automatic capture filters to capture only those statements // that match the filter criteria. // @@ -1529,6 +1593,132 @@ func (client DbManagementClient) createExternalExadataStorageConnector(ctx conte return response, err } +// CreateExternalMySqlDatabase Creates an external MySQL database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/CreateExternalMySqlDatabase.go.html to see an example of how to use CreateExternalMySqlDatabase API. +// A default retry strategy applies to this operation CreateExternalMySqlDatabase() +func (client DbManagementClient) CreateExternalMySqlDatabase(ctx context.Context, request CreateExternalMySqlDatabaseRequest) (response CreateExternalMySqlDatabaseResponse, 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.createExternalMySqlDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateExternalMySqlDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateExternalMySqlDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateExternalMySqlDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateExternalMySqlDatabaseResponse") + } + return +} + +// createExternalMySqlDatabase implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) createExternalMySqlDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/externalMySqlDatabases", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateExternalMySqlDatabaseResponse + 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-management/20201101/ExternalMySqlDatabase/CreateExternalMySqlDatabase" + err = common.PostProcessServiceError(err, "DbManagement", "CreateExternalMySqlDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateExternalMySqlDatabaseConnector Creates an external MySQL connector resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/CreateExternalMySqlDatabaseConnector.go.html to see an example of how to use CreateExternalMySqlDatabaseConnector API. +// A default retry strategy applies to this operation CreateExternalMySqlDatabaseConnector() +func (client DbManagementClient) CreateExternalMySqlDatabaseConnector(ctx context.Context, request CreateExternalMySqlDatabaseConnectorRequest) (response CreateExternalMySqlDatabaseConnectorResponse, 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.createExternalMySqlDatabaseConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateExternalMySqlDatabaseConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateExternalMySqlDatabaseConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateExternalMySqlDatabaseConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateExternalMySqlDatabaseConnectorResponse") + } + return +} + +// createExternalMySqlDatabaseConnector implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) createExternalMySqlDatabaseConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/externalMySqlDatabaseConnectors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateExternalMySqlDatabaseConnectorResponse + 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-management/20201101/ExternalMySqlDatabaseConnector/CreateExternalMySqlDatabaseConnector" + err = common.PostProcessServiceError(err, "DbManagement", "CreateExternalMySqlDatabaseConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateJob Creates a job to be executed on a Managed Database or Managed Database Group. Only one // of the parameters, managedDatabaseId or managedDatabaseGroupId should be provided as // input in CreateJobDetails resource in request body. @@ -2122,6 +2312,120 @@ func (client DbManagementClient) deleteExternalExadataStorageConnector(ctx conte return response, err } +// DeleteExternalMySqlDatabase Deletes the Oracle Cloud Infrastructure resource representing an external MySQL database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DeleteExternalMySqlDatabase.go.html to see an example of how to use DeleteExternalMySqlDatabase API. +func (client DbManagementClient) DeleteExternalMySqlDatabase(ctx context.Context, request DeleteExternalMySqlDatabaseRequest) (response DeleteExternalMySqlDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteExternalMySqlDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteExternalMySqlDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteExternalMySqlDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteExternalMySqlDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteExternalMySqlDatabaseResponse") + } + return +} + +// deleteExternalMySqlDatabase implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) deleteExternalMySqlDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/externalMySqlDatabases/{externalMySqlDatabaseId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteExternalMySqlDatabaseResponse + 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-management/20201101/ExternalMySqlDatabase/DeleteExternalMySqlDatabase" + err = common.PostProcessServiceError(err, "DbManagement", "DeleteExternalMySqlDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteExternalMySqlDatabaseConnector Deletes the Oracle Cloud Infrastructure resource representing an external MySQL database connector. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DeleteExternalMySqlDatabaseConnector.go.html to see an example of how to use DeleteExternalMySqlDatabaseConnector API. +func (client DbManagementClient) DeleteExternalMySqlDatabaseConnector(ctx context.Context, request DeleteExternalMySqlDatabaseConnectorRequest) (response DeleteExternalMySqlDatabaseConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteExternalMySqlDatabaseConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteExternalMySqlDatabaseConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteExternalMySqlDatabaseConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteExternalMySqlDatabaseConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteExternalMySqlDatabaseConnectorResponse") + } + return +} + +// deleteExternalMySqlDatabaseConnector implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) deleteExternalMySqlDatabaseConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/externalMySqlDatabaseConnectors/{externalMySqlDatabaseConnectorId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteExternalMySqlDatabaseConnectorResponse + 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-management/20201101/ExternalMySqlDatabaseConnector/DeleteExternalMySqlDatabaseConnector" + err = common.PostProcessServiceError(err, "DbManagement", "DeleteExternalMySqlDatabaseConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteJob Deletes the job specified by jobId. // // # See also @@ -2852,13 +3156,13 @@ func (client DbManagementClient) disableExternalExadataInfrastructureManagement( return response, err } -// DisableExternalNonContainerDatabaseManagementFeature Disables a Database Management feature for the specified external non-container database. +// DisableExternalMySqlDatabaseManagement Disables Database Management for an external MySQL Database. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalNonContainerDatabaseManagementFeature.go.html to see an example of how to use DisableExternalNonContainerDatabaseManagementFeature API. -// A default retry strategy applies to this operation DisableExternalNonContainerDatabaseManagementFeature() -func (client DbManagementClient) DisableExternalNonContainerDatabaseManagementFeature(ctx context.Context, request DisableExternalNonContainerDatabaseManagementFeatureRequest) (response DisableExternalNonContainerDatabaseManagementFeatureResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalMySqlDatabaseManagement.go.html to see an example of how to use DisableExternalMySqlDatabaseManagement API. +// A default retry strategy applies to this operation DisableExternalMySqlDatabaseManagement() +func (client DbManagementClient) DisableExternalMySqlDatabaseManagement(ctx context.Context, request DisableExternalMySqlDatabaseManagementRequest) (response DisableExternalMySqlDatabaseManagementResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2872,42 +3176,42 @@ func (client DbManagementClient) DisableExternalNonContainerDatabaseManagementFe request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.disableExternalNonContainerDatabaseManagementFeature, policy) + ociResponse, err = common.Retry(ctx, request, client.disableExternalMySqlDatabaseManagement, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DisableExternalNonContainerDatabaseManagementFeatureResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DisableExternalMySqlDatabaseManagementResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DisableExternalNonContainerDatabaseManagementFeatureResponse{} + response = DisableExternalMySqlDatabaseManagementResponse{} } } return } - if convertedResponse, ok := ociResponse.(DisableExternalNonContainerDatabaseManagementFeatureResponse); ok { + if convertedResponse, ok := ociResponse.(DisableExternalMySqlDatabaseManagementResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DisableExternalNonContainerDatabaseManagementFeatureResponse") + err = fmt.Errorf("failed to convert OCIResponse into DisableExternalMySqlDatabaseManagementResponse") } return } -// disableExternalNonContainerDatabaseManagementFeature implements the OCIOperation interface (enables retrying operations) -func (client DbManagementClient) disableExternalNonContainerDatabaseManagementFeature(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// disableExternalMySqlDatabaseManagement implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) disableExternalMySqlDatabaseManagement(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/externalnoncontainerdatabases/{externalNonContainerDatabaseId}/actions/disableDatabaseManagement", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/externalMySqlDatabases/{externalMySqlDatabaseId}/actions/disableDatabaseManagement", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DisableExternalNonContainerDatabaseManagementFeatureResponse + var response DisableExternalMySqlDatabaseManagementResponse 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-management/20201101/ManagedDatabase/DisableExternalNonContainerDatabaseManagementFeature" - err = common.PostProcessServiceError(err, "DbManagement", "DisableExternalNonContainerDatabaseManagementFeature", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ExternalMySqlDatabase/DisableExternalMySqlDatabaseManagement" + err = common.PostProcessServiceError(err, "DbManagement", "DisableExternalMySqlDatabaseManagement", apiReferenceLink) return response, err } @@ -2915,13 +3219,13 @@ func (client DbManagementClient) disableExternalNonContainerDatabaseManagementFe return response, err } -// DisableExternalPluggableDatabaseManagementFeature Disables a Database Management feature for the specified external pluggable database. +// DisableExternalNonContainerDatabaseManagementFeature Disables a Database Management feature for the specified external non-container database. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalPluggableDatabaseManagementFeature.go.html to see an example of how to use DisableExternalPluggableDatabaseManagementFeature API. -// A default retry strategy applies to this operation DisableExternalPluggableDatabaseManagementFeature() -func (client DbManagementClient) DisableExternalPluggableDatabaseManagementFeature(ctx context.Context, request DisableExternalPluggableDatabaseManagementFeatureRequest) (response DisableExternalPluggableDatabaseManagementFeatureResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalNonContainerDatabaseManagementFeature.go.html to see an example of how to use DisableExternalNonContainerDatabaseManagementFeature API. +// A default retry strategy applies to this operation DisableExternalNonContainerDatabaseManagementFeature() +func (client DbManagementClient) DisableExternalNonContainerDatabaseManagementFeature(ctx context.Context, request DisableExternalNonContainerDatabaseManagementFeatureRequest) (response DisableExternalNonContainerDatabaseManagementFeatureResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2935,7 +3239,70 @@ func (client DbManagementClient) DisableExternalPluggableDatabaseManagementFeatu request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.disableExternalPluggableDatabaseManagementFeature, policy) + ociResponse, err = common.Retry(ctx, request, client.disableExternalNonContainerDatabaseManagementFeature, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DisableExternalNonContainerDatabaseManagementFeatureResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DisableExternalNonContainerDatabaseManagementFeatureResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DisableExternalNonContainerDatabaseManagementFeatureResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DisableExternalNonContainerDatabaseManagementFeatureResponse") + } + return +} + +// disableExternalNonContainerDatabaseManagementFeature implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) disableExternalNonContainerDatabaseManagementFeature(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/externalnoncontainerdatabases/{externalNonContainerDatabaseId}/actions/disableDatabaseManagement", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DisableExternalNonContainerDatabaseManagementFeatureResponse + 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-management/20201101/ManagedDatabase/DisableExternalNonContainerDatabaseManagementFeature" + err = common.PostProcessServiceError(err, "DbManagement", "DisableExternalNonContainerDatabaseManagementFeature", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DisableExternalPluggableDatabaseManagementFeature Disables a Database Management feature for the specified external pluggable database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalPluggableDatabaseManagementFeature.go.html to see an example of how to use DisableExternalPluggableDatabaseManagementFeature API. +// A default retry strategy applies to this operation DisableExternalPluggableDatabaseManagementFeature() +func (client DbManagementClient) DisableExternalPluggableDatabaseManagementFeature(ctx context.Context, request DisableExternalPluggableDatabaseManagementFeatureRequest) (response DisableExternalPluggableDatabaseManagementFeatureResponse, 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.disableExternalPluggableDatabaseManagementFeature, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { @@ -3870,6 +4237,69 @@ func (client DbManagementClient) enableExternalExadataInfrastructureManagement(c return response, err } +// EnableExternalMySqlDatabaseManagement Enables Database Management for an external MySQL Database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/EnableExternalMySqlDatabaseManagement.go.html to see an example of how to use EnableExternalMySqlDatabaseManagement API. +// A default retry strategy applies to this operation EnableExternalMySqlDatabaseManagement() +func (client DbManagementClient) EnableExternalMySqlDatabaseManagement(ctx context.Context, request EnableExternalMySqlDatabaseManagementRequest) (response EnableExternalMySqlDatabaseManagementResponse, 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.enableExternalMySqlDatabaseManagement, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = EnableExternalMySqlDatabaseManagementResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = EnableExternalMySqlDatabaseManagementResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(EnableExternalMySqlDatabaseManagementResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into EnableExternalMySqlDatabaseManagementResponse") + } + return +} + +// enableExternalMySqlDatabaseManagement implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) enableExternalMySqlDatabaseManagement(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/externalMySqlDatabases/{externalMySqlDatabaseId}/actions/enableDatabaseManagement", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response EnableExternalMySqlDatabaseManagementResponse + 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-management/20201101/ExternalMySqlDatabase/EnableExternalMySqlDatabaseManagement" + err = common.PostProcessServiceError(err, "DbManagement", "EnableExternalMySqlDatabaseManagement", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // EnableExternalNonContainerDatabaseManagementFeature Enables Database Management feature for the specified external non-container database. // // # See also @@ -4426,6 +4856,184 @@ func (client DbManagementClient) getClusterCacheMetric(ctx context.Context, requ return response, err } +// GetDatabaseFleetBackupMetrics Gets the fleet of container databases (CDBs) and their backup details and metrics, in a compartment or Database Group. +// The databaseHostedIn query parameter must be provided to list either cloud or external databases. +// Either the CompartmentId or the ManagedDatabaseGroupId query parameters must be provided to retrieve the HA and backup metrics. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseFleetBackupMetrics.go.html to see an example of how to use GetDatabaseFleetBackupMetrics API. +// A default retry strategy applies to this operation GetDatabaseFleetBackupMetrics() +func (client DbManagementClient) GetDatabaseFleetBackupMetrics(ctx context.Context, request GetDatabaseFleetBackupMetricsRequest) (response GetDatabaseFleetBackupMetricsResponse, 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.getDatabaseFleetBackupMetrics, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDatabaseFleetBackupMetricsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDatabaseFleetBackupMetricsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDatabaseFleetBackupMetricsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDatabaseFleetBackupMetricsResponse") + } + return +} + +// getDatabaseFleetBackupMetrics implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getDatabaseFleetBackupMetrics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseFleetBackupMetrics", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDatabaseFleetBackupMetricsResponse + 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-management/20201101/DatabaseFleetBackupMetrics/GetDatabaseFleetBackupMetrics" + err = common.PostProcessServiceError(err, "DbManagement", "GetDatabaseFleetBackupMetrics", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDatabaseFleetDataguardMetrics Gets the fleet of Oracle Data Guard-enabled container databases (CDBs) along with Data Guard metrics and standby databases, in a compartment or Database Group. +// Either the CompartmentId or the ManagedDatabaseGroupId query parameters must be provided to retrieve the list of databases and Data Guard metrics. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseFleetDataguardMetrics.go.html to see an example of how to use GetDatabaseFleetDataguardMetrics API. +// A default retry strategy applies to this operation GetDatabaseFleetDataguardMetrics() +func (client DbManagementClient) GetDatabaseFleetDataguardMetrics(ctx context.Context, request GetDatabaseFleetDataguardMetricsRequest) (response GetDatabaseFleetDataguardMetricsResponse, 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.getDatabaseFleetDataguardMetrics, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDatabaseFleetDataguardMetricsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDatabaseFleetDataguardMetricsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDatabaseFleetDataguardMetricsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDatabaseFleetDataguardMetricsResponse") + } + return +} + +// getDatabaseFleetDataguardMetrics implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getDatabaseFleetDataguardMetrics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseFleetDataguardMetrics", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDatabaseFleetDataguardMetricsResponse + 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-management/20201101/DatabaseFleetDataguardMetrics/GetDatabaseFleetDataguardMetrics" + err = common.PostProcessServiceError(err, "DbManagement", "GetDatabaseFleetDataguardMetrics", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDatabaseFleetHaOverviewMetrics Gets the fleet of container databases (CDBs) and their HA and backup metrics in a compartment or in a Database Group. +// Either the CompartmentId or the ManagedDatabaseGroupId query parameters must be provided to retrieve the HA and backup metrics. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseFleetHaOverviewMetrics.go.html to see an example of how to use GetDatabaseFleetHaOverviewMetrics API. +// A default retry strategy applies to this operation GetDatabaseFleetHaOverviewMetrics() +func (client DbManagementClient) GetDatabaseFleetHaOverviewMetrics(ctx context.Context, request GetDatabaseFleetHaOverviewMetricsRequest) (response GetDatabaseFleetHaOverviewMetricsResponse, 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.getDatabaseFleetHaOverviewMetrics, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDatabaseFleetHaOverviewMetricsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDatabaseFleetHaOverviewMetricsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDatabaseFleetHaOverviewMetricsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDatabaseFleetHaOverviewMetricsResponse") + } + return +} + +// getDatabaseFleetHaOverviewMetrics implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getDatabaseFleetHaOverviewMetrics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseFleetHaOverviewMetrics", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDatabaseFleetHaOverviewMetricsResponse + 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-management/20201101/DatabaseFleetHaOverviewMetrics/GetDatabaseFleetHaOverviewMetrics" + err = common.PostProcessServiceError(err, "DbManagement", "GetDatabaseFleetHaOverviewMetrics", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetDatabaseFleetHealthMetrics Gets the health metrics for a fleet of databases in a compartment or in a Managed Database Group. // Either the CompartmentId or the ManagedDatabaseGroupId query parameters must be provided to retrieve the health metrics. // @@ -4484,6 +5092,64 @@ func (client DbManagementClient) getDatabaseFleetHealthMetrics(ctx context.Conte return response, err } +// GetDatabaseHaBackupDetails Gets HA and backup details with metrics and backup history for a single database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseHaBackupDetails.go.html to see an example of how to use GetDatabaseHaBackupDetails API. +// A default retry strategy applies to this operation GetDatabaseHaBackupDetails() +func (client DbManagementClient) GetDatabaseHaBackupDetails(ctx context.Context, request GetDatabaseHaBackupDetailsRequest) (response GetDatabaseHaBackupDetailsResponse, 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.getDatabaseHaBackupDetails, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDatabaseHaBackupDetailsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDatabaseHaBackupDetailsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDatabaseHaBackupDetailsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDatabaseHaBackupDetailsResponse") + } + return +} + +// getDatabaseHaBackupDetails implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getDatabaseHaBackupDetails(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/managedDatabases/{managedDatabaseId}/haBackupDetails", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDatabaseHaBackupDetailsResponse + 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-management/20201101/DatabaseHaBackupDetails/GetDatabaseHaBackupDetails" + err = common.PostProcessServiceError(err, "DbManagement", "GetDatabaseHaBackupDetails", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetDatabaseHomeMetrics Gets a summary of the activity and resource usage metrics like DB Time, CPU, User I/O, Wait, Storage, and Memory for a Managed Database. // // # See also @@ -5311,42 +5977,158 @@ func (client DbManagementClient) GetExternalExadataStorageConnector(ctx context. if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getExternalExadataStorageConnector, policy) + ociResponse, err = common.Retry(ctx, request, client.getExternalExadataStorageConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetExternalExadataStorageConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetExternalExadataStorageConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetExternalExadataStorageConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExternalExadataStorageConnectorResponse") + } + return +} + +// getExternalExadataStorageConnector implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getExternalExadataStorageConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalExadataStorageConnectors/{externalExadataStorageConnectorId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetExternalExadataStorageConnectorResponse + 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-management/20201101/ExternalExadataStorageConnector/GetExternalExadataStorageConnector" + err = common.PostProcessServiceError(err, "DbManagement", "GetExternalExadataStorageConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExternalExadataStorageGrid Gets the details for the Exadata storage server grid specified by exadataStorageGridId. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalExadataStorageGrid.go.html to see an example of how to use GetExternalExadataStorageGrid API. +// A default retry strategy applies to this operation GetExternalExadataStorageGrid() +func (client DbManagementClient) GetExternalExadataStorageGrid(ctx context.Context, request GetExternalExadataStorageGridRequest) (response GetExternalExadataStorageGridResponse, 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.getExternalExadataStorageGrid, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetExternalExadataStorageGridResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetExternalExadataStorageGridResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetExternalExadataStorageGridResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetExternalExadataStorageGridResponse") + } + return +} + +// getExternalExadataStorageGrid implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getExternalExadataStorageGrid(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalExadataStorageGrids/{externalExadataStorageGridId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetExternalExadataStorageGridResponse + 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-management/20201101/ExternalExadataStorageGrid/GetExternalExadataStorageGrid" + err = common.PostProcessServiceError(err, "DbManagement", "GetExternalExadataStorageGrid", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExternalExadataStorageServer Gets the summary for the Exadata storage server specified by exadataStorageServerId. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalExadataStorageServer.go.html to see an example of how to use GetExternalExadataStorageServer API. +// A default retry strategy applies to this operation GetExternalExadataStorageServer() +func (client DbManagementClient) GetExternalExadataStorageServer(ctx context.Context, request GetExternalExadataStorageServerRequest) (response GetExternalExadataStorageServerResponse, 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.getExternalExadataStorageServer, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetExternalExadataStorageConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetExternalExadataStorageServerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetExternalExadataStorageConnectorResponse{} + response = GetExternalExadataStorageServerResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetExternalExadataStorageConnectorResponse); ok { + if convertedResponse, ok := ociResponse.(GetExternalExadataStorageServerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExternalExadataStorageConnectorResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetExternalExadataStorageServerResponse") } return } -// getExternalExadataStorageConnector implements the OCIOperation interface (enables retrying operations) -func (client DbManagementClient) getExternalExadataStorageConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getExternalExadataStorageServer implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getExternalExadataStorageServer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalExadataStorageConnectors/{externalExadataStorageConnectorId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalExadataStorageServers/{externalExadataStorageServerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetExternalExadataStorageConnectorResponse + var response GetExternalExadataStorageServerResponse 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-management/20201101/ExternalExadataStorageConnector/GetExternalExadataStorageConnector" - err = common.PostProcessServiceError(err, "DbManagement", "GetExternalExadataStorageConnector", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ExternalExadataStorageServer/GetExternalExadataStorageServer" + err = common.PostProcessServiceError(err, "DbManagement", "GetExternalExadataStorageServer", apiReferenceLink) return response, err } @@ -5354,13 +6136,13 @@ func (client DbManagementClient) getExternalExadataStorageConnector(ctx context. return response, err } -// GetExternalExadataStorageGrid Gets the details for the Exadata storage server grid specified by exadataStorageGridId. +// GetExternalListener Gets the details for the external listener specified by `externalListenerId`. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalExadataStorageGrid.go.html to see an example of how to use GetExternalExadataStorageGrid API. -// A default retry strategy applies to this operation GetExternalExadataStorageGrid() -func (client DbManagementClient) GetExternalExadataStorageGrid(ctx context.Context, request GetExternalExadataStorageGridRequest) (response GetExternalExadataStorageGridResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalListener.go.html to see an example of how to use GetExternalListener API. +// A default retry strategy applies to this operation GetExternalListener() +func (client DbManagementClient) GetExternalListener(ctx context.Context, request GetExternalListenerRequest) (response GetExternalListenerResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5369,42 +6151,42 @@ func (client DbManagementClient) GetExternalExadataStorageGrid(ctx context.Conte if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getExternalExadataStorageGrid, policy) + ociResponse, err = common.Retry(ctx, request, client.getExternalListener, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetExternalExadataStorageGridResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetExternalListenerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetExternalExadataStorageGridResponse{} + response = GetExternalListenerResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetExternalExadataStorageGridResponse); ok { + if convertedResponse, ok := ociResponse.(GetExternalListenerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExternalExadataStorageGridResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetExternalListenerResponse") } return } -// getExternalExadataStorageGrid implements the OCIOperation interface (enables retrying operations) -func (client DbManagementClient) getExternalExadataStorageGrid(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getExternalListener implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getExternalListener(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalExadataStorageGrids/{externalExadataStorageGridId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalListeners/{externalListenerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetExternalExadataStorageGridResponse + var response GetExternalListenerResponse 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-management/20201101/ExternalExadataStorageGrid/GetExternalExadataStorageGrid" - err = common.PostProcessServiceError(err, "DbManagement", "GetExternalExadataStorageGrid", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ExternalListener/GetExternalListener" + err = common.PostProcessServiceError(err, "DbManagement", "GetExternalListener", apiReferenceLink) return response, err } @@ -5412,13 +6194,13 @@ func (client DbManagementClient) getExternalExadataStorageGrid(ctx context.Conte return response, err } -// GetExternalExadataStorageServer Gets the summary for the Exadata storage server specified by exadataStorageServerId. +// GetExternalMySqlDatabase Retrieves the external MySQL database information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalExadataStorageServer.go.html to see an example of how to use GetExternalExadataStorageServer API. -// A default retry strategy applies to this operation GetExternalExadataStorageServer() -func (client DbManagementClient) GetExternalExadataStorageServer(ctx context.Context, request GetExternalExadataStorageServerRequest) (response GetExternalExadataStorageServerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalMySqlDatabase.go.html to see an example of how to use GetExternalMySqlDatabase API. +// A default retry strategy applies to this operation GetExternalMySqlDatabase() +func (client DbManagementClient) GetExternalMySqlDatabase(ctx context.Context, request GetExternalMySqlDatabaseRequest) (response GetExternalMySqlDatabaseResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5427,42 +6209,42 @@ func (client DbManagementClient) GetExternalExadataStorageServer(ctx context.Con if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getExternalExadataStorageServer, policy) + ociResponse, err = common.Retry(ctx, request, client.getExternalMySqlDatabase, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetExternalExadataStorageServerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetExternalMySqlDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetExternalExadataStorageServerResponse{} + response = GetExternalMySqlDatabaseResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetExternalExadataStorageServerResponse); ok { + if convertedResponse, ok := ociResponse.(GetExternalMySqlDatabaseResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExternalExadataStorageServerResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetExternalMySqlDatabaseResponse") } return } -// getExternalExadataStorageServer implements the OCIOperation interface (enables retrying operations) -func (client DbManagementClient) getExternalExadataStorageServer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getExternalMySqlDatabase implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getExternalMySqlDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalExadataStorageServers/{externalExadataStorageServerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalMySqlDatabases/{externalMySqlDatabaseId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetExternalExadataStorageServerResponse + var response GetExternalMySqlDatabaseResponse 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-management/20201101/ExternalExadataStorageServer/GetExternalExadataStorageServer" - err = common.PostProcessServiceError(err, "DbManagement", "GetExternalExadataStorageServer", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ExternalMySqlDatabase/GetExternalMySqlDatabase" + err = common.PostProcessServiceError(err, "DbManagement", "GetExternalMySqlDatabase", apiReferenceLink) return response, err } @@ -5470,13 +6252,13 @@ func (client DbManagementClient) getExternalExadataStorageServer(ctx context.Con return response, err } -// GetExternalListener Gets the details for the external listener specified by `externalListenerId`. +// GetExternalMySqlDatabaseConnector Retrieves the MySQL database connector. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalListener.go.html to see an example of how to use GetExternalListener API. -// A default retry strategy applies to this operation GetExternalListener() -func (client DbManagementClient) GetExternalListener(ctx context.Context, request GetExternalListenerRequest) (response GetExternalListenerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalMySqlDatabaseConnector.go.html to see an example of how to use GetExternalMySqlDatabaseConnector API. +// A default retry strategy applies to this operation GetExternalMySqlDatabaseConnector() +func (client DbManagementClient) GetExternalMySqlDatabaseConnector(ctx context.Context, request GetExternalMySqlDatabaseConnectorRequest) (response GetExternalMySqlDatabaseConnectorResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5485,42 +6267,42 @@ func (client DbManagementClient) GetExternalListener(ctx context.Context, reques if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getExternalListener, policy) + ociResponse, err = common.Retry(ctx, request, client.getExternalMySqlDatabaseConnector, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetExternalListenerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetExternalMySqlDatabaseConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetExternalListenerResponse{} + response = GetExternalMySqlDatabaseConnectorResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetExternalListenerResponse); ok { + if convertedResponse, ok := ociResponse.(GetExternalMySqlDatabaseConnectorResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExternalListenerResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetExternalMySqlDatabaseConnectorResponse") } return } -// getExternalListener implements the OCIOperation interface (enables retrying operations) -func (client DbManagementClient) getExternalListener(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getExternalMySqlDatabaseConnector implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) getExternalMySqlDatabaseConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalListeners/{externalListenerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalMySqlDatabaseConnectors/{externalMySqlDatabaseConnectorId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetExternalListenerResponse + var response GetExternalMySqlDatabaseConnectorResponse 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-management/20201101/ExternalListener/GetExternalListener" - err = common.PostProcessServiceError(err, "DbManagement", "GetExternalListener", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database-management/20201101/ExternalMySqlDatabase/GetExternalMySqlDatabaseConnector" + err = common.PostProcessServiceError(err, "DbManagement", "GetExternalMySqlDatabaseConnector", apiReferenceLink) return response, err } @@ -8249,6 +9031,63 @@ func (client DbManagementClient) listExternalListeners(ctx context.Context, requ return response, err } +// ListExternalMySqlDatabases Gets the list of External MySQL Databases. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/ListExternalMySqlDatabases.go.html to see an example of how to use ListExternalMySqlDatabases API. +func (client DbManagementClient) ListExternalMySqlDatabases(ctx context.Context, request ListExternalMySqlDatabasesRequest) (response ListExternalMySqlDatabasesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listExternalMySqlDatabases, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListExternalMySqlDatabasesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListExternalMySqlDatabasesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListExternalMySqlDatabasesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListExternalMySqlDatabasesResponse") + } + return +} + +// listExternalMySqlDatabases implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) listExternalMySqlDatabases(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalMySqlDatabases", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListExternalMySqlDatabasesResponse + 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-management/20201101/ExternalMySqlDatabaseCollection/ListExternalMySqlDatabases" + err = common.PostProcessServiceError(err, "DbManagement", "ListExternalMySqlDatabases", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListJobExecutions Gets the job execution for a specific ID or the list of job executions for a job, job run, Managed Database or Managed Database Group // in a specific compartment. Only one of the parameters, ID, jobId, jobRunId, managedDatabaseId or managedDatabaseGroupId should be provided. // If none of these parameters is provided, all the job executions in the compartment are listed. Job executions can also be filtered @@ -8551,6 +9390,63 @@ func (client DbManagementClient) listManagedDatabases(ctx context.Context, reque return response, err } +// ListMySqlDatabaseConnectors Gets the list of External MySQL Database connectors. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/ListMySqlDatabaseConnectors.go.html to see an example of how to use ListMySqlDatabaseConnectors API. +func (client DbManagementClient) ListMySqlDatabaseConnectors(ctx context.Context, request ListMySqlDatabaseConnectorsRequest) (response ListMySqlDatabaseConnectorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listMySqlDatabaseConnectors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListMySqlDatabaseConnectorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListMySqlDatabaseConnectorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListMySqlDatabaseConnectorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMySqlDatabaseConnectorsResponse") + } + return +} + +// listMySqlDatabaseConnectors implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) listMySqlDatabaseConnectors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/externalMySqlDatabaseConnectors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListMySqlDatabaseConnectorsResponse + 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-management/20201101/MySqlConnectorCollection/ListMySqlDatabaseConnectors" + err = common.PostProcessServiceError(err, "DbManagement", "ListMySqlDatabaseConnectors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListNamedCredentials Gets a single named credential specified by the name or all the named credentials in a specific compartment. // // # See also @@ -12340,6 +13236,120 @@ func (client DbManagementClient) updateExternalListener(ctx context.Context, req return response, err } +// UpdateExternalMysqlDatabase Updates the External Mysql Database. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/UpdateExternalMysqlDatabase.go.html to see an example of how to use UpdateExternalMysqlDatabase API. +func (client DbManagementClient) UpdateExternalMysqlDatabase(ctx context.Context, request UpdateExternalMysqlDatabaseRequest) (response UpdateExternalMysqlDatabaseResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateExternalMysqlDatabase, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateExternalMysqlDatabaseResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateExternalMysqlDatabaseResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateExternalMysqlDatabaseResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateExternalMysqlDatabaseResponse") + } + return +} + +// updateExternalMysqlDatabase implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) updateExternalMysqlDatabase(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/externalMySqlDatabases/{externalMySqlDatabaseId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateExternalMysqlDatabaseResponse + 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-management/20201101/ExternalMySqlDatabase/UpdateExternalMysqlDatabase" + err = common.PostProcessServiceError(err, "DbManagement", "UpdateExternalMysqlDatabase", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateExternalMysqlDatabaseConnector Updates the External Mysql Database Connector. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/UpdateExternalMysqlDatabaseConnector.go.html to see an example of how to use UpdateExternalMysqlDatabaseConnector API. +func (client DbManagementClient) UpdateExternalMysqlDatabaseConnector(ctx context.Context, request UpdateExternalMysqlDatabaseConnectorRequest) (response UpdateExternalMysqlDatabaseConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateExternalMysqlDatabaseConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateExternalMysqlDatabaseConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateExternalMysqlDatabaseConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateExternalMysqlDatabaseConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateExternalMysqlDatabaseConnectorResponse") + } + return +} + +// updateExternalMysqlDatabaseConnector implements the OCIOperation interface (enables retrying operations) +func (client DbManagementClient) updateExternalMysqlDatabaseConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/externalMySqlDatabaseConnectors/{externalMySqlDatabaseConnectorId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateExternalMysqlDatabaseConnectorResponse + 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-management/20201101/ExternalMySqlDatabaseConnector/UpdateExternalMysqlDatabaseConnector" + err = common.PostProcessServiceError(err, "DbManagement", "UpdateExternalMysqlDatabaseConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateJob Updates the details for the recurring scheduled job specified by jobId. Note that non-recurring (one time) jobs cannot be updated. // // # See also diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_managedmysqldatabases_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_managedmysqldatabases_client.go index 7637c298a75..b4645b554bf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_managedmysqldatabases_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/databasemanagement_managedmysqldatabases_client.go @@ -93,6 +93,132 @@ func (client *ManagedMySqlDatabasesClient) ConfigurationProvider() *common.Confi return client.config } +// DisableExternalMysqlAssociatedService Disable an Associated Service for an external MySQL database resource. An Associated Service example is OPSI. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalMysqlAssociatedService.go.html to see an example of how to use DisableExternalMysqlAssociatedService API. +// A default retry strategy applies to this operation DisableExternalMysqlAssociatedService() +func (client ManagedMySqlDatabasesClient) DisableExternalMysqlAssociatedService(ctx context.Context, request DisableExternalMysqlAssociatedServiceRequest) (response DisableExternalMysqlAssociatedServiceResponse, 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.disableExternalMysqlAssociatedService, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DisableExternalMysqlAssociatedServiceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DisableExternalMysqlAssociatedServiceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DisableExternalMysqlAssociatedServiceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DisableExternalMysqlAssociatedServiceResponse") + } + return +} + +// disableExternalMysqlAssociatedService implements the OCIOperation interface (enables retrying operations) +func (client ManagedMySqlDatabasesClient) disableExternalMysqlAssociatedService(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/internal/externalMySqlDatabases/{externalMySqlDatabaseId}/actions/disableAssociatedService", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DisableExternalMysqlAssociatedServiceResponse + 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-management/20201101/ExternalMySqlDatabase/DisableExternalMysqlAssociatedService" + err = common.PostProcessServiceError(err, "ManagedMySqlDatabases", "DisableExternalMysqlAssociatedService", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// EnableExternalMysqlAssociatedService Enable an Associated Service for an external MySQL database resource. An Associated Service example is OPSI. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/EnableExternalMysqlAssociatedService.go.html to see an example of how to use EnableExternalMysqlAssociatedService API. +// A default retry strategy applies to this operation EnableExternalMysqlAssociatedService() +func (client ManagedMySqlDatabasesClient) EnableExternalMysqlAssociatedService(ctx context.Context, request EnableExternalMysqlAssociatedServiceRequest) (response EnableExternalMysqlAssociatedServiceResponse, 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.enableExternalMysqlAssociatedService, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = EnableExternalMysqlAssociatedServiceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = EnableExternalMysqlAssociatedServiceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(EnableExternalMysqlAssociatedServiceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into EnableExternalMysqlAssociatedServiceResponse") + } + return +} + +// enableExternalMysqlAssociatedService implements the OCIOperation interface (enables retrying operations) +func (client ManagedMySqlDatabasesClient) enableExternalMysqlAssociatedService(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/internal/externalMySqlDatabases/{externalMySqlDatabaseId}/actions/enableAssociatedService", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response EnableExternalMysqlAssociatedServiceResponse + 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-management/20201101/ExternalMySqlDatabase/EnableExternalMysqlAssociatedService" + err = common.PostProcessServiceError(err, "ManagedMySqlDatabases", "EnableExternalMysqlAssociatedService", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetHeatWaveFleetMetric Gets the health metrics for a fleet of HeatWave clusters in a compartment. // // # See also diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/dataguard_metrics.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/dataguard_metrics.go new file mode 100644 index 00000000000..5c2b5dcb3f2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/dataguard_metrics.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DataguardMetrics The Data Guard usage metrics for a single database. +type DataguardMetrics struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database. + DbId *string `mandatory:"true" json:"dbId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the Managed Database resides. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of Oracle Database installation. + DatabaseType DatabaseTypeEnum `mandatory:"true" json:"databaseType"` + + // The subtype of the Oracle Database. Indicates whether the database is a Container Database, + // Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database. + DatabaseSubType DatabaseSubTypeEnum `mandatory:"true" json:"databaseSubType"` + + // The infrastructure used to deploy the Oracle Database. + DeploymentType DeploymentTypeEnum `mandatory:"true" json:"deploymentType"` + + // The display name of the Managed Database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The database role of the Managed Database. + DbRole DbRoleEnum `mandatory:"true" json:"dbRole"` + + // The Fast-Start Failover status of the primary database. + FastStartFailOver *string `mandatory:"true" json:"fastStartFailOver"` + + // The protection mode of the primary Database. + ProtectionMode *string `mandatory:"true" json:"protectionMode"` + + // A list of primary or standby database metrics. + Metrics []HaMetricDefinition `mandatory:"true" json:"metrics"` + + // A list of standby databases and their metrics + StandByDatabases []StandByDatabaseDataguardMetrics `mandatory:"true" json:"standByDatabases"` + + // The Oracle Database version. + DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` + + // The workload type of the Autonomous Database. + WorkloadType WorkloadTypeEnum `mandatory:"false" json:"workloadType,omitempty"` + + // The database ID of the Managed Database. Every database had its own ID and that value is captured here. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The database unique name of the Managed Database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` +} + +func (m DataguardMetrics) 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 DataguardMetrics) 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 := GetMappingDatabaseSubTypeEnum(string(m.DatabaseSubType)); !ok && m.DatabaseSubType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseSubType: %s. Supported values are: %s.", m.DatabaseSubType, strings.Join(GetDatabaseSubTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDeploymentTypeEnum(string(m.DeploymentType)); !ok && m.DeploymentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DeploymentType: %s. Supported values are: %s.", m.DeploymentType, strings.Join(GetDeploymentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDbRoleEnum(string(m.DbRole)); !ok && m.DbRole != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbRole: %s. Supported values are: %s.", m.DbRole, strings.Join(GetDbRoleEnumStringValues(), ","))) + } + + if _, ok := GetMappingWorkloadTypeEnum(string(m.WorkloadType)); !ok && m.WorkloadType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for WorkloadType: %s. Supported values are: %s.", m.WorkloadType, strings.Join(GetWorkloadTypeEnumStringValues(), ","))) + } + 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/databasemanagement/delete_external_my_sql_database_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/delete_external_my_sql_database_connector_request_response.go new file mode 100644 index 00000000000..c9ba8d6d70b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/delete_external_my_sql_database_connector_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteExternalMySqlDatabaseConnectorRequest wrapper for the DeleteExternalMySqlDatabaseConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DeleteExternalMySqlDatabaseConnector.go.html to see an example of how to use DeleteExternalMySqlDatabaseConnectorRequest. +type DeleteExternalMySqlDatabaseConnectorRequest struct { + + // The OCID of the External MySQL Database Connector. + ExternalMySqlDatabaseConnectorId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseConnectorId"` + + // 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 DeleteExternalMySqlDatabaseConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteExternalMySqlDatabaseConnectorRequest) 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 DeleteExternalMySqlDatabaseConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteExternalMySqlDatabaseConnectorRequest) 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 DeleteExternalMySqlDatabaseConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteExternalMySqlDatabaseConnectorResponse wrapper for the DeleteExternalMySqlDatabaseConnector operation +type DeleteExternalMySqlDatabaseConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + 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 DeleteExternalMySqlDatabaseConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteExternalMySqlDatabaseConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/delete_external_my_sql_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/delete_external_my_sql_database_request_response.go new file mode 100644 index 00000000000..2ba35074f7a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/delete_external_my_sql_database_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteExternalMySqlDatabaseRequest wrapper for the DeleteExternalMySqlDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DeleteExternalMySqlDatabase.go.html to see an example of how to use DeleteExternalMySqlDatabaseRequest. +type DeleteExternalMySqlDatabaseRequest struct { + + // The OCID of the External MySQL Database. + ExternalMySqlDatabaseId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseId"` + + // 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 DeleteExternalMySqlDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteExternalMySqlDatabaseRequest) 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 DeleteExternalMySqlDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteExternalMySqlDatabaseRequest) 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 DeleteExternalMySqlDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteExternalMySqlDatabaseResponse wrapper for the DeleteExternalMySqlDatabase operation +type DeleteExternalMySqlDatabaseResponse 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 request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteExternalMySqlDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteExternalMySqlDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_my_sql_database_management_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_my_sql_database_management_request_response.go new file mode 100644 index 00000000000..a8f6a5bcd8d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_my_sql_database_management_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DisableExternalMySqlDatabaseManagementRequest wrapper for the DisableExternalMySqlDatabaseManagement operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalMySqlDatabaseManagement.go.html to see an example of how to use DisableExternalMySqlDatabaseManagementRequest. +type DisableExternalMySqlDatabaseManagementRequest struct { + + // The OCID of the External MySQL Database. + ExternalMySqlDatabaseId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseId"` + + // 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"` + + // 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 DisableExternalMySqlDatabaseManagementRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DisableExternalMySqlDatabaseManagementRequest) 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 DisableExternalMySqlDatabaseManagementRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DisableExternalMySqlDatabaseManagementRequest) 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 DisableExternalMySqlDatabaseManagementRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DisableExternalMySqlDatabaseManagementResponse wrapper for the DisableExternalMySqlDatabaseManagement operation +type DisableExternalMySqlDatabaseManagementResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + 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 DisableExternalMySqlDatabaseManagementResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DisableExternalMySqlDatabaseManagementResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_mysql_associated_service_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_mysql_associated_service_details.go new file mode 100644 index 00000000000..6835a0c4f77 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_mysql_associated_service_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DisableExternalMysqlAssociatedServiceDetails Details to disable an eMysql Associated Service. +type DisableExternalMysqlAssociatedServiceDetails struct { + + // OCID of the Service Resource. + ServiceResourceId *string `mandatory:"true" json:"serviceResourceId"` + + // OCID of the External MySQL Database connector. + ConnectorId *string `mandatory:"true" json:"connectorId"` + + // Name of the Associated Service. + ServiceName ExternalMysqlAssociatedServiceNameEnum `mandatory:"true" json:"serviceName"` +} + +func (m DisableExternalMysqlAssociatedServiceDetails) 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 DisableExternalMysqlAssociatedServiceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingExternalMysqlAssociatedServiceNameEnum(string(m.ServiceName)); !ok && m.ServiceName != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ServiceName: %s. Supported values are: %s.", m.ServiceName, strings.Join(GetExternalMysqlAssociatedServiceNameEnumStringValues(), ","))) + } + + 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/databasemanagement/disable_external_mysql_associated_service_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_mysql_associated_service_request_response.go new file mode 100644 index 00000000000..404237e2d00 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/disable_external_mysql_associated_service_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DisableExternalMysqlAssociatedServiceRequest wrapper for the DisableExternalMysqlAssociatedService operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/DisableExternalMysqlAssociatedService.go.html to see an example of how to use DisableExternalMysqlAssociatedServiceRequest. +type DisableExternalMysqlAssociatedServiceRequest struct { + + // The OCID of the External MySQL Database. + ExternalMySqlDatabaseId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseId"` + + // The details required to disable an Associated Service for an external MySQL database resource. + DisableExternalMysqlAssociatedServiceDetails `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"` + + // 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 DisableExternalMysqlAssociatedServiceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DisableExternalMysqlAssociatedServiceRequest) 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 DisableExternalMysqlAssociatedServiceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DisableExternalMysqlAssociatedServiceRequest) 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 DisableExternalMysqlAssociatedServiceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DisableExternalMysqlAssociatedServiceResponse wrapper for the DisableExternalMysqlAssociatedService operation +type DisableExternalMysqlAssociatedServiceResponse 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"` +} + +func (response DisableExternalMysqlAssociatedServiceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DisableExternalMysqlAssociatedServiceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_database_management_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_database_management_details.go new file mode 100644 index 00000000000..bc8b097a0bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_database_management_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnableExternalDatabaseManagementDetails Detail to enable or disable database management. +type EnableExternalDatabaseManagementDetails struct { + + // OCID of External MySQL Database connector. + ConnectorId *string `mandatory:"true" json:"connectorId"` +} + +func (m EnableExternalDatabaseManagementDetails) 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 EnableExternalDatabaseManagementDetails) 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/databasemanagement/enable_external_my_sql_database_management_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_my_sql_database_management_request_response.go new file mode 100644 index 00000000000..b3da4d17e66 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_my_sql_database_management_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// EnableExternalMySqlDatabaseManagementRequest wrapper for the EnableExternalMySqlDatabaseManagement operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/EnableExternalMySqlDatabaseManagement.go.html to see an example of how to use EnableExternalMySqlDatabaseManagementRequest. +type EnableExternalMySqlDatabaseManagementRequest struct { + + // The OCID of the External MySQL Database. + ExternalMySqlDatabaseId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseId"` + + // The details required to enable an external MySQL database resource. + EnableExternalDatabaseManagementDetails `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"` + + // 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 EnableExternalMySqlDatabaseManagementRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request EnableExternalMySqlDatabaseManagementRequest) 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 EnableExternalMySqlDatabaseManagementRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request EnableExternalMySqlDatabaseManagementRequest) 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 EnableExternalMySqlDatabaseManagementRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EnableExternalMySqlDatabaseManagementResponse wrapper for the EnableExternalMySqlDatabaseManagement operation +type EnableExternalMySqlDatabaseManagementResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + 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 EnableExternalMySqlDatabaseManagementResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response EnableExternalMySqlDatabaseManagementResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_mysql_associated_service_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_mysql_associated_service_details.go new file mode 100644 index 00000000000..f31764fc28b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_mysql_associated_service_details.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnableExternalMysqlAssociatedServiceDetails Details to enable an eMysql Associated Service. +type EnableExternalMysqlAssociatedServiceDetails struct { + + // OCID of the Service Resource. + ServiceResourceId *string `mandatory:"true" json:"serviceResourceId"` + + // OCID of the External MySQL Database connector. + ConnectorId *string `mandatory:"true" json:"connectorId"` + + // Name of the Associated Service. + ServiceName ExternalMysqlAssociatedServiceNameEnum `mandatory:"true" json:"serviceName"` +} + +func (m EnableExternalMysqlAssociatedServiceDetails) 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 EnableExternalMysqlAssociatedServiceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingExternalMysqlAssociatedServiceNameEnum(string(m.ServiceName)); !ok && m.ServiceName != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ServiceName: %s. Supported values are: %s.", m.ServiceName, strings.Join(GetExternalMysqlAssociatedServiceNameEnumStringValues(), ","))) + } + + 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/databasemanagement/enable_external_mysql_associated_service_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_mysql_associated_service_request_response.go new file mode 100644 index 00000000000..930c1239978 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/enable_external_mysql_associated_service_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// EnableExternalMysqlAssociatedServiceRequest wrapper for the EnableExternalMysqlAssociatedService operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/EnableExternalMysqlAssociatedService.go.html to see an example of how to use EnableExternalMysqlAssociatedServiceRequest. +type EnableExternalMysqlAssociatedServiceRequest struct { + + // The OCID of the External MySQL Database. + ExternalMySqlDatabaseId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseId"` + + // The details required to enable an Associated Service for an external MySQL database resource. + EnableExternalMysqlAssociatedServiceDetails `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"` + + // 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 EnableExternalMysqlAssociatedServiceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request EnableExternalMysqlAssociatedServiceRequest) 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 EnableExternalMysqlAssociatedServiceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request EnableExternalMysqlAssociatedServiceRequest) 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 EnableExternalMysqlAssociatedServiceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EnableExternalMysqlAssociatedServiceResponse wrapper for the EnableExternalMysqlAssociatedService operation +type EnableExternalMysqlAssociatedServiceResponse 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"` +} + +func (response EnableExternalMysqlAssociatedServiceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response EnableExternalMysqlAssociatedServiceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/exadata_infrastructure_lifecycle_state_values.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/exadata_infrastructure_lifecycle_state_values.go new file mode 100644 index 00000000000..a620c5f0e0c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/exadata_infrastructure_lifecycle_state_values.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExadataInfrastructureLifecycleStateValues the lifecycle state values for the Exadata infrastructure. +type ExadataInfrastructureLifecycleStateValues struct { + + // The current lifecycle state of the database resource. + LifecycleState ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m ExadataInfrastructureLifecycleStateValues) 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 ExadataInfrastructureLifecycleStateValues) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingExadataInfrastructureLifecycleStateValuesLifecycleStateEnum(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(GetExadataInfrastructureLifecycleStateValuesLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum Enum with underlying type: string +type ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum string + +// Set of constants representing the allowable values for ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum +const ( + ExadataInfrastructureLifecycleStateValuesLifecycleStateCreating ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = "CREATING" + ExadataInfrastructureLifecycleStateValuesLifecycleStateActive ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = "ACTIVE" + ExadataInfrastructureLifecycleStateValuesLifecycleStateInactive ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = "INACTIVE" + ExadataInfrastructureLifecycleStateValuesLifecycleStateUpdating ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = "UPDATING" + ExadataInfrastructureLifecycleStateValuesLifecycleStateDeleting ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = "DELETING" + ExadataInfrastructureLifecycleStateValuesLifecycleStateDeleted ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = "DELETED" + ExadataInfrastructureLifecycleStateValuesLifecycleStateFailed ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = "FAILED" +) + +var mappingExadataInfrastructureLifecycleStateValuesLifecycleStateEnum = map[string]ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum{ + "CREATING": ExadataInfrastructureLifecycleStateValuesLifecycleStateCreating, + "ACTIVE": ExadataInfrastructureLifecycleStateValuesLifecycleStateActive, + "INACTIVE": ExadataInfrastructureLifecycleStateValuesLifecycleStateInactive, + "UPDATING": ExadataInfrastructureLifecycleStateValuesLifecycleStateUpdating, + "DELETING": ExadataInfrastructureLifecycleStateValuesLifecycleStateDeleting, + "DELETED": ExadataInfrastructureLifecycleStateValuesLifecycleStateDeleted, + "FAILED": ExadataInfrastructureLifecycleStateValuesLifecycleStateFailed, +} + +var mappingExadataInfrastructureLifecycleStateValuesLifecycleStateEnumLowerCase = map[string]ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum{ + "creating": ExadataInfrastructureLifecycleStateValuesLifecycleStateCreating, + "active": ExadataInfrastructureLifecycleStateValuesLifecycleStateActive, + "inactive": ExadataInfrastructureLifecycleStateValuesLifecycleStateInactive, + "updating": ExadataInfrastructureLifecycleStateValuesLifecycleStateUpdating, + "deleting": ExadataInfrastructureLifecycleStateValuesLifecycleStateDeleting, + "deleted": ExadataInfrastructureLifecycleStateValuesLifecycleStateDeleted, + "failed": ExadataInfrastructureLifecycleStateValuesLifecycleStateFailed, +} + +// GetExadataInfrastructureLifecycleStateValuesLifecycleStateEnumValues Enumerates the set of values for ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum +func GetExadataInfrastructureLifecycleStateValuesLifecycleStateEnumValues() []ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum { + values := make([]ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum, 0) + for _, v := range mappingExadataInfrastructureLifecycleStateValuesLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetExadataInfrastructureLifecycleStateValuesLifecycleStateEnumStringValues Enumerates the set of values in String for ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum +func GetExadataInfrastructureLifecycleStateValuesLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "INACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingExadataInfrastructureLifecycleStateValuesLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExadataInfrastructureLifecycleStateValuesLifecycleStateEnum(val string) (ExadataInfrastructureLifecycleStateValuesLifecycleStateEnum, bool) { + enum, ok := mappingExadataInfrastructureLifecycleStateValuesLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database.go new file mode 100644 index 00000000000..7eb512fa195 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalMySqlDatabase External database. +type ExternalMySqlDatabase struct { + + // OCID of compartment for the External MySQL Database. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Display Name of the External MySQL Database. + DbName *string `mandatory:"true" json:"dbName"` + + // OCID of External MySQL Database. + ExternalDatabaseId *string `mandatory:"false" json:"externalDatabaseId"` + + // Indicates database management state. + ManagementState ManagementStateEnum `mandatory:"false" json:"managementState,omitempty"` +} + +func (m ExternalMySqlDatabase) 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 ExternalMySqlDatabase) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingManagementStateEnum(string(m.ManagementState)); !ok && m.ManagementState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ManagementState: %s. Supported values are: %s.", m.ManagementState, strings.Join(GetManagementStateEnumStringValues(), ","))) + } + 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/databasemanagement/external_my_sql_database_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database_collection.go new file mode 100644 index 00000000000..1d56f8c1915 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database_collection.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalMySqlDatabaseCollection The collection of external MySQL Databases. +type ExternalMySqlDatabaseCollection struct { + + // The list of external MySQL Database records. + Items []ExternalMySqlDatabaseSummary `mandatory:"true" json:"items"` +} + +func (m ExternalMySqlDatabaseCollection) 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 ExternalMySqlDatabaseCollection) 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/databasemanagement/external_my_sql_database_connector.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database_connector.go new file mode 100644 index 00000000000..0dabc9237c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database_connector.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalMySqlDatabaseConnector Details of external database connector. +type ExternalMySqlDatabaseConnector struct { + + // OCID of MySQL Database Connector. + Id *string `mandatory:"true" json:"id"` + + // External MySQL Database Connector Name. + Name *string `mandatory:"false" json:"name"` + + // OCID of compartment for the External MySQL connector. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // OCI Services associated with this connector. + AssociatedServices *string `mandatory:"false" json:"associatedServices"` + + // OCID of MySQL Database resource + ExternalDatabaseId *string `mandatory:"false" json:"externalDatabaseId"` + + // Connector update time. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Connector creation time. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Indicates lifecycle state of the resource. + LifecycleState LifecycleStatesEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Name of MySQL Database. + SourceDatabase *string `mandatory:"false" json:"sourceDatabase"` + + // Type of MySQL Database. + SourceDatabaseType MySqlTypeEnum `mandatory:"false" json:"sourceDatabaseType,omitempty"` + + // Agent Id of the MACS agent. + MacsAgentId *string `mandatory:"false" json:"macsAgentId"` + + // Connection Status + ConnectionStatus *string `mandatory:"false" json:"connectionStatus"` + + // Time when connection status was last updated. + TimeConnectionStatusUpdated *common.SDKTime `mandatory:"false" json:"timeConnectionStatusUpdated"` + + // Host name for Connector. + HostName *string `mandatory:"false" json:"hostName"` + + // Connector port. + Port *int `mandatory:"false" json:"port"` + + // Connector Type. + ConnectorType MySqlConnectorTypeEnum `mandatory:"false" json:"connectorType,omitempty"` + + // Network Protocol. + NetworkProtocol MySqlNetworkProtocolTypeEnum `mandatory:"false" json:"networkProtocol,omitempty"` + + // Credential type used to connect to database. + CredentialType MySqlCredTypeEnum `mandatory:"false" json:"credentialType,omitempty"` + + // OCID of the SSL secret, if TCPS with SSL is used to connect to database. + SslSecretId *string `mandatory:"false" json:"sslSecretId"` + + // Name of the SSL secret, if TCPS with SSL is used to connect to database. + SslSecretName *string `mandatory:"false" json:"sslSecretName"` +} + +func (m ExternalMySqlDatabaseConnector) 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 ExternalMySqlDatabaseConnector) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLifecycleStatesEnum(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(GetLifecycleStatesEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlTypeEnum(string(m.SourceDatabaseType)); !ok && m.SourceDatabaseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceDatabaseType: %s. Supported values are: %s.", m.SourceDatabaseType, strings.Join(GetMySqlTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlConnectorTypeEnum(string(m.ConnectorType)); !ok && m.ConnectorType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConnectorType: %s. Supported values are: %s.", m.ConnectorType, strings.Join(GetMySqlConnectorTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlNetworkProtocolTypeEnum(string(m.NetworkProtocol)); !ok && m.NetworkProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NetworkProtocol: %s. Supported values are: %s.", m.NetworkProtocol, strings.Join(GetMySqlNetworkProtocolTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlCredTypeEnum(string(m.CredentialType)); !ok && m.CredentialType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CredentialType: %s. Supported values are: %s.", m.CredentialType, strings.Join(GetMySqlCredTypeEnumStringValues(), ","))) + } + 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/databasemanagement/external_my_sql_database_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database_summary.go new file mode 100644 index 00000000000..db1fcf3b66b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_my_sql_database_summary.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalMySqlDatabaseSummary External database summary record. +type ExternalMySqlDatabaseSummary struct { + + // OCID of compartment for the External MySQL Database. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Display name of the External MySQL Database. + DbName *string `mandatory:"true" json:"dbName"` + + // OCID of External MySQL Database. + ExternalDatabaseId *string `mandatory:"false" json:"externalDatabaseId"` + + // The OCID of the enabled MySQL Database Connector. + ConnectorId *string `mandatory:"false" json:"connectorId"` + + // The deployment type of the Mysql Database. + DeploymentType MySqlDeploymentTypeEnum `mandatory:"false" json:"deploymentType,omitempty"` + + // Indicates database management state. + ManagementState ManagementStateEnum `mandatory:"false" json:"managementState,omitempty"` + + // Indicates lifecycle state of the resource. + LifecycleState LifecycleStatesEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // 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/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m ExternalMySqlDatabaseSummary) 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 ExternalMySqlDatabaseSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingMySqlDeploymentTypeEnum(string(m.DeploymentType)); !ok && m.DeploymentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DeploymentType: %s. Supported values are: %s.", m.DeploymentType, strings.Join(GetMySqlDeploymentTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingManagementStateEnum(string(m.ManagementState)); !ok && m.ManagementState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ManagementState: %s. Supported values are: %s.", m.ManagementState, strings.Join(GetManagementStateEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStatesEnum(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(GetLifecycleStatesEnumStringValues(), ","))) + } + 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/databasemanagement/external_mysql_associated_service_name.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_mysql_associated_service_name.go new file mode 100644 index 00000000000..bb3c6376bbd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/external_mysql_associated_service_name.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "strings" +) + +// ExternalMysqlAssociatedServiceNameEnum Enum with underlying type: string +type ExternalMysqlAssociatedServiceNameEnum string + +// Set of constants representing the allowable values for ExternalMysqlAssociatedServiceNameEnum +const ( + ExternalMysqlAssociatedServiceNameOperationsInsights ExternalMysqlAssociatedServiceNameEnum = "OPERATIONS_INSIGHTS" +) + +var mappingExternalMysqlAssociatedServiceNameEnum = map[string]ExternalMysqlAssociatedServiceNameEnum{ + "OPERATIONS_INSIGHTS": ExternalMysqlAssociatedServiceNameOperationsInsights, +} + +var mappingExternalMysqlAssociatedServiceNameEnumLowerCase = map[string]ExternalMysqlAssociatedServiceNameEnum{ + "operations_insights": ExternalMysqlAssociatedServiceNameOperationsInsights, +} + +// GetExternalMysqlAssociatedServiceNameEnumValues Enumerates the set of values for ExternalMysqlAssociatedServiceNameEnum +func GetExternalMysqlAssociatedServiceNameEnumValues() []ExternalMysqlAssociatedServiceNameEnum { + values := make([]ExternalMysqlAssociatedServiceNameEnum, 0) + for _, v := range mappingExternalMysqlAssociatedServiceNameEnum { + values = append(values, v) + } + return values +} + +// GetExternalMysqlAssociatedServiceNameEnumStringValues Enumerates the set of values in String for ExternalMysqlAssociatedServiceNameEnum +func GetExternalMysqlAssociatedServiceNameEnumStringValues() []string { + return []string{ + "OPERATIONS_INSIGHTS", + } +} + +// GetMappingExternalMysqlAssociatedServiceNameEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExternalMysqlAssociatedServiceNameEnum(val string) (ExternalMysqlAssociatedServiceNameEnum, bool) { + enum, ok := mappingExternalMysqlAssociatedServiceNameEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_backup_metrics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_backup_metrics_request_response.go new file mode 100644 index 00000000000..dd2f7e399ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_backup_metrics_request_response.go @@ -0,0 +1,282 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDatabaseFleetBackupMetricsRequest wrapper for the GetDatabaseFleetBackupMetrics operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseFleetBackupMetrics.go.html to see an example of how to use GetDatabaseFleetBackupMetricsRequest. +type GetDatabaseFleetBackupMetricsRequest struct { + + // Indicates whether the database is a cloud database or an external database. + DatabaseHostedIn GetDatabaseFleetBackupMetricsDatabaseHostedInEnum `mandatory:"true" contributesTo:"query" name:"databaseHostedIn" omitEmpty:"true"` + + // The start time of the time range to retrieve the health metrics of a Managed Database + // in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'". + StartTime *string `mandatory:"true" contributesTo:"query" name:"startTime"` + + // The end time of the time range to retrieve the health metrics of a Managed Database + // in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'". + EndTime *string `mandatory:"true" contributesTo:"query" name:"endTime"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group. + ManagedDatabaseGroupId *string `mandatory:"false" contributesTo:"query" name:"managedDatabaseGroupId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The filter used to retrieve a specific set of metrics by passing the desired metric names with a comma separator. Note that, by default, the service returns all supported metrics. + FilterByMetricNames *string `mandatory:"false" contributesTo:"query" name:"filterByMetricNames"` + + // The page token representing the page from where the next set of paginated results + // are retrieved. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of records returned in the paginated response. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort information by. Only one sortOrder can be used. The + // default sort order for `DATABASENAME` is ascending and it is case-sensitive. + SortBy GetDatabaseFleetBackupMetricsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order. + SortOrder GetDatabaseFleetBackupMetricsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // 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 GetDatabaseFleetBackupMetricsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDatabaseFleetBackupMetricsRequest) 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 GetDatabaseFleetBackupMetricsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDatabaseFleetBackupMetricsRequest) 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 GetDatabaseFleetBackupMetricsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetDatabaseFleetBackupMetricsDatabaseHostedInEnum(string(request.DatabaseHostedIn)); !ok && request.DatabaseHostedIn != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DatabaseHostedIn: %s. Supported values are: %s.", request.DatabaseHostedIn, strings.Join(GetGetDatabaseFleetBackupMetricsDatabaseHostedInEnumStringValues(), ","))) + } + if _, ok := GetMappingGetDatabaseFleetBackupMetricsSortByEnum(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(GetGetDatabaseFleetBackupMetricsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingGetDatabaseFleetBackupMetricsSortOrderEnum(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(GetGetDatabaseFleetBackupMetricsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDatabaseFleetBackupMetricsResponse wrapper for the GetDatabaseFleetBackupMetrics operation +type GetDatabaseFleetBackupMetricsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of DatabaseFleetBackupMetrics instances + DatabaseFleetBackupMetrics `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 GetDatabaseFleetBackupMetricsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDatabaseFleetBackupMetricsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetDatabaseFleetBackupMetricsDatabaseHostedInEnum Enum with underlying type: string +type GetDatabaseFleetBackupMetricsDatabaseHostedInEnum string + +// Set of constants representing the allowable values for GetDatabaseFleetBackupMetricsDatabaseHostedInEnum +const ( + GetDatabaseFleetBackupMetricsDatabaseHostedInCloud GetDatabaseFleetBackupMetricsDatabaseHostedInEnum = "CLOUD" + GetDatabaseFleetBackupMetricsDatabaseHostedInExternal GetDatabaseFleetBackupMetricsDatabaseHostedInEnum = "EXTERNAL" +) + +var mappingGetDatabaseFleetBackupMetricsDatabaseHostedInEnum = map[string]GetDatabaseFleetBackupMetricsDatabaseHostedInEnum{ + "CLOUD": GetDatabaseFleetBackupMetricsDatabaseHostedInCloud, + "EXTERNAL": GetDatabaseFleetBackupMetricsDatabaseHostedInExternal, +} + +var mappingGetDatabaseFleetBackupMetricsDatabaseHostedInEnumLowerCase = map[string]GetDatabaseFleetBackupMetricsDatabaseHostedInEnum{ + "cloud": GetDatabaseFleetBackupMetricsDatabaseHostedInCloud, + "external": GetDatabaseFleetBackupMetricsDatabaseHostedInExternal, +} + +// GetGetDatabaseFleetBackupMetricsDatabaseHostedInEnumValues Enumerates the set of values for GetDatabaseFleetBackupMetricsDatabaseHostedInEnum +func GetGetDatabaseFleetBackupMetricsDatabaseHostedInEnumValues() []GetDatabaseFleetBackupMetricsDatabaseHostedInEnum { + values := make([]GetDatabaseFleetBackupMetricsDatabaseHostedInEnum, 0) + for _, v := range mappingGetDatabaseFleetBackupMetricsDatabaseHostedInEnum { + values = append(values, v) + } + return values +} + +// GetGetDatabaseFleetBackupMetricsDatabaseHostedInEnumStringValues Enumerates the set of values in String for GetDatabaseFleetBackupMetricsDatabaseHostedInEnum +func GetGetDatabaseFleetBackupMetricsDatabaseHostedInEnumStringValues() []string { + return []string{ + "CLOUD", + "EXTERNAL", + } +} + +// GetMappingGetDatabaseFleetBackupMetricsDatabaseHostedInEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDatabaseFleetBackupMetricsDatabaseHostedInEnum(val string) (GetDatabaseFleetBackupMetricsDatabaseHostedInEnum, bool) { + enum, ok := mappingGetDatabaseFleetBackupMetricsDatabaseHostedInEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// GetDatabaseFleetBackupMetricsSortByEnum Enum with underlying type: string +type GetDatabaseFleetBackupMetricsSortByEnum string + +// Set of constants representing the allowable values for GetDatabaseFleetBackupMetricsSortByEnum +const ( + GetDatabaseFleetBackupMetricsSortByDatabasename GetDatabaseFleetBackupMetricsSortByEnum = "DATABASENAME" +) + +var mappingGetDatabaseFleetBackupMetricsSortByEnum = map[string]GetDatabaseFleetBackupMetricsSortByEnum{ + "DATABASENAME": GetDatabaseFleetBackupMetricsSortByDatabasename, +} + +var mappingGetDatabaseFleetBackupMetricsSortByEnumLowerCase = map[string]GetDatabaseFleetBackupMetricsSortByEnum{ + "databasename": GetDatabaseFleetBackupMetricsSortByDatabasename, +} + +// GetGetDatabaseFleetBackupMetricsSortByEnumValues Enumerates the set of values for GetDatabaseFleetBackupMetricsSortByEnum +func GetGetDatabaseFleetBackupMetricsSortByEnumValues() []GetDatabaseFleetBackupMetricsSortByEnum { + values := make([]GetDatabaseFleetBackupMetricsSortByEnum, 0) + for _, v := range mappingGetDatabaseFleetBackupMetricsSortByEnum { + values = append(values, v) + } + return values +} + +// GetGetDatabaseFleetBackupMetricsSortByEnumStringValues Enumerates the set of values in String for GetDatabaseFleetBackupMetricsSortByEnum +func GetGetDatabaseFleetBackupMetricsSortByEnumStringValues() []string { + return []string{ + "DATABASENAME", + } +} + +// GetMappingGetDatabaseFleetBackupMetricsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDatabaseFleetBackupMetricsSortByEnum(val string) (GetDatabaseFleetBackupMetricsSortByEnum, bool) { + enum, ok := mappingGetDatabaseFleetBackupMetricsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// GetDatabaseFleetBackupMetricsSortOrderEnum Enum with underlying type: string +type GetDatabaseFleetBackupMetricsSortOrderEnum string + +// Set of constants representing the allowable values for GetDatabaseFleetBackupMetricsSortOrderEnum +const ( + GetDatabaseFleetBackupMetricsSortOrderAsc GetDatabaseFleetBackupMetricsSortOrderEnum = "ASC" + GetDatabaseFleetBackupMetricsSortOrderDesc GetDatabaseFleetBackupMetricsSortOrderEnum = "DESC" +) + +var mappingGetDatabaseFleetBackupMetricsSortOrderEnum = map[string]GetDatabaseFleetBackupMetricsSortOrderEnum{ + "ASC": GetDatabaseFleetBackupMetricsSortOrderAsc, + "DESC": GetDatabaseFleetBackupMetricsSortOrderDesc, +} + +var mappingGetDatabaseFleetBackupMetricsSortOrderEnumLowerCase = map[string]GetDatabaseFleetBackupMetricsSortOrderEnum{ + "asc": GetDatabaseFleetBackupMetricsSortOrderAsc, + "desc": GetDatabaseFleetBackupMetricsSortOrderDesc, +} + +// GetGetDatabaseFleetBackupMetricsSortOrderEnumValues Enumerates the set of values for GetDatabaseFleetBackupMetricsSortOrderEnum +func GetGetDatabaseFleetBackupMetricsSortOrderEnumValues() []GetDatabaseFleetBackupMetricsSortOrderEnum { + values := make([]GetDatabaseFleetBackupMetricsSortOrderEnum, 0) + for _, v := range mappingGetDatabaseFleetBackupMetricsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetGetDatabaseFleetBackupMetricsSortOrderEnumStringValues Enumerates the set of values in String for GetDatabaseFleetBackupMetricsSortOrderEnum +func GetGetDatabaseFleetBackupMetricsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingGetDatabaseFleetBackupMetricsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDatabaseFleetBackupMetricsSortOrderEnum(val string) (GetDatabaseFleetBackupMetricsSortOrderEnum, bool) { + enum, ok := mappingGetDatabaseFleetBackupMetricsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_dataguard_metrics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_dataguard_metrics_request_response.go new file mode 100644 index 00000000000..3bea7deeaa6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_dataguard_metrics_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDatabaseFleetDataguardMetricsRequest wrapper for the GetDatabaseFleetDataguardMetrics operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseFleetDataguardMetrics.go.html to see an example of how to use GetDatabaseFleetDataguardMetricsRequest. +type GetDatabaseFleetDataguardMetricsRequest struct { + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group. + ManagedDatabaseGroupId *string `mandatory:"false" contributesTo:"query" name:"managedDatabaseGroupId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The filter used to retrieve a specific set of metrics by passing the desired metric names with a comma separator. Note that, by default, the service returns all supported metrics. + FilterByMetricNames *string `mandatory:"false" contributesTo:"query" name:"filterByMetricNames"` + + // The page token representing the page from where the next set of paginated results + // are retrieved. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of records returned in the paginated response. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort information by. Only one sortOrder can be used. The + // default sort order for `DATABASENAME` is ascending and it is case-sensitive. + SortBy GetDatabaseFleetDataguardMetricsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order. + SortOrder GetDatabaseFleetDataguardMetricsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // 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 GetDatabaseFleetDataguardMetricsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDatabaseFleetDataguardMetricsRequest) 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 GetDatabaseFleetDataguardMetricsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDatabaseFleetDataguardMetricsRequest) 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 GetDatabaseFleetDataguardMetricsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetDatabaseFleetDataguardMetricsSortByEnum(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(GetGetDatabaseFleetDataguardMetricsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingGetDatabaseFleetDataguardMetricsSortOrderEnum(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(GetGetDatabaseFleetDataguardMetricsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDatabaseFleetDataguardMetricsResponse wrapper for the GetDatabaseFleetDataguardMetrics operation +type GetDatabaseFleetDataguardMetricsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of DatabaseFleetDataguardMetrics instances + DatabaseFleetDataguardMetrics `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 GetDatabaseFleetDataguardMetricsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDatabaseFleetDataguardMetricsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetDatabaseFleetDataguardMetricsSortByEnum Enum with underlying type: string +type GetDatabaseFleetDataguardMetricsSortByEnum string + +// Set of constants representing the allowable values for GetDatabaseFleetDataguardMetricsSortByEnum +const ( + GetDatabaseFleetDataguardMetricsSortByDatabasename GetDatabaseFleetDataguardMetricsSortByEnum = "DATABASENAME" +) + +var mappingGetDatabaseFleetDataguardMetricsSortByEnum = map[string]GetDatabaseFleetDataguardMetricsSortByEnum{ + "DATABASENAME": GetDatabaseFleetDataguardMetricsSortByDatabasename, +} + +var mappingGetDatabaseFleetDataguardMetricsSortByEnumLowerCase = map[string]GetDatabaseFleetDataguardMetricsSortByEnum{ + "databasename": GetDatabaseFleetDataguardMetricsSortByDatabasename, +} + +// GetGetDatabaseFleetDataguardMetricsSortByEnumValues Enumerates the set of values for GetDatabaseFleetDataguardMetricsSortByEnum +func GetGetDatabaseFleetDataguardMetricsSortByEnumValues() []GetDatabaseFleetDataguardMetricsSortByEnum { + values := make([]GetDatabaseFleetDataguardMetricsSortByEnum, 0) + for _, v := range mappingGetDatabaseFleetDataguardMetricsSortByEnum { + values = append(values, v) + } + return values +} + +// GetGetDatabaseFleetDataguardMetricsSortByEnumStringValues Enumerates the set of values in String for GetDatabaseFleetDataguardMetricsSortByEnum +func GetGetDatabaseFleetDataguardMetricsSortByEnumStringValues() []string { + return []string{ + "DATABASENAME", + } +} + +// GetMappingGetDatabaseFleetDataguardMetricsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDatabaseFleetDataguardMetricsSortByEnum(val string) (GetDatabaseFleetDataguardMetricsSortByEnum, bool) { + enum, ok := mappingGetDatabaseFleetDataguardMetricsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// GetDatabaseFleetDataguardMetricsSortOrderEnum Enum with underlying type: string +type GetDatabaseFleetDataguardMetricsSortOrderEnum string + +// Set of constants representing the allowable values for GetDatabaseFleetDataguardMetricsSortOrderEnum +const ( + GetDatabaseFleetDataguardMetricsSortOrderAsc GetDatabaseFleetDataguardMetricsSortOrderEnum = "ASC" + GetDatabaseFleetDataguardMetricsSortOrderDesc GetDatabaseFleetDataguardMetricsSortOrderEnum = "DESC" +) + +var mappingGetDatabaseFleetDataguardMetricsSortOrderEnum = map[string]GetDatabaseFleetDataguardMetricsSortOrderEnum{ + "ASC": GetDatabaseFleetDataguardMetricsSortOrderAsc, + "DESC": GetDatabaseFleetDataguardMetricsSortOrderDesc, +} + +var mappingGetDatabaseFleetDataguardMetricsSortOrderEnumLowerCase = map[string]GetDatabaseFleetDataguardMetricsSortOrderEnum{ + "asc": GetDatabaseFleetDataguardMetricsSortOrderAsc, + "desc": GetDatabaseFleetDataguardMetricsSortOrderDesc, +} + +// GetGetDatabaseFleetDataguardMetricsSortOrderEnumValues Enumerates the set of values for GetDatabaseFleetDataguardMetricsSortOrderEnum +func GetGetDatabaseFleetDataguardMetricsSortOrderEnumValues() []GetDatabaseFleetDataguardMetricsSortOrderEnum { + values := make([]GetDatabaseFleetDataguardMetricsSortOrderEnum, 0) + for _, v := range mappingGetDatabaseFleetDataguardMetricsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetGetDatabaseFleetDataguardMetricsSortOrderEnumStringValues Enumerates the set of values in String for GetDatabaseFleetDataguardMetricsSortOrderEnum +func GetGetDatabaseFleetDataguardMetricsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingGetDatabaseFleetDataguardMetricsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDatabaseFleetDataguardMetricsSortOrderEnum(val string) (GetDatabaseFleetDataguardMetricsSortOrderEnum, bool) { + enum, ok := mappingGetDatabaseFleetDataguardMetricsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_ha_overview_metrics_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_ha_overview_metrics_request_response.go new file mode 100644 index 00000000000..3448067ec2d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_fleet_ha_overview_metrics_request_response.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDatabaseFleetHaOverviewMetricsRequest wrapper for the GetDatabaseFleetHaOverviewMetrics operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseFleetHaOverviewMetrics.go.html to see an example of how to use GetDatabaseFleetHaOverviewMetricsRequest. +type GetDatabaseFleetHaOverviewMetricsRequest struct { + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group. + ManagedDatabaseGroupId *string `mandatory:"false" contributesTo:"query" name:"managedDatabaseGroupId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The filter used to retrieve a specific set of metrics by passing the desired metric names with a comma separator. Note that, by default, the service returns all supported metrics. + FilterByMetricNames *string `mandatory:"false" contributesTo:"query" name:"filterByMetricNames"` + + // The page token representing the page from where the next set of paginated results + // are retrieved. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of records returned in the paginated response. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort information by. Only one sortOrder can be used. The + // default sort order for `DATABASENAME` is ascending and it is case-sensitive. + SortBy GetDatabaseFleetHaOverviewMetricsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order. + SortOrder GetDatabaseFleetHaOverviewMetricsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // 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 GetDatabaseFleetHaOverviewMetricsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDatabaseFleetHaOverviewMetricsRequest) 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 GetDatabaseFleetHaOverviewMetricsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDatabaseFleetHaOverviewMetricsRequest) 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 GetDatabaseFleetHaOverviewMetricsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetDatabaseFleetHaOverviewMetricsSortByEnum(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(GetGetDatabaseFleetHaOverviewMetricsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingGetDatabaseFleetHaOverviewMetricsSortOrderEnum(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(GetGetDatabaseFleetHaOverviewMetricsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDatabaseFleetHaOverviewMetricsResponse wrapper for the GetDatabaseFleetHaOverviewMetrics operation +type GetDatabaseFleetHaOverviewMetricsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of DatabaseFleetHaOverviewMetrics instances + DatabaseFleetHaOverviewMetrics `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 GetDatabaseFleetHaOverviewMetricsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDatabaseFleetHaOverviewMetricsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetDatabaseFleetHaOverviewMetricsSortByEnum Enum with underlying type: string +type GetDatabaseFleetHaOverviewMetricsSortByEnum string + +// Set of constants representing the allowable values for GetDatabaseFleetHaOverviewMetricsSortByEnum +const ( + GetDatabaseFleetHaOverviewMetricsSortByDatabasename GetDatabaseFleetHaOverviewMetricsSortByEnum = "DATABASENAME" +) + +var mappingGetDatabaseFleetHaOverviewMetricsSortByEnum = map[string]GetDatabaseFleetHaOverviewMetricsSortByEnum{ + "DATABASENAME": GetDatabaseFleetHaOverviewMetricsSortByDatabasename, +} + +var mappingGetDatabaseFleetHaOverviewMetricsSortByEnumLowerCase = map[string]GetDatabaseFleetHaOverviewMetricsSortByEnum{ + "databasename": GetDatabaseFleetHaOverviewMetricsSortByDatabasename, +} + +// GetGetDatabaseFleetHaOverviewMetricsSortByEnumValues Enumerates the set of values for GetDatabaseFleetHaOverviewMetricsSortByEnum +func GetGetDatabaseFleetHaOverviewMetricsSortByEnumValues() []GetDatabaseFleetHaOverviewMetricsSortByEnum { + values := make([]GetDatabaseFleetHaOverviewMetricsSortByEnum, 0) + for _, v := range mappingGetDatabaseFleetHaOverviewMetricsSortByEnum { + values = append(values, v) + } + return values +} + +// GetGetDatabaseFleetHaOverviewMetricsSortByEnumStringValues Enumerates the set of values in String for GetDatabaseFleetHaOverviewMetricsSortByEnum +func GetGetDatabaseFleetHaOverviewMetricsSortByEnumStringValues() []string { + return []string{ + "DATABASENAME", + } +} + +// GetMappingGetDatabaseFleetHaOverviewMetricsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDatabaseFleetHaOverviewMetricsSortByEnum(val string) (GetDatabaseFleetHaOverviewMetricsSortByEnum, bool) { + enum, ok := mappingGetDatabaseFleetHaOverviewMetricsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// GetDatabaseFleetHaOverviewMetricsSortOrderEnum Enum with underlying type: string +type GetDatabaseFleetHaOverviewMetricsSortOrderEnum string + +// Set of constants representing the allowable values for GetDatabaseFleetHaOverviewMetricsSortOrderEnum +const ( + GetDatabaseFleetHaOverviewMetricsSortOrderAsc GetDatabaseFleetHaOverviewMetricsSortOrderEnum = "ASC" + GetDatabaseFleetHaOverviewMetricsSortOrderDesc GetDatabaseFleetHaOverviewMetricsSortOrderEnum = "DESC" +) + +var mappingGetDatabaseFleetHaOverviewMetricsSortOrderEnum = map[string]GetDatabaseFleetHaOverviewMetricsSortOrderEnum{ + "ASC": GetDatabaseFleetHaOverviewMetricsSortOrderAsc, + "DESC": GetDatabaseFleetHaOverviewMetricsSortOrderDesc, +} + +var mappingGetDatabaseFleetHaOverviewMetricsSortOrderEnumLowerCase = map[string]GetDatabaseFleetHaOverviewMetricsSortOrderEnum{ + "asc": GetDatabaseFleetHaOverviewMetricsSortOrderAsc, + "desc": GetDatabaseFleetHaOverviewMetricsSortOrderDesc, +} + +// GetGetDatabaseFleetHaOverviewMetricsSortOrderEnumValues Enumerates the set of values for GetDatabaseFleetHaOverviewMetricsSortOrderEnum +func GetGetDatabaseFleetHaOverviewMetricsSortOrderEnumValues() []GetDatabaseFleetHaOverviewMetricsSortOrderEnum { + values := make([]GetDatabaseFleetHaOverviewMetricsSortOrderEnum, 0) + for _, v := range mappingGetDatabaseFleetHaOverviewMetricsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetGetDatabaseFleetHaOverviewMetricsSortOrderEnumStringValues Enumerates the set of values in String for GetDatabaseFleetHaOverviewMetricsSortOrderEnum +func GetGetDatabaseFleetHaOverviewMetricsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingGetDatabaseFleetHaOverviewMetricsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDatabaseFleetHaOverviewMetricsSortOrderEnum(val string) (GetDatabaseFleetHaOverviewMetricsSortOrderEnum, bool) { + enum, ok := mappingGetDatabaseFleetHaOverviewMetricsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_ha_backup_details_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_ha_backup_details_request_response.go new file mode 100644 index 00000000000..b85805f06c1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_database_ha_backup_details_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDatabaseHaBackupDetailsRequest wrapper for the GetDatabaseHaBackupDetails operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetDatabaseHaBackupDetails.go.html to see an example of how to use GetDatabaseHaBackupDetailsRequest. +type GetDatabaseHaBackupDetailsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database. + ManagedDatabaseId *string `mandatory:"true" contributesTo:"path" name:"managedDatabaseId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The OCID of the Named Credential. + OpcNamedCredentialId *string `mandatory:"false" contributesTo:"header" name:"opc-named-credential-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 GetDatabaseHaBackupDetailsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDatabaseHaBackupDetailsRequest) 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 GetDatabaseHaBackupDetailsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDatabaseHaBackupDetailsRequest) 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 GetDatabaseHaBackupDetailsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDatabaseHaBackupDetailsResponse wrapper for the GetDatabaseHaBackupDetails operation +type GetDatabaseHaBackupDetailsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DatabaseHaBackupDetails instance + DatabaseHaBackupDetails `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 GetDatabaseHaBackupDetailsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDatabaseHaBackupDetailsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_external_my_sql_database_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_external_my_sql_database_connector_request_response.go new file mode 100644 index 00000000000..d6099c316a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_external_my_sql_database_connector_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetExternalMySqlDatabaseConnectorRequest wrapper for the GetExternalMySqlDatabaseConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalMySqlDatabaseConnector.go.html to see an example of how to use GetExternalMySqlDatabaseConnectorRequest. +type GetExternalMySqlDatabaseConnectorRequest struct { + + // The OCID of the External MySQL Database Connector. + ExternalMySqlDatabaseConnectorId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseConnectorId"` + + // 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 GetExternalMySqlDatabaseConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExternalMySqlDatabaseConnectorRequest) 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 GetExternalMySqlDatabaseConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExternalMySqlDatabaseConnectorRequest) 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 GetExternalMySqlDatabaseConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetExternalMySqlDatabaseConnectorResponse wrapper for the GetExternalMySqlDatabaseConnector operation +type GetExternalMySqlDatabaseConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExternalMySqlDatabaseConnector instance + ExternalMySqlDatabaseConnector `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 GetExternalMySqlDatabaseConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExternalMySqlDatabaseConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_external_my_sql_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_external_my_sql_database_request_response.go new file mode 100644 index 00000000000..7f689ec96f6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_external_my_sql_database_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetExternalMySqlDatabaseRequest wrapper for the GetExternalMySqlDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/GetExternalMySqlDatabase.go.html to see an example of how to use GetExternalMySqlDatabaseRequest. +type GetExternalMySqlDatabaseRequest struct { + + // The OCID of the External MySQL Database. + ExternalMySqlDatabaseId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseId"` + + // 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 GetExternalMySqlDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetExternalMySqlDatabaseRequest) 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 GetExternalMySqlDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetExternalMySqlDatabaseRequest) 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 GetExternalMySqlDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetExternalMySqlDatabaseResponse wrapper for the GetExternalMySqlDatabase operation +type GetExternalMySqlDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExternalMySqlDatabase instance + ExternalMySqlDatabase `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 GetExternalMySqlDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetExternalMySqlDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_my_sql_fleet_metric_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_my_sql_fleet_metric_request_response.go index 2e4e62e545a..8cd13fb6d37 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_my_sql_fleet_metric_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/get_my_sql_fleet_metric_request_response.go @@ -41,6 +41,9 @@ type GetMySqlFleetMetricRequest struct { // The parameter to filter by MySQL Database System type. FilterByMdsDeploymentType GetMySqlFleetMetricFilterByMdsDeploymentTypeEnum `mandatory:"false" contributesTo:"query" name:"filterByMdsDeploymentType" omitEmpty:"true"` + // The parameter to filter by MySQL database type. Allowed values are EXTERNAL or MDS. + FilterByMySqlDatabaseTypeParam GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum `mandatory:"false" contributesTo:"query" name:"filterByMySqlDatabaseTypeParam" omitEmpty:"true"` + // The parameter to filter by MySQL Database status. FilterByMySqlStatus GetMySqlFleetMetricFilterByMySqlStatusEnum `mandatory:"false" contributesTo:"query" name:"filterByMySqlStatus" omitEmpty:"true"` @@ -92,6 +95,9 @@ func (request GetMySqlFleetMetricRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingGetMySqlFleetMetricFilterByMdsDeploymentTypeEnum(string(request.FilterByMdsDeploymentType)); !ok && request.FilterByMdsDeploymentType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FilterByMdsDeploymentType: %s. Supported values are: %s.", request.FilterByMdsDeploymentType, strings.Join(GetGetMySqlFleetMetricFilterByMdsDeploymentTypeEnumStringValues(), ","))) } + if _, ok := GetMappingGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum(string(request.FilterByMySqlDatabaseTypeParam)); !ok && request.FilterByMySqlDatabaseTypeParam != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FilterByMySqlDatabaseTypeParam: %s. Supported values are: %s.", request.FilterByMySqlDatabaseTypeParam, strings.Join(GetGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnumStringValues(), ","))) + } if _, ok := GetMappingGetMySqlFleetMetricFilterByMySqlStatusEnum(string(request.FilterByMySqlStatus)); !ok && request.FilterByMySqlStatus != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FilterByMySqlStatus: %s. Supported values are: %s.", request.FilterByMySqlStatus, strings.Join(GetGetMySqlFleetMetricFilterByMySqlStatusEnumStringValues(), ","))) } @@ -212,6 +218,48 @@ func GetMappingGetMySqlFleetMetricFilterByMdsDeploymentTypeEnum(val string) (Get return enum, ok } +// GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum Enum with underlying type: string +type GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum string + +// Set of constants representing the allowable values for GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum +const ( + GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamExternal GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum = "EXTERNAL" + GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamMds GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum = "MDS" +) + +var mappingGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum = map[string]GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum{ + "EXTERNAL": GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamExternal, + "MDS": GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamMds, +} + +var mappingGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnumLowerCase = map[string]GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum{ + "external": GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamExternal, + "mds": GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamMds, +} + +// GetGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnumValues Enumerates the set of values for GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum +func GetGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnumValues() []GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum { + values := make([]GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum, 0) + for _, v := range mappingGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum { + values = append(values, v) + } + return values +} + +// GetGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnumStringValues Enumerates the set of values in String for GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum +func GetGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnumStringValues() []string { + return []string{ + "EXTERNAL", + "MDS", + } +} + +// GetMappingGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum(val string) (GetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnum, bool) { + enum, ok := mappingGetMySqlFleetMetricFilterByMySqlDatabaseTypeParamEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + // GetMySqlFleetMetricFilterByMySqlStatusEnum Enum with underlying type: string type GetMySqlFleetMetricFilterByMySqlStatusEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/ha_metric_definition.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/ha_metric_definition.go new file mode 100644 index 00000000000..debb2490f61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/ha_metric_definition.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HaMetricDefinition The metric definition for HA and backup metrics. +type HaMetricDefinition struct { + + // The name of the metric. + MetricName *string `mandatory:"true" json:"metricName"` + + // The metadata qualifiers provided in the definition of the returned metric. + // Available metadata vary by metric. + Metadata map[string]string `mandatory:"true" json:"metadata"` + + // The dimension qualifiers provided in the definition of the returned metric. + // Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. + // Example: `{"resourceId": "ocid1.instance.region1.phx.exampleuniqueID"}` + Dimensions map[string]string `mandatory:"true" json:"dimensions"` + + // The data point date and time in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'". + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` + + // The target value of the metric. + Value *float64 `mandatory:"true" json:"value"` +} + +func (m HaMetricDefinition) 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 HaMetricDefinition) 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/databasemanagement/list_external_my_sql_databases_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_external_my_sql_databases_request_response.go new file mode 100644 index 00000000000..a5835a10761 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_external_my_sql_databases_request_response.go @@ -0,0 +1,203 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListExternalMySqlDatabasesRequest wrapper for the ListExternalMySqlDatabases operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/ListExternalMySqlDatabases.go.html to see an example of how to use ListExternalMySqlDatabasesRequest. +type ListExternalMySqlDatabasesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The parameter to filter by MySQL Database System type. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // The page token representing the page from where the next set of paginated results + // are retrieved. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of records returned in the paginated response. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort information by. Only one sortOrder can be used. The default sort order + // for ‘TIMECREATED’ is descending and the default sort order for ‘NAME’ is ascending. + // The ‘NAME’ sort order is case-sensitive. + SortBy ListExternalMySqlDatabasesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order. + SortOrder ListExternalMySqlDatabasesSortOrderEnum `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 ListExternalMySqlDatabasesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListExternalMySqlDatabasesRequest) 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 ListExternalMySqlDatabasesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListExternalMySqlDatabasesRequest) 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 ListExternalMySqlDatabasesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListExternalMySqlDatabasesSortByEnum(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(GetListExternalMySqlDatabasesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListExternalMySqlDatabasesSortOrderEnum(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(GetListExternalMySqlDatabasesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListExternalMySqlDatabasesResponse wrapper for the ListExternalMySqlDatabases operation +type ListExternalMySqlDatabasesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ExternalMySqlDatabaseCollection instances + ExternalMySqlDatabaseCollection `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 ListExternalMySqlDatabasesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListExternalMySqlDatabasesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListExternalMySqlDatabasesSortByEnum Enum with underlying type: string +type ListExternalMySqlDatabasesSortByEnum string + +// Set of constants representing the allowable values for ListExternalMySqlDatabasesSortByEnum +const ( + ListExternalMySqlDatabasesSortByTimecreated ListExternalMySqlDatabasesSortByEnum = "TIMECREATED" + ListExternalMySqlDatabasesSortByName ListExternalMySqlDatabasesSortByEnum = "NAME" +) + +var mappingListExternalMySqlDatabasesSortByEnum = map[string]ListExternalMySqlDatabasesSortByEnum{ + "TIMECREATED": ListExternalMySqlDatabasesSortByTimecreated, + "NAME": ListExternalMySqlDatabasesSortByName, +} + +var mappingListExternalMySqlDatabasesSortByEnumLowerCase = map[string]ListExternalMySqlDatabasesSortByEnum{ + "timecreated": ListExternalMySqlDatabasesSortByTimecreated, + "name": ListExternalMySqlDatabasesSortByName, +} + +// GetListExternalMySqlDatabasesSortByEnumValues Enumerates the set of values for ListExternalMySqlDatabasesSortByEnum +func GetListExternalMySqlDatabasesSortByEnumValues() []ListExternalMySqlDatabasesSortByEnum { + values := make([]ListExternalMySqlDatabasesSortByEnum, 0) + for _, v := range mappingListExternalMySqlDatabasesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListExternalMySqlDatabasesSortByEnumStringValues Enumerates the set of values in String for ListExternalMySqlDatabasesSortByEnum +func GetListExternalMySqlDatabasesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "NAME", + } +} + +// GetMappingListExternalMySqlDatabasesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExternalMySqlDatabasesSortByEnum(val string) (ListExternalMySqlDatabasesSortByEnum, bool) { + enum, ok := mappingListExternalMySqlDatabasesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListExternalMySqlDatabasesSortOrderEnum Enum with underlying type: string +type ListExternalMySqlDatabasesSortOrderEnum string + +// Set of constants representing the allowable values for ListExternalMySqlDatabasesSortOrderEnum +const ( + ListExternalMySqlDatabasesSortOrderAsc ListExternalMySqlDatabasesSortOrderEnum = "ASC" + ListExternalMySqlDatabasesSortOrderDesc ListExternalMySqlDatabasesSortOrderEnum = "DESC" +) + +var mappingListExternalMySqlDatabasesSortOrderEnum = map[string]ListExternalMySqlDatabasesSortOrderEnum{ + "ASC": ListExternalMySqlDatabasesSortOrderAsc, + "DESC": ListExternalMySqlDatabasesSortOrderDesc, +} + +var mappingListExternalMySqlDatabasesSortOrderEnumLowerCase = map[string]ListExternalMySqlDatabasesSortOrderEnum{ + "asc": ListExternalMySqlDatabasesSortOrderAsc, + "desc": ListExternalMySqlDatabasesSortOrderDesc, +} + +// GetListExternalMySqlDatabasesSortOrderEnumValues Enumerates the set of values for ListExternalMySqlDatabasesSortOrderEnum +func GetListExternalMySqlDatabasesSortOrderEnumValues() []ListExternalMySqlDatabasesSortOrderEnum { + values := make([]ListExternalMySqlDatabasesSortOrderEnum, 0) + for _, v := range mappingListExternalMySqlDatabasesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListExternalMySqlDatabasesSortOrderEnumStringValues Enumerates the set of values in String for ListExternalMySqlDatabasesSortOrderEnum +func GetListExternalMySqlDatabasesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListExternalMySqlDatabasesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListExternalMySqlDatabasesSortOrderEnum(val string) (ListExternalMySqlDatabasesSortOrderEnum, bool) { + enum, ok := mappingListExternalMySqlDatabasesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_managed_my_sql_databases_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_managed_my_sql_databases_request_response.go index 662c590a480..63f7586e869 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_managed_my_sql_databases_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_managed_my_sql_databases_request_response.go @@ -31,6 +31,9 @@ type ListManagedMySqlDatabasesRequest struct { // The maximum number of records returned in the paginated response. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + // The parameter to filter by MySQL database type. Allowed values are EXTERNAL or MDS. + FilterByMySqlDatabaseTypeParam ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum `mandatory:"false" contributesTo:"query" name:"filterByMySqlDatabaseTypeParam" omitEmpty:"true"` + // The field to sort information by. Only one sortOrder can be used. The default sort order // for ‘TIMECREATED’ is descending and the default sort order for ‘NAME’ is ascending. // The ‘NAME’ sort order is case-sensitive. @@ -75,6 +78,9 @@ func (request ListManagedMySqlDatabasesRequest) RetryPolicy() *common.RetryPolic // Not recommended for calling this function directly func (request ListManagedMySqlDatabasesRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum(string(request.FilterByMySqlDatabaseTypeParam)); !ok && request.FilterByMySqlDatabaseTypeParam != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for FilterByMySqlDatabaseTypeParam: %s. Supported values are: %s.", request.FilterByMySqlDatabaseTypeParam, strings.Join(GetListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnumStringValues(), ","))) + } if _, ok := GetMappingListManagedMySqlDatabasesSortByEnum(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(GetListManagedMySqlDatabasesSortByEnumStringValues(), ","))) } @@ -115,6 +121,48 @@ func (response ListManagedMySqlDatabasesResponse) HTTPResponse() *http.Response return response.RawResponse } +// ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum Enum with underlying type: string +type ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum string + +// Set of constants representing the allowable values for ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum +const ( + ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamExternal ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum = "EXTERNAL" + ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamMds ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum = "MDS" +) + +var mappingListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum = map[string]ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum{ + "EXTERNAL": ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamExternal, + "MDS": ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamMds, +} + +var mappingListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnumLowerCase = map[string]ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum{ + "external": ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamExternal, + "mds": ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamMds, +} + +// GetListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnumValues Enumerates the set of values for ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum +func GetListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnumValues() []ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum { + values := make([]ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum, 0) + for _, v := range mappingListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum { + values = append(values, v) + } + return values +} + +// GetListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnumStringValues Enumerates the set of values in String for ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum +func GetListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnumStringValues() []string { + return []string{ + "EXTERNAL", + "MDS", + } +} + +// GetMappingListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum(val string) (ListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnum, bool) { + enum, ok := mappingListManagedMySqlDatabasesFilterByMySqlDatabaseTypeParamEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + // ListManagedMySqlDatabasesSortByEnum Enum with underlying type: string type ListManagedMySqlDatabasesSortByEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_my_sql_database_connectors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_my_sql_database_connectors_request_response.go new file mode 100644 index 00000000000..32122ff18c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/list_my_sql_database_connectors_request_response.go @@ -0,0 +1,206 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMySqlDatabaseConnectorsRequest wrapper for the ListMySqlDatabaseConnectors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/ListMySqlDatabaseConnectors.go.html to see an example of how to use ListMySqlDatabaseConnectorsRequest. +type ListMySqlDatabaseConnectorsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the external database. + ExternalDatabaseId *string `mandatory:"false" contributesTo:"query" name:"externalDatabaseId"` + + // The parameter to filter by MySQL Database System type. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // The page token representing the page from where the next set of paginated results + // are retrieved. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of records returned in the paginated response. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort information by. Only one sortOrder can be used. The default sort order + // for ‘TIMECREATED’ is descending and the default sort order for ‘NAME’ is ascending. + // The ‘NAME’ sort order is case-sensitive. + SortBy ListMySqlDatabaseConnectorsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order. + SortOrder ListMySqlDatabaseConnectorsSortOrderEnum `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 ListMySqlDatabaseConnectorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMySqlDatabaseConnectorsRequest) 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 ListMySqlDatabaseConnectorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMySqlDatabaseConnectorsRequest) 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 ListMySqlDatabaseConnectorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListMySqlDatabaseConnectorsSortByEnum(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(GetListMySqlDatabaseConnectorsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListMySqlDatabaseConnectorsSortOrderEnum(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(GetListMySqlDatabaseConnectorsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMySqlDatabaseConnectorsResponse wrapper for the ListMySqlDatabaseConnectors operation +type ListMySqlDatabaseConnectorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of MySqlConnectorCollection instances + MySqlConnectorCollection `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 ListMySqlDatabaseConnectorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMySqlDatabaseConnectorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListMySqlDatabaseConnectorsSortByEnum Enum with underlying type: string +type ListMySqlDatabaseConnectorsSortByEnum string + +// Set of constants representing the allowable values for ListMySqlDatabaseConnectorsSortByEnum +const ( + ListMySqlDatabaseConnectorsSortByTimecreated ListMySqlDatabaseConnectorsSortByEnum = "TIMECREATED" + ListMySqlDatabaseConnectorsSortByName ListMySqlDatabaseConnectorsSortByEnum = "NAME" +) + +var mappingListMySqlDatabaseConnectorsSortByEnum = map[string]ListMySqlDatabaseConnectorsSortByEnum{ + "TIMECREATED": ListMySqlDatabaseConnectorsSortByTimecreated, + "NAME": ListMySqlDatabaseConnectorsSortByName, +} + +var mappingListMySqlDatabaseConnectorsSortByEnumLowerCase = map[string]ListMySqlDatabaseConnectorsSortByEnum{ + "timecreated": ListMySqlDatabaseConnectorsSortByTimecreated, + "name": ListMySqlDatabaseConnectorsSortByName, +} + +// GetListMySqlDatabaseConnectorsSortByEnumValues Enumerates the set of values for ListMySqlDatabaseConnectorsSortByEnum +func GetListMySqlDatabaseConnectorsSortByEnumValues() []ListMySqlDatabaseConnectorsSortByEnum { + values := make([]ListMySqlDatabaseConnectorsSortByEnum, 0) + for _, v := range mappingListMySqlDatabaseConnectorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListMySqlDatabaseConnectorsSortByEnumStringValues Enumerates the set of values in String for ListMySqlDatabaseConnectorsSortByEnum +func GetListMySqlDatabaseConnectorsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "NAME", + } +} + +// GetMappingListMySqlDatabaseConnectorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMySqlDatabaseConnectorsSortByEnum(val string) (ListMySqlDatabaseConnectorsSortByEnum, bool) { + enum, ok := mappingListMySqlDatabaseConnectorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListMySqlDatabaseConnectorsSortOrderEnum Enum with underlying type: string +type ListMySqlDatabaseConnectorsSortOrderEnum string + +// Set of constants representing the allowable values for ListMySqlDatabaseConnectorsSortOrderEnum +const ( + ListMySqlDatabaseConnectorsSortOrderAsc ListMySqlDatabaseConnectorsSortOrderEnum = "ASC" + ListMySqlDatabaseConnectorsSortOrderDesc ListMySqlDatabaseConnectorsSortOrderEnum = "DESC" +) + +var mappingListMySqlDatabaseConnectorsSortOrderEnum = map[string]ListMySqlDatabaseConnectorsSortOrderEnum{ + "ASC": ListMySqlDatabaseConnectorsSortOrderAsc, + "DESC": ListMySqlDatabaseConnectorsSortOrderDesc, +} + +var mappingListMySqlDatabaseConnectorsSortOrderEnumLowerCase = map[string]ListMySqlDatabaseConnectorsSortOrderEnum{ + "asc": ListMySqlDatabaseConnectorsSortOrderAsc, + "desc": ListMySqlDatabaseConnectorsSortOrderDesc, +} + +// GetListMySqlDatabaseConnectorsSortOrderEnumValues Enumerates the set of values for ListMySqlDatabaseConnectorsSortOrderEnum +func GetListMySqlDatabaseConnectorsSortOrderEnumValues() []ListMySqlDatabaseConnectorsSortOrderEnum { + values := make([]ListMySqlDatabaseConnectorsSortOrderEnum, 0) + for _, v := range mappingListMySqlDatabaseConnectorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListMySqlDatabaseConnectorsSortOrderEnumStringValues Enumerates the set of values in String for ListMySqlDatabaseConnectorsSortOrderEnum +func GetListMySqlDatabaseConnectorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListMySqlDatabaseConnectorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMySqlDatabaseConnectorsSortOrderEnum(val string) (ListMySqlDatabaseConnectorsSortOrderEnum, bool) { + enum, ok := mappingListMySqlDatabaseConnectorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database.go index 04df885d984..d69de1657f6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database.go @@ -61,6 +61,19 @@ type ManagedMySqlDatabase struct { // The date and time the Managed MySQL Database was created. TimeCreatedHeatWave *common.SDKTime `mandatory:"false" json:"timeCreatedHeatWave"` + + // The type of the MySQL Database. Indicates whether the database + // is external or MDS. + DatabaseType MySqlTypeEnum `mandatory:"false" json:"databaseType,omitempty"` + + // Indicates database management status. + ManagementState ManagementStateEnum `mandatory:"false" json:"managementState,omitempty"` + + // Indicates lifecycle state of the resource. + LifecycleState LifecycleStatesEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The date and time the Managed MySQL Database was updated. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` } func (m ManagedMySqlDatabase) String() string { @@ -73,6 +86,15 @@ func (m ManagedMySqlDatabase) String() string { func (m ManagedMySqlDatabase) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingMySqlTypeEnum(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(GetMySqlTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingManagementStateEnum(string(m.ManagementState)); !ok && m.ManagementState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ManagementState: %s. Supported values are: %s.", m.ManagementState, strings.Join(GetManagementStateEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStatesEnum(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(GetLifecycleStatesEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database_summary.go index 46e657c498e..cc42420a855 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/managed_my_sql_database_summary.go @@ -37,6 +37,16 @@ type ManagedMySqlDatabaseSummary struct { // The name of the Managed MySQL Database. Name *string `mandatory:"true" json:"name"` + + // The type of the MySQL Database. Indicates whether the database + // is external or MDS. + DatabaseType MySqlTypeEnum `mandatory:"false" json:"databaseType,omitempty"` + + // Indicates database management status. + ManagementState ManagementStateEnum `mandatory:"false" json:"managementState,omitempty"` + + // Indicates lifecycle state of the resource. + LifecycleState LifecycleStatesEnum `mandatory:"false" json:"lifecycleState,omitempty"` } func (m ManagedMySqlDatabaseSummary) String() string { @@ -49,6 +59,15 @@ func (m ManagedMySqlDatabaseSummary) String() string { func (m ManagedMySqlDatabaseSummary) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingMySqlTypeEnum(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(GetMySqlTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingManagementStateEnum(string(m.ManagementState)); !ok && m.ManagementState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ManagementState: %s. Supported values are: %s.", m.ManagementState, strings.Join(GetManagementStateEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStatesEnum(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(GetLifecycleStatesEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/management_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/management_state.go new file mode 100644 index 00000000000..7167dc97167 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/management_state.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "strings" +) + +// ManagementStateEnum Enum with underlying type: string +type ManagementStateEnum string + +// Set of constants representing the allowable values for ManagementStateEnum +const ( + ManagementStateEnabled ManagementStateEnum = "ENABLED" + ManagementStateDisabled ManagementStateEnum = "DISABLED" +) + +var mappingManagementStateEnum = map[string]ManagementStateEnum{ + "ENABLED": ManagementStateEnabled, + "DISABLED": ManagementStateDisabled, +} + +var mappingManagementStateEnumLowerCase = map[string]ManagementStateEnum{ + "enabled": ManagementStateEnabled, + "disabled": ManagementStateDisabled, +} + +// GetManagementStateEnumValues Enumerates the set of values for ManagementStateEnum +func GetManagementStateEnumValues() []ManagementStateEnum { + values := make([]ManagementStateEnum, 0) + for _, v := range mappingManagementStateEnum { + values = append(values, v) + } + return values +} + +// GetManagementStateEnumStringValues Enumerates the set of values in String for ManagementStateEnum +func GetManagementStateEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingManagementStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingManagementStateEnum(val string) (ManagementStateEnum, bool) { + enum, ok := mappingManagementStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_connector_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_connector_collection.go new file mode 100644 index 00000000000..e496dca8ced --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_connector_collection.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MySqlConnectorCollection The collection of external MySQL Database connectors. +type MySqlConnectorCollection struct { + + // The list of external MySQL Database connector records. + Items []MySqlDatabaseConnectorSummary `mandatory:"true" json:"items"` +} + +func (m MySqlConnectorCollection) 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 MySqlConnectorCollection) 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/databasemanagement/my_sql_connector_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_connector_type.go new file mode 100644 index 00000000000..183f6210051 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_connector_type.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "strings" +) + +// MySqlConnectorTypeEnum Enum with underlying type: string +type MySqlConnectorTypeEnum string + +// Set of constants representing the allowable values for MySqlConnectorTypeEnum +const ( + MySqlConnectorTypeMacs MySqlConnectorTypeEnum = "MACS" +) + +var mappingMySqlConnectorTypeEnum = map[string]MySqlConnectorTypeEnum{ + "MACS": MySqlConnectorTypeMacs, +} + +var mappingMySqlConnectorTypeEnumLowerCase = map[string]MySqlConnectorTypeEnum{ + "macs": MySqlConnectorTypeMacs, +} + +// GetMySqlConnectorTypeEnumValues Enumerates the set of values for MySqlConnectorTypeEnum +func GetMySqlConnectorTypeEnumValues() []MySqlConnectorTypeEnum { + values := make([]MySqlConnectorTypeEnum, 0) + for _, v := range mappingMySqlConnectorTypeEnum { + values = append(values, v) + } + return values +} + +// GetMySqlConnectorTypeEnumStringValues Enumerates the set of values in String for MySqlConnectorTypeEnum +func GetMySqlConnectorTypeEnumStringValues() []string { + return []string{ + "MACS", + } +} + +// GetMappingMySqlConnectorTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMySqlConnectorTypeEnum(val string) (MySqlConnectorTypeEnum, bool) { + enum, ok := mappingMySqlConnectorTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_cred_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_cred_type.go new file mode 100644 index 00000000000..4b50c450434 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_cred_type.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "strings" +) + +// MySqlCredTypeEnum Enum with underlying type: string +type MySqlCredTypeEnum string + +// Set of constants representing the allowable values for MySqlCredTypeEnum +const ( + MySqlCredTypeMysqlExternalNonSslCredentials MySqlCredTypeEnum = "MYSQL_EXTERNAL_NON_SSL_CREDENTIALS" + MySqlCredTypeMysqlExternalSslCredentials MySqlCredTypeEnum = "MYSQL_EXTERNAL_SSL_CREDENTIALS" + MySqlCredTypeMysqlExternalSocketCredentials MySqlCredTypeEnum = "MYSQL_EXTERNAL_SOCKET_CREDENTIALS" +) + +var mappingMySqlCredTypeEnum = map[string]MySqlCredTypeEnum{ + "MYSQL_EXTERNAL_NON_SSL_CREDENTIALS": MySqlCredTypeMysqlExternalNonSslCredentials, + "MYSQL_EXTERNAL_SSL_CREDENTIALS": MySqlCredTypeMysqlExternalSslCredentials, + "MYSQL_EXTERNAL_SOCKET_CREDENTIALS": MySqlCredTypeMysqlExternalSocketCredentials, +} + +var mappingMySqlCredTypeEnumLowerCase = map[string]MySqlCredTypeEnum{ + "mysql_external_non_ssl_credentials": MySqlCredTypeMysqlExternalNonSslCredentials, + "mysql_external_ssl_credentials": MySqlCredTypeMysqlExternalSslCredentials, + "mysql_external_socket_credentials": MySqlCredTypeMysqlExternalSocketCredentials, +} + +// GetMySqlCredTypeEnumValues Enumerates the set of values for MySqlCredTypeEnum +func GetMySqlCredTypeEnumValues() []MySqlCredTypeEnum { + values := make([]MySqlCredTypeEnum, 0) + for _, v := range mappingMySqlCredTypeEnum { + values = append(values, v) + } + return values +} + +// GetMySqlCredTypeEnumStringValues Enumerates the set of values in String for MySqlCredTypeEnum +func GetMySqlCredTypeEnumStringValues() []string { + return []string{ + "MYSQL_EXTERNAL_NON_SSL_CREDENTIALS", + "MYSQL_EXTERNAL_SSL_CREDENTIALS", + "MYSQL_EXTERNAL_SOCKET_CREDENTIALS", + } +} + +// GetMappingMySqlCredTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMySqlCredTypeEnum(val string) (MySqlCredTypeEnum, bool) { + enum, ok := mappingMySqlCredTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_data_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_data_summary.go index b6b81b82aa2..452d9d45f26 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_data_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_data_summary.go @@ -116,6 +116,15 @@ type MySqlDataSummary struct { // The 99.9th percentile of the query latency. Quantile999 *float32 `mandatory:"true" json:"quantile999"` + // The maximum amount of controlled memory used by a statement during execution. + MaxControlledMemory *int64 `mandatory:"false" json:"maxControlledMemory"` + + // The maximum amount of memory used by a statement during execution. + MaxTotalMemory *int64 `mandatory:"false" json:"maxTotalMemory"` + + // The total amount of time spent on CPU for this statement. + SumCpuTime *int64 `mandatory:"false" json:"sumCpuTime"` + // The number of query executions offloaded to HeatWave. HeatWaveOffloaded *float32 `mandatory:"false" json:"heatWaveOffloaded"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_database_connector_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_database_connector_summary.go new file mode 100644 index 00000000000..214bc3bb68b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_database_connector_summary.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MySqlDatabaseConnectorSummary Details of external database connector. +type MySqlDatabaseConnectorSummary struct { + + // OCID of MySQL Database Connector. + Id *string `mandatory:"true" json:"id"` + + // External MySQL Database Connector Name + Name *string `mandatory:"false" json:"name"` + + // OCID of compartment for the External MySQL connector. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // OCI Services associated with this connector. + AssociatedServices *string `mandatory:"false" json:"associatedServices"` + + // Connector creation time. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Connector update time. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Name of MySQL Database. + SourceDatabase *string `mandatory:"false" json:"sourceDatabase"` + + // Type of MySQL Database. + SourceDatabaseType MySqlTypeEnum `mandatory:"false" json:"sourceDatabaseType,omitempty"` + + // Connection Status. + ConnectionStatus *string `mandatory:"false" json:"connectionStatus"` + + // Time when connection status was last updated. + TimeConnectionStatusUpdated *common.SDKTime `mandatory:"false" json:"timeConnectionStatusUpdated"` + + // Host name for Connector. + HostName *string `mandatory:"false" json:"hostName"` + + // Agent Id of the MACS agent. + MacsAgentId *string `mandatory:"false" json:"macsAgentId"` + + // Connector port. + Port *int `mandatory:"false" json:"port"` + + // Connector Type. + ConnectorType MySqlConnectorTypeEnum `mandatory:"false" json:"connectorType,omitempty"` + + // Network Protocol. + NetworkProtocol MySqlNetworkProtocolTypeEnum `mandatory:"false" json:"networkProtocol,omitempty"` + + // Credential type used to connect to database. + CredentialType MySqlCredTypeEnum `mandatory:"false" json:"credentialType,omitempty"` + + // 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/Content/General/Concepts/resourcetags.htm). + // System tags can be viewed by users, but can only be created by the system. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Indicates lifecycle state of the resource. + LifecycleState LifecycleStatesEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m MySqlDatabaseConnectorSummary) 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 MySqlDatabaseConnectorSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingMySqlTypeEnum(string(m.SourceDatabaseType)); !ok && m.SourceDatabaseType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceDatabaseType: %s. Supported values are: %s.", m.SourceDatabaseType, strings.Join(GetMySqlTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlConnectorTypeEnum(string(m.ConnectorType)); !ok && m.ConnectorType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConnectorType: %s. Supported values are: %s.", m.ConnectorType, strings.Join(GetMySqlConnectorTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlNetworkProtocolTypeEnum(string(m.NetworkProtocol)); !ok && m.NetworkProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NetworkProtocol: %s. Supported values are: %s.", m.NetworkProtocol, strings.Join(GetMySqlNetworkProtocolTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingMySqlCredTypeEnum(string(m.CredentialType)); !ok && m.CredentialType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CredentialType: %s. Supported values are: %s.", m.CredentialType, strings.Join(GetMySqlCredTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingLifecycleStatesEnum(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(GetLifecycleStatesEnumStringValues(), ","))) + } + 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/databasemanagement/my_sql_network_protocol_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_network_protocol_type.go new file mode 100644 index 00000000000..bd4d7408ae1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_network_protocol_type.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "strings" +) + +// MySqlNetworkProtocolTypeEnum Enum with underlying type: string +type MySqlNetworkProtocolTypeEnum string + +// Set of constants representing the allowable values for MySqlNetworkProtocolTypeEnum +const ( + MySqlNetworkProtocolTypeTcp MySqlNetworkProtocolTypeEnum = "TCP" + MySqlNetworkProtocolTypeTcps MySqlNetworkProtocolTypeEnum = "TCPS" + MySqlNetworkProtocolTypeSockets MySqlNetworkProtocolTypeEnum = "SOCKETS" +) + +var mappingMySqlNetworkProtocolTypeEnum = map[string]MySqlNetworkProtocolTypeEnum{ + "TCP": MySqlNetworkProtocolTypeTcp, + "TCPS": MySqlNetworkProtocolTypeTcps, + "SOCKETS": MySqlNetworkProtocolTypeSockets, +} + +var mappingMySqlNetworkProtocolTypeEnumLowerCase = map[string]MySqlNetworkProtocolTypeEnum{ + "tcp": MySqlNetworkProtocolTypeTcp, + "tcps": MySqlNetworkProtocolTypeTcps, + "sockets": MySqlNetworkProtocolTypeSockets, +} + +// GetMySqlNetworkProtocolTypeEnumValues Enumerates the set of values for MySqlNetworkProtocolTypeEnum +func GetMySqlNetworkProtocolTypeEnumValues() []MySqlNetworkProtocolTypeEnum { + values := make([]MySqlNetworkProtocolTypeEnum, 0) + for _, v := range mappingMySqlNetworkProtocolTypeEnum { + values = append(values, v) + } + return values +} + +// GetMySqlNetworkProtocolTypeEnumStringValues Enumerates the set of values in String for MySqlNetworkProtocolTypeEnum +func GetMySqlNetworkProtocolTypeEnumStringValues() []string { + return []string{ + "TCP", + "TCPS", + "SOCKETS", + } +} + +// GetMappingMySqlNetworkProtocolTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMySqlNetworkProtocolTypeEnum(val string) (MySqlNetworkProtocolTypeEnum, bool) { + enum, ok := mappingMySqlNetworkProtocolTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_type.go new file mode 100644 index 00000000000..f79b9d9796d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/my_sql_type.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "strings" +) + +// MySqlTypeEnum Enum with underlying type: string +type MySqlTypeEnum string + +// Set of constants representing the allowable values for MySqlTypeEnum +const ( + MySqlTypeExternal MySqlTypeEnum = "EXTERNAL" + MySqlTypeMds MySqlTypeEnum = "MDS" +) + +var mappingMySqlTypeEnum = map[string]MySqlTypeEnum{ + "EXTERNAL": MySqlTypeExternal, + "MDS": MySqlTypeMds, +} + +var mappingMySqlTypeEnumLowerCase = map[string]MySqlTypeEnum{ + "external": MySqlTypeExternal, + "mds": MySqlTypeMds, +} + +// GetMySqlTypeEnumValues Enumerates the set of values for MySqlTypeEnum +func GetMySqlTypeEnumValues() []MySqlTypeEnum { + values := make([]MySqlTypeEnum, 0) + for _, v := range mappingMySqlTypeEnum { + values = append(values, v) + } + return values +} + +// GetMySqlTypeEnumStringValues Enumerates the set of values in String for MySqlTypeEnum +func GetMySqlTypeEnumStringValues() []string { + return []string{ + "EXTERNAL", + "MDS", + } +} + +// GetMappingMySqlTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMySqlTypeEnum(val string) (MySqlTypeEnum, bool) { + enum, ok := mappingMySqlTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/stand_by_database_dataguard_metrics.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/stand_by_database_dataguard_metrics.go new file mode 100644 index 00000000000..6d35a338539 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/stand_by_database_dataguard_metrics.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StandByDatabaseDataguardMetrics The standby database details. +type StandByDatabaseDataguardMetrics struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database. + DbId *string `mandatory:"true" json:"dbId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment where the Managed Database resides. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The display name of the Managed Database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The database role of the Managed Database. + DbRole DbRoleEnum `mandatory:"true" json:"dbRole"` + + // A list of standby databases with latest values for metrics such as ApplyLag, TransportLag, and RedoApplyRate. + Metrics []HaMetricDefinition `mandatory:"true" json:"metrics"` + + // The database ID of the Managed Database. Every database had its own ID and that value is captured here. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The database unique name of the Managed Database. + DbUniqueName *string `mandatory:"false" json:"dbUniqueName"` +} + +func (m StandByDatabaseDataguardMetrics) 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 StandByDatabaseDataguardMetrics) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDbRoleEnum(string(m.DbRole)); !ok && m.DbRole != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DbRole: %s. Supported values are: %s.", m.DbRole, strings.Join(GetDbRoleEnumStringValues(), ","))) + } + + 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/databasemanagement/update_external_my_sql_database_connector_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_my_sql_database_connector_details.go new file mode 100644 index 00000000000..89c75f21eeb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_my_sql_database_connector_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateExternalMySqlDatabaseConnectorDetails Details required for updating an external MySQL database connector. +type UpdateExternalMySqlDatabaseConnectorDetails struct { + ConnectorDetails *UpdateMySqlDatabaseConnectorDetails `mandatory:"true" json:"connectorDetails"` + + // OCID of compartment for the External MySQL Database. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m UpdateExternalMySqlDatabaseConnectorDetails) 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 UpdateExternalMySqlDatabaseConnectorDetails) 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/databasemanagement/update_external_my_sql_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_my_sql_database_details.go new file mode 100644 index 00000000000..c4912e9003a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_my_sql_database_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateExternalMySqlDatabaseDetails Details for updating an external MySQL database. +type UpdateExternalMySqlDatabaseDetails struct { + + // Display Name of the External MySQL Database. + DbName *string `mandatory:"true" json:"dbName"` +} + +func (m UpdateExternalMySqlDatabaseDetails) 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 UpdateExternalMySqlDatabaseDetails) 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/databasemanagement/update_external_mysql_database_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_mysql_database_connector_request_response.go new file mode 100644 index 00000000000..bf96d3d1c3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_mysql_database_connector_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateExternalMysqlDatabaseConnectorRequest wrapper for the UpdateExternalMysqlDatabaseConnector operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/UpdateExternalMysqlDatabaseConnector.go.html to see an example of how to use UpdateExternalMysqlDatabaseConnectorRequest. +type UpdateExternalMysqlDatabaseConnectorRequest struct { + + // The OCID of the External MySQL Database Connector. + ExternalMySqlDatabaseConnectorId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseConnectorId"` + + // The details required to update MySQL database connector resource. + UpdateExternalMySqlDatabaseConnectorDetails `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 UpdateExternalMysqlDatabaseConnectorRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateExternalMysqlDatabaseConnectorRequest) 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 UpdateExternalMysqlDatabaseConnectorRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateExternalMysqlDatabaseConnectorRequest) 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 UpdateExternalMysqlDatabaseConnectorRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateExternalMysqlDatabaseConnectorResponse wrapper for the UpdateExternalMysqlDatabaseConnector operation +type UpdateExternalMysqlDatabaseConnectorResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExternalMySqlDatabaseConnector instance + ExternalMySqlDatabaseConnector `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"` + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateExternalMysqlDatabaseConnectorResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateExternalMysqlDatabaseConnectorResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_mysql_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_mysql_database_request_response.go new file mode 100644 index 00000000000..f5637fbb7ec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_external_mysql_database_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2025, 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 databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateExternalMysqlDatabaseRequest wrapper for the UpdateExternalMysqlDatabase operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemanagement/UpdateExternalMysqlDatabase.go.html to see an example of how to use UpdateExternalMysqlDatabaseRequest. +type UpdateExternalMysqlDatabaseRequest struct { + + // The OCID of the External MySQL Database. + ExternalMySqlDatabaseId *string `mandatory:"true" contributesTo:"path" name:"externalMySqlDatabaseId"` + + // The details required to update an external MySQL database resource. + UpdateExternalMySqlDatabaseDetails `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 UpdateExternalMysqlDatabaseRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateExternalMysqlDatabaseRequest) 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 UpdateExternalMysqlDatabaseRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateExternalMysqlDatabaseRequest) 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 UpdateExternalMysqlDatabaseRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateExternalMysqlDatabaseResponse wrapper for the UpdateExternalMysqlDatabase operation +type UpdateExternalMysqlDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ExternalMySqlDatabase instance + ExternalMySqlDatabase `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 UpdateExternalMysqlDatabaseResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateExternalMysqlDatabaseResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_my_sql_database_connector_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_my_sql_database_connector_details.go new file mode 100644 index 00000000000..e9c99890e20 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/update_my_sql_database_connector_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2025, 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 Management API +// +// Use the Database Management API to monitor and manage resources such as +// Oracle Databases, MySQL Databases, and External Database Systems. +// For more information, see Database Management (https://docs.cloud.oracle.com/iaas/database-management/home.htm). +// + +package databasemanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMySqlDatabaseConnectorDetails Update Details of external database connector. +type UpdateMySqlDatabaseConnectorDetails struct { + + // Agent Id of the MACS agent. + MacsAgentId *string `mandatory:"true" json:"macsAgentId"` + + // Host name for Connector. + HostName *string `mandatory:"true" json:"hostName"` + + // Port number to connect to External MySQL Database. + Port *int `mandatory:"true" json:"port"` + + // If using existing SSL secret to connect, OCID for the secret resource. + SslSecretId *string `mandatory:"true" json:"sslSecretId"` + + // Protocol to be used to connect to External MySQL Database; TCP, TCP with SSL or Socket. + NetworkProtocol MySqlNetworkProtocolTypeEnum `mandatory:"true" json:"networkProtocol"` + + // External MySQL Database Connector Name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Type of the credential. + CredentialType MySqlCredTypeEnum `mandatory:"false" json:"credentialType,omitempty"` + + // OCID of MySQL Database resource. + ExternalDatabaseId *string `mandatory:"false" json:"externalDatabaseId"` +} + +func (m UpdateMySqlDatabaseConnectorDetails) 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 UpdateMySqlDatabaseConnectorDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMySqlNetworkProtocolTypeEnum(string(m.NetworkProtocol)); !ok && m.NetworkProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NetworkProtocol: %s. Supported values are: %s.", m.NetworkProtocol, strings.Join(GetMySqlNetworkProtocolTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingMySqlCredTypeEnum(string(m.CredentialType)); !ok && m.CredentialType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CredentialType: %s. Supported values are: %s.", m.CredentialType, strings.Join(GetMySqlCredTypeEnumStringValues(), ","))) + } + 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/databasemanagement/work_request_operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/work_request_operation_type.go index 98b482813cf..8854a5383c1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/work_request_operation_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/databasemanagement/work_request_operation_type.go @@ -43,6 +43,11 @@ const ( WorkRequestOperationTypeEnableDbmgmt WorkRequestOperationTypeEnum = "ENABLE_DBMGMT" WorkRequestOperationTypeDisableDbmgmt WorkRequestOperationTypeEnum = "DISABLE_DBMGMT" WorkRequestOperationTypeModifyDbmgmt WorkRequestOperationTypeEnum = "MODIFY_DBMGMT" + WorkRequestOperationTypeCheckExternalMysqlConnection WorkRequestOperationTypeEnum = "CHECK_EXTERNAL_MYSQL_CONNECTION" + WorkRequestOperationTypeUpdateExternalMysqlCredential WorkRequestOperationTypeEnum = "UPDATE_EXTERNAL_MYSQL_CREDENTIAL" + WorkRequestOperationTypeCreateExternalMysqlConnector WorkRequestOperationTypeEnum = "CREATE_EXTERNAL_MYSQL_CONNECTOR" + WorkRequestOperationTypeDeleteExternalMysqlConnector WorkRequestOperationTypeEnum = "DELETE_EXTERNAL_MYSQL_CONNECTOR" + WorkRequestOperationTypeDeleteExternalMysqlDatabase WorkRequestOperationTypeEnum = "DELETE_EXTERNAL_MYSQL_DATABASE" ) var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ @@ -69,6 +74,11 @@ var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnu "ENABLE_DBMGMT": WorkRequestOperationTypeEnableDbmgmt, "DISABLE_DBMGMT": WorkRequestOperationTypeDisableDbmgmt, "MODIFY_DBMGMT": WorkRequestOperationTypeModifyDbmgmt, + "CHECK_EXTERNAL_MYSQL_CONNECTION": WorkRequestOperationTypeCheckExternalMysqlConnection, + "UPDATE_EXTERNAL_MYSQL_CREDENTIAL": WorkRequestOperationTypeUpdateExternalMysqlCredential, + "CREATE_EXTERNAL_MYSQL_CONNECTOR": WorkRequestOperationTypeCreateExternalMysqlConnector, + "DELETE_EXTERNAL_MYSQL_CONNECTOR": WorkRequestOperationTypeDeleteExternalMysqlConnector, + "DELETE_EXTERNAL_MYSQL_DATABASE": WorkRequestOperationTypeDeleteExternalMysqlDatabase, } var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ @@ -95,6 +105,11 @@ var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperati "enable_dbmgmt": WorkRequestOperationTypeEnableDbmgmt, "disable_dbmgmt": WorkRequestOperationTypeDisableDbmgmt, "modify_dbmgmt": WorkRequestOperationTypeModifyDbmgmt, + "check_external_mysql_connection": WorkRequestOperationTypeCheckExternalMysqlConnection, + "update_external_mysql_credential": WorkRequestOperationTypeUpdateExternalMysqlCredential, + "create_external_mysql_connector": WorkRequestOperationTypeCreateExternalMysqlConnector, + "delete_external_mysql_connector": WorkRequestOperationTypeDeleteExternalMysqlConnector, + "delete_external_mysql_database": WorkRequestOperationTypeDeleteExternalMysqlDatabase, } // GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum @@ -132,6 +147,11 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "ENABLE_DBMGMT", "DISABLE_DBMGMT", "MODIFY_DBMGMT", + "CHECK_EXTERNAL_MYSQL_CONNECTION", + "UPDATE_EXTERNAL_MYSQL_CREDENTIAL", + "CREATE_EXTERNAL_MYSQL_CONNECTOR", + "DELETE_EXTERNAL_MYSQL_CONNECTOR", + "DELETE_EXTERNAL_MYSQL_DATABASE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_details.go index 22228b18be0..7219dda2efa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_details.go @@ -91,6 +91,10 @@ func (m *createdrprotectiongroupmemberdetails) UnmarshalPolymorphicJSON(data []b mm := CreateDrProtectionGroupMemberVolumeGroupDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "OKE_CLUSTER": + mm := CreateDrProtectionGroupMemberOkeClusterDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "FILE_SYSTEM": mm := CreateDrProtectionGroupMemberFileSystemDetails{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_oke_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_oke_cluster_details.go new file mode 100644 index 00000000000..9a82aab5ec3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_oke_cluster_details.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDrProtectionGroupMemberOkeClusterDetails Create properties for an OKE member. +type CreateDrProtectionGroupMemberOkeClusterDetails struct { + + // The OCID of the member. + // Example: `ocid1.instance.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the peer OKE cluster. + // This property applies to the OKE cluster member in both the primary and standby region. + // Example: `ocid1.cluster.oc1..uniqueID` + PeerClusterId *string `mandatory:"false" json:"peerClusterId"` + + // The OCID of the compute instance member that is designated as a jump host. + // This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature. + // Example: `ocid1.instance.oc1..uniqueID` + JumpHostId *string `mandatory:"false" json:"jumpHostId"` + + BackupLocation *CreateOkeBackupLocationDetails `mandatory:"false" json:"backupLocation"` + + BackupConfig *CreateOkeClusterBackupConfigDetails `mandatory:"false" json:"backupConfig"` + + // The list of source-to-destination load balancer mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + LoadBalancerMappings []CreateOkeClusterLoadBalancerMappingDetails `mandatory:"false" json:"loadBalancerMappings"` + + // The list of source-to-destination network load balancer mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + NetworkLoadBalancerMappings []CreateOkeClusterNetworkLoadBalancerMappingDetails `mandatory:"false" json:"networkLoadBalancerMappings"` + + // The list of source-to-destination vault mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + VaultMappings []CreateOkeClusterVaultMappingDetails `mandatory:"false" json:"vaultMappings"` + + // The list of managed node pools with configurations for minimum and maximum node counts. + // This property applies to the OKE cluster member in both the primary and standby region. + ManagedNodePoolConfigs []CreateOkeClusterManagedNodePoolConfigurationDetails `mandatory:"false" json:"managedNodePoolConfigs"` + + // The list of virtual node pools with configurations for minimum and maximum node counts. + // This property applies to the OKE cluster member in both the primary and standby region. + VirtualNodePoolConfigs []CreateOkeClusterVirtualNodePoolConfigurationDetails `mandatory:"false" json:"virtualNodePoolConfigs"` +} + +// GetMemberId returns MemberId +func (m CreateDrProtectionGroupMemberOkeClusterDetails) GetMemberId() *string { + return m.MemberId +} + +func (m CreateDrProtectionGroupMemberOkeClusterDetails) 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 CreateDrProtectionGroupMemberOkeClusterDetails) 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 CreateDrProtectionGroupMemberOkeClusterDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDrProtectionGroupMemberOkeClusterDetails CreateDrProtectionGroupMemberOkeClusterDetails + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeCreateDrProtectionGroupMemberOkeClusterDetails + }{ + "OKE_CLUSTER", + (MarshalTypeCreateDrProtectionGroupMemberOkeClusterDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_backup_location_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_backup_location_details.go new file mode 100644 index 00000000000..784e88b2b41 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_backup_location_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOkeBackupLocationDetails The details for creating the backup location of an OKE Cluster. +type CreateOkeBackupLocationDetails struct { + + // The namespace in the object storage bucket location (Note - this is usually the tenancy name). + // Example: `myocitenancy` + Namespace *string `mandatory:"false" json:"namespace"` + + // The bucket name inside the object storage namespace. + // Example: `operation_logs` + Bucket *string `mandatory:"false" json:"bucket"` +} + +func (m CreateOkeBackupLocationDetails) 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 CreateOkeBackupLocationDetails) 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/disasterrecovery/create_oke_cluster_backup_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_backup_config_details.go new file mode 100644 index 00000000000..c2a206a60b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_backup_config_details.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOkeClusterBackupConfigDetails Create backup configuration properties for an OKE member. +type CreateOkeClusterBackupConfigDetails struct { + + // A list of namespaces that need to be backed up. + // The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. + // This property applies to the OKE cluster member in primary region. + // Example: ["default", "pv-nginx"] + Namespaces []string `mandatory:"false" json:"namespaces"` + + // The schedule for backing up namespaces to the destination region. If a backup schedule is not specified, only a single backup will be created. + // This format of the string specifying the backup schedule must conform with RFC-5545 (see examples below). + // This schedule will use the UTC timezone. + // This property applies to the OKE cluster member in primary region. + // The backup frequency can be HOURLY, DAILY, WEEKLY or MONTHLY, and the upper and lower interval bounds are as follows + // HOURLY + // - Minimum = 1 + // - Maximum = 24 + // DAILY + // - Minimum = 1 + // - Maximum = 30 + // WEEKLY + // - Minimum = 1 + // - Maximum = 1 + // MONTHLY + // - Minimum = 1 + // - Maximum = 12 + // Examples: + // FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=1 -> Run a backup every week on monday and wednesday at 10:00 AM. + // FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=2 -> Invalid configuration (can not specify interval of 2). + // FREQ=HOURLY;INTERVAL=25 -> Invalid configuration (can not specify interval of 25). + // FREQ=HOURLY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). + // FREQ=HOURLY;INTERVAL=24 -> Run a backup every 24 hours. + // FREQ=HOURLY;INTERVAL=1 -> Run a backup every hour. + // FREQ=HOURLY;BYMINUTE=30;INTERVAL=15 -> Run a backup every 15 hours at the 30th minute. + // + // FREQ=DAILY;INTERVAL=31 -> Invalid configuration (can not specify interval of 31). + // FREQ=DAILY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). + // FREQ=DAILY;INTERVAL=30 -> Run a backup every 30 days at 12:00 midnight. + // FREQ=DAILY;BYHOUR=17;BYMINUTE=10;INTERVAL=1 -> Run a backup every day at 05:10 PM. + BackupSchedule *string `mandatory:"false" json:"backupSchedule"` + + // Controls the behaviour of image replication across regions. + // Image replication is enabled by default for DR Protection Groups with a primary role. + // This property applies to the OKE cluster member in primary region. + ReplicateImages OkeClusterImageReplicationEnum `mandatory:"false" json:"replicateImages,omitempty"` + + // The maximum number of backups that should be retained. + // This property applies to the OKE cluster member in primary region. + MaxNumberOfBackupsRetained *int `mandatory:"false" json:"maxNumberOfBackupsRetained"` + + // The OCID of the vault secret that stores the image credential. + // This property applies to the OKE cluster member in both the primary and standby region. + ImageReplicationVaultSecretId *string `mandatory:"false" json:"imageReplicationVaultSecretId"` +} + +func (m CreateOkeClusterBackupConfigDetails) 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 CreateOkeClusterBackupConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingOkeClusterImageReplicationEnum(string(m.ReplicateImages)); !ok && m.ReplicateImages != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReplicateImages: %s. Supported values are: %s.", m.ReplicateImages, strings.Join(GetOkeClusterImageReplicationEnumStringValues(), ","))) + } + 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/disasterrecovery/create_oke_cluster_load_balancer_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_load_balancer_mapping_details.go new file mode 100644 index 00000000000..67bc21d5d81 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_load_balancer_mapping_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOkeClusterLoadBalancerMappingDetails Create source-to-destination mapping for a load balancer. +type CreateOkeClusterLoadBalancerMappingDetails struct { + + // The OCID of the source Load Balancer. + // + // Example: `ocid1.loadbalancer.oc1..uniqueID` + SourceLoadBalancerId *string `mandatory:"true" json:"sourceLoadBalancerId"` + + // The OCID of the destination Load Balancer. + // Example: `ocid1.loadbalancer.oc1..uniqueID` + DestinationLoadBalancerId *string `mandatory:"true" json:"destinationLoadBalancerId"` +} + +func (m CreateOkeClusterLoadBalancerMappingDetails) 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 CreateOkeClusterLoadBalancerMappingDetails) 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/disasterrecovery/create_oke_cluster_managed_node_pool_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_managed_node_pool_configuration_details.go new file mode 100644 index 00000000000..525ef9d256b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_managed_node_pool_configuration_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOkeClusterManagedNodePoolConfigurationDetails Create managed node pool configuration properties for an OKE member. +type CreateOkeClusterManagedNodePoolConfigurationDetails struct { + + // The OCID of the managed node pool in OKE cluster. + Id *string `mandatory:"true" json:"id"` + + // The minimum number to which nodes in the managed node pool could be scaled down. + Minimum *int `mandatory:"false" json:"minimum"` + + // The maximum number to which nodes in the managed node pool could be scaled up. + Maximum *int `mandatory:"false" json:"maximum"` +} + +func (m CreateOkeClusterManagedNodePoolConfigurationDetails) 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 CreateOkeClusterManagedNodePoolConfigurationDetails) 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/disasterrecovery/create_oke_cluster_network_load_balancer_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_network_load_balancer_mapping_details.go new file mode 100644 index 00000000000..8f16b9bbb86 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_network_load_balancer_mapping_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOkeClusterNetworkLoadBalancerMappingDetails Create source-to-destination mapping for a network load balancer. +type CreateOkeClusterNetworkLoadBalancerMappingDetails struct { + + // The OCID of the source Network Load Balancer. + // Example: `ocid1.networkloadbalancer.oc1..uniqueID` + SourceNetworkLoadBalancerId *string `mandatory:"true" json:"sourceNetworkLoadBalancerId"` + + // The OCID of the Network Load Balancer. + // Example: `ocid1.networkloadbalancer.oc1..uniqueID` + DestinationNetworkLoadBalancerId *string `mandatory:"true" json:"destinationNetworkLoadBalancerId"` +} + +func (m CreateOkeClusterNetworkLoadBalancerMappingDetails) 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 CreateOkeClusterNetworkLoadBalancerMappingDetails) 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/disasterrecovery/create_oke_cluster_vault_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_vault_mapping_details.go new file mode 100644 index 00000000000..db36ac07372 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_vault_mapping_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOkeClusterVaultMappingDetails Create source-to-destination mapping for a vault. +type CreateOkeClusterVaultMappingDetails struct { + + // The OCID of the source Vault. + // Example: `ocid1.vault.oc1..uniqueID` + SourceVaultId *string `mandatory:"true" json:"sourceVaultId"` + + // The OCID of the destination Vault. + // Example: `ocid1.vault.oc1..uniqueID` + DestinationVaultId *string `mandatory:"true" json:"destinationVaultId"` +} + +func (m CreateOkeClusterVaultMappingDetails) 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 CreateOkeClusterVaultMappingDetails) 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/disasterrecovery/create_oke_cluster_virtual_node_pool_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_virtual_node_pool_configuration_details.go new file mode 100644 index 00000000000..3ca795796cb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_virtual_node_pool_configuration_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateOkeClusterVirtualNodePoolConfigurationDetails Create virtual node pool configuration properties for an OKE member. +type CreateOkeClusterVirtualNodePoolConfigurationDetails struct { + + // The OCID of the virtual node pool in OKE cluster. + Id *string `mandatory:"true" json:"id"` + + // The minimum number to which nodes in the virtual node pool could be scaled down. + Minimum *int `mandatory:"false" json:"minimum"` + + // The maximum number to which nodes in the virtual node pool could be scaled up. + Maximum *int `mandatory:"false" json:"maximum"` +} + +func (m CreateOkeClusterVirtualNodePoolConfigurationDetails) 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 CreateOkeClusterVirtualNodePoolConfigurationDetails) 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/disasterrecovery/dr_plan_step_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_type.go index ab7d29340ea..d0fa1e73550 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_type.go @@ -106,6 +106,22 @@ const ( DrPlanStepTypeComputeCapacityReservationFailoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK" DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK" DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck DrPlanStepTypeEnum = "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK" + DrPlanStepTypeOkeClusterSwitchoverCleanupPrimaryPrecheck DrPlanStepTypeEnum = "OKE_CLUSTER_SWITCHOVER_CLEANUP_PRIMARY_PRECHECK" + DrPlanStepTypeOkeClusterSwitchoverRestoreStandbyPrecheck DrPlanStepTypeEnum = "OKE_CLUSTER_SWITCHOVER_RESTORE_STANDBY_PRECHECK" + DrPlanStepTypeOkeClusterFailoverRestoreStandbyPrecheck DrPlanStepTypeEnum = "OKE_CLUSTER_FAILOVER_RESTORE_STANDBY_PRECHECK" + DrPlanStepTypeOkeClusterStopDrillCleanupStandbyPrecheck DrPlanStepTypeEnum = "OKE_CLUSTER_STOP_DRILL_CLEANUP_STANDBY_PRECHECK" + DrPlanStepTypeOkeClusterStartDrillRestoreStandbyPrecheck DrPlanStepTypeEnum = "OKE_CLUSTER_START_DRILL_RESTORE_STANDBY_PRECHECK" + DrPlanStepTypeOkeClusterSwitchoverCleanupPrimary DrPlanStepTypeEnum = "OKE_CLUSTER_SWITCHOVER_CLEANUP_PRIMARY" + DrPlanStepTypeOkeClusterSwitchoverScaleUpStandby DrPlanStepTypeEnum = "OKE_CLUSTER_SWITCHOVER_SCALE_UP_STANDBY" + DrPlanStepTypeOkeClusterSwitchoverRestoreStandby DrPlanStepTypeEnum = "OKE_CLUSTER_SWITCHOVER_RESTORE_STANDBY" + DrPlanStepTypeOkeClusterSwitchoverReverseBackupStandby DrPlanStepTypeEnum = "OKE_CLUSTER_SWITCHOVER_REVERSE_BACKUP_STANDBY" + DrPlanStepTypeOkeClusterSwitchoverScaleDownPrimary DrPlanStepTypeEnum = "OKE_CLUSTER_SWITCHOVER_SCALE_DOWN_PRIMARY" + DrPlanStepTypeOkeClusterFailoverRestoreStandby DrPlanStepTypeEnum = "OKE_CLUSTER_FAILOVER_RESTORE_STANDBY" + DrPlanStepTypeOkeClusterFailoverScaleUpStandby DrPlanStepTypeEnum = "OKE_CLUSTER_FAILOVER_SCALE_UP_STANDBY" + DrPlanStepTypeOkeClusterStartDrillRestoreStandby DrPlanStepTypeEnum = "OKE_CLUSTER_START_DRILL_RESTORE_STANDBY" + DrPlanStepTypeOkeClusterStartDrillScaleUpStandby DrPlanStepTypeEnum = "OKE_CLUSTER_START_DRILL_SCALE_UP_STANDBY" + DrPlanStepTypeOkeClusterStopDrillCleanupStandby DrPlanStepTypeEnum = "OKE_CLUSTER_STOP_DRILL_CLEANUP_STANDBY" + DrPlanStepTypeOkeClusterStopDrillScaleDownStandby DrPlanStepTypeEnum = "OKE_CLUSTER_STOP_DRILL_SCALE_DOWN_STANDBY" DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimaryPrecheck DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK" DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandbyPrecheck DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK" DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandbyPrecheck DrPlanStepTypeEnum = "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK" @@ -202,6 +218,22 @@ var mappingDrPlanStepTypeEnum = map[string]DrPlanStepTypeEnum{ "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK": DrPlanStepTypeComputeCapacityReservationFailoverPrecheck, "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck, "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK": DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck, + "OKE_CLUSTER_SWITCHOVER_CLEANUP_PRIMARY_PRECHECK": DrPlanStepTypeOkeClusterSwitchoverCleanupPrimaryPrecheck, + "OKE_CLUSTER_SWITCHOVER_RESTORE_STANDBY_PRECHECK": DrPlanStepTypeOkeClusterSwitchoverRestoreStandbyPrecheck, + "OKE_CLUSTER_FAILOVER_RESTORE_STANDBY_PRECHECK": DrPlanStepTypeOkeClusterFailoverRestoreStandbyPrecheck, + "OKE_CLUSTER_STOP_DRILL_CLEANUP_STANDBY_PRECHECK": DrPlanStepTypeOkeClusterStopDrillCleanupStandbyPrecheck, + "OKE_CLUSTER_START_DRILL_RESTORE_STANDBY_PRECHECK": DrPlanStepTypeOkeClusterStartDrillRestoreStandbyPrecheck, + "OKE_CLUSTER_SWITCHOVER_CLEANUP_PRIMARY": DrPlanStepTypeOkeClusterSwitchoverCleanupPrimary, + "OKE_CLUSTER_SWITCHOVER_SCALE_UP_STANDBY": DrPlanStepTypeOkeClusterSwitchoverScaleUpStandby, + "OKE_CLUSTER_SWITCHOVER_RESTORE_STANDBY": DrPlanStepTypeOkeClusterSwitchoverRestoreStandby, + "OKE_CLUSTER_SWITCHOVER_REVERSE_BACKUP_STANDBY": DrPlanStepTypeOkeClusterSwitchoverReverseBackupStandby, + "OKE_CLUSTER_SWITCHOVER_SCALE_DOWN_PRIMARY": DrPlanStepTypeOkeClusterSwitchoverScaleDownPrimary, + "OKE_CLUSTER_FAILOVER_RESTORE_STANDBY": DrPlanStepTypeOkeClusterFailoverRestoreStandby, + "OKE_CLUSTER_FAILOVER_SCALE_UP_STANDBY": DrPlanStepTypeOkeClusterFailoverScaleUpStandby, + "OKE_CLUSTER_START_DRILL_RESTORE_STANDBY": DrPlanStepTypeOkeClusterStartDrillRestoreStandby, + "OKE_CLUSTER_START_DRILL_SCALE_UP_STANDBY": DrPlanStepTypeOkeClusterStartDrillScaleUpStandby, + "OKE_CLUSTER_STOP_DRILL_CLEANUP_STANDBY": DrPlanStepTypeOkeClusterStopDrillCleanupStandby, + "OKE_CLUSTER_STOP_DRILL_SCALE_DOWN_STANDBY": DrPlanStepTypeOkeClusterStopDrillScaleDownStandby, "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK": DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimaryPrecheck, "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK": DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandbyPrecheck, "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK": DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandbyPrecheck, @@ -298,6 +330,22 @@ var mappingDrPlanStepTypeEnumLowerCase = map[string]DrPlanStepTypeEnum{ "compute_capacity_reservation_failover_precheck": DrPlanStepTypeComputeCapacityReservationFailoverPrecheck, "compute_capacity_availability_switchover_precheck": DrPlanStepTypeComputeCapacityAvailabilitySwitchoverPrecheck, "compute_capacity_availability_failover_precheck": DrPlanStepTypeComputeCapacityAvailabilityFailoverPrecheck, + "oke_cluster_switchover_cleanup_primary_precheck": DrPlanStepTypeOkeClusterSwitchoverCleanupPrimaryPrecheck, + "oke_cluster_switchover_restore_standby_precheck": DrPlanStepTypeOkeClusterSwitchoverRestoreStandbyPrecheck, + "oke_cluster_failover_restore_standby_precheck": DrPlanStepTypeOkeClusterFailoverRestoreStandbyPrecheck, + "oke_cluster_stop_drill_cleanup_standby_precheck": DrPlanStepTypeOkeClusterStopDrillCleanupStandbyPrecheck, + "oke_cluster_start_drill_restore_standby_precheck": DrPlanStepTypeOkeClusterStartDrillRestoreStandbyPrecheck, + "oke_cluster_switchover_cleanup_primary": DrPlanStepTypeOkeClusterSwitchoverCleanupPrimary, + "oke_cluster_switchover_scale_up_standby": DrPlanStepTypeOkeClusterSwitchoverScaleUpStandby, + "oke_cluster_switchover_restore_standby": DrPlanStepTypeOkeClusterSwitchoverRestoreStandby, + "oke_cluster_switchover_reverse_backup_standby": DrPlanStepTypeOkeClusterSwitchoverReverseBackupStandby, + "oke_cluster_switchover_scale_down_primary": DrPlanStepTypeOkeClusterSwitchoverScaleDownPrimary, + "oke_cluster_failover_restore_standby": DrPlanStepTypeOkeClusterFailoverRestoreStandby, + "oke_cluster_failover_scale_up_standby": DrPlanStepTypeOkeClusterFailoverScaleUpStandby, + "oke_cluster_start_drill_restore_standby": DrPlanStepTypeOkeClusterStartDrillRestoreStandby, + "oke_cluster_start_drill_scale_up_standby": DrPlanStepTypeOkeClusterStartDrillScaleUpStandby, + "oke_cluster_stop_drill_cleanup_standby": DrPlanStepTypeOkeClusterStopDrillCleanupStandby, + "oke_cluster_stop_drill_scale_down_standby": DrPlanStepTypeOkeClusterStopDrillScaleDownStandby, "object_storage_bucket_switchover_delete_replication_primary_precheck": DrPlanStepTypeObjectStorageBucketSwitchoverDeleteReplicationPrimaryPrecheck, "object_storage_bucket_switchover_setup_reverse_replication_standby_precheck": DrPlanStepTypeObjectStorageBucketSwitchoverSetupReverseReplicationStandbyPrecheck, "object_storage_bucket_failover_delete_replication_standby_precheck": DrPlanStepTypeObjectStorageBucketFailoverDeleteReplicationStandbyPrecheck, @@ -405,6 +453,22 @@ func GetDrPlanStepTypeEnumStringValues() []string { "COMPUTE_CAPACITY_RESERVATION_FAILOVER_PRECHECK", "COMPUTE_CAPACITY_AVAILABILITY_SWITCHOVER_PRECHECK", "COMPUTE_CAPACITY_AVAILABILITY_FAILOVER_PRECHECK", + "OKE_CLUSTER_SWITCHOVER_CLEANUP_PRIMARY_PRECHECK", + "OKE_CLUSTER_SWITCHOVER_RESTORE_STANDBY_PRECHECK", + "OKE_CLUSTER_FAILOVER_RESTORE_STANDBY_PRECHECK", + "OKE_CLUSTER_STOP_DRILL_CLEANUP_STANDBY_PRECHECK", + "OKE_CLUSTER_START_DRILL_RESTORE_STANDBY_PRECHECK", + "OKE_CLUSTER_SWITCHOVER_CLEANUP_PRIMARY", + "OKE_CLUSTER_SWITCHOVER_SCALE_UP_STANDBY", + "OKE_CLUSTER_SWITCHOVER_RESTORE_STANDBY", + "OKE_CLUSTER_SWITCHOVER_REVERSE_BACKUP_STANDBY", + "OKE_CLUSTER_SWITCHOVER_SCALE_DOWN_PRIMARY", + "OKE_CLUSTER_FAILOVER_RESTORE_STANDBY", + "OKE_CLUSTER_FAILOVER_SCALE_UP_STANDBY", + "OKE_CLUSTER_START_DRILL_RESTORE_STANDBY", + "OKE_CLUSTER_START_DRILL_SCALE_UP_STANDBY", + "OKE_CLUSTER_STOP_DRILL_CLEANUP_STANDBY", + "OKE_CLUSTER_STOP_DRILL_SCALE_DOWN_STANDBY", "OBJECT_STORAGE_BUCKET_SWITCHOVER_DELETE_REPLICATION_PRIMARY_PRECHECK", "OBJECT_STORAGE_BUCKET_SWITCHOVER_SETUP_REVERSE_REPLICATION_STANDBY_PRECHECK", "OBJECT_STORAGE_BUCKET_FAILOVER_DELETE_REPLICATION_STANDBY_PRECHECK", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member.go index 837d78801d9..021d6f4099d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member.go @@ -103,6 +103,10 @@ func (m *drprotectiongroupmember) UnmarshalPolymorphicJSON(data []byte) (interfa mm := DrProtectionGroupMemberDatabase{} err = json.Unmarshal(data, &mm) return mm, err + case "OKE_CLUSTER": + mm := DrProtectionGroupMemberOkeCluster{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for DrProtectionGroupMember: %s.", m.MemberType) return *m, nil diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_oke_cluster.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_oke_cluster.go new file mode 100644 index 00000000000..c9ad7701494 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_oke_cluster.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DrProtectionGroupMemberOkeCluster Properties for a OKE Cluster member of a DR Protection Group. +type DrProtectionGroupMemberOkeCluster struct { + + // The OCID of the member. + // Example: `ocid1.instance.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the peer OKE cluster. + // This property applies to the OKE cluster member in both the primary and standby region. + // Example: `ocid1.cluster.oc1.uniqueID` + PeerClusterId *string `mandatory:"false" json:"peerClusterId"` + + // The OCID of the compute instance member that is designated as a jump host. + // This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature. + // Example: `ocid1.instance.oc1..uniqueID` + JumpHostId *string `mandatory:"false" json:"jumpHostId"` + + BackupLocation *OkeBackupLocation `mandatory:"false" json:"backupLocation"` + + BackupConfig *OkeClusterBackupConfig `mandatory:"false" json:"backupConfig"` + + // The list of source-to-destination load balancer mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + LoadBalancerMappings []OkeClusterLoadBalancerMapping `mandatory:"false" json:"loadBalancerMappings"` + + // The list of source-to-destination network load balancer mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + NetworkLoadBalancerMappings []OkeClusterNetworkLoadBalancerMapping `mandatory:"false" json:"networkLoadBalancerMappings"` + + // The list of source-to-destination vault mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + VaultMappings []OkeClusterVaultMapping `mandatory:"false" json:"vaultMappings"` + + // The list of node pools with configurations for minimum and maximum node counts. + // This property applies to the OKE cluster member in both the primary and standby region. + ManagedNodePoolConfigs []OkeClusterManagedNodePoolConfiguration `mandatory:"false" json:"managedNodePoolConfigs"` + + // The list of node pools with configurations for minimum and maximum node counts. + // This property applies to the OKE cluster member in both the primary and standby region. + VirtualNodePoolConfigs []OkeClusterVirtualNodePoolConfiguration `mandatory:"false" json:"virtualNodePoolConfigs"` +} + +// GetMemberId returns MemberId +func (m DrProtectionGroupMemberOkeCluster) GetMemberId() *string { + return m.MemberId +} + +func (m DrProtectionGroupMemberOkeCluster) 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 DrProtectionGroupMemberOkeCluster) 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 DrProtectionGroupMemberOkeCluster) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDrProtectionGroupMemberOkeCluster DrProtectionGroupMemberOkeCluster + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeDrProtectionGroupMemberOkeCluster + }{ + "OKE_CLUSTER", + (MarshalTypeDrProtectionGroupMemberOkeCluster)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_type.go index c874f3a3660..161804d34c0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_type.go @@ -31,6 +31,7 @@ const ( DrProtectionGroupMemberTypeLoadBalancer DrProtectionGroupMemberTypeEnum = "LOAD_BALANCER" DrProtectionGroupMemberTypeNetworkLoadBalancer DrProtectionGroupMemberTypeEnum = "NETWORK_LOAD_BALANCER" DrProtectionGroupMemberTypeFileSystem DrProtectionGroupMemberTypeEnum = "FILE_SYSTEM" + DrProtectionGroupMemberTypeOkeCluster DrProtectionGroupMemberTypeEnum = "OKE_CLUSTER" DrProtectionGroupMemberTypeObjectStorageBucket DrProtectionGroupMemberTypeEnum = "OBJECT_STORAGE_BUCKET" ) @@ -45,6 +46,7 @@ var mappingDrProtectionGroupMemberTypeEnum = map[string]DrProtectionGroupMemberT "LOAD_BALANCER": DrProtectionGroupMemberTypeLoadBalancer, "NETWORK_LOAD_BALANCER": DrProtectionGroupMemberTypeNetworkLoadBalancer, "FILE_SYSTEM": DrProtectionGroupMemberTypeFileSystem, + "OKE_CLUSTER": DrProtectionGroupMemberTypeOkeCluster, "OBJECT_STORAGE_BUCKET": DrProtectionGroupMemberTypeObjectStorageBucket, } @@ -59,6 +61,7 @@ var mappingDrProtectionGroupMemberTypeEnumLowerCase = map[string]DrProtectionGro "load_balancer": DrProtectionGroupMemberTypeLoadBalancer, "network_load_balancer": DrProtectionGroupMemberTypeNetworkLoadBalancer, "file_system": DrProtectionGroupMemberTypeFileSystem, + "oke_cluster": DrProtectionGroupMemberTypeOkeCluster, "object_storage_bucket": DrProtectionGroupMemberTypeObjectStorageBucket, } @@ -84,6 +87,7 @@ func GetDrProtectionGroupMemberTypeEnumStringValues() []string { "LOAD_BALANCER", "NETWORK_LOAD_BALANCER", "FILE_SYSTEM", + "OKE_CLUSTER", "OBJECT_STORAGE_BUCKET", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_backup_location.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_backup_location.go new file mode 100644 index 00000000000..d4e1c2679bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_backup_location.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkeBackupLocation The details for object storage backup location of an OKE Cluster +type OkeBackupLocation struct { + + // The namespace in object storage backup location(Note - this is usually the tenancy name). + // Example: `myocitenancy` + Namespace *string `mandatory:"true" json:"namespace"` + + // The bucket name inside the object storage namespace. + // Example: `operation_logs` + Bucket *string `mandatory:"true" json:"bucket"` + + // The object name inside the object storage bucket. + // Example: `switchover_plan_executions` + Object *string `mandatory:"false" json:"object"` +} + +func (m OkeBackupLocation) 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 OkeBackupLocation) 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/disasterrecovery/oke_cluster_backup_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_backup_config.go new file mode 100644 index 00000000000..33dc122c875 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_backup_config.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkeClusterBackupConfig The details of backup performed on OKE Cluster. +type OkeClusterBackupConfig struct { + + // A list of namespaces that need to be backed up. + // The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. + // This property applies to the OKE cluster member in primary region. + // Example: ["default", "pv-nginx"] + Namespaces []string `mandatory:"false" json:"namespaces"` + + // The schedule for backing up namespaces to the destination region. If a backup schedule is not specified, only a single backup will be created. This format of the string specifying the backup schedule must conform with RFC-5545. + // This schedule will use the UTC timezone. + // This property applies to the OKE cluster member in primary region. + // Example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 + BackupSchedule *string `mandatory:"false" json:"backupSchedule"` + + // Controls the behaviour of image replication across regions. + // This property applies to the OKE cluster member in primary region. + ReplicateImages OkeClusterImageReplicationEnum `mandatory:"false" json:"replicateImages,omitempty"` + + // The maximum number of backups that should be retained. + // This property applies to the OKE cluster member in primary region. + MaxNumberOfBackupsRetained *int `mandatory:"false" json:"maxNumberOfBackupsRetained"` + + // The OCID of the vault secret that stores the image credential. + // This property applies to the OKE cluster member in both the primary and standby region. + ImageReplicationVaultSecretId *string `mandatory:"false" json:"imageReplicationVaultSecretId"` +} + +func (m OkeClusterBackupConfig) 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 OkeClusterBackupConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingOkeClusterImageReplicationEnum(string(m.ReplicateImages)); !ok && m.ReplicateImages != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReplicateImages: %s. Supported values are: %s.", m.ReplicateImages, strings.Join(GetOkeClusterImageReplicationEnumStringValues(), ","))) + } + 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/disasterrecovery/oke_cluster_image_replication.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_image_replication.go new file mode 100644 index 00000000000..b943aa94947 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_image_replication.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "strings" +) + +// OkeClusterImageReplicationEnum Enum with underlying type: string +type OkeClusterImageReplicationEnum string + +// Set of constants representing the allowable values for OkeClusterImageReplicationEnum +const ( + OkeClusterImageReplicationEnable OkeClusterImageReplicationEnum = "ENABLE" + OkeClusterImageReplicationDisable OkeClusterImageReplicationEnum = "DISABLE" +) + +var mappingOkeClusterImageReplicationEnum = map[string]OkeClusterImageReplicationEnum{ + "ENABLE": OkeClusterImageReplicationEnable, + "DISABLE": OkeClusterImageReplicationDisable, +} + +var mappingOkeClusterImageReplicationEnumLowerCase = map[string]OkeClusterImageReplicationEnum{ + "enable": OkeClusterImageReplicationEnable, + "disable": OkeClusterImageReplicationDisable, +} + +// GetOkeClusterImageReplicationEnumValues Enumerates the set of values for OkeClusterImageReplicationEnum +func GetOkeClusterImageReplicationEnumValues() []OkeClusterImageReplicationEnum { + values := make([]OkeClusterImageReplicationEnum, 0) + for _, v := range mappingOkeClusterImageReplicationEnum { + values = append(values, v) + } + return values +} + +// GetOkeClusterImageReplicationEnumStringValues Enumerates the set of values in String for OkeClusterImageReplicationEnum +func GetOkeClusterImageReplicationEnumStringValues() []string { + return []string{ + "ENABLE", + "DISABLE", + } +} + +// GetMappingOkeClusterImageReplicationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOkeClusterImageReplicationEnum(val string) (OkeClusterImageReplicationEnum, bool) { + enum, ok := mappingOkeClusterImageReplicationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_load_balancer_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_load_balancer_mapping.go new file mode 100644 index 00000000000..b8577af3aba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_load_balancer_mapping.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkeClusterLoadBalancerMapping Source-to-destination mapping for a load balancer. +type OkeClusterLoadBalancerMapping struct { + + // The OCID of the source Load Balancer. + // Example: `ocid1.loadbalancer.oc1..uniqueID` + SourceLoadBalancerId *string `mandatory:"true" json:"sourceLoadBalancerId"` + + // The OCID of the destination Load Balancer. + // Example: `ocid1.loadbalancer.oc1..uniqueID` + DestinationLoadBalancerId *string `mandatory:"true" json:"destinationLoadBalancerId"` +} + +func (m OkeClusterLoadBalancerMapping) 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 OkeClusterLoadBalancerMapping) 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/disasterrecovery/oke_cluster_managed_node_pool_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_managed_node_pool_configuration.go new file mode 100644 index 00000000000..3cc76ca1497 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_managed_node_pool_configuration.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkeClusterManagedNodePoolConfiguration The managed node pool configuration properties for an OKE member. +type OkeClusterManagedNodePoolConfiguration struct { + + // The OCID of the managed node pool in OKE cluster. + Id *string `mandatory:"true" json:"id"` + + // The minimum number to which nodes in the managed node pool could be scaled down. + Minimum *int `mandatory:"false" json:"minimum"` + + // The maximum number to which nodes in the managed node pool could be scaled up. + Maximum *int `mandatory:"false" json:"maximum"` +} + +func (m OkeClusterManagedNodePoolConfiguration) 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 OkeClusterManagedNodePoolConfiguration) 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/disasterrecovery/oke_cluster_network_load_balancer_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_network_load_balancer_mapping.go new file mode 100644 index 00000000000..edfef591de3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_network_load_balancer_mapping.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkeClusterNetworkLoadBalancerMapping Source-to-destination mapping for a network load balancer. +type OkeClusterNetworkLoadBalancerMapping struct { + + // The OCID of the source Network Load Balancer. + // Example: `ocid1.networkloadbalancer.oc1..uniqueID` + SourceNetworkLoadBalancerId *string `mandatory:"true" json:"sourceNetworkLoadBalancerId"` + + // The OCID of the destination Network Load Balancer. + // Example: `ocid1.networkloadbalancer.oc1..uniqueID` + DestinationNetworkLoadBalancerId *string `mandatory:"true" json:"destinationNetworkLoadBalancerId"` +} + +func (m OkeClusterNetworkLoadBalancerMapping) 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 OkeClusterNetworkLoadBalancerMapping) 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/disasterrecovery/oke_cluster_vault_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_vault_mapping.go new file mode 100644 index 00000000000..39b8ea98b3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_vault_mapping.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkeClusterVaultMapping Source-to-destination mapping for a vault. +type OkeClusterVaultMapping struct { + + // The OCID of the source Vault. + // Example: `ocid1.vault.oc1..uniqueID` + SourceVaultId *string `mandatory:"true" json:"sourceVaultId"` + + // The OCID of the destination Vault. + // Example: `ocid1.vault.oc1..uniqueID` + DestinationVaultId *string `mandatory:"true" json:"destinationVaultId"` +} + +func (m OkeClusterVaultMapping) 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 OkeClusterVaultMapping) 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/disasterrecovery/oke_cluster_virtual_node_pool_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_virtual_node_pool_configuration.go new file mode 100644 index 00000000000..4cc6dfd8c65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/oke_cluster_virtual_node_pool_configuration.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkeClusterVirtualNodePoolConfiguration The virtual node pool configuration properties for an OKE member. +type OkeClusterVirtualNodePoolConfiguration struct { + + // The OCID of the virtual node pool in OKE cluster. + Id *string `mandatory:"true" json:"id"` + + // The minimum number to which nodes in the virtual node pool could be scaled down. + Minimum *int `mandatory:"false" json:"minimum"` + + // The maximum number to which nodes in the virtual node pool could be scaled up. + Maximum *int `mandatory:"false" json:"maximum"` +} + +func (m OkeClusterVirtualNodePoolConfiguration) 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 OkeClusterVirtualNodePoolConfiguration) 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/disasterrecovery/update_dr_protection_group_member_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_details.go index bd5a2dd104d..4c06c1a9d71 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_details.go @@ -67,6 +67,10 @@ func (m *updatedrprotectiongroupmemberdetails) UnmarshalPolymorphicJSON(data []b mm := UpdateDrProtectionGroupMemberNetworkLoadBalancerDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "OKE_CLUSTER": + mm := UpdateDrProtectionGroupMemberOkeClusterDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "AUTONOMOUS_DATABASE": mm := UpdateDrProtectionGroupMemberAutonomousDatabaseDetails{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_oke_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_oke_cluster_details.go new file mode 100644 index 00000000000..3a5cde57a74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_oke_cluster_details.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDrProtectionGroupMemberOkeClusterDetails Update properties for an OKE member. +type UpdateDrProtectionGroupMemberOkeClusterDetails struct { + + // The OCID of the member. + // Example: `ocid1.database.oc1..uniqueID` + MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the peer OKE cluster. + // This property applies to the OKE cluster member in both the primary and standby region. + // Example: `ocid1.cluster.oc1..uniqueID` + PeerClusterId *string `mandatory:"false" json:"peerClusterId"` + + // The OCID of the compute instance member that is designated as a jump host. + // This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature. + // Example: `ocid1.instance.oc1..uniqueID` + JumpHostId *string `mandatory:"false" json:"jumpHostId"` + + BackupLocation *UpdateOkeBackupLocationDetails `mandatory:"false" json:"backupLocation"` + + BackupConfig *UpdateOkeClusterBackupConfigDetails `mandatory:"false" json:"backupConfig"` + + // The list of source-to-destination load balancer mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + LoadBalancerMappings []UpdateOkeClusterLoadBalancerMappingDetails `mandatory:"false" json:"loadBalancerMappings"` + + // The list of source-to-destination network load balancer mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + NetworkLoadBalancerMappings []UpdateOkeClusterNetworkLoadBalancerMappingDetails `mandatory:"false" json:"networkLoadBalancerMappings"` + + // The list of source-to-destination vault mappings required for DR operations. + // This property applies to the OKE cluster member in primary region. + VaultMappings []UpdateOkeClusterVaultMappingDetails `mandatory:"false" json:"vaultMappings"` + + // The list of managed node pools with configurations for minimum and maximum node counts. + // This property applies to the OKE cluster member in both the primary and standby region. + ManagedNodePoolConfigs []UpdateOkeClusterManagedNodePoolConfigurationDetails `mandatory:"false" json:"managedNodePoolConfigs"` + + // The list of virtual node pools with configurations for minimum and maximum node counts. + // This property applies to the OKE cluster member in both the primary and standby region. + VirtualNodePoolConfigs []UpdateOkeClusterVirtualNodePoolConfigurationDetails `mandatory:"false" json:"virtualNodePoolConfigs"` +} + +// GetMemberId returns MemberId +func (m UpdateDrProtectionGroupMemberOkeClusterDetails) GetMemberId() *string { + return m.MemberId +} + +func (m UpdateDrProtectionGroupMemberOkeClusterDetails) 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 UpdateDrProtectionGroupMemberOkeClusterDetails) 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 UpdateDrProtectionGroupMemberOkeClusterDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDrProtectionGroupMemberOkeClusterDetails UpdateDrProtectionGroupMemberOkeClusterDetails + s := struct { + DiscriminatorParam string `json:"memberType"` + MarshalTypeUpdateDrProtectionGroupMemberOkeClusterDetails + }{ + "OKE_CLUSTER", + (MarshalTypeUpdateDrProtectionGroupMemberOkeClusterDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_backup_location_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_backup_location_details.go new file mode 100644 index 00000000000..08a4d16d1e4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_backup_location_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOkeBackupLocationDetails The details for updating the backup location of an OKE Cluster. +type UpdateOkeBackupLocationDetails struct { + + // The namespace in the object storage backup location (Note - this is usually the tenancy name). + // Example: `myocitenancy` + Namespace *string `mandatory:"false" json:"namespace"` + + // The bucket name inside the object storage namespace. + // Example: `operation_logs` + Bucket *string `mandatory:"false" json:"bucket"` +} + +func (m UpdateOkeBackupLocationDetails) 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 UpdateOkeBackupLocationDetails) 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/disasterrecovery/update_oke_cluster_backup_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_backup_config_details.go new file mode 100644 index 00000000000..ed55fcaaa1a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_backup_config_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOkeClusterBackupConfigDetails Update backup configuration properties for an OKE member. +type UpdateOkeClusterBackupConfigDetails struct { + + // A list of namespaces that need to be backed up. + // The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. + // This property applies to the OKE cluster member in primary region. + // Example: ["default", "pv-nginx"] + Namespaces []string `mandatory:"false" json:"namespaces"` + + // The schedule for backing up namespaces to the destination region. If a backup schedule is not specified, only a single backup will be created. + // This format of the string specifying the backup schedule must conform with RFC-5545. + // This schedule will use the UTC timezone. + // This property applies to the OKE cluster member in primary region. + // Example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 + BackupSchedule *string `mandatory:"false" json:"backupSchedule"` + + // Controls the behaviour of image replication across regions. + // This property applies to the OKE cluster member in primary region. + ReplicateImages OkeClusterImageReplicationEnum `mandatory:"false" json:"replicateImages,omitempty"` + + // The maximum number of backups that should be retained. + // This property applies to the OKE cluster member in primary region. + MaxNumberOfBackupsRetained *int `mandatory:"false" json:"maxNumberOfBackupsRetained"` + + // The OCID of the vault secret that stores the image credential. + // This property applies to the OKE cluster member in both the primary and standby region. + ImageReplicationVaultSecretId *string `mandatory:"false" json:"imageReplicationVaultSecretId"` +} + +func (m UpdateOkeClusterBackupConfigDetails) 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 UpdateOkeClusterBackupConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingOkeClusterImageReplicationEnum(string(m.ReplicateImages)); !ok && m.ReplicateImages != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReplicateImages: %s. Supported values are: %s.", m.ReplicateImages, strings.Join(GetOkeClusterImageReplicationEnumStringValues(), ","))) + } + 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/disasterrecovery/update_oke_cluster_load_balancer_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_load_balancer_mapping_details.go new file mode 100644 index 00000000000..cde1d7b2618 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_load_balancer_mapping_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOkeClusterLoadBalancerMappingDetails Update source-to-destination mapping for a load balancer. +type UpdateOkeClusterLoadBalancerMappingDetails struct { + + // The OCID of the source Load Balancer . + // + // Example: `ocid1.loadbalancer.oc1..uniqueID` + SourceLoadBalancerId *string `mandatory:"true" json:"sourceLoadBalancerId"` + + // The OCID of the destination Load Balancer. + // Example: `ocid1.loadbalancer.oc1..uniqueID` + DestinationLoadBalancerId *string `mandatory:"true" json:"destinationLoadBalancerId"` +} + +func (m UpdateOkeClusterLoadBalancerMappingDetails) 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 UpdateOkeClusterLoadBalancerMappingDetails) 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/disasterrecovery/update_oke_cluster_managed_node_pool_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_managed_node_pool_configuration_details.go new file mode 100644 index 00000000000..caa29e6f8df --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_managed_node_pool_configuration_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOkeClusterManagedNodePoolConfigurationDetails Update managed node pool configuration properties for an OKE member. +type UpdateOkeClusterManagedNodePoolConfigurationDetails struct { + + // The OCID of the managed node pool in OKE cluster. + Id *string `mandatory:"true" json:"id"` + + // The minimum number to which nodes in the managed node pool could be scaled down. + Minimum *int `mandatory:"false" json:"minimum"` + + // The maximum number to which nodes in the managed node pool could be scaled up. + Maximum *int `mandatory:"false" json:"maximum"` +} + +func (m UpdateOkeClusterManagedNodePoolConfigurationDetails) 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 UpdateOkeClusterManagedNodePoolConfigurationDetails) 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/disasterrecovery/update_oke_cluster_network_load_balancer_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_network_load_balancer_mapping_details.go new file mode 100644 index 00000000000..b83985983fa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_network_load_balancer_mapping_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOkeClusterNetworkLoadBalancerMappingDetails Update source-to-destination mapping for a network load balancer. +type UpdateOkeClusterNetworkLoadBalancerMappingDetails struct { + + // The OCID of the source Network Load Balancer. + // Example: `ocid1.networkloadbalancer.oc1..uniqueID` + SourceNetworkLoadBalancerId *string `mandatory:"true" json:"sourceNetworkLoadBalancerId"` + + // The OCID of the destination Network Load Balancer. + // Example: `ocid1.networkloadbalancer.oc1..uniqueID` + DestinationNetworkLoadBalancerId *string `mandatory:"true" json:"destinationNetworkLoadBalancerId"` +} + +func (m UpdateOkeClusterNetworkLoadBalancerMappingDetails) 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 UpdateOkeClusterNetworkLoadBalancerMappingDetails) 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/disasterrecovery/update_oke_cluster_vault_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_vault_mapping_details.go new file mode 100644 index 00000000000..b880ca559d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_vault_mapping_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOkeClusterVaultMappingDetails Update source-to-destination mapping for a vault. +type UpdateOkeClusterVaultMappingDetails struct { + + // The OCID of the source Vault. + // Example: `ocid1.vault.oc1..uniqueID` + SourceVaultId *string `mandatory:"true" json:"sourceVaultId"` + + // The OCID of the destination Vault. + // Example: `ocid1.vault.oc1..uniqueID` + DestinationVaultId *string `mandatory:"true" json:"destinationVaultId"` +} + +func (m UpdateOkeClusterVaultMappingDetails) 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 UpdateOkeClusterVaultMappingDetails) 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/disasterrecovery/update_oke_cluster_virtual_node_pool_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_virtual_node_pool_configuration_details.go new file mode 100644 index 00000000000..c18eeb62ade --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_oke_cluster_virtual_node_pool_configuration_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOkeClusterVirtualNodePoolConfigurationDetails Update virtual node pool configuration properties for an OKE member. +type UpdateOkeClusterVirtualNodePoolConfigurationDetails struct { + + // The OCID of the virtual node pool in OKE cluster. + Id *string `mandatory:"true" json:"id"` + + // The minimum number to which nodes in the virtual node pool could be scaled down. + Minimum *int `mandatory:"false" json:"minimum"` + + // The maximum number to which nodes in the virtual node pool could be scaled up. + Maximum *int `mandatory:"false" json:"maximum"` +} + +func (m UpdateOkeClusterVirtualNodePoolConfigurationDetails) 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 UpdateOkeClusterVirtualNodePoolConfigurationDetails) 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/actionable_insights_content_types_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/actionable_insights_content_types_resource.go new file mode 100644 index 00000000000..39cfb343b96 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/actionable_insights_content_types_resource.go @@ -0,0 +1,210 @@ +// Copyright (c) 2016, 2018, 2025, 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 ( + "strings" +) + +// ActionableInsightsContentTypesResourceEnum Enum with underlying type: string +type ActionableInsightsContentTypesResourceEnum string + +// Set of constants representing the allowable values for ActionableInsightsContentTypesResourceEnum +const ( + ActionableInsightsContentTypesResourceNewHighs ActionableInsightsContentTypesResourceEnum = "NEW_HIGHS" + ActionableInsightsContentTypesResourceBigChanges ActionableInsightsContentTypesResourceEnum = "BIG_CHANGES" + ActionableInsightsContentTypesResourceCurrentInventory ActionableInsightsContentTypesResourceEnum = "CURRENT_INVENTORY" + ActionableInsightsContentTypesResourceInventoryChanges ActionableInsightsContentTypesResourceEnum = "INVENTORY_CHANGES" + ActionableInsightsContentTypesResourceFleetStatistics ActionableInsightsContentTypesResourceEnum = "FLEET_STATISTICS" + ActionableInsightsContentTypesResourceFleetAnalysisSummaryDbCount ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_SUMMARY_DB_COUNT" + ActionableInsightsContentTypesResourceFleetAnalysisSummarySqlAnalyzedCount ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_SUMMARY_SQL_ANALYZED_COUNT" + ActionableInsightsContentTypesResourceFleetAnalysisSummaryNewSqlCount ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_SUMMARY_NEW_SQL_COUNT" + ActionableInsightsContentTypesResourceFleetAnalysisSummaryBusiestDb ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_SUMMARY_BUSIEST_DB" + ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlCount ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_DEGRADING_SQL_COUNT" + ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlByDb ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_DEGRADING_SQL_BY_DB" + ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlBySqlId ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_DEGRADING_SQL_BY_SQL_ID" + ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesCount ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_PLAN_CHANGES_COUNT" + ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesDbMostChanges ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_PLAN_CHANGES_DB_MOST_CHANGES" + ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdImproved ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_IMPROVED" + ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdDegraded ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_DEGRADED" + ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsCount ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_INVALIDATION_STORMS_COUNT" + ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsHighest ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_INVALIDATION_STORMS_HIGHEST" + ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesCount ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_COUNT" + ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesByDb ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_DB" + ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesBySql ActionableInsightsContentTypesResourceEnum = "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_SQL" + ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDbCount ActionableInsightsContentTypesResourceEnum = "PERFORMANCE_DEGRADATION_SUMMARY_DB_COUNT" + ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlAnalyzedCount ActionableInsightsContentTypesResourceEnum = "PERFORMANCE_DEGRADATION_SUMMARY_SQL_ANALYZED_COUNT" + ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlPerformanceTrendsCount ActionableInsightsContentTypesResourceEnum = "PERFORMANCE_DEGRADATION_SUMMARY_SQL_PERFORMANCE_TRENDS_COUNT" + ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDegradedSqlCount ActionableInsightsContentTypesResourceEnum = "PERFORMANCE_DEGRADATION_SUMMARY_DEGRADED_SQL_COUNT" + ActionableInsightsContentTypesResourcePerformanceDegradationSummaryImprovedSqlCount ActionableInsightsContentTypesResourceEnum = "PERFORMANCE_DEGRADATION_SUMMARY_IMPROVED_SQL_COUNT" + ActionableInsightsContentTypesResourcePerformanceDegradationDbDegradedCount ActionableInsightsContentTypesResourceEnum = "PERFORMANCE_DEGRADATION_DB_DEGRADED_COUNT" + ActionableInsightsContentTypesResourcePerformanceDegradationSqlDegradedTable ActionableInsightsContentTypesResourceEnum = "PERFORMANCE_DEGRADATION_SQL_DEGRADED_TABLE" + ActionableInsightsContentTypesResourcePlanChangesSummaryDbCount ActionableInsightsContentTypesResourceEnum = "PLAN_CHANGES_SUMMARY_DB_COUNT" + ActionableInsightsContentTypesResourcePlanChangesSummarySqlAnalyzedCount ActionableInsightsContentTypesResourceEnum = "PLAN_CHANGES_SUMMARY_SQL_ANALYZED_COUNT" + ActionableInsightsContentTypesResourcePlanChangesSummaryPlanChangesCount ActionableInsightsContentTypesResourceEnum = "PLAN_CHANGES_SUMMARY_PLAN_CHANGES_COUNT" + ActionableInsightsContentTypesResourcePlanChangesSummaryImprovementsCount ActionableInsightsContentTypesResourceEnum = "PLAN_CHANGES_SUMMARY_IMPROVEMENTS_COUNT" + ActionableInsightsContentTypesResourcePlanChangesSummaryDegradationCount ActionableInsightsContentTypesResourceEnum = "PLAN_CHANGES_SUMMARY_DEGRADATION_COUNT" + ActionableInsightsContentTypesResourcePlanChangesTopPlanChangesTable ActionableInsightsContentTypesResourceEnum = "PLAN_CHANGES_TOP_PLAN_CHANGES_TABLE" + ActionableInsightsContentTypesResourceTopDbSummaryDbCount ActionableInsightsContentTypesResourceEnum = "TOP_DB_SUMMARY_DB_COUNT" + ActionableInsightsContentTypesResourceTopDbSummarySqlAnalyzedCount ActionableInsightsContentTypesResourceEnum = "TOP_DB_SUMMARY_SQL_ANALYZED_COUNT" + ActionableInsightsContentTypesResourceTopDbSummaryBusiestDb ActionableInsightsContentTypesResourceEnum = "TOP_DB_SUMMARY_BUSIEST_DB" + ActionableInsightsContentTypesResourceTopTable ActionableInsightsContentTypesResourceEnum = "TOP_TABLE" + ActionableInsightsContentTypesResourceCollectionDelayCount ActionableInsightsContentTypesResourceEnum = "COLLECTION_DELAY_COUNT" + ActionableInsightsContentTypesResourceCollectionDelayPreviousWeekCount ActionableInsightsContentTypesResourceEnum = "COLLECTION_DELAY_PREVIOUS_WEEK_COUNT" +) + +var mappingActionableInsightsContentTypesResourceEnum = map[string]ActionableInsightsContentTypesResourceEnum{ + "NEW_HIGHS": ActionableInsightsContentTypesResourceNewHighs, + "BIG_CHANGES": ActionableInsightsContentTypesResourceBigChanges, + "CURRENT_INVENTORY": ActionableInsightsContentTypesResourceCurrentInventory, + "INVENTORY_CHANGES": ActionableInsightsContentTypesResourceInventoryChanges, + "FLEET_STATISTICS": ActionableInsightsContentTypesResourceFleetStatistics, + "FLEET_ANALYSIS_SUMMARY_DB_COUNT": ActionableInsightsContentTypesResourceFleetAnalysisSummaryDbCount, + "FLEET_ANALYSIS_SUMMARY_SQL_ANALYZED_COUNT": ActionableInsightsContentTypesResourceFleetAnalysisSummarySqlAnalyzedCount, + "FLEET_ANALYSIS_SUMMARY_NEW_SQL_COUNT": ActionableInsightsContentTypesResourceFleetAnalysisSummaryNewSqlCount, + "FLEET_ANALYSIS_SUMMARY_BUSIEST_DB": ActionableInsightsContentTypesResourceFleetAnalysisSummaryBusiestDb, + "FLEET_ANALYSIS_DEGRADING_SQL_COUNT": ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlCount, + "FLEET_ANALYSIS_DEGRADING_SQL_BY_DB": ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlByDb, + "FLEET_ANALYSIS_DEGRADING_SQL_BY_SQL_ID": ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlBySqlId, + "FLEET_ANALYSIS_PLAN_CHANGES_COUNT": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesCount, + "FLEET_ANALYSIS_PLAN_CHANGES_DB_MOST_CHANGES": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesDbMostChanges, + "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_IMPROVED": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdImproved, + "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_DEGRADED": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdDegraded, + "FLEET_ANALYSIS_INVALIDATION_STORMS_COUNT": ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsCount, + "FLEET_ANALYSIS_INVALIDATION_STORMS_HIGHEST": ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsHighest, + "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_COUNT": ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesCount, + "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_DB": ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesByDb, + "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_SQL": ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesBySql, + "PERFORMANCE_DEGRADATION_SUMMARY_DB_COUNT": ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDbCount, + "PERFORMANCE_DEGRADATION_SUMMARY_SQL_ANALYZED_COUNT": ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlAnalyzedCount, + "PERFORMANCE_DEGRADATION_SUMMARY_SQL_PERFORMANCE_TRENDS_COUNT": ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlPerformanceTrendsCount, + "PERFORMANCE_DEGRADATION_SUMMARY_DEGRADED_SQL_COUNT": ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDegradedSqlCount, + "PERFORMANCE_DEGRADATION_SUMMARY_IMPROVED_SQL_COUNT": ActionableInsightsContentTypesResourcePerformanceDegradationSummaryImprovedSqlCount, + "PERFORMANCE_DEGRADATION_DB_DEGRADED_COUNT": ActionableInsightsContentTypesResourcePerformanceDegradationDbDegradedCount, + "PERFORMANCE_DEGRADATION_SQL_DEGRADED_TABLE": ActionableInsightsContentTypesResourcePerformanceDegradationSqlDegradedTable, + "PLAN_CHANGES_SUMMARY_DB_COUNT": ActionableInsightsContentTypesResourcePlanChangesSummaryDbCount, + "PLAN_CHANGES_SUMMARY_SQL_ANALYZED_COUNT": ActionableInsightsContentTypesResourcePlanChangesSummarySqlAnalyzedCount, + "PLAN_CHANGES_SUMMARY_PLAN_CHANGES_COUNT": ActionableInsightsContentTypesResourcePlanChangesSummaryPlanChangesCount, + "PLAN_CHANGES_SUMMARY_IMPROVEMENTS_COUNT": ActionableInsightsContentTypesResourcePlanChangesSummaryImprovementsCount, + "PLAN_CHANGES_SUMMARY_DEGRADATION_COUNT": ActionableInsightsContentTypesResourcePlanChangesSummaryDegradationCount, + "PLAN_CHANGES_TOP_PLAN_CHANGES_TABLE": ActionableInsightsContentTypesResourcePlanChangesTopPlanChangesTable, + "TOP_DB_SUMMARY_DB_COUNT": ActionableInsightsContentTypesResourceTopDbSummaryDbCount, + "TOP_DB_SUMMARY_SQL_ANALYZED_COUNT": ActionableInsightsContentTypesResourceTopDbSummarySqlAnalyzedCount, + "TOP_DB_SUMMARY_BUSIEST_DB": ActionableInsightsContentTypesResourceTopDbSummaryBusiestDb, + "TOP_TABLE": ActionableInsightsContentTypesResourceTopTable, + "COLLECTION_DELAY_COUNT": ActionableInsightsContentTypesResourceCollectionDelayCount, + "COLLECTION_DELAY_PREVIOUS_WEEK_COUNT": ActionableInsightsContentTypesResourceCollectionDelayPreviousWeekCount, +} + +var mappingActionableInsightsContentTypesResourceEnumLowerCase = map[string]ActionableInsightsContentTypesResourceEnum{ + "new_highs": ActionableInsightsContentTypesResourceNewHighs, + "big_changes": ActionableInsightsContentTypesResourceBigChanges, + "current_inventory": ActionableInsightsContentTypesResourceCurrentInventory, + "inventory_changes": ActionableInsightsContentTypesResourceInventoryChanges, + "fleet_statistics": ActionableInsightsContentTypesResourceFleetStatistics, + "fleet_analysis_summary_db_count": ActionableInsightsContentTypesResourceFleetAnalysisSummaryDbCount, + "fleet_analysis_summary_sql_analyzed_count": ActionableInsightsContentTypesResourceFleetAnalysisSummarySqlAnalyzedCount, + "fleet_analysis_summary_new_sql_count": ActionableInsightsContentTypesResourceFleetAnalysisSummaryNewSqlCount, + "fleet_analysis_summary_busiest_db": ActionableInsightsContentTypesResourceFleetAnalysisSummaryBusiestDb, + "fleet_analysis_degrading_sql_count": ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlCount, + "fleet_analysis_degrading_sql_by_db": ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlByDb, + "fleet_analysis_degrading_sql_by_sql_id": ActionableInsightsContentTypesResourceFleetAnalysisDegradingSqlBySqlId, + "fleet_analysis_plan_changes_count": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesCount, + "fleet_analysis_plan_changes_db_most_changes": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesDbMostChanges, + "fleet_analysis_plan_changes_by_sql_id_improved": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdImproved, + "fleet_analysis_plan_changes_by_sql_id_degraded": ActionableInsightsContentTypesResourceFleetAnalysisPlanChangesBySqlIdDegraded, + "fleet_analysis_invalidation_storms_count": ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsCount, + "fleet_analysis_invalidation_storms_highest": ActionableInsightsContentTypesResourceFleetAnalysisInvalidationStormsHighest, + "fleet_analysis_cursor_sharing_issues_count": ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesCount, + "fleet_analysis_cursor_sharing_issues_by_db": ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesByDb, + "fleet_analysis_cursor_sharing_issues_by_sql": ActionableInsightsContentTypesResourceFleetAnalysisCursorSharingIssuesBySql, + "performance_degradation_summary_db_count": ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDbCount, + "performance_degradation_summary_sql_analyzed_count": ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlAnalyzedCount, + "performance_degradation_summary_sql_performance_trends_count": ActionableInsightsContentTypesResourcePerformanceDegradationSummarySqlPerformanceTrendsCount, + "performance_degradation_summary_degraded_sql_count": ActionableInsightsContentTypesResourcePerformanceDegradationSummaryDegradedSqlCount, + "performance_degradation_summary_improved_sql_count": ActionableInsightsContentTypesResourcePerformanceDegradationSummaryImprovedSqlCount, + "performance_degradation_db_degraded_count": ActionableInsightsContentTypesResourcePerformanceDegradationDbDegradedCount, + "performance_degradation_sql_degraded_table": ActionableInsightsContentTypesResourcePerformanceDegradationSqlDegradedTable, + "plan_changes_summary_db_count": ActionableInsightsContentTypesResourcePlanChangesSummaryDbCount, + "plan_changes_summary_sql_analyzed_count": ActionableInsightsContentTypesResourcePlanChangesSummarySqlAnalyzedCount, + "plan_changes_summary_plan_changes_count": ActionableInsightsContentTypesResourcePlanChangesSummaryPlanChangesCount, + "plan_changes_summary_improvements_count": ActionableInsightsContentTypesResourcePlanChangesSummaryImprovementsCount, + "plan_changes_summary_degradation_count": ActionableInsightsContentTypesResourcePlanChangesSummaryDegradationCount, + "plan_changes_top_plan_changes_table": ActionableInsightsContentTypesResourcePlanChangesTopPlanChangesTable, + "top_db_summary_db_count": ActionableInsightsContentTypesResourceTopDbSummaryDbCount, + "top_db_summary_sql_analyzed_count": ActionableInsightsContentTypesResourceTopDbSummarySqlAnalyzedCount, + "top_db_summary_busiest_db": ActionableInsightsContentTypesResourceTopDbSummaryBusiestDb, + "top_table": ActionableInsightsContentTypesResourceTopTable, + "collection_delay_count": ActionableInsightsContentTypesResourceCollectionDelayCount, + "collection_delay_previous_week_count": ActionableInsightsContentTypesResourceCollectionDelayPreviousWeekCount, +} + +// GetActionableInsightsContentTypesResourceEnumValues Enumerates the set of values for ActionableInsightsContentTypesResourceEnum +func GetActionableInsightsContentTypesResourceEnumValues() []ActionableInsightsContentTypesResourceEnum { + values := make([]ActionableInsightsContentTypesResourceEnum, 0) + for _, v := range mappingActionableInsightsContentTypesResourceEnum { + values = append(values, v) + } + return values +} + +// GetActionableInsightsContentTypesResourceEnumStringValues Enumerates the set of values in String for ActionableInsightsContentTypesResourceEnum +func GetActionableInsightsContentTypesResourceEnumStringValues() []string { + return []string{ + "NEW_HIGHS", + "BIG_CHANGES", + "CURRENT_INVENTORY", + "INVENTORY_CHANGES", + "FLEET_STATISTICS", + "FLEET_ANALYSIS_SUMMARY_DB_COUNT", + "FLEET_ANALYSIS_SUMMARY_SQL_ANALYZED_COUNT", + "FLEET_ANALYSIS_SUMMARY_NEW_SQL_COUNT", + "FLEET_ANALYSIS_SUMMARY_BUSIEST_DB", + "FLEET_ANALYSIS_DEGRADING_SQL_COUNT", + "FLEET_ANALYSIS_DEGRADING_SQL_BY_DB", + "FLEET_ANALYSIS_DEGRADING_SQL_BY_SQL_ID", + "FLEET_ANALYSIS_PLAN_CHANGES_COUNT", + "FLEET_ANALYSIS_PLAN_CHANGES_DB_MOST_CHANGES", + "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_IMPROVED", + "FLEET_ANALYSIS_PLAN_CHANGES_BY_SQL_ID_DEGRADED", + "FLEET_ANALYSIS_INVALIDATION_STORMS_COUNT", + "FLEET_ANALYSIS_INVALIDATION_STORMS_HIGHEST", + "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_COUNT", + "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_DB", + "FLEET_ANALYSIS_CURSOR_SHARING_ISSUES_BY_SQL", + "PERFORMANCE_DEGRADATION_SUMMARY_DB_COUNT", + "PERFORMANCE_DEGRADATION_SUMMARY_SQL_ANALYZED_COUNT", + "PERFORMANCE_DEGRADATION_SUMMARY_SQL_PERFORMANCE_TRENDS_COUNT", + "PERFORMANCE_DEGRADATION_SUMMARY_DEGRADED_SQL_COUNT", + "PERFORMANCE_DEGRADATION_SUMMARY_IMPROVED_SQL_COUNT", + "PERFORMANCE_DEGRADATION_DB_DEGRADED_COUNT", + "PERFORMANCE_DEGRADATION_SQL_DEGRADED_TABLE", + "PLAN_CHANGES_SUMMARY_DB_COUNT", + "PLAN_CHANGES_SUMMARY_SQL_ANALYZED_COUNT", + "PLAN_CHANGES_SUMMARY_PLAN_CHANGES_COUNT", + "PLAN_CHANGES_SUMMARY_IMPROVEMENTS_COUNT", + "PLAN_CHANGES_SUMMARY_DEGRADATION_COUNT", + "PLAN_CHANGES_TOP_PLAN_CHANGES_TABLE", + "TOP_DB_SUMMARY_DB_COUNT", + "TOP_DB_SUMMARY_SQL_ANALYZED_COUNT", + "TOP_DB_SUMMARY_BUSIEST_DB", + "TOP_TABLE", + "COLLECTION_DELAY_COUNT", + "COLLECTION_DELAY_PREVIOUS_WEEK_COUNT", + } +} + +// GetMappingActionableInsightsContentTypesResourceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingActionableInsightsContentTypesResourceEnum(val string) (ActionableInsightsContentTypesResourceEnum, bool) { + enum, ok := mappingActionableInsightsContentTypesResourceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/change_external_mysql_database_insight_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/change_external_mysql_database_insight_connection_details.go new file mode 100644 index 00000000000..7329960a37f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/change_external_mysql_database_insight_connection_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// ChangeExternalMysqlDatabaseInsightConnectionDetails Connection details of an External MySQL database insight. +type ChangeExternalMysqlDatabaseInsightConnectionDetails struct { + + // The DBM owned database connector OCID (https://docs.cloud.oracle.com/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. + DatabaseConnectorId *string `mandatory:"true" json:"databaseConnectorId"` +} + +func (m ChangeExternalMysqlDatabaseInsightConnectionDetails) 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 ChangeExternalMysqlDatabaseInsightConnectionDetails) 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/change_external_mysql_database_insight_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/change_external_mysql_database_insight_connection_request_response.go new file mode 100644 index 00000000000..18ec2f06494 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/change_external_mysql_database_insight_connection_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// ChangeExternalMysqlDatabaseInsightConnectionRequest wrapper for the ChangeExternalMysqlDatabaseInsightConnection operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ChangeExternalMysqlDatabaseInsightConnection.go.html to see an example of how to use ChangeExternalMysqlDatabaseInsightConnectionRequest. +type ChangeExternalMysqlDatabaseInsightConnectionRequest struct { + + // Unique database insight identifier + DatabaseInsightId *string `mandatory:"true" contributesTo:"path" name:"databaseInsightId"` + + // The information to be updated. + ChangeExternalMysqlDatabaseInsightConnectionDetails `contributesTo:"body"` + + // 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"` + + // 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"` + + // 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 ChangeExternalMysqlDatabaseInsightConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeExternalMysqlDatabaseInsightConnectionRequest) 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 ChangeExternalMysqlDatabaseInsightConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeExternalMysqlDatabaseInsightConnectionRequest) 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 ChangeExternalMysqlDatabaseInsightConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeExternalMysqlDatabaseInsightConnectionResponse wrapper for the ChangeExternalMysqlDatabaseInsightConnection operation +type ChangeExternalMysqlDatabaseInsightConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + 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 ChangeExternalMysqlDatabaseInsightConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeExternalMysqlDatabaseInsightConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} 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 c35ead71564..3ae1b1f2f08 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 @@ -73,6 +73,10 @@ func (m *createdatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in mm := CreateMacsManagedCloudDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "EXTERNAL_MYSQL_DATABASE_SYSTEM": + mm := CreateExternalMysqlDatabaseInsightDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "AUTONOMOUS_DATABASE": mm := CreateAutonomousDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_external_mysql_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_external_mysql_database_insight_details.go new file mode 100644 index 00000000000..db35d2d079b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_external_mysql_database_insight_details.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// CreateExternalMysqlDatabaseInsightDetails The information about database to be analyzed. +type CreateExternalMysqlDatabaseInsightDetails 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"` + + // The DBM owned database connector OCID (https://docs.cloud.oracle.com/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. + DatabaseConnectorId *string `mandatory:"true" json:"databaseConnectorId"` + + // 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 CreateExternalMysqlDatabaseInsightDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetFreeformTags returns FreeformTags +func (m CreateExternalMysqlDatabaseInsightDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateExternalMysqlDatabaseInsightDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateExternalMysqlDatabaseInsightDetails) 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 CreateExternalMysqlDatabaseInsightDetails) 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 CreateExternalMysqlDatabaseInsightDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateExternalMysqlDatabaseInsightDetails CreateExternalMysqlDatabaseInsightDetails + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeCreateExternalMysqlDatabaseInsightDetails + }{ + "EXTERNAL_MYSQL_DATABASE_SYSTEM", + (MarshalTypeCreateExternalMysqlDatabaseInsightDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_news_report_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_news_report_details.go index 05b9c7a8ef6..6dfbdb4bc5c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_news_report_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/create_news_report_details.go @@ -56,6 +56,14 @@ type CreateNewsReportDetails struct { // A flag to consider the resources within a given compartment and all sub-compartments. AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` + + // List of tag filters; each filter composed by a namespace, key, and value. + // Example for defined tags - '.='. + // Example for freeform tags - '=' + TagFilters []string `mandatory:"false" json:"tagFilters"` + + // Match rule used for tag filters. + MatchRule MatchRuleEnum `mandatory:"false" json:"matchRule,omitempty"` } func (m CreateNewsReportDetails) String() string { @@ -80,6 +88,9 @@ func (m CreateNewsReportDetails) ValidateEnumValue() (bool, error) { if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) } + if _, ok := GetMappingMatchRuleEnum(string(m.MatchRule)); !ok && m.MatchRule != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MatchRule: %s. Supported values are: %s.", m.MatchRule, strings.Join(GetMatchRuleEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } 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 59bc89a78ba..607767aeff9 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 @@ -108,6 +108,10 @@ func (m *databaseconfigurationsummary) UnmarshalPolymorphicJSON(data []byte) (in mm := EmManagedExternalDatabaseConfigurationSummary{} err = json.Unmarshal(data, &mm) return mm, err + case "EXTERNAL_MYSQL_DATABASE_SYSTEM": + mm := ExternalMysqlDatabaseConfigurationSummary{} + err = json.Unmarshal(data, &mm) + return mm, err case "AUTONOMOUS_DATABASE": mm := AutonomousDatabaseConfigurationSummary{} err = json.Unmarshal(data, &mm) 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 0a625c0ffcd..d3fa4484f1c 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 @@ -20,24 +20,27 @@ type DatabaseEntitySourceEnum string // Set of constants representing the allowable values for DatabaseEntitySourceEnum const ( - DatabaseEntitySourceEmManagedExternalDatabase DatabaseEntitySourceEnum = "EM_MANAGED_EXTERNAL_DATABASE" - DatabaseEntitySourcePeComanagedDatabase DatabaseEntitySourceEnum = "PE_COMANAGED_DATABASE" - DatabaseEntitySourceMdsMysqlDatabaseSystem DatabaseEntitySourceEnum = "MDS_MYSQL_DATABASE_SYSTEM" - DatabaseEntitySourceMacsManagedCloudDatabase DatabaseEntitySourceEnum = "MACS_MANAGED_CLOUD_DATABASE" + DatabaseEntitySourceEmManagedExternalDatabase DatabaseEntitySourceEnum = "EM_MANAGED_EXTERNAL_DATABASE" + DatabaseEntitySourcePeComanagedDatabase DatabaseEntitySourceEnum = "PE_COMANAGED_DATABASE" + DatabaseEntitySourceMdsMysqlDatabaseSystem DatabaseEntitySourceEnum = "MDS_MYSQL_DATABASE_SYSTEM" + DatabaseEntitySourceExternalMysqlDatabaseSystem DatabaseEntitySourceEnum = "EXTERNAL_MYSQL_DATABASE_SYSTEM" + DatabaseEntitySourceMacsManagedCloudDatabase DatabaseEntitySourceEnum = "MACS_MANAGED_CLOUD_DATABASE" ) var mappingDatabaseEntitySourceEnum = map[string]DatabaseEntitySourceEnum{ - "EM_MANAGED_EXTERNAL_DATABASE": DatabaseEntitySourceEmManagedExternalDatabase, - "PE_COMANAGED_DATABASE": DatabaseEntitySourcePeComanagedDatabase, - "MDS_MYSQL_DATABASE_SYSTEM": DatabaseEntitySourceMdsMysqlDatabaseSystem, - "MACS_MANAGED_CLOUD_DATABASE": DatabaseEntitySourceMacsManagedCloudDatabase, + "EM_MANAGED_EXTERNAL_DATABASE": DatabaseEntitySourceEmManagedExternalDatabase, + "PE_COMANAGED_DATABASE": DatabaseEntitySourcePeComanagedDatabase, + "MDS_MYSQL_DATABASE_SYSTEM": DatabaseEntitySourceMdsMysqlDatabaseSystem, + "EXTERNAL_MYSQL_DATABASE_SYSTEM": DatabaseEntitySourceExternalMysqlDatabaseSystem, + "MACS_MANAGED_CLOUD_DATABASE": DatabaseEntitySourceMacsManagedCloudDatabase, } var mappingDatabaseEntitySourceEnumLowerCase = map[string]DatabaseEntitySourceEnum{ - "em_managed_external_database": DatabaseEntitySourceEmManagedExternalDatabase, - "pe_comanaged_database": DatabaseEntitySourcePeComanagedDatabase, - "mds_mysql_database_system": DatabaseEntitySourceMdsMysqlDatabaseSystem, - "macs_managed_cloud_database": DatabaseEntitySourceMacsManagedCloudDatabase, + "em_managed_external_database": DatabaseEntitySourceEmManagedExternalDatabase, + "pe_comanaged_database": DatabaseEntitySourcePeComanagedDatabase, + "mds_mysql_database_system": DatabaseEntitySourceMdsMysqlDatabaseSystem, + "external_mysql_database_system": DatabaseEntitySourceExternalMysqlDatabaseSystem, + "macs_managed_cloud_database": DatabaseEntitySourceMacsManagedCloudDatabase, } // GetDatabaseEntitySourceEnumValues Enumerates the set of values for DatabaseEntitySourceEnum @@ -55,6 +58,7 @@ func GetDatabaseEntitySourceEnumStringValues() []string { "EM_MANAGED_EXTERNAL_DATABASE", "PE_COMANAGED_DATABASE", "MDS_MYSQL_DATABASE_SYSTEM", + "EXTERNAL_MYSQL_DATABASE_SYSTEM", "MACS_MANAGED_CLOUD_DATABASE", } } 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 13a23a6782f..5a7a708968b 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 @@ -25,6 +25,7 @@ const ( DatabaseEntitySourceAllMacsManagedExternalDatabase DatabaseEntitySourceAllEnum = "MACS_MANAGED_EXTERNAL_DATABASE" DatabaseEntitySourceAllPeComanagedDatabase DatabaseEntitySourceAllEnum = "PE_COMANAGED_DATABASE" DatabaseEntitySourceAllMdsMysqlDatabaseSystem DatabaseEntitySourceAllEnum = "MDS_MYSQL_DATABASE_SYSTEM" + DatabaseEntitySourceAllExternalMysqlDatabaseSystem DatabaseEntitySourceAllEnum = "EXTERNAL_MYSQL_DATABASE_SYSTEM" DatabaseEntitySourceAllMacsManagedCloudDatabase DatabaseEntitySourceAllEnum = "MACS_MANAGED_CLOUD_DATABASE" ) @@ -34,6 +35,7 @@ var mappingDatabaseEntitySourceAllEnum = map[string]DatabaseEntitySourceAllEnum{ "MACS_MANAGED_EXTERNAL_DATABASE": DatabaseEntitySourceAllMacsManagedExternalDatabase, "PE_COMANAGED_DATABASE": DatabaseEntitySourceAllPeComanagedDatabase, "MDS_MYSQL_DATABASE_SYSTEM": DatabaseEntitySourceAllMdsMysqlDatabaseSystem, + "EXTERNAL_MYSQL_DATABASE_SYSTEM": DatabaseEntitySourceAllExternalMysqlDatabaseSystem, "MACS_MANAGED_CLOUD_DATABASE": DatabaseEntitySourceAllMacsManagedCloudDatabase, } @@ -43,6 +45,7 @@ var mappingDatabaseEntitySourceAllEnumLowerCase = map[string]DatabaseEntitySourc "macs_managed_external_database": DatabaseEntitySourceAllMacsManagedExternalDatabase, "pe_comanaged_database": DatabaseEntitySourceAllPeComanagedDatabase, "mds_mysql_database_system": DatabaseEntitySourceAllMdsMysqlDatabaseSystem, + "external_mysql_database_system": DatabaseEntitySourceAllExternalMysqlDatabaseSystem, "macs_managed_cloud_database": DatabaseEntitySourceAllMacsManagedCloudDatabase, } @@ -63,6 +66,7 @@ func GetDatabaseEntitySourceAllEnumStringValues() []string { "MACS_MANAGED_EXTERNAL_DATABASE", "PE_COMANAGED_DATABASE", "MDS_MYSQL_DATABASE_SYSTEM", + "EXTERNAL_MYSQL_DATABASE_SYSTEM", "MACS_MANAGED_CLOUD_DATABASE", } } 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 e3cff62ef46..b86ca13abec 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 := MacsManagedCloudDatabaseInsight{} err = json.Unmarshal(data, &mm) return mm, err + case "EXTERNAL_MYSQL_DATABASE_SYSTEM": + mm := ExternalMysqlDatabaseInsight{} + err = json.Unmarshal(data, &mm) + return mm, err case "AUTONOMOUS_DATABASE": mm := AutonomousDatabaseInsight{} err = json.Unmarshal(data, &mm) 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 fb601b71b51..1fb256811ee 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 @@ -169,6 +169,10 @@ func (m *databaseinsightsummary) UnmarshalPolymorphicJSON(data []byte) (interfac mm := EmManagedExternalDatabaseInsightSummary{} err = json.Unmarshal(data, &mm) return mm, err + case "EXTERNAL_MYSQL_DATABASE_SYSTEM": + mm := ExternalMysqlDatabaseInsightSummary{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for DatabaseInsightSummary: %s.", m.EntitySource) return *m, nil 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 4522b9a41f1..9298d533916 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 @@ -60,6 +60,10 @@ func (m *enabledatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in mm := EnableMdsMySqlDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "EXTERNAL_MYSQL_DATABASE_SYSTEM": + mm := EnableExternalMysqlDatabaseInsightDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "AUTONOMOUS_DATABASE": mm := EnableAutonomousDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_external_mysql_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_external_mysql_database_insight_details.go new file mode 100644 index 00000000000..b5514d25a88 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/enable_external_mysql_database_insight_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// EnableExternalMysqlDatabaseInsightDetails The information about database to be analyzed. +type EnableExternalMysqlDatabaseInsightDetails struct { + + // The DBM owned database connector OCID (https://docs.cloud.oracle.com/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. + DatabaseConnectorId *string `mandatory:"true" json:"databaseConnectorId"` +} + +func (m EnableExternalMysqlDatabaseInsightDetails) 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 EnableExternalMysqlDatabaseInsightDetails) 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 EnableExternalMysqlDatabaseInsightDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEnableExternalMysqlDatabaseInsightDetails EnableExternalMysqlDatabaseInsightDetails + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeEnableExternalMysqlDatabaseInsightDetails + }{ + "EXTERNAL_MYSQL_DATABASE_SYSTEM", + (MarshalTypeEnableExternalMysqlDatabaseInsightDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_configuration_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_configuration_summary.go new file mode 100644 index 00000000000..201ab3251a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_configuration_summary.go @@ -0,0 +1,144 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// ExternalMysqlDatabaseConfigurationSummary Configuration Summary of a External MySQL database. +type ExternalMysqlDatabaseConfigurationSummary 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"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Management Agent + AgentId *string `mandatory:"true" json:"agentId"` + + // The DBM owned database connector OCID (https://docs.cloud.oracle.com/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. + DatabaseConnectorId *string `mandatory:"true" json:"databaseConnectorId"` + + // 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 ExternalMysqlDatabaseConfigurationSummary) GetDatabaseInsightId() *string { + return m.DatabaseInsightId +} + +// GetCompartmentId returns CompartmentId +func (m ExternalMysqlDatabaseConfigurationSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDatabaseName returns DatabaseName +func (m ExternalMysqlDatabaseConfigurationSummary) GetDatabaseName() *string { + return m.DatabaseName +} + +// GetDatabaseDisplayName returns DatabaseDisplayName +func (m ExternalMysqlDatabaseConfigurationSummary) GetDatabaseDisplayName() *string { + return m.DatabaseDisplayName +} + +// GetDatabaseType returns DatabaseType +func (m ExternalMysqlDatabaseConfigurationSummary) GetDatabaseType() *string { + return m.DatabaseType +} + +// GetDatabaseVersion returns DatabaseVersion +func (m ExternalMysqlDatabaseConfigurationSummary) GetDatabaseVersion() *string { + return m.DatabaseVersion +} + +// GetCdbName returns CdbName +func (m ExternalMysqlDatabaseConfigurationSummary) GetCdbName() *string { + return m.CdbName +} + +// GetDefinedTags returns DefinedTags +func (m ExternalMysqlDatabaseConfigurationSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetFreeformTags returns FreeformTags +func (m ExternalMysqlDatabaseConfigurationSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetProcessorCount returns ProcessorCount +func (m ExternalMysqlDatabaseConfigurationSummary) GetProcessorCount() *int { + return m.ProcessorCount +} + +func (m ExternalMysqlDatabaseConfigurationSummary) 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 ExternalMysqlDatabaseConfigurationSummary) 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 ExternalMysqlDatabaseConfigurationSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalMysqlDatabaseConfigurationSummary ExternalMysqlDatabaseConfigurationSummary + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeExternalMysqlDatabaseConfigurationSummary + }{ + "EXTERNAL_MYSQL_DATABASE_SYSTEM", + (MarshalTypeExternalMysqlDatabaseConfigurationSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_insight.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_insight.go new file mode 100644 index 00000000000..64301ddd051 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_insight.go @@ -0,0 +1,183 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// ExternalMysqlDatabaseInsight Database insight resource. +type ExternalMysqlDatabaseInsight 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"` + + // 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"` + + // 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 ExternalMysqlDatabaseInsight) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m ExternalMysqlDatabaseInsight) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetStatus returns Status +func (m ExternalMysqlDatabaseInsight) GetStatus() ResourceStatusEnum { + return m.Status +} + +// GetDatabaseType returns DatabaseType +func (m ExternalMysqlDatabaseInsight) GetDatabaseType() *string { + return m.DatabaseType +} + +// GetDatabaseVersion returns DatabaseVersion +func (m ExternalMysqlDatabaseInsight) GetDatabaseVersion() *string { + return m.DatabaseVersion +} + +// GetProcessorCount returns ProcessorCount +func (m ExternalMysqlDatabaseInsight) GetProcessorCount() *int { + return m.ProcessorCount +} + +// GetFreeformTags returns FreeformTags +func (m ExternalMysqlDatabaseInsight) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m ExternalMysqlDatabaseInsight) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m ExternalMysqlDatabaseInsight) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetTimeCreated returns TimeCreated +func (m ExternalMysqlDatabaseInsight) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m ExternalMysqlDatabaseInsight) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m ExternalMysqlDatabaseInsight) GetLifecycleState() LifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m ExternalMysqlDatabaseInsight) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails +func (m ExternalMysqlDatabaseInsight) GetDatabaseConnectionStatusDetails() *string { + return m.DatabaseConnectionStatusDetails +} + +func (m ExternalMysqlDatabaseInsight) 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 ExternalMysqlDatabaseInsight) 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 ExternalMysqlDatabaseInsight) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalMysqlDatabaseInsight ExternalMysqlDatabaseInsight + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeExternalMysqlDatabaseInsight + }{ + "EXTERNAL_MYSQL_DATABASE_SYSTEM", + (MarshalTypeExternalMysqlDatabaseInsight)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_insight_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_insight_summary.go new file mode 100644 index 00000000000..33357edd52d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/external_mysql_database_insight_summary.go @@ -0,0 +1,215 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// ExternalMysqlDatabaseInsightSummary Summary of a database insight resource. +type ExternalMysqlDatabaseInsightSummary 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 Management Agent + AgentId *string `mandatory:"true" json:"agentId"` + + // 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"` + + // The DBM owned database connector OCID (https://docs.cloud.oracle.com/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. + DatabaseConnectorId *string `mandatory:"false" json:"databaseConnectorId"` + + // 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 ExternalMysqlDatabaseInsightSummary) GetId() *string { + return m.Id +} + +// GetDatabaseId returns DatabaseId +func (m ExternalMysqlDatabaseInsightSummary) GetDatabaseId() *string { + return m.DatabaseId +} + +// GetCompartmentId returns CompartmentId +func (m ExternalMysqlDatabaseInsightSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDatabaseName returns DatabaseName +func (m ExternalMysqlDatabaseInsightSummary) GetDatabaseName() *string { + return m.DatabaseName +} + +// GetDatabaseDisplayName returns DatabaseDisplayName +func (m ExternalMysqlDatabaseInsightSummary) GetDatabaseDisplayName() *string { + return m.DatabaseDisplayName +} + +// GetDatabaseType returns DatabaseType +func (m ExternalMysqlDatabaseInsightSummary) GetDatabaseType() *string { + return m.DatabaseType +} + +// GetDatabaseVersion returns DatabaseVersion +func (m ExternalMysqlDatabaseInsightSummary) GetDatabaseVersion() *string { + return m.DatabaseVersion +} + +// GetDatabaseHostNames returns DatabaseHostNames +func (m ExternalMysqlDatabaseInsightSummary) GetDatabaseHostNames() []string { + return m.DatabaseHostNames +} + +// GetFreeformTags returns FreeformTags +func (m ExternalMysqlDatabaseInsightSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m ExternalMysqlDatabaseInsightSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m ExternalMysqlDatabaseInsightSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetProcessorCount returns ProcessorCount +func (m ExternalMysqlDatabaseInsightSummary) GetProcessorCount() *int { + return m.ProcessorCount +} + +// GetStatus returns Status +func (m ExternalMysqlDatabaseInsightSummary) GetStatus() ResourceStatusEnum { + return m.Status +} + +// GetTimeCreated returns TimeCreated +func (m ExternalMysqlDatabaseInsightSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m ExternalMysqlDatabaseInsightSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleState returns LifecycleState +func (m ExternalMysqlDatabaseInsightSummary) GetLifecycleState() LifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m ExternalMysqlDatabaseInsightSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails +func (m ExternalMysqlDatabaseInsightSummary) GetDatabaseConnectionStatusDetails() *string { + return m.DatabaseConnectionStatusDetails +} + +func (m ExternalMysqlDatabaseInsightSummary) 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 ExternalMysqlDatabaseInsightSummary) 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 ExternalMysqlDatabaseInsightSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalMysqlDatabaseInsightSummary ExternalMysqlDatabaseInsightSummary + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeExternalMysqlDatabaseInsightSummary + }{ + "EXTERNAL_MYSQL_DATABASE_SYSTEM", + (MarshalTypeExternalMysqlDatabaseInsightSummary)(m), + } + + return json.Marshal(&s) +} 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 0c607710241..7856c99ce69 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 @@ -205,6 +205,7 @@ const ( ListDatabaseConfigurationsDatabaseTypeComanagedExaccPdb ListDatabaseConfigurationsDatabaseTypeEnum = "COMANAGED-EXACC-PDB" ListDatabaseConfigurationsDatabaseTypeComanagedExaccNoncdb ListDatabaseConfigurationsDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" ListDatabaseConfigurationsDatabaseTypeMdsMysql ListDatabaseConfigurationsDatabaseTypeEnum = "MDS-MYSQL" + ListDatabaseConfigurationsDatabaseTypeExternalMysql ListDatabaseConfigurationsDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingListDatabaseConfigurationsDatabaseTypeEnum = map[string]ListDatabaseConfigurationsDatabaseTypeEnum{ @@ -227,6 +228,7 @@ var mappingListDatabaseConfigurationsDatabaseTypeEnum = map[string]ListDatabaseC "COMANAGED-EXACC-PDB": ListDatabaseConfigurationsDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": ListDatabaseConfigurationsDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": ListDatabaseConfigurationsDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": ListDatabaseConfigurationsDatabaseTypeExternalMysql, } var mappingListDatabaseConfigurationsDatabaseTypeEnumLowerCase = map[string]ListDatabaseConfigurationsDatabaseTypeEnum{ @@ -249,6 +251,7 @@ var mappingListDatabaseConfigurationsDatabaseTypeEnumLowerCase = map[string]List "comanaged-exacc-pdb": ListDatabaseConfigurationsDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": ListDatabaseConfigurationsDatabaseTypeComanagedExaccNoncdb, "mds-mysql": ListDatabaseConfigurationsDatabaseTypeMdsMysql, + "external-mysql": ListDatabaseConfigurationsDatabaseTypeExternalMysql, } // GetListDatabaseConfigurationsDatabaseTypeEnumValues Enumerates the set of values for ListDatabaseConfigurationsDatabaseTypeEnum @@ -282,6 +285,7 @@ func GetListDatabaseConfigurationsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 ed1957cfcc5..38df5896b2f 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 @@ -201,6 +201,7 @@ const ( ListDatabaseInsightsDatabaseTypeComanagedExaccPdb ListDatabaseInsightsDatabaseTypeEnum = "COMANAGED-EXACC-PDB" ListDatabaseInsightsDatabaseTypeComanagedExaccNoncdb ListDatabaseInsightsDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" ListDatabaseInsightsDatabaseTypeMdsMysql ListDatabaseInsightsDatabaseTypeEnum = "MDS-MYSQL" + ListDatabaseInsightsDatabaseTypeExternalMysql ListDatabaseInsightsDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingListDatabaseInsightsDatabaseTypeEnum = map[string]ListDatabaseInsightsDatabaseTypeEnum{ @@ -223,6 +224,7 @@ var mappingListDatabaseInsightsDatabaseTypeEnum = map[string]ListDatabaseInsight "COMANAGED-EXACC-PDB": ListDatabaseInsightsDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": ListDatabaseInsightsDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": ListDatabaseInsightsDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": ListDatabaseInsightsDatabaseTypeExternalMysql, } var mappingListDatabaseInsightsDatabaseTypeEnumLowerCase = map[string]ListDatabaseInsightsDatabaseTypeEnum{ @@ -245,6 +247,7 @@ var mappingListDatabaseInsightsDatabaseTypeEnumLowerCase = map[string]ListDataba "comanaged-exacc-pdb": ListDatabaseInsightsDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": ListDatabaseInsightsDatabaseTypeComanagedExaccNoncdb, "mds-mysql": ListDatabaseInsightsDatabaseTypeMdsMysql, + "external-mysql": ListDatabaseInsightsDatabaseTypeExternalMysql, } // GetListDatabaseInsightsDatabaseTypeEnumValues Enumerates the set of values for ListDatabaseInsightsDatabaseTypeEnum @@ -278,6 +281,7 @@ func GetListDatabaseInsightsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/match_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/match_rule.go new file mode 100644 index 00000000000..3a94d9a78fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/match_rule.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2025, 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 ( + "strings" +) + +// MatchRuleEnum Enum with underlying type: string +type MatchRuleEnum string + +// Set of constants representing the allowable values for MatchRuleEnum +const ( + MatchRuleMatchAny MatchRuleEnum = "MATCH_ANY" + MatchRuleMatchAll MatchRuleEnum = "MATCH_ALL" + MatchRuleMatchNone MatchRuleEnum = "MATCH_NONE" +) + +var mappingMatchRuleEnum = map[string]MatchRuleEnum{ + "MATCH_ANY": MatchRuleMatchAny, + "MATCH_ALL": MatchRuleMatchAll, + "MATCH_NONE": MatchRuleMatchNone, +} + +var mappingMatchRuleEnumLowerCase = map[string]MatchRuleEnum{ + "match_any": MatchRuleMatchAny, + "match_all": MatchRuleMatchAll, + "match_none": MatchRuleMatchNone, +} + +// GetMatchRuleEnumValues Enumerates the set of values for MatchRuleEnum +func GetMatchRuleEnumValues() []MatchRuleEnum { + values := make([]MatchRuleEnum, 0) + for _, v := range mappingMatchRuleEnum { + values = append(values, v) + } + return values +} + +// GetMatchRuleEnumStringValues Enumerates the set of values in String for MatchRuleEnum +func GetMatchRuleEnumStringValues() []string { + return []string{ + "MATCH_ANY", + "MATCH_ALL", + "MATCH_NONE", + } +} + +// GetMappingMatchRuleEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMatchRuleEnum(val string) (MatchRuleEnum, bool) { + enum, ok := mappingMatchRuleEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_content_types.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_content_types.go index 2293f5af0bb..c3aff374709 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_content_types.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_content_types.go @@ -40,6 +40,9 @@ type NewsContentTypes struct { // Supported resources for SQL insights - performance degradation content type. SqlInsightsPerformanceDegradationResources []NewsSqlInsightsContentTypesResourceEnum `mandatory:"false" json:"sqlInsightsPerformanceDegradationResources"` + + // Supported resources for actionable insights content type. + ActionableInsightsResources []ActionableInsightsContentTypesResourceEnum `mandatory:"false" json:"actionableInsightsResources"` } func (m NewsContentTypes) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_frequency.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_frequency.go index 3f501ebbf5d..10e15041c07 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_frequency.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_frequency.go @@ -21,14 +21,20 @@ type NewsFrequencyEnum string // Set of constants representing the allowable values for NewsFrequencyEnum const ( NewsFrequencyWeekly NewsFrequencyEnum = "WEEKLY" + NewsFrequencyDaily NewsFrequencyEnum = "DAILY" + NewsFrequencyHourly NewsFrequencyEnum = "HOURLY" ) var mappingNewsFrequencyEnum = map[string]NewsFrequencyEnum{ "WEEKLY": NewsFrequencyWeekly, + "DAILY": NewsFrequencyDaily, + "HOURLY": NewsFrequencyHourly, } var mappingNewsFrequencyEnumLowerCase = map[string]NewsFrequencyEnum{ "weekly": NewsFrequencyWeekly, + "daily": NewsFrequencyDaily, + "hourly": NewsFrequencyHourly, } // GetNewsFrequencyEnumValues Enumerates the set of values for NewsFrequencyEnum @@ -44,6 +50,8 @@ func GetNewsFrequencyEnumValues() []NewsFrequencyEnum { func GetNewsFrequencyEnumStringValues() []string { return []string{ "WEEKLY", + "DAILY", + "HOURLY", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report.go index 99fadf6a32d..58e8b85f5e6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report.go @@ -75,6 +75,14 @@ type NewsReport struct { // A flag to consider the resources within a given compartment and all sub-compartments. AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` + + // List of tag filters; each filter composed by a namespace, key, and value. + // Example for defined tags - '.='. + // Example for freeform tags - '='. + TagFilters []string `mandatory:"false" json:"tagFilters"` + + // Match rule used for tag filters. + MatchRule MatchRuleEnum `mandatory:"false" json:"matchRule,omitempty"` } func (m NewsReport) String() string { @@ -102,6 +110,9 @@ func (m NewsReport) ValidateEnumValue() (bool, error) { if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) } + if _, ok := GetMappingMatchRuleEnum(string(m.MatchRule)); !ok && m.MatchRule != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MatchRule: %s. Supported values are: %s.", m.MatchRule, strings.Join(GetMatchRuleEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report_summary.go index 35cc3299e73..81654b2e484 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/news_report_summary.go @@ -75,6 +75,14 @@ type NewsReportSummary struct { // A flag to consider the resources within a given compartment and all sub-compartments. AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` + + // List of tag filters; each filter composed by a namespace, key, and value. + // Example for defined tags - '.='. + // Example for freeform tags - '='. + TagFilters []string `mandatory:"false" json:"tagFilters"` + + // Match rule used for tag filters. + MatchRule MatchRuleEnum `mandatory:"false" json:"matchRule,omitempty"` } func (m NewsReportSummary) String() string { @@ -102,6 +110,9 @@ func (m NewsReportSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) } + if _, ok := GetMappingMatchRuleEnum(string(m.MatchRule)); !ok && m.MatchRule != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MatchRule: %s. Supported values are: %s.", m.MatchRule, strings.Join(GetMatchRuleEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/operation_type.go index 8794f1943c1..60aa9f1db7b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/operation_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/operation_type.go @@ -83,6 +83,7 @@ const ( OperationTypeDisableAwrhubSource OperationTypeEnum = "DISABLE_AWRHUB_SOURCE" OperationTypeChangeMacsManagedCloudDatabaseInsightConnectionDetails OperationTypeEnum = "CHANGE_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS" OperationTypeTestMacsManagedCloudDatabaseInsightConnectionDetails OperationTypeEnum = "TEST_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS" + OperationTypeChangeExternalMysqlDatabaseInsightConnectionDetails OperationTypeEnum = "CHANGE_EXTERNAL_MYSQL_DATABASE_INSIGHT_CONNECTION_DETAILS" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -149,6 +150,7 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "DISABLE_AWRHUB_SOURCE": OperationTypeDisableAwrhubSource, "CHANGE_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS": OperationTypeChangeMacsManagedCloudDatabaseInsightConnectionDetails, "TEST_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS": OperationTypeTestMacsManagedCloudDatabaseInsightConnectionDetails, + "CHANGE_EXTERNAL_MYSQL_DATABASE_INSIGHT_CONNECTION_DETAILS": OperationTypeChangeExternalMysqlDatabaseInsightConnectionDetails, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -215,6 +217,7 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "disable_awrhub_source": OperationTypeDisableAwrhubSource, "change_macs_managed_cloud_database_insight_connection_details": OperationTypeChangeMacsManagedCloudDatabaseInsightConnectionDetails, "test_macs_managed_cloud_database_insight_connection_details": OperationTypeTestMacsManagedCloudDatabaseInsightConnectionDetails, + "change_external_mysql_database_insight_connection_details": OperationTypeChangeExternalMysqlDatabaseInsightConnectionDetails, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -292,6 +295,7 @@ func GetOperationTypeEnumStringValues() []string { "DISABLE_AWRHUB_SOURCE", "CHANGE_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS", "TEST_MACS_MANAGED_CLOUD_DATABASE_INSIGHT_CONNECTION_DETAILS", + "CHANGE_EXTERNAL_MYSQL_DATABASE_INSIGHT_CONNECTION_DETAILS", } } 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 3d58201ec6a..1a05b078d59 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 @@ -466,6 +466,69 @@ func (client OperationsInsightsClient) changeExadataInsightCompartment(ctx conte return response, err } +// ChangeExternalMysqlDatabaseInsightConnection Change the connection details of an External MySQL database insight. When provided, If-Match is checked against ETag values of the resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ChangeExternalMysqlDatabaseInsightConnection.go.html to see an example of how to use ChangeExternalMysqlDatabaseInsightConnection API. +// A default retry strategy applies to this operation ChangeExternalMysqlDatabaseInsightConnection() +func (client OperationsInsightsClient) ChangeExternalMysqlDatabaseInsightConnection(ctx context.Context, request ChangeExternalMysqlDatabaseInsightConnectionRequest) (response ChangeExternalMysqlDatabaseInsightConnectionResponse, 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.changeExternalMysqlDatabaseInsightConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeExternalMysqlDatabaseInsightConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeExternalMysqlDatabaseInsightConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeExternalMysqlDatabaseInsightConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeExternalMysqlDatabaseInsightConnectionResponse") + } + return +} + +// changeExternalMysqlDatabaseInsightConnection implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) changeExternalMysqlDatabaseInsightConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databaseInsights/{databaseInsightId}/actions/changeExternalMysqlDatabaseInsightConnectionDetails", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeExternalMysqlDatabaseInsightConnectionResponse + 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/ChangeExternalMysqlDatabaseInsightConnection" + err = common.PostProcessServiceError(err, "OperationsInsights", "ChangeExternalMysqlDatabaseInsightConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeHostInsightCompartment Moves a HostInsight resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. // // # See also 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 7d7ffd577a6..b23a57cce22 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 @@ -239,6 +239,7 @@ const ( SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExaccPdb SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExaccNoncdb SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "MDS-MYSQL" + SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeExternalMysql SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum{ @@ -261,6 +262,7 @@ var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum = map[s "COMANAGED-EXACC-PDB": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeExternalMysql, } var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum{ @@ -283,6 +285,7 @@ var mappingSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumLowerCas "comanaged-exacc-pdb": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeMdsMysql, + "external-mysql": SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeExternalMysql, } // GetSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnum @@ -316,6 +319,7 @@ func GetSummarizeDatabaseInsightResourceCapacityTrendDatabaseTypeEnumStringValue "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 1aca07db889..dcd8ab500ef 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 @@ -253,6 +253,7 @@ const ( SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExaccPdb SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExaccNoncdb SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "MDS-MYSQL" + SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeExternalMysql SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum{ @@ -275,6 +276,7 @@ var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum = map[s "COMANAGED-EXACC-PDB": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeExternalMysql, } var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum{ @@ -297,6 +299,7 @@ var mappingSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumLowerCas "comanaged-exacc-pdb": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeMdsMysql, + "external-mysql": SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeExternalMysql, } // GetSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnum @@ -330,6 +333,7 @@ func GetSummarizeDatabaseInsightResourceForecastTrendDatabaseTypeEnumStringValue "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 4e436b9d8aa..22f790af32c 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 @@ -244,6 +244,7 @@ const ( SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExaccPdb SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExaccNoncdb SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeDatabaseInsightResourceStatisticsDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "MDS-MYSQL" + SummarizeDatabaseInsightResourceStatisticsDatabaseTypeExternalMysql SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum{ @@ -266,6 +267,7 @@ var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum = map[stri "COMANAGED-EXACC-PDB": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeExternalMysql, } var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum{ @@ -288,6 +290,7 @@ var mappingSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumLowerCase = "comanaged-exacc-pdb": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeMdsMysql, + "external-mysql": SummarizeDatabaseInsightResourceStatisticsDatabaseTypeExternalMysql, } // GetSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnum @@ -321,6 +324,7 @@ func GetSummarizeDatabaseInsightResourceStatisticsDatabaseTypeEnumStringValues() "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 8c5bee2a043..642e0bf67cd 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 @@ -211,6 +211,7 @@ const ( SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExaccPdb SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExaccNoncdb SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeDatabaseInsightResourceUsageDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "MDS-MYSQL" + SummarizeDatabaseInsightResourceUsageDatabaseTypeExternalMysql SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum{ @@ -233,6 +234,7 @@ var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnum = map[string]Su "COMANAGED-EXACC-PDB": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeDatabaseInsightResourceUsageDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeDatabaseInsightResourceUsageDatabaseTypeExternalMysql, } var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum{ @@ -255,6 +257,7 @@ var mappingSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumLowerCase = map[ "comanaged-exacc-pdb": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeDatabaseInsightResourceUsageDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeDatabaseInsightResourceUsageDatabaseTypeMdsMysql, + "external-mysql": SummarizeDatabaseInsightResourceUsageDatabaseTypeExternalMysql, } // GetSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceUsageDatabaseTypeEnum @@ -288,6 +291,7 @@ func GetSummarizeDatabaseInsightResourceUsageDatabaseTypeEnumStringValues() []st "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 ef0231f0f74..13f99e17789 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 @@ -220,6 +220,7 @@ const ( SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExaccPdb SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExaccNoncdb SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "MDS-MYSQL" + SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeExternalMysql SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum{ @@ -242,6 +243,7 @@ var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum = map[stri "COMANAGED-EXACC-PDB": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeExternalMysql, } var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum{ @@ -264,6 +266,7 @@ var mappingSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumLowerCase = "comanaged-exacc-pdb": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeMdsMysql, + "external-mysql": SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeExternalMysql, } // GetSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnum @@ -297,6 +300,7 @@ func GetSummarizeDatabaseInsightResourceUsageTrendDatabaseTypeEnumStringValues() "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 12b34e0436a..8221bb061d9 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 @@ -217,6 +217,7 @@ const ( SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExaccPdb SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExaccNoncdb SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeMdsMysql SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "MDS-MYSQL" + SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeExternalMysql SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = map[string]SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum{ @@ -239,6 +240,7 @@ var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum = "COMANAGED-EXACC-PDB": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeExternalMysql, } var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumLowerCase = map[string]SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum{ @@ -261,6 +263,7 @@ var mappingSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumLow "comanaged-exacc-pdb": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeMdsMysql, + "external-mysql": SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeExternalMysql, } // GetSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumValues Enumerates the set of values for SummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnum @@ -294,6 +297,7 @@ func GetSummarizeDatabaseInsightResourceUtilizationInsightDatabaseTypeEnumString "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-MYSQL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_aggregation.go index fda3189fc91..5fd64cb0746 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_aggregation.go @@ -26,6 +26,12 @@ type SummarizeExadataInsightResourceUtilizationInsightAggregation struct { // The end timestamp that was passed into the request. TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + // Percent value in which a resource metric is considered highly utilized. + HighUtilizationThreshold *int `mandatory:"true" json:"highUtilizationThreshold"` + + // Percent value in which a resource metric is considered lowly utilized. + LowUtilizationThreshold *int `mandatory:"true" json:"lowUtilizationThreshold"` + // Defines the type of exadata resource metric (example: CPU, STORAGE) ExadataResourceMetric SummarizeExadataInsightResourceUtilizationInsightAggregationExadataResourceMetricEnum `mandatory:"true" json:"exadataResourceMetric"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_request_response.go index 19231872952..344f1a23310 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_exadata_insight_resource_utilization_insight_request_response.go @@ -111,6 +111,12 @@ type SummarizeExadataInsightResourceUtilizationInsightRequest struct { // Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Percent value in which a resource metric is considered highly utilized. + HighUtilizationThreshold *int `mandatory:"false" contributesTo:"query" name:"highUtilizationThreshold"` + + // Percent value in which a resource metric is considered low utilized. + LowUtilizationThreshold *int `mandatory:"false" contributesTo:"query" name:"lowUtilizationThreshold"` + // 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/opsi/summarize_sql_insights_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_sql_insights_request_response.go index 9603a0afdc0..e670ab9d29e 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 @@ -202,6 +202,7 @@ const ( SummarizeSqlInsightsDatabaseTypeComanagedExaccPdb SummarizeSqlInsightsDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeSqlInsightsDatabaseTypeComanagedExaccNoncdb SummarizeSqlInsightsDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeSqlInsightsDatabaseTypeMdsMysql SummarizeSqlInsightsDatabaseTypeEnum = "MDS-MYSQL" + SummarizeSqlInsightsDatabaseTypeExternalMysql SummarizeSqlInsightsDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeSqlInsightsDatabaseTypeEnum = map[string]SummarizeSqlInsightsDatabaseTypeEnum{ @@ -224,6 +225,7 @@ var mappingSummarizeSqlInsightsDatabaseTypeEnum = map[string]SummarizeSqlInsight "COMANAGED-EXACC-PDB": SummarizeSqlInsightsDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeSqlInsightsDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeSqlInsightsDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeSqlInsightsDatabaseTypeExternalMysql, } var mappingSummarizeSqlInsightsDatabaseTypeEnumLowerCase = map[string]SummarizeSqlInsightsDatabaseTypeEnum{ @@ -246,6 +248,7 @@ var mappingSummarizeSqlInsightsDatabaseTypeEnumLowerCase = map[string]SummarizeS "comanaged-exacc-pdb": SummarizeSqlInsightsDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeSqlInsightsDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeSqlInsightsDatabaseTypeMdsMysql, + "external-mysql": SummarizeSqlInsightsDatabaseTypeExternalMysql, } // GetSummarizeSqlInsightsDatabaseTypeEnumValues Enumerates the set of values for SummarizeSqlInsightsDatabaseTypeEnum @@ -279,6 +282,7 @@ func GetSummarizeSqlInsightsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 a5b0b0001fd..ea14ebe7c5b 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 @@ -235,6 +235,7 @@ const ( SummarizeSqlStatisticsDatabaseTypeComanagedExaccPdb SummarizeSqlStatisticsDatabaseTypeEnum = "COMANAGED-EXACC-PDB" SummarizeSqlStatisticsDatabaseTypeComanagedExaccNoncdb SummarizeSqlStatisticsDatabaseTypeEnum = "COMANAGED-EXACC-NONCDB" SummarizeSqlStatisticsDatabaseTypeMdsMysql SummarizeSqlStatisticsDatabaseTypeEnum = "MDS-MYSQL" + SummarizeSqlStatisticsDatabaseTypeExternalMysql SummarizeSqlStatisticsDatabaseTypeEnum = "EXTERNAL-MYSQL" ) var mappingSummarizeSqlStatisticsDatabaseTypeEnum = map[string]SummarizeSqlStatisticsDatabaseTypeEnum{ @@ -257,6 +258,7 @@ var mappingSummarizeSqlStatisticsDatabaseTypeEnum = map[string]SummarizeSqlStati "COMANAGED-EXACC-PDB": SummarizeSqlStatisticsDatabaseTypeComanagedExaccPdb, "COMANAGED-EXACC-NONCDB": SummarizeSqlStatisticsDatabaseTypeComanagedExaccNoncdb, "MDS-MYSQL": SummarizeSqlStatisticsDatabaseTypeMdsMysql, + "EXTERNAL-MYSQL": SummarizeSqlStatisticsDatabaseTypeExternalMysql, } var mappingSummarizeSqlStatisticsDatabaseTypeEnumLowerCase = map[string]SummarizeSqlStatisticsDatabaseTypeEnum{ @@ -279,6 +281,7 @@ var mappingSummarizeSqlStatisticsDatabaseTypeEnumLowerCase = map[string]Summariz "comanaged-exacc-pdb": SummarizeSqlStatisticsDatabaseTypeComanagedExaccPdb, "comanaged-exacc-noncdb": SummarizeSqlStatisticsDatabaseTypeComanagedExaccNoncdb, "mds-mysql": SummarizeSqlStatisticsDatabaseTypeMdsMysql, + "external-mysql": SummarizeSqlStatisticsDatabaseTypeExternalMysql, } // GetSummarizeSqlStatisticsDatabaseTypeEnumValues Enumerates the set of values for SummarizeSqlStatisticsDatabaseTypeEnum @@ -312,6 +315,7 @@ func GetSummarizeSqlStatisticsDatabaseTypeEnumStringValues() []string { "COMANAGED-EXACC-PDB", "COMANAGED-EXACC-NONCDB", "MDS-MYSQL", + "EXTERNAL-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 034422dc2bb..72c04ea24b1 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 @@ -88,6 +88,10 @@ func (m *updatedatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in mm := UpdateMacsManagedCloudDatabaseInsightDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "EXTERNAL_MYSQL_DATABASE_SYSTEM": + mm := UpdateExternalMysqlDatabaseInsightDetails{} + 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_external_mysql_database_insight_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_external_mysql_database_insight_details.go new file mode 100644 index 00000000000..16ce64b6fe1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_external_mysql_database_insight_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2025, 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" +) + +// UpdateExternalMysqlDatabaseInsightDetails Database insight resource. +type UpdateExternalMysqlDatabaseInsightDetails 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 UpdateExternalMysqlDatabaseInsightDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateExternalMysqlDatabaseInsightDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateExternalMysqlDatabaseInsightDetails) 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 UpdateExternalMysqlDatabaseInsightDetails) 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 UpdateExternalMysqlDatabaseInsightDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateExternalMysqlDatabaseInsightDetails UpdateExternalMysqlDatabaseInsightDetails + s := struct { + DiscriminatorParam string `json:"entitySource"` + MarshalTypeUpdateExternalMysqlDatabaseInsightDetails + }{ + "EXTERNAL_MYSQL_DATABASE_SYSTEM", + (MarshalTypeUpdateExternalMysqlDatabaseInsightDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_news_report_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_news_report_details.go index 507da54ab1b..08958a32093 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_news_report_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/update_news_report_details.go @@ -53,6 +53,14 @@ type UpdateNewsReportDetails struct { // A flag to consider the resources within a given compartment and all sub-compartments. AreChildCompartmentsIncluded *bool `mandatory:"false" json:"areChildCompartmentsIncluded"` + + // List of tag filters; each filter composed by a namespace, key, and value. + // Example for defined tags - '.=' + // Example for freeform tags - '=' + TagFilters []string `mandatory:"false" json:"tagFilters"` + + // Match rule used for tag filters. + MatchRule MatchRuleEnum `mandatory:"false" json:"matchRule,omitempty"` } func (m UpdateNewsReportDetails) String() string { @@ -77,6 +85,9 @@ func (m UpdateNewsReportDetails) ValidateEnumValue() (bool, error) { if _, ok := GetMappingDayOfWeekEnum(string(m.DayOfWeek)); !ok && m.DayOfWeek != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DayOfWeek: %s. Supported values are: %s.", m.DayOfWeek, strings.Join(GetDayOfWeekEnumStringValues(), ","))) } + if _, ok := GetMappingMatchRuleEnum(string(m.MatchRule)); !ok && m.MatchRule != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MatchRule: %s. Supported values are: %s.", m.MatchRule, strings.Join(GetMatchRuleEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/vm_cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/vm_cluster_summary.go index 95276aa2cc5..7a4547dc8a8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/vm_cluster_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/vm_cluster_summary.go @@ -20,16 +20,16 @@ import ( // VmClusterSummary Partial information about the VM Cluster which includes name, memory allocated etc. type VmClusterSummary struct { - // The name of the vm cluster. + // The name of the VM Cluster. VmclusterName *string `mandatory:"true" json:"vmclusterName"` - // The memory allocated on a vm cluster. + // The memory allocated on a VM Cluster. MemoryAllocatedInGBs *int `mandatory:"false" json:"memoryAllocatedInGBs"` - // The cpu allocated on a vm cluster. + // The CPU allocated on a VM Cluster. CpuAllocated *int `mandatory:"false" json:"cpuAllocated"` - // The number of DB nodes on a vm cluster. + // The number of DB nodes on a VM Cluster. DbNodesCount *int `mandatory:"false" json:"dbNodesCount"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/visualbuilder/attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/visualbuilder/attachment_details.go new file mode 100644 index 00000000000..c0c4596ef0d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/visualbuilder/attachment_details.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. + +// Visual Builder API +// +// Oracle Visual Builder enables developers to quickly build web and mobile applications. With a visual development environment that makes it easy to connect to Oracle data and third-party REST services, developers can build modern, consumer-grade applications in a fraction of the time it would take in other tools. +// The Visual Builder Instance Management API allows users to create and manage a Visual Builder instance. +// + +package visualbuilder + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AttachmentDetails Description of an attachments for this instance +type AttachmentDetails struct { + + // The role of the target attachment. + // * `PARENT` - The target instance is the parent of this attachment. + // * `CHILD` - The target instance is the child of this attachment. + TargetRole AttachmentDetailsTargetRoleEnum `mandatory:"true" json:"targetRole"` + + // * If role == `PARENT`, the attached instance was created by this service instance + // * If role == `CHILD`, this instance was created from attached instance on behalf of a user + IsImplicit *bool `mandatory:"true" json:"isImplicit"` + + // The OCID of the target instance (which could be any other OCI PaaS/SaaS resource), to which this instance is attached. + TargetId *string `mandatory:"true" json:"targetId"` + + // The dataplane instance URL of the attached instance + TargetInstanceUrl *string `mandatory:"true" json:"targetInstanceUrl"` + + // The type of the target instance, such as "FUSION". + TargetServiceType *string `mandatory:"true" json:"targetServiceType"` +} + +func (m AttachmentDetails) 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 AttachmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAttachmentDetailsTargetRoleEnum(string(m.TargetRole)); !ok && m.TargetRole != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TargetRole: %s. Supported values are: %s.", m.TargetRole, strings.Join(GetAttachmentDetailsTargetRoleEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AttachmentDetailsTargetRoleEnum Enum with underlying type: string +type AttachmentDetailsTargetRoleEnum string + +// Set of constants representing the allowable values for AttachmentDetailsTargetRoleEnum +const ( + AttachmentDetailsTargetRoleParent AttachmentDetailsTargetRoleEnum = "PARENT" + AttachmentDetailsTargetRoleChild AttachmentDetailsTargetRoleEnum = "CHILD" +) + +var mappingAttachmentDetailsTargetRoleEnum = map[string]AttachmentDetailsTargetRoleEnum{ + "PARENT": AttachmentDetailsTargetRoleParent, + "CHILD": AttachmentDetailsTargetRoleChild, +} + +var mappingAttachmentDetailsTargetRoleEnumLowerCase = map[string]AttachmentDetailsTargetRoleEnum{ + "parent": AttachmentDetailsTargetRoleParent, + "child": AttachmentDetailsTargetRoleChild, +} + +// GetAttachmentDetailsTargetRoleEnumValues Enumerates the set of values for AttachmentDetailsTargetRoleEnum +func GetAttachmentDetailsTargetRoleEnumValues() []AttachmentDetailsTargetRoleEnum { + values := make([]AttachmentDetailsTargetRoleEnum, 0) + for _, v := range mappingAttachmentDetailsTargetRoleEnum { + values = append(values, v) + } + return values +} + +// GetAttachmentDetailsTargetRoleEnumStringValues Enumerates the set of values in String for AttachmentDetailsTargetRoleEnum +func GetAttachmentDetailsTargetRoleEnumStringValues() []string { + return []string{ + "PARENT", + "CHILD", + } +} + +// GetMappingAttachmentDetailsTargetRoleEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAttachmentDetailsTargetRoleEnum(val string) (AttachmentDetailsTargetRoleEnum, bool) { + enum, ok := mappingAttachmentDetailsTargetRoleEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/visualbuilder/idcs_info_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/visualbuilder/idcs_info_details.go new file mode 100644 index 00000000000..a0695e4b513 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/visualbuilder/idcs_info_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. + +// Visual Builder API +// +// Oracle Visual Builder enables developers to quickly build web and mobile applications. With a visual development environment that makes it easy to connect to Oracle data and third-party REST services, developers can build modern, consumer-grade applications in a fraction of the time it would take in other tools. +// The Visual Builder Instance Management API allows users to create and manage a Visual Builder instance. +// + +package visualbuilder + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IdcsInfoDetails Information for IDCS access +type IdcsInfoDetails struct { + + // URL for the location of the IDCS Application (used by IDCS APIs) + IdcsAppLocationUrl *string `mandatory:"true" json:"idcsAppLocationUrl"` + + // The IDCS application display name associated with the instance + IdcsAppDisplayName *string `mandatory:"true" json:"idcsAppDisplayName"` + + // The IDCS application ID associated with the instance + IdcsAppId *string `mandatory:"true" json:"idcsAppId"` + + // The IDCS application name associated with the instance + IdcsAppName *string `mandatory:"true" json:"idcsAppName"` + + // The URL used as the primary audience for visual builder flows in this instance + // type: string + InstancePrimaryAudienceUrl *string `mandatory:"true" json:"instancePrimaryAudienceUrl"` +} + +func (m IdcsInfoDetails) 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 IdcsInfoDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index adfccd1358b..31b7a48bc89 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.81.1 => ./vendor/github.com/oracle/oci-go-sdk +# github.com/oracle/oci-go-sdk/v65 v65.82.0 ## explicit; go 1.13 github.com/oracle/oci-go-sdk/v65/adm github.com/oracle/oci-go-sdk/v65/aianomalydetection diff --git a/website/docs/d/apm_synthetics_dedicated_vantage_point.html.markdown b/website/docs/d/apm_synthetics_dedicated_vantage_point.html.markdown index 3a21dcc178e..5c99137aea5 100644 --- a/website/docs/d/apm_synthetics_dedicated_vantage_point.html.markdown +++ b/website/docs/d/apm_synthetics_dedicated_vantage_point.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_dedicated_vantage_point" sidebar_current: "docs-oci-datasource-apm_synthetics-dedicated_vantage_point" description: |- - Provides details about a specific Dedicated Vantage Point in Oracle Cloud Infrastructure Apm Synthetics service + Provides details about a specific Dedicated Vantage Point in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_dedicated_vantage_point -This data source provides details about a specific Dedicated Vantage Point resource in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides details about a specific Dedicated Vantage Point resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Gets the details of the dedicated vantage point identified by the OCID. diff --git a/website/docs/d/apm_synthetics_dedicated_vantage_points.html.markdown b/website/docs/d/apm_synthetics_dedicated_vantage_points.html.markdown index 02342777b6a..e5eb22cc55f 100644 --- a/website/docs/d/apm_synthetics_dedicated_vantage_points.html.markdown +++ b/website/docs/d/apm_synthetics_dedicated_vantage_points.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_dedicated_vantage_points" sidebar_current: "docs-oci-datasource-apm_synthetics-dedicated_vantage_points" description: |- - Provides the list of Dedicated Vantage Points in Oracle Cloud Infrastructure Apm Synthetics service + Provides the list of Dedicated Vantage Points in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_dedicated_vantage_points -This data source provides the list of Dedicated Vantage Points in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides the list of Dedicated Vantage Points in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Returns a list of dedicated vantage points. diff --git a/website/docs/d/apm_synthetics_monitor.html.markdown b/website/docs/d/apm_synthetics_monitor.html.markdown index 70b7670f717..07e8f842fbd 100644 --- a/website/docs/d/apm_synthetics_monitor.html.markdown +++ b/website/docs/d/apm_synthetics_monitor.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_monitor" sidebar_current: "docs-oci-datasource-apm_synthetics-monitor" description: |- - Provides details about a specific Monitor in Oracle Cloud Infrastructure Apm Synthetics service + Provides details about a specific Monitor in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_monitor -This data source provides details about a specific Monitor resource in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides details about a specific Monitor resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Gets the configuration of the monitor identified by the OCID. diff --git a/website/docs/d/apm_synthetics_monitors.html.markdown b/website/docs/d/apm_synthetics_monitors.html.markdown index f58dd230e14..366c30b14e5 100644 --- a/website/docs/d/apm_synthetics_monitors.html.markdown +++ b/website/docs/d/apm_synthetics_monitors.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_monitors" sidebar_current: "docs-oci-datasource-apm_synthetics-monitors" description: |- - Provides the list of Monitors in Oracle Cloud Infrastructure Apm Synthetics service + Provides the list of Monitors in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_monitors -This data source provides the list of Monitors in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides the list of Monitors in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Returns a list of monitors. diff --git a/website/docs/d/apm_synthetics_on_premise_vantage_point.html.markdown b/website/docs/d/apm_synthetics_on_premise_vantage_point.html.markdown index 5132d8c0e23..314d6de7cfb 100644 --- a/website/docs/d/apm_synthetics_on_premise_vantage_point.html.markdown +++ b/website/docs/d/apm_synthetics_on_premise_vantage_point.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_on_premise_vantage_point" sidebar_current: "docs-oci-datasource-apm_synthetics-on_premise_vantage_point" description: |- - Provides details about a specific On Premise Vantage Point in Oracle Cloud Infrastructure Apm Synthetics service + Provides details about a specific On Premise Vantage Point in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_on_premise_vantage_point -This data source provides details about a specific On Premise Vantage Point resource in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides details about a specific On Premise Vantage Point resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Gets the details of the On-premise vantage point identified by the OCID. diff --git a/website/docs/d/apm_synthetics_on_premise_vantage_point_worker.html.markdown b/website/docs/d/apm_synthetics_on_premise_vantage_point_worker.html.markdown index 289d6bf7b54..1c6e44e0961 100644 --- a/website/docs/d/apm_synthetics_on_premise_vantage_point_worker.html.markdown +++ b/website/docs/d/apm_synthetics_on_premise_vantage_point_worker.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_on_premise_vantage_point_worker" sidebar_current: "docs-oci-datasource-apm_synthetics-on_premise_vantage_point_worker" description: |- - Provides details about a specific On Premise Vantage Point Worker in Oracle Cloud Infrastructure Apm Synthetics service + Provides details about a specific On Premise Vantage Point Worker in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_on_premise_vantage_point_worker -This data source provides details about a specific On Premise Vantage Point Worker resource in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides details about a specific On Premise Vantage Point Worker resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Gets the details of the worker identified by the OCID. diff --git a/website/docs/d/apm_synthetics_on_premise_vantage_point_workers.html.markdown b/website/docs/d/apm_synthetics_on_premise_vantage_point_workers.html.markdown index e481dab0187..8456a15baa5 100644 --- a/website/docs/d/apm_synthetics_on_premise_vantage_point_workers.html.markdown +++ b/website/docs/d/apm_synthetics_on_premise_vantage_point_workers.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_on_premise_vantage_point_workers" sidebar_current: "docs-oci-datasource-apm_synthetics-on_premise_vantage_point_workers" description: |- - Provides the list of On Premise Vantage Point Workers in Oracle Cloud Infrastructure Apm Synthetics service + Provides the list of On Premise Vantage Point Workers in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_on_premise_vantage_point_workers -This data source provides the list of On Premise Vantage Point Workers in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides the list of On Premise Vantage Point Workers in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Returns a list of workers. diff --git a/website/docs/d/apm_synthetics_on_premise_vantage_points.html.markdown b/website/docs/d/apm_synthetics_on_premise_vantage_points.html.markdown index 0060e8ef1e8..6d2ab6c9e4b 100644 --- a/website/docs/d/apm_synthetics_on_premise_vantage_points.html.markdown +++ b/website/docs/d/apm_synthetics_on_premise_vantage_points.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_on_premise_vantage_points" sidebar_current: "docs-oci-datasource-apm_synthetics-on_premise_vantage_points" description: |- - Provides the list of On Premise Vantage Points in Oracle Cloud Infrastructure Apm Synthetics service + Provides the list of On Premise Vantage Points in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_on_premise_vantage_points -This data source provides the list of On Premise Vantage Points in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides the list of On Premise Vantage Points in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Returns a list of On-premise vantage points. diff --git a/website/docs/d/apm_synthetics_public_vantage_point.html.markdown b/website/docs/d/apm_synthetics_public_vantage_point.html.markdown index 8a04efb3b90..44346b31042 100644 --- a/website/docs/d/apm_synthetics_public_vantage_point.html.markdown +++ b/website/docs/d/apm_synthetics_public_vantage_point.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_public_vantage_point" sidebar_current: "docs-oci-datasource-apm_synthetics-public_vantage_point" description: |- - Provides details about a specific Public Vantage Point in Oracle Cloud Infrastructure Apm Synthetics service + Provides details about a specific Public Vantage Point in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_public_vantage_point -This data source provides details about a specific Public Vantage Point resource in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides details about a specific Public Vantage Point resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Returns a list of public vantage points. diff --git a/website/docs/d/apm_synthetics_public_vantage_points.html.markdown b/website/docs/d/apm_synthetics_public_vantage_points.html.markdown index f59251e7606..b60973ec7c1 100644 --- a/website/docs/d/apm_synthetics_public_vantage_points.html.markdown +++ b/website/docs/d/apm_synthetics_public_vantage_points.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_public_vantage_points" sidebar_current: "docs-oci-datasource-apm_synthetics-public_vantage_points" description: |- - Provides the list of Public Vantage Points in Oracle Cloud Infrastructure Apm Synthetics service + Provides the list of Public Vantage Points in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_public_vantage_points -This data source provides the list of Public Vantage Points in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides the list of Public Vantage Points in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Returns a list of public vantage points. diff --git a/website/docs/d/apm_synthetics_result.html.markdown b/website/docs/d/apm_synthetics_result.html.markdown index 5ff2f57a7e2..d59e1451862 100644 --- a/website/docs/d/apm_synthetics_result.html.markdown +++ b/website/docs/d/apm_synthetics_result.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_result" sidebar_current: "docs-oci-datasource-apm_synthetics-result" description: |- - Provides details about a specific Result in Oracle Cloud Infrastructure Apm Synthetics service + Provides details about a specific Result in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_result -This data source provides details about a specific Result resource in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides details about a specific Result resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Gets the results for a specific execution of a monitor identified by OCID. The results are in a HAR file, Screenshot, Console Log or Network details. diff --git a/website/docs/d/apm_synthetics_script.html.markdown b/website/docs/d/apm_synthetics_script.html.markdown index d4dfe7236dd..922f8f81cc7 100644 --- a/website/docs/d/apm_synthetics_script.html.markdown +++ b/website/docs/d/apm_synthetics_script.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_script" sidebar_current: "docs-oci-datasource-apm_synthetics-script" description: |- - Provides details about a specific Script in Oracle Cloud Infrastructure Apm Synthetics service + Provides details about a specific Script in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_script -This data source provides details about a specific Script resource in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides details about a specific Script resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Gets the configuration of the script identified by the OCID. diff --git a/website/docs/d/apm_synthetics_scripts.html.markdown b/website/docs/d/apm_synthetics_scripts.html.markdown index baaaa591963..a01119e9cb6 100644 --- a/website/docs/d/apm_synthetics_scripts.html.markdown +++ b/website/docs/d/apm_synthetics_scripts.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_scripts" sidebar_current: "docs-oci-datasource-apm_synthetics-scripts" description: |- - Provides the list of Scripts in Oracle Cloud Infrastructure Apm Synthetics service + Provides the list of Scripts in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # Data Source: oci_apm_synthetics_scripts -This data source provides the list of Scripts in Oracle Cloud Infrastructure Apm Synthetics service. +This data source provides the list of Scripts in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Returns a list of scripts. diff --git a/website/docs/d/database_autonomous_database.html.markdown b/website/docs/d/database_autonomous_database.html.markdown index 2594f953040..cc6240f1643 100644 --- a/website/docs/d/database_autonomous_database.html.markdown +++ b/website/docs/d/database_autonomous_database.html.markdown @@ -56,7 +56,7 @@ The following attributes are exported: 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 * `cluster_placement_group_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `compute_count` - The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU. +* `compute_count` - The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU. * `compute_model` - The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. * `connection_strings` - The connection string used to connect to the Autonomous Database. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Database for the password value. * `all_connection_strings` - Returns all connection strings that can be used to connect to the Autonomous Database. For more information, please see [Predefined Database Service Names for Autonomous Transaction Processing](https://docs.oracle.com/en/cloud/paas/atp-cloud/atpug/connect-predefined.html#GUID-9747539B-FD46-44F1-8FF8-F5AC650F15BE) diff --git a/website/docs/d/database_backups.html.markdown b/website/docs/d/database_backups.html.markdown index fa4db1db682..885274dadad 100644 --- a/website/docs/d/database_backups.html.markdown +++ b/website/docs/d/database_backups.html.markdown @@ -50,6 +50,9 @@ The following attributes are exported: * `database_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `database_size_in_gbs` - The size of the database in gigabytes at the time the backup was taken. * `display_name` - The user-friendly name for the backup. The name does not have to be unique. +* `encryption_key_location_details` - Types of providers supported for managing database encryption keys + * `hsm_password` - Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup. * `key_store_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. * `key_store_wallet_name` - The wallet name for Oracle Key Vault. diff --git a/website/docs/d/database_database.html.markdown b/website/docs/d/database_database.html.markdown index fd0a4b2e6c2..c8e496e9d31 100644 --- a/website/docs/d/database_database.html.markdown +++ b/website/docs/d/database_database.html.markdown @@ -81,6 +81,9 @@ The following attributes are exported: The database workload type. * `defined_tags` - 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). +* `encryption_key_location_details` - Types of providers supported for managing database encryption keys + * `hsm_password` - Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `is_cdb` - True if the database is a container database. diff --git a/website/docs/d/database_databases.html.markdown b/website/docs/d/database_databases.html.markdown index 47c6b484577..5e11939de0e 100644 --- a/website/docs/d/database_databases.html.markdown +++ b/website/docs/d/database_databases.html.markdown @@ -98,6 +98,9 @@ The following attributes are exported: The database workload type. * `defined_tags` - 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). +* `encryption_key_location_details` - Types of providers supported for managing database encryption keys + * `hsm_password` - Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `is_cdb` - True if the database is a container database. diff --git a/website/docs/d/database_management_external_my_sql_database.html.markdown b/website/docs/d/database_management_external_my_sql_database.html.markdown new file mode 100644 index 00000000000..7e304cd5695 --- /dev/null +++ b/website/docs/d/database_management_external_my_sql_database.html.markdown @@ -0,0 +1,39 @@ +--- +subcategory: "Database Management" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_database_management_external_my_sql_database" +sidebar_current: "docs-oci-datasource-database_management-external_my_sql_database" +description: |- + Provides details about a specific External My Sql Database in Oracle Cloud Infrastructure Database Management service +--- + +# Data Source: oci_database_management_external_my_sql_database +This data source provides details about a specific External My Sql Database resource in Oracle Cloud Infrastructure Database Management service. + +Retrieves the external MySQL database information. + + +## Example Usage + +```hcl +data "oci_database_management_external_my_sql_database" "test_external_my_sql_database" { + #Required + external_my_sql_database_id = oci_database_management_external_my_sql_database.test_external_my_sql_database.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `external_my_sql_database_id` - (Required) The OCID of the External MySQL Database. + + +## Attributes Reference + +The following attributes are exported: + +* `compartment_id` - OCID of compartment for the External MySQL Database. +* `db_name` - Display Name of the External MySQL Database. +* `external_database_id` - OCID of External MySQL Database. + diff --git a/website/docs/d/database_management_external_my_sql_database_connector.html.markdown b/website/docs/d/database_management_external_my_sql_database_connector.html.markdown new file mode 100644 index 00000000000..c40230c55f5 --- /dev/null +++ b/website/docs/d/database_management_external_my_sql_database_connector.html.markdown @@ -0,0 +1,56 @@ +--- +subcategory: "Database Management" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_database_management_external_my_sql_database_connector" +sidebar_current: "docs-oci-datasource-database_management-external_my_sql_database_connector" +description: |- + Provides details about a specific External My Sql Database Connector in Oracle Cloud Infrastructure Database Management service +--- + +# Data Source: oci_database_management_external_my_sql_database_connector +This data source provides details about a specific External My Sql Database Connector resource in Oracle Cloud Infrastructure Database Management service. + +Retrieves the MySQL database connector. + + +## Example Usage + +```hcl +data "oci_database_management_external_my_sql_database_connector" "test_external_my_sql_database_connector" { + #Required + external_my_sql_database_connector_id = oci_database_management_external_my_sql_database_connector.test_external_my_sql_database_connector.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `external_my_sql_database_connector_id` - (Required) The OCID of the External MySQL Database Connector. + + +## Attributes Reference + +The following attributes are exported: + +* `associated_services` - Oracle Cloud Infrastructure Services associated with this connector. +* `compartment_id` - OCID of compartment for the External MySQL connector. +* `connection_status` - Connection Status +* `connector_type` - Connector Type. +* `credential_type` - Credential type used to connect to database. +* `external_database_id` - OCID of MySQL Database resource +* `host_name` - Host name for Connector. +* `id` - OCID of MySQL Database Connector. +* `macs_agent_id` - Agent Id of the MACS agent. +* `name` - External MySQL Database Connector Name. +* `network_protocol` - Network Protocol. +* `port` - Connector port. +* `source_database` - Name of MySQL Database. +* `source_database_type` - Type of MySQL Database. +* `ssl_secret_id` - OCID of the SSL secret, if TCPS with SSL is used to connect to database. +* `ssl_secret_name` - Name of the SSL secret, if TCPS with SSL is used to connect to database. +* `state` - Indicates lifecycle state of the resource. +* `time_connection_status_updated` - Time when connection status was last updated. +* `time_created` - Connector creation time. +* `time_updated` - Connector update time. + diff --git a/website/docs/d/database_management_external_my_sql_database_connectors.html.markdown b/website/docs/d/database_management_external_my_sql_database_connectors.html.markdown new file mode 100644 index 00000000000..530db4f7a52 --- /dev/null +++ b/website/docs/d/database_management_external_my_sql_database_connectors.html.markdown @@ -0,0 +1,66 @@ +--- +subcategory: "Database Management" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_database_management_external_my_sql_database_connectors" +sidebar_current: "docs-oci-datasource-database_management-external_my_sql_database_connectors" +description: |- + Provides the list of External My Sql Database Connectors in Oracle Cloud Infrastructure Database Management service +--- + +# Data Source: oci_database_management_external_my_sql_database_connectors +This data source provides the list of External My Sql Database Connectors in Oracle Cloud Infrastructure Database Management service. + +Gets the list of External MySQL Database connectors. + + +## Example Usage + +```hcl +data "oci_database_management_external_my_sql_database_connectors" "test_external_my_sql_database_connectors" { + #Required + compartment_id = var.compartment_id + + #Optional + name = var.external_my_sql_database_connector_name +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. +* `name` - (Optional) The parameter to filter by MySQL Database System type. + + +## Attributes Reference + +The following attributes are exported: + +* `my_sql_connector_collection` - The list of my_sql_connector_collection. + +### ExternalMySqlDatabaseConnector Reference + +The following attributes are exported: + +* `associated_services` - Oracle Cloud Infrastructure Services associated with this connector. +* `compartment_id` - OCID of compartment for the External MySQL connector. +* `connection_status` - Connection Status +* `connector_type` - Connector Type. +* `credential_type` - Credential type used to connect to database. +* `external_database_id` - OCID of MySQL Database resource +* `host_name` - Host name for Connector. +* `id` - OCID of MySQL Database Connector. +* `macs_agent_id` - Agent Id of the MACS agent. +* `name` - External MySQL Database Connector Name. +* `network_protocol` - Network Protocol. +* `port` - Connector port. +* `source_database` - Name of MySQL Database. +* `source_database_type` - Type of MySQL Database. +* `ssl_secret_id` - OCID of the SSL secret, if TCPS with SSL is used to connect to database. +* `ssl_secret_name` - Name of the SSL secret, if TCPS with SSL is used to connect to database. +* `state` - Indicates lifecycle state of the resource. +* `time_connection_status_updated` - Time when connection status was last updated. +* `time_created` - Connector creation time. +* `time_updated` - Connector update time. + diff --git a/website/docs/d/database_management_external_my_sql_databases.html.markdown b/website/docs/d/database_management_external_my_sql_databases.html.markdown new file mode 100644 index 00000000000..a00ba97ac75 --- /dev/null +++ b/website/docs/d/database_management_external_my_sql_databases.html.markdown @@ -0,0 +1,49 @@ +--- +subcategory: "Database Management" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_database_management_external_my_sql_databases" +sidebar_current: "docs-oci-datasource-database_management-external_my_sql_databases" +description: |- + Provides the list of External My Sql Databases in Oracle Cloud Infrastructure Database Management service +--- + +# Data Source: oci_database_management_external_my_sql_databases +This data source provides the list of External My Sql Databases in Oracle Cloud Infrastructure Database Management service. + +Gets the list of External MySQL Databases. + + +## Example Usage + +```hcl +data "oci_database_management_external_my_sql_databases" "test_external_my_sql_databases" { + #Required + compartment_id = var.compartment_id + + #Optional + name = var.external_my_sql_database_name +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. +* `name` - (Optional) The parameter to filter by MySQL Database System type. + + +## Attributes Reference + +The following attributes are exported: + +* `external_my_sql_database_collection` - The list of external_my_sql_database_collection. + +### ExternalMySqlDatabase Reference + +The following attributes are exported: + +* `compartment_id` - OCID of compartment for the External MySQL Database. +* `db_name` - Display Name of the External MySQL Database. +* `external_database_id` - OCID of External MySQL Database. + diff --git a/website/docs/d/database_management_managed_my_sql_database.html.markdown b/website/docs/d/database_management_managed_my_sql_database.html.markdown index c4c02c4ffd7..0554a9e9dc6 100644 --- a/website/docs/d/database_management_managed_my_sql_database.html.markdown +++ b/website/docs/d/database_management_managed_my_sql_database.html.markdown @@ -50,4 +50,10 @@ The following attributes are exported: * `is_lakehouse_enabled` - Indicates whether HeatWave Lakehouse is enabled for the MySQL Database System or not. * `name` - The name of the Managed MySQL Database. * `time_created_heat_wave` - The date and time the Managed MySQL Database was created. +* `database_type` - The type of the MySQL Database. Indicates whether the database is external or MDS. +* `management_state` - Indicates database management status. +* `name` - The name of the Managed MySQL Database. +* `state` - Indicates lifecycle state of the resource. +* `time_updated` - The date and time the Managed MySQL Database was updated. +* `name` - The name of the Managed MySQL Database. diff --git a/website/docs/d/database_management_managed_my_sql_database_sql_data.html.markdown b/website/docs/d/database_management_managed_my_sql_database_sql_data.html.markdown index 637aa41a5f6..033929703f7 100644 --- a/website/docs/d/database_management_managed_my_sql_database_sql_data.html.markdown +++ b/website/docs/d/database_management_managed_my_sql_database_sql_data.html.markdown @@ -71,11 +71,16 @@ The following attributes are exported: * `heat_wave_out_of_memory` - The number of query executions with HeatWave out-of-memory errors. * `last_seen` - The date and time the query was last seen. * `max_timer_wait` - The slowest the query has been executed. + * `last_seen` - The date and time the query was last seen. + * `max_controlled_memory` - The maximum amount of controlled memory used by a statement during execution. + * `max_timer_wait` - The slowest the query has been executed. + * `max_total_memory` - The maximum amount of memory used by a statement during execution. * `min_timer_wait` - The fastest the query has been executed. * `quantile95` - The 95th percentile of the query latency. That is, 95% of the queries complete in the time given or in less time. * `quantile99` - The 99th percentile of the query latency. * `quantile999` - The 99.9th percentile of the query latency. * `schema_name` - The name of the default schema when executing the query. If a schema is not set as the default, then the value is NULL. + * `sum_cpu_time` - The total amount of time spent on CPU for this statement. * `sum_created_temp_disk_tables` - The total number of On-Disk internal temporary tables that have been created by the query. * `sum_created_temp_tables` - The total number of internal temporary tables (in memory or on disk), which have been created by the query. * `sum_errors` - The total number of errors that have been encountered executing the query. @@ -95,5 +100,5 @@ The following attributes are exported: * `sum_sort_rows` - The total number of rows sorted. This is the same as the sort_rowsStatus variable. * `sum_sort_scan` - The total number of times a sort was done by scanning the table. This is the same as the sort_scan status variable. * `sum_timer_wait` - The total amount of time that has been spent executing the query. - * `sum_warnings` - The total number of warnings that have been encountered executing the query. + * `sum_warnings` - The total number of warnings that have been encountered executing the query. diff --git a/website/docs/d/database_management_managed_my_sql_databases.html.markdown b/website/docs/d/database_management_managed_my_sql_databases.html.markdown index 24f14c183ff..d903990a75a 100644 --- a/website/docs/d/database_management_managed_my_sql_databases.html.markdown +++ b/website/docs/d/database_management_managed_my_sql_databases.html.markdown @@ -19,6 +19,9 @@ Gets the list of Managed MySQL Databases in a specific compartment. data "oci_database_management_managed_my_sql_databases" "test_managed_my_sql_databases" { #Required compartment_id = var.compartment_id + + #Optional + filter_by_my_sql_database_type_param = var.managed_my_sql_database_filter_by_my_sql_database_type_param } ``` @@ -27,6 +30,7 @@ data "oci_database_management_managed_my_sql_databases" "test_managed_my_sql_dat The following arguments are supported: * `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. +* `filter_by_my_sql_database_type_param` - (Optional) The parameter to filter by MySQL database type. Allowed values are EXTERNAL or MDS. ## Attributes Reference @@ -56,4 +60,7 @@ The following attributes are exported: * `is_heat_wave_enabled` - If HeatWave is enabled for this db system or not. * `is_lakehouse_enabled` - If HeatWave Lakehouse is enabled for the db system or not. * `time_created_heat_wave` - The date and time the Managed MySQL Database was created. +* `database_type` - The type of the MySQL Database. Indicates whether the database is external or MDS. +* `management_state` - Indicates database management status. +* `time_updated` - The date and time the Managed MySQL Database was updated. diff --git a/website/docs/d/disaster_recovery_dr_protection_group.html.markdown b/website/docs/d/disaster_recovery_dr_protection_group.html.markdown index cedcda6eb5e..056f5d5381a 100644 --- a/website/docs/d/disaster_recovery_dr_protection_group.html.markdown +++ b/website/docs/d/disaster_recovery_dr_protection_group.html.markdown @@ -49,6 +49,16 @@ The following attributes are exported: * `destination_backend_set_name` - The name of the destination backend set. Example: `My_Destination_Backend_Set` * `is_backend_set_for_non_movable` - This flag specifies if this backend set is used for traffic for non-movable compute instances. Backend sets that point to non-movable instances are only enabled or disabled during DR. For non-movable instances this flag should be set to 'true'. Backend sets that point to movable instances are emptied and their contents are transferred to the destination region network load balancer. For movable instances this flag should be set to 'false'. Example: `true` * `source_backend_set_name` - The name of the source backend set. Example: `My_Source_Backend_Set` + * `backup_config` - The details of backup performed on OKE Cluster. + * `backup_schedule` - The schedule for backing up namespaces to the destination region. If a backup schedule is not specified, only a single backup will be created. This format of the string specifying the backup schedule must conform with RFC-5545. This schedule will use the UTC timezone. This property applies to the OKE cluster member in primary region. Example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 + * `image_replication_vault_secret_id` - The OCID of the vault secret that stores the image credential. This property applies to the OKE cluster member in both the primary and standby region. + * `max_number_of_backups_retained` - The maximum number of backups that should be retained. This property applies to the OKE cluster member in primary region. + * `namespaces` - A list of namespaces that need to be backed up. The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. This property applies to the OKE cluster member in primary region. Example: ["default", "pv-nginx"] + * `replicate_images` - Controls the behaviour of image replication across regions. This property applies to the OKE cluster member in primary region. + * `backup_location` - The details for object storage backup location of an OKE Cluster + * `bucket` - The bucket name inside the object storage namespace. Example: `operation_logs` + * `namespace` - The namespace in object storage backup location(Note - this is usually the tenancy name). Example: `myocitenancy` + * `object` - The object name inside the object storage bucket. Example: `switchover_plan_executions` * `block_volume_operations` - Operations performed on a list of block volumes used on the non-movable compute instance. * `attachment_details` - The details for attaching or detaching a block volume. * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` @@ -77,10 +87,29 @@ The following attributes are exported: * `is_movable` - A flag indicating if the compute instance should be moved during DR operations. Example: `false` * `is_retain_fault_domain` - A flag indicating if the compute instance should be moved to the same fault domain in the destination region. The compute instance launch will fail if this flag is set to true and capacity is not available in the specified fault domain in the destination region. Example: `false` * `is_start_stop_enabled` - A flag indicating whether the non-movable compute instance needs to be started and stopped during DR operations. + * `jump_host_id` - The OCID of the compute instance member that is designated as a jump host. This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature. Example: `ocid1.instance.oc1..uniqueID` + * `load_balancer_mappings` - The list of source-to-destination load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_load_balancer_id` - The OCID of the destination Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `source_load_balancer_id` - The OCID of the source Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `managed_node_pool_configs` - The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - The OCID of the managed node pool in OKE cluster. + * `maximum` - The maximum number to which nodes in the managed node pool could be scaled up. + * `minimum` - The minimum number to which nodes in the managed node pool could be scaled down. * `member_id` - The OCID of the member. Example: `ocid1.instance.oc1..uniqueID` * `member_type` - The type of the member. * `namespace` - The namespace in object storage (Note - this is usually the tenancy name). Example: `myocitenancy` + * `network_load_balancer_mappings` - The list of source-to-destination network load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_network_load_balancer_id` - The OCID of the destination Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `source_network_load_balancer_id` - The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` + * `peer_cluster_id` - The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1.uniqueID` + * `vault_mappings` - The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_vault_id` - The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` + * `source_vault_id` - The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` + * `virtual_node_pool_configs` - The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - The OCID of the virtual node pool in OKE cluster. + * `maximum` - The maximum number to which nodes in the virtual node pool could be scaled up. + * `minimum` - The minimum number to which nodes in the virtual node pool could be scaled down. * `vnic_mapping` - A list of compute instance VNIC mappings. * `destination_nsg_id_list` - A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID1, ocid1.networksecuritygroup.oc1..uniqueID2 ]` * `destination_subnet_id` - The OCID of the destination subnet to which the source VNIC should connect. Example: `ocid1.subnet.oc1..uniqueID` diff --git a/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown b/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown index 7f941878969..434ad74fdf5 100644 --- a/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown +++ b/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown @@ -67,6 +67,16 @@ The following attributes are exported: * `destination_backend_set_name` - The name of the destination backend set. Example: `My_Destination_Backend_Set` * `is_backend_set_for_non_movable` - This flag specifies if this backend set is used for traffic for non-movable compute instances. Backend sets that point to non-movable instances are only enabled or disabled during DR. For non-movable instances this flag should be set to 'true'. Backend sets that point to movable instances are emptied and their contents are transferred to the destination region network load balancer. For movable instances this flag should be set to 'false'. Example: `true` * `source_backend_set_name` - The name of the source backend set. Example: `My_Source_Backend_Set` + * `backup_config` - The details of backup performed on OKE Cluster. + * `backup_schedule` - The schedule for backing up namespaces to the destination region. If a backup schedule is not specified, only a single backup will be created. This format of the string specifying the backup schedule must conform with RFC-5545. This schedule will use the UTC timezone. This property applies to the OKE cluster member in primary region. Example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 + * `image_replication_vault_secret_id` - The OCID of the vault secret that stores the image credential. This property applies to the OKE cluster member in both the primary and standby region. + * `max_number_of_backups_retained` - The maximum number of backups that should be retained. This property applies to the OKE cluster member in primary region. + * `namespaces` - A list of namespaces that need to be backed up. The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. This property applies to the OKE cluster member in primary region. Example: ["default", "pv-nginx"] + * `replicate_images` - Controls the behaviour of image replication across regions. This property applies to the OKE cluster member in primary region. + * `backup_location` - The details for object storage backup location of an OKE Cluster + * `bucket` - The bucket name inside the object storage namespace. Example: `operation_logs` + * `namespace` - The namespace in object storage backup location(Note - this is usually the tenancy name). Example: `myocitenancy` + * `object` - The object name inside the object storage bucket. Example: `switchover_plan_executions` * `block_volume_operations` - Operations performed on a list of block volumes used on the non-movable compute instance. * `attachment_details` - The details for attaching or detaching a block volume. * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` @@ -95,10 +105,29 @@ The following attributes are exported: * `is_movable` - A flag indicating if the compute instance should be moved during DR operations. Example: `false` * `is_retain_fault_domain` - A flag indicating if the compute instance should be moved to the same fault domain in the destination region. The compute instance launch will fail if this flag is set to true and capacity is not available in the specified fault domain in the destination region. Example: `false` * `is_start_stop_enabled` - A flag indicating whether the non-movable compute instance needs to be started and stopped during DR operations. + * `jump_host_id` - The OCID of the compute instance member that is designated as a jump host. This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature. Example: `ocid1.instance.oc1..uniqueID` + * `load_balancer_mappings` - The list of source-to-destination load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_load_balancer_id` - The OCID of the destination Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `source_load_balancer_id` - The OCID of the source Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `managed_node_pool_configs` - The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - The OCID of the managed node pool in OKE cluster. + * `maximum` - The maximum number to which nodes in the managed node pool could be scaled up. + * `minimum` - The minimum number to which nodes in the managed node pool could be scaled down. * `member_id` - The OCID of the member. Example: `ocid1.instance.oc1..uniqueID` * `member_type` - The type of the member. * `namespace` - The namespace in object storage (Note - this is usually the tenancy name). Example: `myocitenancy` + * `network_load_balancer_mappings` - The list of source-to-destination network load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_network_load_balancer_id` - The OCID of the destination Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `source_network_load_balancer_id` - The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` + * `peer_cluster_id` - The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1.uniqueID` + * `vault_mappings` - The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_vault_id` - The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` + * `source_vault_id` - The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` + * `virtual_node_pool_configs` - The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - The OCID of the virtual node pool in OKE cluster. + * `maximum` - The maximum number to which nodes in the virtual node pool could be scaled up. + * `minimum` - The minimum number to which nodes in the virtual node pool could be scaled down. * `vnic_mapping` - A list of compute instance VNIC mappings. * `destination_nsg_id_list` - A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID1, ocid1.networksecuritygroup.oc1..uniqueID2 ]` * `destination_subnet_id` - The OCID of the destination subnet to which the source VNIC should connect. Example: `ocid1.subnet.oc1..uniqueID` diff --git a/website/docs/d/opsi_database_insight.html.markdown b/website/docs/d/opsi_database_insight.html.markdown index 7645524a35a..37769465888 100644 --- a/website/docs/d/opsi_database_insight.html.markdown +++ b/website/docs/d/opsi_database_insight.html.markdown @@ -56,6 +56,7 @@ The following attributes are exported: * `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_connector_id` - (Required when entity_source=EXTERNAL_MYSQL_DATABASE_SYSTEM) (Updatable) The DBM owned database connector [OCID](/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. * `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. diff --git a/website/docs/d/opsi_database_insights.html.markdown b/website/docs/d/opsi_database_insights.html.markdown index b1008d7749e..c8546d44f50 100644 --- a/website/docs/d/opsi_database_insights.html.markdown +++ b/website/docs/d/opsi_database_insights.html.markdown @@ -85,6 +85,7 @@ The following attributes are exported: * `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_connector_id` - (Required when entity_source=EXTERNAL_MYSQL_DATABASE_SYSTEM) (Updatable) The DBM owned database connector [OCID](/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. * `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. diff --git a/website/docs/d/opsi_news_report.html.markdown b/website/docs/d/opsi_news_report.html.markdown index 93fbac5569e..4b4a0ba0ec4 100644 --- a/website/docs/d/opsi_news_report.html.markdown +++ b/website/docs/d/opsi_news_report.html.markdown @@ -35,6 +35,7 @@ The following attributes are exported: * `are_child_compartments_included` - A flag to consider the resources within a given compartment and all sub-compartments. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. * `content_types` - Content types that the news report can handle. + * `actionable_insights_resources` - Supported resources for actionable insights content type. * `capacity_planning_resources` - Supported resources for capacity planning content type. * `sql_insights_fleet_analysis_resources` - Supported resources for SQL insights - fleet analysis content type. * `sql_insights_performance_degradation_resources` - Supported resources for SQL insights - performance degradation content type. @@ -49,12 +50,14 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the news report 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. * `locale` - Language of the news report. +* `match_rule` - Match rule used for tag filters. * `name` - The news report name. * `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 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"}` +* `tag_filters` - List of tag filters; each filter composed by a namespace, key, and value. Example for defined tags - '.='. Example for freeform tags - '='. * `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 2034c3fc7ae..a8b45171371 100644 --- a/website/docs/d/opsi_news_reports.html.markdown +++ b/website/docs/d/opsi_news_reports.html.markdown @@ -51,6 +51,7 @@ The following attributes are exported: * `are_child_compartments_included` - A flag to consider the resources within a given compartment and all sub-compartments. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. * `content_types` - Content types that the news report can handle. + * `actionable_insights_resources` - Supported resources for actionable insights content type. * `capacity_planning_resources` - Supported resources for capacity planning content type. * `sql_insights_fleet_analysis_resources` - Supported resources for SQL insights - fleet analysis content type. * `sql_insights_performance_degradation_resources` - Supported resources for SQL insights - performance degradation content type. @@ -65,12 +66,14 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the news report 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. * `locale` - Language of the news report. +* `match_rule` - Match rule used for tag filters. * `name` - The news report name. * `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 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"}` +* `tag_filters` - List of tag filters; each filter composed by a namespace, key, and value. Example for defined tags - '.='. Example for freeform tags - '='. * `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/apm_synthetics_dedicated_vantage_point.html.markdown b/website/docs/r/apm_synthetics_dedicated_vantage_point.html.markdown index 3cf53e06efd..1220a11edc2 100644 --- a/website/docs/r/apm_synthetics_dedicated_vantage_point.html.markdown +++ b/website/docs/r/apm_synthetics_dedicated_vantage_point.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_dedicated_vantage_point" sidebar_current: "docs-oci-resource-apm_synthetics-dedicated_vantage_point" description: |- - Provides the Dedicated Vantage Point resource in Oracle Cloud Infrastructure Apm Synthetics service + Provides the Dedicated Vantage Point resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # oci_apm_synthetics_dedicated_vantage_point -This resource provides the Dedicated Vantage Point resource in Oracle Cloud Infrastructure Apm Synthetics service. +This resource provides the Dedicated Vantage Point resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Registers a new dedicated vantage point. diff --git a/website/docs/r/apm_synthetics_monitor.html.markdown b/website/docs/r/apm_synthetics_monitor.html.markdown index 8f4b358d893..13f4c5896aa 100644 --- a/website/docs/r/apm_synthetics_monitor.html.markdown +++ b/website/docs/r/apm_synthetics_monitor.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_monitor" sidebar_current: "docs-oci-resource-apm_synthetics-monitor" description: |- - Provides the Monitor resource in Oracle Cloud Infrastructure Apm Synthetics service + Provides the Monitor resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # oci_apm_synthetics_monitor -This resource provides the Monitor resource in Oracle Cloud Infrastructure Apm Synthetics service. +This resource provides the Monitor resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Creates a new monitor. diff --git a/website/docs/r/apm_synthetics_on_premise_vantage_point.html.markdown b/website/docs/r/apm_synthetics_on_premise_vantage_point.html.markdown index 9ae73332492..3509076bcca 100644 --- a/website/docs/r/apm_synthetics_on_premise_vantage_point.html.markdown +++ b/website/docs/r/apm_synthetics_on_premise_vantage_point.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_on_premise_vantage_point" sidebar_current: "docs-oci-resource-apm_synthetics-on_premise_vantage_point" description: |- - Provides the On Premise Vantage Point resource in Oracle Cloud Infrastructure Apm Synthetics service + Provides the On Premise Vantage Point resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # oci_apm_synthetics_on_premise_vantage_point -This resource provides the On Premise Vantage Point resource in Oracle Cloud Infrastructure Apm Synthetics service. +This resource provides the On Premise Vantage Point resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Registers a new On-premise vantage point. diff --git a/website/docs/r/apm_synthetics_on_premise_vantage_point_worker.html.markdown b/website/docs/r/apm_synthetics_on_premise_vantage_point_worker.html.markdown index e830088830e..ca956c50930 100644 --- a/website/docs/r/apm_synthetics_on_premise_vantage_point_worker.html.markdown +++ b/website/docs/r/apm_synthetics_on_premise_vantage_point_worker.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_on_premise_vantage_point_worker" sidebar_current: "docs-oci-resource-apm_synthetics-on_premise_vantage_point_worker" description: |- - Provides the On Premise Vantage Point Worker resource in Oracle Cloud Infrastructure Apm Synthetics service + Provides the On Premise Vantage Point Worker resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # oci_apm_synthetics_on_premise_vantage_point_worker -This resource provides the On Premise Vantage Point Worker resource in Oracle Cloud Infrastructure Apm Synthetics service. +This resource provides the On Premise Vantage Point Worker resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Registers a new worker. diff --git a/website/docs/r/apm_synthetics_script.html.markdown b/website/docs/r/apm_synthetics_script.html.markdown index ec5e6acd614..e3c663ee40f 100644 --- a/website/docs/r/apm_synthetics_script.html.markdown +++ b/website/docs/r/apm_synthetics_script.html.markdown @@ -4,11 +4,11 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_apm_synthetics_script" sidebar_current: "docs-oci-resource-apm_synthetics-script" description: |- - Provides the Script resource in Oracle Cloud Infrastructure Apm Synthetics service + Provides the Script resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service) --- # oci_apm_synthetics_script -This resource provides the Script resource in Oracle Cloud Infrastructure Apm Synthetics service. +This resource provides the Script resource in Oracle Cloud Infrastructure APM Availability Monitoring service (aka APM Synthetics Service). Creates a new script. diff --git a/website/docs/r/database_autonomous_database.html.markdown b/website/docs/r/database_autonomous_database.html.markdown index 55ee2acb73c..e540e5b07c3 100644 --- a/website/docs/r/database_autonomous_database.html.markdown +++ b/website/docs/r/database_autonomous_database.html.markdown @@ -364,7 +364,7 @@ The following attributes are exported: 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 * `cluster_placement_group_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster placement group of the Autonomous Serverless Database. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `compute_count` - The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU. +* `compute_count` - The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU. * `compute_model` - The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. * `connection_strings` - The connection string used to connect to the Autonomous Database. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Database for the password value. * `all_connection_strings` - Returns all connection strings that can be used to connect to the Autonomous Database. For more information, please see [Predefined Database Service Names for Autonomous Transaction Processing](https://docs.oracle.com/en/cloud/paas/atp-cloud/atpug/connect-predefined.html#GUID-9747539B-FD46-44F1-8FF8-F5AC650F15BE) diff --git a/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown b/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown index 0e69d492d34..bcdcb4092d7 100644 --- a/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown +++ b/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown @@ -64,7 +64,7 @@ The following attributes are exported: 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 * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. -* `compute_count` - The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. For an Autonomous Database Serverless instance, the 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU. +* `compute_count` - The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. The 'ECPU' compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU. * `compute_model` - The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. * `connection_strings` - The connection string used to connect to the Autonomous Database. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Database for the password value. * `all_connection_strings` - Returns all connection strings that can be used to connect to the Autonomous Database. For more information, please see [Predefined Database Service Names for Autonomous Transaction Processing](https://docs.oracle.com/en/cloud/paas/atp-cloud/atpug/connect-predefined.html#GUID-9747539B-FD46-44F1-8FF8-F5AC650F15BE) diff --git a/website/docs/r/database_backup.html.markdown b/website/docs/r/database_backup.html.markdown index 04716fe4c72..094c6d6f1b2 100644 --- a/website/docs/r/database_backup.html.markdown +++ b/website/docs/r/database_backup.html.markdown @@ -44,6 +44,9 @@ The following attributes are exported: * `database_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `database_size_in_gbs` - The size of the database in gigabytes at the time the backup was taken. * `display_name` - The user-friendly name for the backup. The name does not have to be unique. +* `encryption_key_location_details` - Types of providers supported for managing database encryption keys + * `hsm_password` - Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup. * `key_store_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. * `key_store_wallet_name` - The wallet name for Oracle Key Vault. diff --git a/website/docs/r/database_cloud_database_management.html.markdown b/website/docs/r/database_cloud_database_management.html.markdown index 7bfa191dfdf..7d162627ee0 100644 --- a/website/docs/r/database_cloud_database_management.html.markdown +++ b/website/docs/r/database_cloud_database_management.html.markdown @@ -114,6 +114,9 @@ The following attributes are exported: The database workload type. * `defined_tags` - 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). +* `encryption_key_location_details` - Types of providers supported for managing database encryption keys + * `hsm_password` - Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `is_cdb` - True if the database is a container database. diff --git a/website/docs/r/database_data_guard_association.html.markdown b/website/docs/r/database_data_guard_association.html.markdown index 8048ca90e3f..0b38659abc6 100644 --- a/website/docs/r/database_data_guard_association.html.markdown +++ b/website/docs/r/database_data_guard_association.html.markdown @@ -127,7 +127,7 @@ The following arguments are supported: **IMPORTANT** - The only protection mode currently supported by the Database service is MAXIMUM_PERFORMANCE. * `shape` - (Applicable when creation_type=NewDbSystem) The virtual machine DB system shape to launch for the standby database in the Data Guard association. The shape determines the number of CPU cores and the amount of memory available for the DB system. Only virtual machine shapes are valid options. If you do not supply this parameter, the default shape is the shape of the primary DB system. - To get a list of all shapes, use the [ListDbSystemShapes](https://docs.cloud.oracle.com/iaas/api/#/en/database/latest/DbSystemShapeSummary/ListDbSystemShapes) operation. + To get a list of all shapes, use the [ListDbSystemShapes](https://docs.cloud.oracle.com/iaas/api/#/en/database/latest/DbSystemShapeSummary/ListDbSystemShapes) operation. * `storage_volume_performance_mode` - (Applicable when creation_type=NewDbSystem) The block storage volume performance level. Valid values are `BALANCED` and `HIGH_PERFORMANCE`. See [Block Volume Performance](https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm) for more information. * `subnet_id` - (Applicable when creation_type=NewDbSystem) The OCID of the subnet the DB system is associated with. **Subnet Restrictions:** * For 1- and 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.16.16/28 diff --git a/website/docs/r/database_database.html.markdown b/website/docs/r/database_database.html.markdown index 825a70fa8c2..40169308629 100644 --- a/website/docs/r/database_database.html.markdown +++ b/website/docs/r/database_database.html.markdown @@ -28,7 +28,6 @@ resource "oci_database_database" "test_database" { backup_id = oci_database_backup.test_backup.id backup_tde_password = var.database_database_backup_tde_password character_set = var.database_database_character_set - database_admin_password = var.database_database_database_admin_password database_software_image_id = oci_database_database_software_image.test_database_software_image.id db_backup_config { @@ -52,6 +51,11 @@ resource "oci_database_database" "test_database" { db_unique_name = var.database_database_db_unique_name db_workload = var.database_database_db_workload defined_tags = var.database_database_defined_tags + encryption_key_location_details { + #Required + hsm_password = var.database_database_encryption_key_location_details_hsm_password + provider_type = var.database_database_encryption_key_location_details_provider_type + } freeform_tags = var.database_database_freeform_tags key_store_id = oci_database_key_store.test_key_store.id is_active_data_guard_enabled = var.database_database_is_active_data_guard_enabled @@ -64,6 +68,11 @@ resource "oci_database_database" "test_database" { sid_prefix = var.database_database_sid_prefix source_database_id = oci_database_database.test_database.id source_tde_wallet_password = var.database_database_source_tde_wallet_password + source_encryption_key_location_details { + #Required + hsm_password = var.database_database_source_encryption_key_location_details_hsm_password + provider_type = var.database_database_source_encryption_key_location_details_provider_type + } tde_wallet_password = var.database_database_tde_wallet_password transport_type = var.database_database_transport_type vault_id = oci_kms_vault.test_vault.id @@ -113,6 +122,10 @@ 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). + * `encryption_key_location_details` - (Applicable when source=NONE) Types of providers supported for managing database encryption keys + * `hsm_password` - (Required) Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - (Required) Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. + * `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"}` * `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. * `is_active_data_guard_enabled` - (Applicable when source=DATAGUARD) True if active Data Guard is enabled. @@ -123,6 +136,9 @@ The following arguments are supported: * `pluggable_databases` - (Applicable when source=DB_BACKUP) The list of pluggable databases that needs to be restored into new database. * `protection_mode` - (Required when source=DATAGUARD) The protection mode of this Data Guard. For more information, see [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) in the Oracle Data Guard documentation. * `sid_prefix` - (Optional) Specifies a prefix for the `Oracle SID` of the database to be created. + * `source_encryption_key_location_details` - (Applicable when source=DB_BACKUP) Types of providers supported for managing database encryption keys + * `hsm_password` - (Required) Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - (Required) Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `source_database_id` - (Required when source=DATAGUARD) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source database. * `source_tde_wallet_password` - (Required when source=DATAGUARD) The TDE wallet password of the source database specified by 'sourceDatabaseId'. * `tde_wallet_password` - (Applicable when source=NONE) The optional password to open the TDE wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, \#, or -. @@ -204,6 +220,9 @@ The following attributes are exported: The database workload type. * `defined_tags` - 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). +* `encryption_key_location_details` - Types of providers supported for managing database encryption keys + * `hsm_password` - Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `is_cdb` - True if the database is a container database. diff --git a/website/docs/r/database_database_upgrade.html.markdown b/website/docs/r/database_database_upgrade.html.markdown index 14f6fdf001b..feae81e4894 100644 --- a/website/docs/r/database_database_upgrade.html.markdown +++ b/website/docs/r/database_database_upgrade.html.markdown @@ -118,6 +118,9 @@ The following attributes are exported: The database workload type. * `defined_tags` - 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). +* `encryption_key_location_details` - Types of providers supported for managing database encryption keys + * `hsm_password` - Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database. * `is_cdb` - True if the database is a container database. diff --git a/website/docs/r/database_db_home.html.markdown b/website/docs/r/database_db_home.html.markdown index 03611e0659d..48f399bff10 100644 --- a/website/docs/r/database_db_home.html.markdown +++ b/website/docs/r/database_db_home.html.markdown @@ -55,6 +55,11 @@ resource "oci_database_db_home" "test_db_home" { db_name = var.db_home_database_db_name db_workload = var.db_home_database_db_workload defined_tags = var.db_home_database_defined_tags + encryption_key_location_details { + #Required + hsm_password = var.db_home_database_encryption_key_location_details_hsm_password + provider_type = var.db_home_database_encryption_key_location_details_provider_type + } 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 @@ -63,6 +68,11 @@ resource "oci_database_db_home" "test_db_home" { pdb_name = var.db_home_database_pdb_name pluggable_databases = var.db_home_database_pluggable_databases sid_prefix = var.db_home_database_sid_prefix + source_encryption_key_location_details { + #Required + hsm_password = var.db_home_database_source_encryption_key_location_details_hsm_password + provider_type = var.db_home_database_source_encryption_key_location_details_provider_type + } tde_wallet_password = var.db_home_database_tde_wallet_password time_stamp_for_point_in_time_recovery = var.db_home_database_time_stamp_for_point_in_time_recovery vault_id = oci_kms_vault.test_vault.id @@ -116,6 +126,9 @@ The following arguments are supported: The database workload type. * `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). + * `encryption_key_location_details` - (Applicable when source=NONE | VM_CLUSTER_NEW) Types of providers supported for managing database encryption keys + * `hsm_password` - (Required) Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - (Required) Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `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. @@ -125,6 +138,9 @@ The following arguments are supported: * `pdb_name` - (Applicable when source=NONE | VM_CLUSTER_NEW) The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. * `pluggable_databases` - (Applicable when source=DATABASE | DB_BACKUP | VM_CLUSTER_BACKUP) The list of pluggable databases that needs to be restored into new database. * `sid_prefix` - (Applicable when source=DB_BACKUP | NONE | VM_CLUSTER_BACKUP | VM_CLUSTER_NEW) Specifies a prefix for the `Oracle SID` of the database to be created. + * `source_encryption_key_location_details` - (Applicable when source=DB_BACKUP | VM_CLUSTER_BACKUP) Types of providers supported for managing database encryption keys + * `hsm_password` - (Required) Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - (Required) Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `tde_wallet_password` - (Applicable when source=NONE | VM_CLUSTER_NEW) The optional password to open the TDE wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, \#, or -. * `time_stamp_for_point_in_time_recovery` - (Applicable when source=DATABASE) The point in time of the original database from which the new database is created. If not specifed, the latest backup is used to create the database. * `vault_id` - (Applicable when source=NONE | VM_CLUSTER_NEW) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. diff --git a/website/docs/r/database_db_system.html.markdown b/website/docs/r/database_db_system.html.markdown index 4ec924d1c31..838692dac6d 100644 --- a/website/docs/r/database_db_system.html.markdown +++ b/website/docs/r/database_db_system.html.markdown @@ -65,6 +65,11 @@ resource "oci_database_db_system" "test_db_system" { db_name = var.db_system_db_home_database_db_name db_workload = var.db_system_db_home_database_db_workload defined_tags = var.db_system_db_home_database_defined_tags + encryption_key_location_details { + #Required + hsm_password = var.db_system_db_home_database_encryption_key_location_details_hsm_password + provider_type = var.db_system_db_home_database_encryption_key_location_details_provider_type + } 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 @@ -73,6 +78,11 @@ resource "oci_database_db_system" "test_db_system" { pdb_name = var.db_system_db_home_database_pdb_name pluggable_databases = var.db_system_db_home_database_pluggable_databases sid_prefix = var.db_system_db_home_database_sid_prefix + source_encryption_key_location_details { + #Required + hsm_password = var.db_system_db_home_database_source_encryption_key_location_details_hsm_password + provider_type = var.db_system_db_home_database_source_encryption_key_location_details_provider_type + } tde_wallet_password = var.db_system_db_home_database_tde_wallet_password time_stamp_for_point_in_time_recovery = var.db_system_db_home_database_time_stamp_for_point_in_time_recovery vault_id = oci_kms_vault.test_vault.id @@ -218,6 +228,9 @@ 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). + * `encryption_key_location_details` - (Applicable when source=NONE) Types of providers supported for managing database encryption keys + * `hsm_password` - (Required) Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - (Required) Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `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. @@ -226,6 +239,9 @@ The following arguments are supported: * `pdb_name` - (Applicable when source=NONE) The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. * `pluggable_databases` - (Applicable when source=DATABASE | DB_BACKUP) The list of pluggable databases that needs to be restored into new database. * `sid_prefix` - (Applicable when source=DB_BACKUP | NONE) Specifies a prefix for the `Oracle SID` of the database to be created. + * `source_encryption_key_location_details` - (Applicable when source=DB_BACKUP) Types of providers supported for managing database encryption keys + * `hsm_password` - (Required) Provide the HSM password as you would in RDBMS for External HSM. + * `provider_type` - (Required) Use 'EXTERNAL' for creating a new database or migrate database key with External HSM. * `tde_wallet_password` - (Applicable when source=NONE) The optional password to open the TDE wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, \#, or -. * `time_stamp_for_point_in_time_recovery` - (Applicable when source=DATABASE) The point in time of the original database from which the new database is created. If not specifed, the latest backup is used to create the database. * `vault_id` - (Applicable when source=NONE) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. diff --git a/website/docs/r/database_management_external_my_sql_database.html.markdown b/website/docs/r/database_management_external_my_sql_database.html.markdown new file mode 100644 index 00000000000..ffea21ba639 --- /dev/null +++ b/website/docs/r/database_management_external_my_sql_database.html.markdown @@ -0,0 +1,60 @@ +--- +subcategory: "Database Management" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_database_management_external_my_sql_database" +sidebar_current: "docs-oci-resource-database_management-external_my_sql_database" +description: |- + Provides the External My Sql Database resource in Oracle Cloud Infrastructure Database Management service +--- + +# oci_database_management_external_my_sql_database +This resource provides the External My Sql Database resource in Oracle Cloud Infrastructure Database Management service. + +Creates an external MySQL database. + + +## Example Usage + +```hcl +resource "oci_database_management_external_my_sql_database" "test_external_my_sql_database" { + #Required + compartment_id = var.compartment_id + db_name = var.external_my_sql_database_db_name +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) OCID of compartment for the External MySQL Database. +* `db_name` - (Required) (Updatable) Name of the External MySQL Database. + + +** 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` - OCID of compartment for the External MySQL Database. +* `db_name` - Display Name of the External MySQL Database. +* `external_database_id` - OCID of External MySQL 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 External My Sql Database + * `update` - (Defaults to 20 minutes), when updating the External My Sql Database + * `delete` - (Defaults to 20 minutes), when destroying the External My Sql Database + + +## Import + +ExternalMySqlDatabases can be imported using the `id`, e.g. + +``` +$ terraform import oci_database_management_external_my_sql_database.test_external_my_sql_database "id" +``` + diff --git a/website/docs/r/database_management_external_my_sql_database_connector.html.markdown b/website/docs/r/database_management_external_my_sql_database_connector.html.markdown new file mode 100644 index 00000000000..d8af0edae2e --- /dev/null +++ b/website/docs/r/database_management_external_my_sql_database_connector.html.markdown @@ -0,0 +1,98 @@ +--- +subcategory: "Database Management" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_database_management_external_my_sql_database_connector" +sidebar_current: "docs-oci-resource-database_management-external_my_sql_database_connector" +description: |- + Provides the External My Sql Database Connector resource in Oracle Cloud Infrastructure Database Management service +--- + +# oci_database_management_external_my_sql_database_connector +This resource provides the External My Sql Database Connector resource in Oracle Cloud Infrastructure Database Management service. + +Creates an external MySQL connector resource. + + +## Example Usage + +```hcl +resource "oci_database_management_external_my_sql_database_connector" "test_external_my_sql_database_connector" { + #Required + compartment_id = var.compartment_id + connector_details { + #Required + credential_type = var.external_my_sql_database_connector_connector_details_credential_type + display_name = var.external_my_sql_database_connector_connector_details_display_name + external_database_id = oci_database_management_external_database.test_external_database.id + host_name = var.external_my_sql_database_connector_connector_details_host_name + macs_agent_id = oci_cloud_bridge_agent.test_agent.id + network_protocol = var.external_my_sql_database_connector_connector_details_network_protocol + port = var.external_my_sql_database_connector_connector_details_port + ssl_secret_id = oci_vault_secret.test_secret.id + } + is_test_connection_param = var.external_my_sql_database_connector_is_test_connection_param +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) (Updatable) OCID of compartment for the External MySQL Database. +* `connector_details` - (Required) (Updatable) Create Details of external database connector. + * `credential_type` - (Required) (Updatable) Type of the credential. + * `display_name` - (Required) (Updatable) External MySQL Database Connector Name. + * `external_database_id` - (Required) (Updatable) OCID of MySQL Database resource. + * `host_name` - (Required) (Updatable) Host name for Connector. + * `macs_agent_id` - (Required) (Updatable) Agent Id of the MACS agent. + * `network_protocol` - (Required) (Updatable) Protocol to be used to connect to External MySQL Database; TCP, TCP with SSL or Socket. + * `port` - (Required) (Updatable) Port number to connect to External MySQL Database. + * `ssl_secret_id` - (Required) (Updatable) If using existing SSL secret to connect, OCID for the secret resource. +* `is_test_connection_param` - (Required) Parameter indicating whether database connection needs to be tested. +* `check_connection_status_trigger` - (Optional) (Updatable) An optional property when incremented triggers Check Connection Status. 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: + +* `associated_services` - Oracle Cloud Infrastructure Services associated with this connector. +* `compartment_id` - OCID of compartment for the External MySQL connector. +* `connection_status` - Connection Status +* `connector_type` - Connector Type. +* `credential_type` - Credential type used to connect to database. +* `external_database_id` - OCID of MySQL Database resource +* `host_name` - Host name for Connector. +* `id` - OCID of MySQL Database Connector. +* `macs_agent_id` - Agent Id of the MACS agent. +* `name` - External MySQL Database Connector Name. +* `network_protocol` - Network Protocol. +* `port` - Connector port. +* `source_database` - Name of MySQL Database. +* `source_database_type` - Type of MySQL Database. +* `ssl_secret_id` - OCID of the SSL secret, if TCPS with SSL is used to connect to database. +* `ssl_secret_name` - Name of the SSL secret, if TCPS with SSL is used to connect to database. +* `state` - Indicates lifecycle state of the resource. +* `time_connection_status_updated` - Time when connection status was last updated. +* `time_created` - Connector creation time. +* `time_updated` - Connector update time. + +## 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 External My Sql Database Connector + * `update` - (Defaults to 20 minutes), when updating the External My Sql Database Connector + * `delete` - (Defaults to 20 minutes), when destroying the External My Sql Database Connector + + +## Import + +ExternalMySqlDatabaseConnectors can be imported using the `id`, e.g. + +``` +$ terraform import oci_database_management_external_my_sql_database_connector.test_external_my_sql_database_connector "id" +``` + diff --git a/website/docs/r/database_management_external_my_sql_database_external_mysql_databases_management.html.markdown b/website/docs/r/database_management_external_my_sql_database_external_mysql_databases_management.html.markdown new file mode 100644 index 00000000000..0e6c47ed873 --- /dev/null +++ b/website/docs/r/database_management_external_my_sql_database_external_mysql_databases_management.html.markdown @@ -0,0 +1,51 @@ +--- +subcategory: "Database Management" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_database_management_external_my_sql_database_external_mysql_databases_management" +sidebar_current: "docs-oci-resource-database_management-external_my_sql_database_external_mysql_databases_management" +description: |- + Provides the External My Sql Database External Mysql Databases Management resource in Oracle Cloud Infrastructure Database Management service +--- + +# oci_database_management_external_my_sql_database_external_mysql_databases_management +This resource provides the External My Sql Database External Mysql Databases Management resource in Oracle Cloud Infrastructure Database Management service. + +Enables Database Management for an external MySQL Database. + + +## Example Usage + +```hcl +resource "oci_database_management_external_my_sql_database_external_mysql_databases_management" "test_external_my_sql_database_external_mysql_databases_management" { + #Required + external_my_sql_database_id = oci_database_management_external_my_sql_database.test_external_my_sql_database.id + enable_external_mysql_database = var.enable_external_mysql_database + + #Optional + connector_id = oci_database_management_connector.test_connector.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `connector_id` - (Optional) OCID of External MySQL Database connector. +* `external_my_sql_database_id` - (Required) The OCID of the External MySQL Database. +* `enable_external_mysql_database` - (Required) (Updatable) A required field when set to `true` calls enable action and when set to `false` calls disable action. + + +** 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: + + +## 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 External My Sql Database External Mysql Databases Management + * `update` - (Defaults to 20 minutes), when updating the External My Sql Database External Mysql Databases Management + * `delete` - (Defaults to 20 minutes), when destroying the External My Sql Database External Mysql Databases Management diff --git a/website/docs/r/disaster_recovery_dr_protection_group.html.markdown b/website/docs/r/disaster_recovery_dr_protection_group.html.markdown index 730ddede217..927b26e1bbb 100644 --- a/website/docs/r/disaster_recovery_dr_protection_group.html.markdown +++ b/website/docs/r/disaster_recovery_dr_protection_group.html.markdown @@ -54,6 +54,21 @@ resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" is_backend_set_for_non_movable = var.dr_protection_group_members_backend_set_mappings_is_backend_set_for_non_movable source_backend_set_name = oci_load_balancer_backend_set.test_backend_set.name } + backup_config { + + #Optional + backup_schedule = var.dr_protection_group_members_backup_config_backup_schedule + image_replication_vault_secret_id = oci_vault_secret.test_secret.id + max_number_of_backups_retained = var.dr_protection_group_members_backup_config_max_number_of_backups_retained + namespaces = var.dr_protection_group_members_backup_config_namespaces + replicate_images = var.dr_protection_group_members_backup_config_replicate_images + } + backup_location { + + #Optional + bucket = var.dr_protection_group_members_backup_location_bucket + namespace = var.dr_protection_group_members_backup_location_namespace + } block_volume_operations { #Optional @@ -103,8 +118,46 @@ resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" is_movable = var.dr_protection_group_members_is_movable is_retain_fault_domain = var.dr_protection_group_members_is_retain_fault_domain is_start_stop_enabled = var.dr_protection_group_members_is_start_stop_enabled + jump_host_id = oci_disaster_recovery_jump_host.test_jump_host.id + load_balancer_mappings { + + #Optional + destination_load_balancer_id = oci_load_balancer_load_balancer.test_load_balancer.id + source_load_balancer_id = oci_load_balancer_load_balancer.test_load_balancer.id + } + managed_node_pool_configs { + + #Optional + id = var.dr_protection_group_members_managed_node_pool_configs_id + maximum = var.dr_protection_group_members_managed_node_pool_configs_maximum + minimum = var.dr_protection_group_members_managed_node_pool_configs_minimum + } namespace = var.dr_protection_group_members_namespace +<<<<<<< ours + network_load_balancer_mappings { + + #Optional + destination_network_load_balancer_id = oci_network_load_balancer_network_load_balancer.test_network_load_balancer.id + source_network_load_balancer_id = oci_network_load_balancer_network_load_balancer.test_network_load_balancer.id + } + password_vault_secret_id = oci_vault_secret.test_secret.id + peer_cluster_id = oci_containerengine_cluster.test_cluster.id + vault_mappings { + + #Optional + destination_vault_id = oci_kms_vault.test_vault.id + source_vault_id = oci_kms_vault.test_vault.id + } + virtual_node_pool_configs { + + #Optional + id = var.dr_protection_group_members_virtual_node_pool_configs_id + maximum = var.dr_protection_group_members_virtual_node_pool_configs_maximum + minimum = var.dr_protection_group_members_virtual_node_pool_configs_minimum + } +======= password_vault_secret_id = var.password_vault_secret_id +>>>>>>> theirs vnic_mapping { #Optional @@ -148,6 +201,29 @@ The following arguments are supported: * `destination_backend_set_name` - (Required when member_type=LOAD_BALANCER | NETWORK_LOAD_BALANCER) (Updatable) The name of the destination backend set. Example: `Destination-BackendSet-1` * `is_backend_set_for_non_movable` - (Required when member_type=LOAD_BALANCER | NETWORK_LOAD_BALANCER) (Updatable) This flag specifies if this backend set is used for traffic for non-movable compute instances. Backend sets that point to non-movable instances are only enabled or disabled during DR, their contents are not altered. For non-movable instances this flag should be set to 'true'. Backend sets that point to movable instances are emptied and their contents are transferred to the destination region load balancer. For movable instances this flag should be set to 'false'. Example: `true` * `source_backend_set_name` - (Required when member_type=LOAD_BALANCER | NETWORK_LOAD_BALANCER) (Updatable) The name of the source backend set. Example: `Source-BackendSet-1` + * `backup_config` - (Applicable when member_type=OKE_CLUSTER) (Updatable) Create backup configuration properties for an OKE member. + * `backup_schedule` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The schedule for backing up namespaces to the destination region. If a backup schedule is not specified, only a single backup will be created. This format of the string specifying the backup schedule must conform with RFC-5545 (see examples below). This schedule will use the UTC timezone. This property applies to the OKE cluster member in primary region. + + The backup frequency can be HOURLY, DAILY, WEEKLY or MONTHLY, and the upper and lower interval bounds are as follows HOURLY + * Minimum = 1 + * Maximum = 24 DAILY + * Minimum = 1 + * Maximum = 30 WEEKLY + * Minimum = 1 + * Maximum = 1 MONTHLY + * Minimum = 1 + * Maximum = 12 + + Examples: FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=1 -> Run a backup every week on monday and wednesday at 10:00 AM. FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=2 -> Invalid configuration (can not specify interval of 2). + + FREQ=HOURLY;INTERVAL=25 -> Invalid configuration (can not specify interval of 25). FREQ=HOURLY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). FREQ=HOURLY;INTERVAL=24 -> Run a backup every 24 hours. FREQ=HOURLY;INTERVAL=1 -> Run a backup every hour. FREQ=HOURLY;BYMINUTE=30;INTERVAL=15 -> Run a backup every 15 hours at the 30th minute. FREQ=DAILY;INTERVAL=31 -> Invalid configuration (can not specify interval of 31). FREQ=DAILY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). FREQ=DAILY;INTERVAL=30 -> Run a backup every 30 days at 12:00 midnight. FREQ=DAILY;BYHOUR=17;BYMINUTE=10;INTERVAL=1 -> Run a backup every day at 05:10 PM. + * `image_replication_vault_secret_id` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The OCID of the vault secret that stores the image credential. This property applies to the OKE cluster member in both the primary and standby region. + * `max_number_of_backups_retained` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The maximum number of backups that should be retained. This property applies to the OKE cluster member in primary region. + * `namespaces` - (Applicable when member_type=OKE_CLUSTER) (Updatable) A list of namespaces that need to be backed up. The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. This property applies to the OKE cluster member in primary region. Example: ["default", "pv-nginx"] + * `replicate_images` - (Applicable when member_type=OKE_CLUSTER) (Updatable) Controls the behaviour of image replication across regions. Image replication is enabled by default for DR Protection Groups with a primary role. This property applies to the OKE cluster member in primary region. + * `backup_location` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The details for creating the backup location of an OKE Cluster. + * `bucket` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The bucket name inside the object storage namespace. Example: `operation_logs` + * `namespace` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The namespace in the object storage bucket location (Note - this is usually the tenancy name). Example: `myocitenancy` * `block_volume_operations` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) A list of operations performed on block volumes used by the compute instance. * `attachment_details` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The details for creating a block volume attachment. * `volume_attachment_reference_instance_id` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` @@ -176,10 +252,29 @@ The following arguments are supported: * `is_movable` - (Applicable when member_type=COMPUTE_INSTANCE) (Updatable) A flag indicating if the compute instance should be moved during DR operations. Example: `false` * `is_retain_fault_domain` - (Applicable when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) A flag indicating if the compute instance should be moved to the same fault domain in the destination region. The compute instance launch will fail if this flag is set to true and capacity is not available in the specified fault domain in the destination region. Example: `false` * `is_start_stop_enabled` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) A flag indicating whether the non-movable compute instance should be started and stopped during DR operations. *Prechecks cannot be executed on stopped instances that are configured to be started.* + * `jump_host_id` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The OCID of the compute instance member that is designated as a jump host. This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature. Example: `ocid1.instance.oc1..uniqueID` + * `load_balancer_mappings` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The list of source-to-destination load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_load_balancer_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the destination Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `source_load_balancer_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the source Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `managed_node_pool_configs` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The list of managed node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the managed node pool in OKE cluster. + * `maximum` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The maximum number to which nodes in the managed node pool could be scaled up. + * `minimum` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The minimum number to which nodes in the managed node pool could be scaled down. * `member_id` - (Required) (Updatable) The OCID of the member. Example: `ocid1.instance.oc1..uniqueID` * `member_type` - (Required) (Updatable) The type of the member. * `namespace` - (Required when member_type=OBJECT_STORAGE_BUCKET) (Updatable) The namespace in object storage (Note - this is usually the tenancy name). Example: `myocitenancy` + * `network_load_balancer_mappings` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The list of source-to-destination network load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_network_load_balancer_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `source_network_load_balancer_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - (Applicable when member_type=AUTONOMOUS_DATABASE | DATABASE) (Updatable) The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` + * `peer_cluster_id` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1..uniqueID` + * `vault_mappings` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_vault_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` + * `source_vault_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` + * `virtual_node_pool_configs` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The list of virtual node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the virtual node pool in OKE cluster. + * `maximum` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The maximum number to which nodes in the virtual node pool could be scaled up. + * `minimum` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The minimum number to which nodes in the virtual node pool could be scaled down. * `vnic_mapping` - (Applicable when member_type=COMPUTE_INSTANCE) (Updatable) A list of compute instance VNIC mappings. * `destination_nsg_id_list` - (Applicable when member_type=COMPUTE_INSTANCE) (Updatable) A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID, ocid1.networksecuritygroup.oc1..uniqueID ]` * `destination_primary_private_ip_address` - (Applicable when member_type=COMPUTE_INSTANCE) (Updatable) The primary private IP address to be assigned to the VNIC in the destination region. This address must belong to the destination subnet. Example: `10.0.3.3` @@ -219,6 +314,16 @@ The following attributes are exported: * `destination_backend_set_name` - The name of the destination backend set. Example: `My_Destination_Backend_Set` * `is_backend_set_for_non_movable` - This flag specifies if this backend set is used for traffic for non-movable compute instances. Backend sets that point to non-movable instances are only enabled or disabled during DR. For non-movable instances this flag should be set to 'true'. Backend sets that point to movable instances are emptied and their contents are transferred to the destination region network load balancer. For movable instances this flag should be set to 'false'. Example: `true` * `source_backend_set_name` - The name of the source backend set. Example: `My_Source_Backend_Set` + * `backup_config` - The details of backup performed on OKE Cluster. + * `backup_schedule` - The schedule for backing up namespaces to the destination region. If a backup schedule is not specified, only a single backup will be created. This format of the string specifying the backup schedule must conform with RFC-5545. This schedule will use the UTC timezone. This property applies to the OKE cluster member in primary region. Example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1 + * `image_replication_vault_secret_id` - The OCID of the vault secret that stores the image credential. This property applies to the OKE cluster member in both the primary and standby region. + * `max_number_of_backups_retained` - The maximum number of backups that should be retained. This property applies to the OKE cluster member in primary region. + * `namespaces` - A list of namespaces that need to be backed up. The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. This property applies to the OKE cluster member in primary region. Example: ["default", "pv-nginx"] + * `replicate_images` - Controls the behaviour of image replication across regions. This property applies to the OKE cluster member in primary region. + * `backup_location` - The details for object storage backup location of an OKE Cluster + * `bucket` - The bucket name inside the object storage namespace. Example: `operation_logs` + * `namespace` - The namespace in object storage backup location(Note - this is usually the tenancy name). Example: `myocitenancy` + * `object` - The object name inside the object storage bucket. Example: `switchover_plan_executions` * `block_volume_operations` - Operations performed on a list of block volumes used on the non-movable compute instance. * `attachment_details` - The details for attaching or detaching a block volume. * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` @@ -247,10 +352,29 @@ The following attributes are exported: * `is_movable` - A flag indicating if the compute instance should be moved during DR operations. Example: `false` * `is_retain_fault_domain` - A flag indicating if the compute instance should be moved to the same fault domain in the destination region. The compute instance launch will fail if this flag is set to true and capacity is not available in the specified fault domain in the destination region. Example: `false` * `is_start_stop_enabled` - A flag indicating whether the non-movable compute instance needs to be started and stopped during DR operations. + * `jump_host_id` - The OCID of the compute instance member that is designated as a jump host. This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature. Example: `ocid1.instance.oc1..uniqueID` + * `load_balancer_mappings` - The list of source-to-destination load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_load_balancer_id` - The OCID of the destination Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `source_load_balancer_id` - The OCID of the source Load Balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` + * `managed_node_pool_configs` - The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - The OCID of the managed node pool in OKE cluster. + * `maximum` - The maximum number to which nodes in the managed node pool could be scaled up. + * `minimum` - The minimum number to which nodes in the managed node pool could be scaled down. * `member_id` - The OCID of the member. Example: `ocid1.instance.oc1..uniqueID` * `member_type` - The type of the member. * `namespace` - The namespace in object storage (Note - this is usually the tenancy name). Example: `myocitenancy` + * `network_load_balancer_mappings` - The list of source-to-destination network load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_network_load_balancer_id` - The OCID of the destination Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `source_network_load_balancer_id` - The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` + * `peer_cluster_id` - The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1.uniqueID` + * `vault_mappings` - The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. + * `destination_vault_id` - The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` + * `source_vault_id` - The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` + * `virtual_node_pool_configs` - The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region. + * `id` - The OCID of the virtual node pool in OKE cluster. + * `maximum` - The maximum number to which nodes in the virtual node pool could be scaled up. + * `minimum` - The minimum number to which nodes in the virtual node pool could be scaled down. * `vnic_mapping` - A list of compute instance VNIC mappings. * `destination_nsg_id_list` - A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID1, ocid1.networksecuritygroup.oc1..uniqueID2 ]` * `destination_subnet_id` - The OCID of the destination subnet to which the source VNIC should connect. Example: `ocid1.subnet.oc1..uniqueID` diff --git a/website/docs/r/opsi_database_insight.html.markdown b/website/docs/r/opsi_database_insight.html.markdown index f437a8dd1d8..dd366c2e48a 100644 --- a/website/docs/r/opsi_database_insight.html.markdown +++ b/website/docs/r/opsi_database_insight.html.markdown @@ -64,6 +64,7 @@ resource "oci_opsi_database_insight" "test_database_insight" { user_name = oci_identity_user.test_user.name wallet_secret_id = oci_vault_secret.test_secret.id } + database_connector_id = oci_opsi_database_connector.test_database_connector.id dbm_private_endpoint_id = oci_dataflow_private_endpoint.test_private_endpoint.id defined_tags = {"foo-namespace.bar-key"= "value"} deployment_type = var.database_insight_deployment_type @@ -106,7 +107,8 @@ The following arguments are supported: * `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_CLOUD_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_connector_id` - (Required when entity_source=EXTERNAL_MYSQL_DATABASE_SYSTEM) (Updatable) The DBM owned database connector [OCID](/iaas/database-management/doc/view-connector-details.html) mapping to the database credentials and connection details. +* `database_id` - (Required when entity_source=AUTONOMOUS_DATABASE | MACS_MANAGED_CLOUD_DATABASE | MACS_MANAGED_EXTERNAL_DATABASE | MDS_MYSQL_DATABASE_SYSTEM | PE_COMANAGED_DATABASE | EXTERNAL_MYSQL_DATABASE_SYSTEM) 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_CLOUD_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"}` diff --git a/website/docs/r/opsi_news_report.html.markdown b/website/docs/r/opsi_news_report.html.markdown index 48d673347e1..ead6d9b642b 100644 --- a/website/docs/r/opsi_news_report.html.markdown +++ b/website/docs/r/opsi_news_report.html.markdown @@ -22,6 +22,7 @@ resource "oci_opsi_news_report" "test_news_report" { content_types { #Optional + actionable_insights_resources = var.news_report_content_types_actionable_insights_resources capacity_planning_resources = var.news_report_content_types_capacity_planning_resources sql_insights_fleet_analysis_resources = var.news_report_content_types_sql_insights_fleet_analysis_resources sql_insights_performance_degradation_resources = var.news_report_content_types_sql_insights_performance_degradation_resources @@ -41,7 +42,9 @@ resource "oci_opsi_news_report" "test_news_report" { day_of_week = var.news_report_day_of_week defined_tags = {"foo-namespace.bar-key"= "value"} freeform_tags = {"bar-key"= "value"} + match_rule = var.news_report_match_rule status = var.news_report_status + tag_filters = var.news_report_tag_filters } ``` @@ -52,6 +55,7 @@ The following arguments are supported: * `are_child_compartments_included` - (Optional) (Updatable) A flag to consider the resources within a given compartment and all sub-compartments. * `compartment_id` - (Required) (Updatable) Compartment Identifier where the news report will be created. * `content_types` - (Required) (Updatable) Content types that the news report can handle. + * `actionable_insights_resources` - (Optional) (Updatable) Supported resources for actionable insights content type. * `capacity_planning_resources` - (Optional) (Updatable) Supported resources for capacity planning content type. * `sql_insights_fleet_analysis_resources` - (Optional) (Updatable) Supported resources for SQL insights - fleet analysis content type. * `sql_insights_performance_degradation_resources` - (Optional) (Updatable) Supported resources for SQL insights - performance degradation content type. @@ -64,10 +68,12 @@ The following arguments are supported: * `description` - (Required) (Updatable) The description of the news report. * `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"}` * `locale` - (Required) (Updatable) Language of the news report. +* `match_rule` - (Optional) (Updatable) Match rule used for tag filters. * `name` - (Required) (Updatable) The news report name. * `news_frequency` - (Required) (Updatable) News report frequency. * `ons_topic_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the ONS topic. * `status` - (Optional) (Updatable) Defines if the news report will be enabled or disabled. +* `tag_filters` - (Optional) (Updatable) List of tag filters; each filter composed by a namespace, key, and value. Example for defined tags - '.='. Example for freeform tags - '=' ** IMPORTANT ** @@ -80,6 +86,7 @@ The following attributes are exported: * `are_child_compartments_included` - A flag to consider the resources within a given compartment and all sub-compartments. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. * `content_types` - Content types that the news report can handle. + * `actionable_insights_resources` - Supported resources for actionable insights content type. * `capacity_planning_resources` - Supported resources for capacity planning content type. * `sql_insights_fleet_analysis_resources` - Supported resources for SQL insights - fleet analysis content type. * `sql_insights_performance_degradation_resources` - Supported resources for SQL insights - performance degradation content type. @@ -94,12 +101,14 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the news report 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. * `locale` - Language of the news report. +* `match_rule` - Match rule used for tag filters. * `name` - The news report name. * `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 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"}` +* `tag_filters` - List of tag filters; each filter composed by a namespace, key, and value. Example for defined tags - '.='. Example for freeform tags - '='. * `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/oci.erb b/website/oci.erb index e3d5fffd3b3..840e9272ee4 100644 --- a/website/oci.erb +++ b/website/oci.erb @@ -3817,6 +3817,18 @@
  • oci_database_management_external_listeners
  • +
  • + oci_database_management_external_my_sql_database +
  • +
  • + oci_database_management_external_my_sql_database_connector +
  • +
  • + oci_database_management_external_my_sql_database_connectors +
  • +
  • + oci_database_management_external_my_sql_databases +
  • oci_database_management_job_executions_statu
  • @@ -4029,6 +4041,15 @@
  • oci_database_management_external_listener
  • +
  • + oci_database_management_external_my_sql_database +
  • +
  • + oci_database_management_external_my_sql_database_connector +
  • +
  • + oci_database_management_external_my_sql_database_external_mysql_databases_management +
  • oci_database_management_externalcontainerdatabase_external_container_dbm_features_management