diff --git a/CHANGELOG.md b/CHANGELOG.md index a521d467e8b..1478231c747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## 6.21.0 (December 19, 2024) + +### Added +- Support for ADB-S: Backup Retention Lock +- Support for StackMonitoring: Metric Extensions : Advanced Support and Integration +- Support for Extend OBP cloud service to include new SKUs for Digital Assets editions +- Support for Data Science: Support Private Endpoint Access for Model Deployment +- Support for Add ZeroETL as a resource in GoldenGate Cloud Service +- Support Llama 3.2 unit shape in Generative AI service +- Support for BDS 3.0.29 Release - Feature Enhancements +- Support for BDS - Kerb to IAM Automation +### Bug Fix + +- Fix terraform documentation for oci_database_exadb_vm_cluster resource + ## 6.20.0 (December 11, 2024) ### Added diff --git a/coverage/coverage_test.go b/coverage/coverage_test.go index bd55e0e130c..2ae47238481 100644 --- a/coverage/coverage_test.go +++ b/coverage/coverage_test.go @@ -14,7 +14,7 @@ import ( var totalRgx = regexp.MustCompile(`total:\s+\(statements\)\s+([^"]*)%`) -const CodeCoverageThreshold = 57 +const CodeCoverageThreshold = 55.9 func TestCoverage(t *testing.T) { if os.Getenv("CHECK_COVERAGE") != "true" { diff --git a/examples/big_data_service/Identity_Configuration/main.tf b/examples/big_data_service/Identity_Configuration/main.tf new file mode 100755 index 00000000000..67047407b2f --- /dev/null +++ b/examples/big_data_service/Identity_Configuration/main.tf @@ -0,0 +1,63 @@ +variable "bds_instance_id" { +} + +variable "cluster_admin_password" { +} + +variable "confidential_application_id" { +} + +variable "display_name" { + default = "identityDomainConfig" +} + +variable "identity_domain_id" { +} + +variable "activate_iam_user_sync_configuration_trigger" { + default = "false" +} + +variable "activate_upst_configuration_trigger" { + default = "false" +} + +variable "refresh_confidential_application_trigger" { + default = "false" +} + +variable "refresh_upst_token_exchange_keytab_trigger" { + default = "false" +} + +variable "is_posix_attributes_addition_required" { +default = "false" +} + +variable "confidential_application_id" { +} + +variable "vault_id" { +} + +resource "oci_bds_bds_instance_identity_configuration" "test_bds_instance_identity_configuration" { +bds_instance_id = var.bds_instance_id +cluster_admin_password = var.cluster_admin_password +confidential_application_id = var.confidential_application_id +display_name = var.display_name +identity_domain_id = var.identity_domain_id +activate_iam_user_sync_configuration_trigger = var.activate_iam_user_sync_configuration_trigger +activate_upst_configuration_trigger = var.activate_upst_configuration_trigger +refresh_confidential_application_trigger = var.refresh_confidential_application_trigger +refresh_upst_token_exchange_keytab_trigger = var.refresh_upst_token_exchange_keytab_trigger + +iam_user_sync_configuration_details { + is_posix_attributes_addition_required = var.is_posix_attributes_addition_required +} + +upst_configuration_details { + master_encryption_key_id = var.confidential_application_id + vault_id = var.vault_id +} + +} diff --git a/examples/big_data_service/main.tf b/examples/big_data_service/main.tf index 4622b83698c..3a7d4c65157 100644 --- a/examples/big_data_service/main.tf +++ b/examples/big_data_service/main.tf @@ -149,6 +149,16 @@ resource "oci_bds_bds_instance" "test_bds_instance" { kms_key_id = var.kms_key_id cluster_profile = var.cluster_profile bootstrap_script_url = "https://objectstorage.us-ashburn-1.oraclecloud.com/p/Lk5JT9tnUIOG4yLm6S21QVR7m3Rm2uj1RAS2Olx5v14onLU2Y-b0lIc_N0RuUIge/n/idpbwtq1b3ta/b/bucket-20230214-1316/o/execute_bootstrap_script.sh" + is_force_stop_jobs = "true" + state = "ACTIVE" + + start_cluster_shape_configs{ + node_type_shape_configs { + node_type = "WORKER" + shape = "VM.Standard.Generic" + + } + } master_node { #Required diff --git a/examples/database/adb/autonomous_database.tf b/examples/database/adb/autonomous_database.tf index 907a0203978..290a96f880b 100644 --- a/examples/database/adb/autonomous_database.tf +++ b/examples/database/adb/autonomous_database.tf @@ -128,6 +128,20 @@ resource "oci_database_autonomous_database" "test_autonomous_database_apex" { is_free_tier = "false" } +resource "oci_database_autonomous_database" "test_autonomous_database_bck_ret_lock" { + admin_password = random_string.autonomous_database_admin_password.result + compartment_id = var.compartment_ocid + compute_count = "2.0" + compute_model = "ECPU" + data_storage_size_in_tbs = "1" + db_name = "adbBckRetLock" + db_version = "19c" + license_model = "LICENSE_INCLUDED" + is_free_tier = "false" + is_backup_retention_locked = "false" +} + + resource "oci_database_autonomous_database" "test_autonomous_database_bck_ret_days" { admin_password = random_string.autonomous_database_admin_password.result compartment_id = var.compartment_ocid diff --git a/examples/database/db_systems/db_vm/db_vm_amd/data.tf b/examples/database/db_systems/db_vm/db_vm_amd/data.tf new file mode 100644 index 00000000000..cd6b38f1abe --- /dev/null +++ b/examples/database/db_systems/db_vm/db_vm_amd/data.tf @@ -0,0 +1,23 @@ +# $Header$ +# +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# +# NAME +# data.tf +# +# USAGE +# Use the following path for the Example & Backward Compatibility tests: database/db_systems/db_vm/db_vm_amd +# NOTES +# Terraform Integration Test: TestResourceDatabaseDBSystemAmdVM +# +# FILE(S) +# database_db_system_resource_amd_vm_test.go +# +# MODIFIED MM/DD/YY +# escabrer 12/12/2024 - Created + + + +data "oci_identity_availability_domains" "test_availability_domains" { + compartment_id = var.tenancy_ocid +} \ No newline at end of file diff --git a/examples/database/db_systems/db_vm/db_vm_amd/main.tf b/examples/database/db_systems/db_vm/db_vm_amd/main.tf index 12e994b2f09..cfa84659797 100644 --- a/examples/database/db_systems/db_vm/db_vm_amd/main.tf +++ b/examples/database/db_systems/db_vm/db_vm_amd/main.tf @@ -1,369 +1,53 @@ -// 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 "kms_key_id" { -#} +# $Header$ # -#variable "kms_key_version_id" { -#} +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. # -#variable "vault_id" { -#} - -variable "compartment_ocid" { -} - -variable "ssh_public_key" { -} - -variable "ssh_private_key" { -} - -# DBSystem specific -variable "db_system_shape" { - default = "VM.Standard.E4.Flex" -} - -variable "cpu_core_count" { - default = "2" -} - -variable "db_system_storage_volume_performance_mode" { - default = "BALANCED" -} - -variable "db_edition" { - default = "ENTERPRISE_EDITION" -} - -variable "db_admin_password" { - default = "BEstrO0ng_#12" -} - -variable "db_version" { - default = "19.24.0.0" -} - -variable "db_disk_redundancy" { - default = "NORMAL" -} - -variable "sparse_diskgroup" { - default = true -} - -variable "hostname" { - default = "myoracledb" -} - -variable "host_user_name" { - default = "opc" -} - -variable "n_character_set" { - default = "AL16UTF16" -} - -variable "character_set" { - default = "AL32UTF8" -} - -variable "db_workload" { - default = "OLTP" -} - -variable "pdb_name" { - default = "pdbName" -} - -variable "data_storage_size_in_gb" { - default = "256" -} - -variable "license_model" { - default = "LICENSE_INCLUDED" -} - -variable "node_count" { - default = "1" -} - -variable "test_database_software_image_ocid" { - -} - -provider "oci" { -# version = "4.70.0" - tenancy_ocid = var.tenancy_ocid - user_ocid = var.user_ocid - fingerprint = var.fingerprint - private_key_path = var.private_key_path - region = var.region -} - -data "oci_identity_availability_domain" "ad" { - compartment_id = var.tenancy_ocid - ad_number = 1 -} - -# Get DB node list -data "oci_database_db_nodes" "db_nodes" { - compartment_id = var.compartment_ocid - db_system_id = oci_database_db_system.test_db_system.id -} - -# Get DB node details -data "oci_database_db_node" "db_node_details" { - db_node_id = data.oci_database_db_nodes.db_nodes.db_nodes[0]["id"] -} - -# Gets the OCID of the first (default) vNIC -#data "oci_core_vnic" "db_node_vnic" { -# vnic_id = data.oci_database_db_node.db_node_details.vnic_id -#} - -data "oci_database_db_homes" "db_homes" { - compartment_id = var.compartment_ocid - db_system_id = oci_database_db_system.test_db_system.id -} - -data "oci_database_databases" "databases" { - compartment_id = var.compartment_ocid - db_home_id = data.oci_database_db_homes.db_homes.db_homes[0].db_home_id -} - -data "oci_database_db_versions" "test_db_versions_by_db_system_id" { - compartment_id = var.compartment_ocid - db_system_id = oci_database_db_system.test_db_system.id -} - -resource "oci_database_backup" "test_backup" { - database_id = data.oci_database_databases.databases.databases.0.id - display_name = "Monthly Backup" -} - -data "oci_database_db_system_shapes" "test_db_system_shapes" { - availability_domain = data.oci_identity_availability_domain.ad.name - compartment_id = var.compartment_ocid - - filter { - name = "shape" - values = [var.db_system_shape] - } -} - -data "oci_database_db_systems" "db_systems" { - compartment_id = var.compartment_ocid - - filter { - name = "id" - values = [oci_database_db_system.test_db_system.id] - } -} - -resource "oci_core_vcn" "vcn" { - cidr_block = "10.1.0.0/16" - compartment_id = var.compartment_ocid - display_name = "TFExampleVCNDBSystem" - dns_label = "tfexvcndbsys" -} - -resource "oci_core_subnet" "subnet" { - availability_domain = data.oci_identity_availability_domain.ad.name - cidr_block = "10.1.20.0/24" - display_name = "TFExampleSubnetDBSystem" - dns_label = "tfexsubdbsys" - security_list_ids = [oci_core_security_list.ExampleSecurityList.id] - compartment_id = var.compartment_ocid - vcn_id = oci_core_vcn.vcn.id - route_table_id = oci_core_route_table.route_table.id - dhcp_options_id = oci_core_vcn.vcn.default_dhcp_options_id -} - -resource "oci_core_subnet" "subnet_backup" { - availability_domain = data.oci_identity_availability_domain.ad.name - cidr_block = "10.1.1.0/24" - display_name = "TFExampleSubnetDBSystemBackup" - dns_label = "tfexsubdbsysbp" - security_list_ids = [oci_core_security_list.ExampleSecurityList.id] - compartment_id = var.compartment_ocid - vcn_id = oci_core_vcn.vcn.id - route_table_id = oci_core_route_table.route_table_backup.id - dhcp_options_id = oci_core_vcn.vcn.default_dhcp_options_id -} - -resource "oci_core_internet_gateway" "internet_gateway" { - compartment_id = var.compartment_ocid - display_name = "TFExampleIGDBSystem" - vcn_id = oci_core_vcn.vcn.id -} - -resource "oci_core_route_table" "route_table" { - compartment_id = var.compartment_ocid - vcn_id = oci_core_vcn.vcn.id - display_name = "TFExampleRouteTableDBSystem" - - route_rules { - destination = "0.0.0.0/0" - destination_type = "CIDR_BLOCK" - network_entity_id = oci_core_internet_gateway.internet_gateway.id - } -} - -resource "oci_core_route_table" "route_table_backup" { - compartment_id = var.compartment_ocid - vcn_id = oci_core_vcn.vcn.id - display_name = "TFExampleRouteTableDBSystemBackup" - - route_rules { - destination = "0.0.0.0/0" - destination_type = "CIDR_BLOCK" - network_entity_id = oci_core_internet_gateway.internet_gateway.id - } -} - -resource "oci_core_security_list" "ExampleSecurityList" { - compartment_id = var.compartment_ocid - vcn_id = oci_core_vcn.vcn.id - display_name = "TFExampleSecurityList" - - // allow outbound tcp traffic on all ports - egress_security_rules { - destination = "0.0.0.0/0" - protocol = "6" - } - - // allow outbound udp traffic on a port range - egress_security_rules { - destination = "0.0.0.0/0" - protocol = "17" // udp - stateless = true - } - - egress_security_rules { - destination = "0.0.0.0/0" - protocol = "1" - stateless = true - } - - // allow inbound ssh traffic from a specific port - ingress_security_rules { - protocol = "6" // tcp - source = "0.0.0.0/0" - stateless = false - } - - // allow inbound icmp traffic of a specific type - ingress_security_rules { - protocol = 1 - source = "0.0.0.0/0" - stateless = true - } -} +# NAME +# main.tf +# +# USAGE +# Use the following path for the Example & Backward Compatibility tests: database/db_systems/db_vm/db_vm_amd +# NOTES +# Terraform Integration Test: TestResourceDatabaseDBSystemAmdVM +# +# FILE(S) +# database_db_system_resource_amd_vm_test.go +# +# MODIFIED MM/DD/YY +# escabrer 12/12/2024 - Created -resource "oci_core_network_security_group" "test_network_security_group" { - compartment_id = var.compartment_ocid - vcn_id = oci_core_vcn.vcn.id - display_name = "displayName" -} -resource "oci_core_network_security_group" "test_network_security_group_backup" { +resource "oci_database_db_system" "test_amd_db_system" { + availability_domain = data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name compartment_id = var.compartment_ocid - vcn_id = oci_core_vcn.vcn.id - display_name = "displayName" -} - -resource "oci_database_db_system" "test_db_system" { - availability_domain = data.oci_identity_availability_domain.ad.name - compartment_id = var.compartment_ocid - database_edition = var.db_edition - + cpu_core_count = "2" + data_storage_size_in_gb = "256" + database_edition = "ENTERPRISE_EDITION" db_home { database { - admin_password = var.db_admin_password -# kms_key_version_id = var.kms_key_version_id -# kms_key_id = var.kms_key_id -# vault_id = var.vault_id - db_name = "aTFdbVm" - db_unique_name = "aTFdbVm_xyz" - character_set = var.character_set - ncharacter_set = var.n_character_set - db_workload = var.db_workload - pdb_name = var.pdb_name - + admin_password = var.admin_password + character_set = "AL32UTF8" db_backup_config { - auto_backup_enabled = false + auto_backup_enabled = "false" } + db_name = "tfDb" + db_workload = "OLTP" + kms_key_id = var.kms_key_id + ncharacter_set = "AL16UTF16" + pdb_name = "tfPdb" + vault_id = var.vault_id } - - db_version = "19.24.0.0" - display_name = "MyTFDBHomeVm" - } - - db_system_options { - storage_management = "LVM" - } - - disk_redundancy = var.db_disk_redundancy - shape = var.db_system_shape - cpu_core_count = var.cpu_core_count - storage_volume_performance_mode = var.db_system_storage_volume_performance_mode - subnet_id = oci_core_subnet.subnet.id - ssh_public_keys = [var.ssh_public_key] - display_name = "MyTFDBSystemVM" - hostname = var.hostname - data_storage_size_in_gb = var.data_storage_size_in_gb - license_model = var.license_model - node_count = data.oci_database_db_system_shapes.test_db_system_shapes.db_system_shapes[0]["minimum_node_count"] - nsg_ids = [oci_core_network_security_group.test_network_security_group_backup.id, oci_core_network_security_group.test_network_security_group.id] - - #To use defined_tags, set the values below to an existing tag namespace, refer to the identity example on how to create tag namespaces - #defined_tags = {"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "value"} - - freeform_tags = { - "Department" = "Finance" - } -} - -resource "oci_database_db_system" "db_system_bkup" { - source = "DB_BACKUP" - availability_domain = data.oci_identity_availability_domain.ad.name - compartment_id = var.compartment_ocid - subnet_id = oci_core_subnet.subnet.id - database_edition = var.db_edition - disk_redundancy = var.db_disk_redundancy - shape = var.db_system_shape - cpu_core_count= var.cpu_core_count - storage_volume_performance_mode= var.db_system_storage_volume_performance_mode - ssh_public_keys = [var.ssh_public_key] - hostname = var.hostname - data_storage_size_in_gb = var.data_storage_size_in_gb - license_model = var.license_model - node_count = data.oci_database_db_system_shapes.test_db_system_shapes.db_system_shapes[0]["minimum_node_count"] - display_name = "tfDbSystemFromBackupWithCustImg" - - db_home { - db_version = "19.24.0.0" -# database_software_image_id = var.test_database_software_image_ocid - database { - admin_password = "BEstrO0ng_#11" - backup_tde_password = "BEstrO0ng_#11" - backup_id = oci_database_backup.test_backup.id - db_name = "dbback" - } - } -} + db_version = "19.0.0.0" + display_name = "tfDbHome" + } + disk_redundancy = "NORMAL" + display_name = "tfExampleDbSystemAmd" + domain = oci_core_subnet.test_subnet.subnet_domain_name + hostname = "oracle-db" + kms_key_id = var.kms_key_id + license_model = "LICENSE_INCLUDED" + node_count = "1" + shape = "VM.Standard.E4.Flex" + ssh_public_keys = [var.ssh_public_key] + subnet_id = oci_core_subnet.test_subnet.id +} \ No newline at end of file diff --git a/examples/database/db_systems/db_vm/db_vm_amd/network.tf b/examples/database/db_systems/db_vm/db_vm_amd/network.tf new file mode 100644 index 00000000000..872f4d1b162 --- /dev/null +++ b/examples/database/db_systems/db_vm/db_vm_amd/network.tf @@ -0,0 +1,53 @@ +# $Header$ +# +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# NAME +# network.tf +# +# USAGE +# Use the following path for the Example & Backward Compatibility tests: database/db_systems/db_vm/db_vm_amd +# NOTES +# Terraform Integration Test: TestResourceDatabaseDBSystemAmdVM +# +# FILE(S) +# database_db_system_resource_amd_vm_test.go +# +# +# MODIFIED MM/DD/YY +# escabrer 12/12/2024 - Created + + +resource "oci_core_vcn" "test_vcn" { + cidr_block = "10.1.0.0/16" + compartment_id = var.compartment_ocid + display_name = "tfVcn" + dns_label = "tfvcn" +} + +resource "oci_core_route_table" "test_route_table" { + compartment_id = var.compartment_ocid + display_name = "tfRouteTable" + route_rules { + cidr_block = "0.0.0.0/0" + description = "Internal traffic for OCI Services" + network_entity_id = oci_core_internet_gateway.test_internet_gateway.id + } + vcn_id = oci_core_vcn.test_vcn.id +} + +resource "oci_core_internet_gateway" "test_internet_gateway" { + compartment_id = var.compartment_ocid + display_name = "tfInternetGateway" + vcn_id = oci_core_vcn.test_vcn.id +} + +resource "oci_core_subnet" "test_subnet" { + cidr_block = "10.1.20.0/24" + compartment_id = var.compartment_ocid + dhcp_options_id = oci_core_vcn.test_vcn.default_dhcp_options_id + display_name = "tfSubnet" + dns_label = "tfsubnet" + route_table_id = oci_core_route_table.test_route_table.id + security_list_ids = [oci_core_vcn.test_vcn.default_security_list_id] + vcn_id = oci_core_vcn.test_vcn.id +} \ No newline at end of file diff --git a/examples/database/db_systems/db_vm/db_vm_amd/provider.tf b/examples/database/db_systems/db_vm/db_vm_amd/provider.tf new file mode 100644 index 00000000000..11ad3d3df23 --- /dev/null +++ b/examples/database/db_systems/db_vm/db_vm_amd/provider.tf @@ -0,0 +1,27 @@ +# $Header$ +# +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# +# NAME +# provider.tf +# +# USAGE +# Use the following path for the Example & Backward Compatibility tests: database/db_systems/db_vm/db_vm_amd +# NOTES +# Terraform Integration Test: TestResourceDatabaseDBSystemAmdVM +# +# FILE(S) +# database_db_system_resource_amd_vm_test.go +# +# MODIFIED MM/DD/YY +# escabrer 12/12/2024 - Created + + + + +provider "oci" { + auth = "SecurityToken" + config_file_profile = "terraform-federation-test" + region = var.region + tenancy_ocid = var.compartment_ocid +} \ No newline at end of file diff --git a/examples/database/db_systems/db_vm/db_vm_amd/tags.tf b/examples/database/db_systems/db_vm/db_vm_amd/tags.tf new file mode 100644 index 00000000000..766e601a940 --- /dev/null +++ b/examples/database/db_systems/db_vm/db_vm_amd/tags.tf @@ -0,0 +1,37 @@ +# $Header$ +# +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# +# NAME +# tags.tf +# +# USAGE +# Use the following path for the Example & Backward Compatibility tests: database/db_systems/db_vm/db_vm_amd +# NOTES +# Terraform Integration Test: TestResourceDatabaseDBSystemAmdVM +# +# FILE(S) +# database_db_system_resource_amd_vm_test.go +# +# MODIFIED MM/DD/YY +# escabrer 12/12/2024 - Created + + + +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 +} \ No newline at end of file diff --git a/examples/database/db_systems/db_vm/db_vm_amd/variables.tf b/examples/database/db_systems/db_vm/db_vm_amd/variables.tf new file mode 100644 index 00000000000..9b5c761fc51 --- /dev/null +++ b/examples/database/db_systems/db_vm/db_vm_amd/variables.tf @@ -0,0 +1,51 @@ +# $Header$ +# +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. +# +# NAME +# variables.tf +# +# USAGE +# Use the following path for the Example & Backward Compatibility tests: database/db_systems/db_vm/db_vm_amd +# NOTES +# Terraform Integration Test: TestResourceDatabaseDBSystemAmdVM +# +# FILE(S) +# database_db_system_resource_amd_vm_test.go +# +# MODIFIED MM/DD/YY +# escabrer 12/12/2024 - Created + + + +variable "tenancy_ocid" { + type = string +} + +variable "ssh_public_key" { + type = string +} + +variable "region" { + type = string +} + +variable "compartment_ocid" { + type = string +} + +variable "defined_tag_namespace_name" { + default = "" +} + +variable "kms_key_id" { + type = string +} + +variable "vault_id" { + type = string +} + +variable "admin_password" { + type = string +} \ No newline at end of file diff --git a/examples/datascience/model_deployment/model_deployment.tf b/examples/datascience/model_deployment/model_deployment.tf index 725f6f834f1..164ac109196 100644 --- a/examples/datascience/model_deployment/model_deployment.tf +++ b/examples/datascience/model_deployment/model_deployment.tf @@ -3,27 +3,21 @@ // These variables would commonly be defined as environment variables or sourced in a .env file -variable "tenancy_ocid" { -} - variable "user_ocid" { } -variable "fingerprint" { +variable "region" { } -variable "private_key_path" { -} - -variable "region" { +variable config_file_profile { } provider "oci" { region = var.region - tenancy_ocid = var.tenancy_ocid user_ocid = var.user_ocid - fingerprint = var.fingerprint - private_key_path = var.private_key_path +// version = "6.19.0" + auth = "SecurityToken" + config_file_profile = var.config_file_profile } variable "compartment_ocid" { @@ -207,6 +201,12 @@ variable "model_deployment_model_deployment_configuration_details_environment_co variable "model_egress_id" { } +# Private Networking +variable "model_deployment_display_name_for_private_network" { + default = "terraform-testing-private-model-deployment" +} +variable "private_endpoint_id" {} + # A model deployment resource configurations for creating a new model deployment with scaling policy type = FIXED SIZE resource "oci_datascience_model_deployment" "tf_model_deployment" { # Required @@ -491,6 +491,67 @@ resource "oci_datascience_model_deployment" "tf_model_deployment_custom_networki display_name = var.model_deployment_display_name } +# A model deployment resource configurations for creating a new model deployment with Private Networking +resource "oci_datascience_model_deployment" "tf_model_deployment_private_networking" { + # Required + compartment_id = var.compartment_ocid + model_deployment_configuration_details { + # Required + deployment_type = var.model_deployment_model_deployment_configuration_details_deployment_type + model_configuration_details { + # Required + instance_configuration { + # Required + instance_shape_name = var.shape + + #Optional + model_deployment_instance_shape_config_details { + + #Optional + cpu_baseline = var.model_deployment_model_deployment_configuration_details_model_configuration_details_instance_configuration_model_deployment_instance_shape_config_details_cpu_baseline + memory_in_gbs = var.model_deployment_model_configuration_details_instance_configuration_model_deployment_instance_shape_config_details_memory_in_gbs + ocpus = var.model_deployment_model_configuration_details_instance_configuration_model_deployment_instance_shape_config_details_ocpus + } + + # Required + subnet_id = oci_core_subnet.tf_subnet.id + private_endpoint_id = var.private_endpoint_id + } + model_id = var.model_egress_id + + # Optional + bandwidth_mbps = var.model_deployment_model_deployment_configuration_details_model_configuration_details_bandwidth_mbps + maximum_bandwidth_mbps = var.model_deployment_model_deployment_configuration_details_model_configuration_details_maximum_bandwidth_mbps + + scaling_policy { + # Required + instance_count = var.model_deployment_model_deployment_configuration_details_model_configuration_details_scaling_policy_instance_count + policy_type = var.model_deployment_model_deployment_configuration_details_model_configuration_details_scaling_policy_policy_type + } + } + } + project_id = var.project_ocid + + # Optional + category_log_details { + + # Optional + access { + # Required + log_group_id = var.log_group_id + log_id = var.access_log_id + } + predict { + # Required + log_group_id = var.log_group_id + log_id = var.predict_log_id + } + } + # Optional + description = var.model_deployment_description + display_name = var.model_deployment_display_name_for_private_network +} + # The data resource for a list of model deployments in a specified compartment data "oci_datascience_model_deployments" "tf_model_deployments" { # Required @@ -513,4 +574,4 @@ resource "oci_core_subnet" "tf_subnet" { resource "oci_core_vcn" "tf_vcn" { cidr_block = "10.0.0.0/16" compartment_id = var.compartment_ocid -} \ No newline at end of file +} diff --git a/examples/goldengate/Pipeline/main.tf b/examples/goldengate/Pipeline/main.tf new file mode 100644 index 00000000000..3b6b6cbf4af --- /dev/null +++ b/examples/goldengate/Pipeline/main.tf @@ -0,0 +1,39 @@ +variable "tenancy_ocid" {} +variable "user_ocid" {} +variable "fingerprint" {} +variable "private_key_path" {} +variable "compartment_id" {} +variable "region" {} + +variable "source_connection_id" { } +variable "target_connection_id" { } +variable "display_name" { + default = "Pipeline display Name" +} +variable "license_model" { + default = "LICENSE_INCLUDED" +} +variable "recipe_type" { + default = "ZERO_ETL" +} + +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_golden_gate_pipeline" "test_pipeline" { + compartment_id = var.compartment_id + display_name = var.display_name + license_model = var.license_model + recipe_type = var.recipe_type + source_connection_details { + connection_id = var.source_connection_id + } + target_connection_details { + connection_id = var.target_connection_id + } +} \ No newline at end of file diff --git a/examples/stack_monitoring/metric_extensions/metric_extension.tf b/examples/stack_monitoring/metric_extensions/metric_extension.tf index 2aa5a3ac03a..909f92ec4db 100644 --- a/examples/stack_monitoring/metric_extensions/metric_extension.tf +++ b/examples/stack_monitoring/metric_extensions/metric_extension.tf @@ -56,3 +56,47 @@ data "oci_stack_monitoring_metric_extension" "test_metric_extension_example" { #Required metric_extension_id = oci_stack_monitoring_metric_extension.test_metric_extension_example.id } + +resource "oci_stack_monitoring_metric_extension" "test_metric_extension_example_http" { + #Required + compartment_id = var.compartment_ocid + name = "ME_MetricExtensionTerraformExampleHttp" + resource_type = "oracle_goldengate_admin_server" + display_name = "Golden Gate IO Read Performance" + collection_recurrences = "FREQ=MINUTELY;INTERVAL=10" + metric_list { + name = "IoReadBytes" + display_name = "IO Read Bytes" + is_dimension = false + data_type = "NUMBER" + is_hidden = true + metric_category = "AVAILABILITY" + } + metric_list { + name = "IOReadRate" + display_name = "IO Read Rate" + is_dimension = false + data_type = "NUMBER" + is_hidden = false + metric_category = "AVAILABILITY" + compute_expression = "(IoReadBytes > 0 ? (__interval == 0 ? 0 : (IoReadBytes > _IoReadBytes ? (((IoReadBytes - _IoReadBytes) / __interval) / (1024 * 1024)) : 0)) : 0)" + } + query_properties { + collection_method = "HTTP" + url = "%pm_server_url%/services/v2/mpoints/%api_process_name%/processPerformance" + response_content_type = "APPLICATION_JSON" + protocol_type = "HTTPS" + script_details { + name = "ioRead_performance.js" + content = "ZnVuY3Rpb24gcnVuTWV0aG9kKG1ldHJpY09ic2VydmF0aW9uLCBzb3VyY2VQcm9wcykKewogICAgbGV0IHJlc3BvbnNlX3JhdyA9IEpTT04ucGFyc2UobWV0cmljT2JzZXJ2YXRpb24pOwogICAgbGV0IHJlc3BvbnNlID0gcmVzcG9uc2VfcmF3LnJlc3BvbnNlOwogICAgbGV0IGlvUmVhZEJ5dGVzID0gcmVzcG9uc2VbImlvUmVhZEJ5dGVzIl07CiAgICByZXR1cm4gW1tpb1JlYWRCeXRlc11dOwp9" + } + } + #Optional + description = "Collects count of instances in 'UP' status in staging compartments from monitoring table" + publish_trigger = var.publish_trigger +} + +data "oci_stack_monitoring_metric_extension" "test_metric_extension_example_http" { + # Required + metric_extension_id = oci_stack_monitoring_metric_extension.test_metric_extension_example_http.id +} diff --git a/examples/stack_monitoring/metric_extensions_on_given_resources_management/metric_extension_on_given_resource.tf b/examples/stack_monitoring/metric_extensions_on_given_resources_management/metric_extension_on_given_resource.tf index 9dfa2ea38c8..9a518aae863 100644 --- a/examples/stack_monitoring/metric_extensions_on_given_resources_management/metric_extension_on_given_resource.tf +++ b/examples/stack_monitoring/metric_extensions_on_given_resources_management/metric_extension_on_given_resource.tf @@ -81,6 +81,7 @@ resource "oci_stack_monitoring_monitored_resource" "test_monitored_resource_enab display_name = "ResourceMetricExtEnableTerraformExample" host_name = var.stack_mon_hostname_resource1 management_agent_id = var.stack_mon_management_agent_id_resource1 + license = "ENTERPRISE_EDITION" properties { name = "osName" value = "Linux" @@ -95,7 +96,8 @@ resource "oci_stack_monitoring_monitored_resource" "test_monitored_resource_enab credentials, properties, external_id, - defined_tags] + defined_tags, + system_tags] } } diff --git a/examples/stack_monitoring/metric_extensions_test_management/metric_extension_test.tf b/examples/stack_monitoring/metric_extensions_test_management/metric_extension_test.tf index e9f73db8dca..f124a8e2a57 100644 --- a/examples/stack_monitoring/metric_extensions_test_management/metric_extension_test.tf +++ b/examples/stack_monitoring/metric_extensions_test_management/metric_extension_test.tf @@ -79,6 +79,7 @@ resource "oci_stack_monitoring_monitored_resource" "test_monitored_resource_metr display_name = "metricExtensionTestTerraformExample" host_name = var.stack_mon_hostname_resource1 management_agent_id = var.stack_mon_management_agent_id_resource1 + license = "ENTERPRISE_EDITION" properties { name = "osName" value = "Linux" @@ -93,7 +94,8 @@ resource "oci_stack_monitoring_monitored_resource" "test_monitored_resource_metr credentials, properties, external_id, - defined_tags] + defined_tags, + system_tags] } } diff --git a/examples/zips/adm.zip b/examples/zips/adm.zip index 7805e0eea97..1e845e94064 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 4a33df4d942..e0a0a0d2139 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 7f30babf970..03fdd51e0b7 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 de851df052c..843f8fdc30a 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 3b3479055e3..befa0cdfb8e 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 1dfa3f94523..071f8b6be02 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 c373ecf209c..28c924ab55d 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 4ab5fec939b..021c21f2b58 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 ddf67dc7310..08c332cb292 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 70636e8abef..ace1a45b91f 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 f3d69a154a4..b665226d06a 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 211c93cafbd..e14cd2cfc8c 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 894af780167..1aaa96874f6 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 a88e5144fd8..767ce7654c8 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 45493bf05e1..5b7f96ad55c 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 83d1d3b6764..fa56c80909f 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 5c76d681901..ea0f5ffd668 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 da4638fe845..46e91570588 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 36dcc7e0cd0..3780a6e4c5a 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 70a5ce12f0a..8f35051782d 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 90c5bf080c2..c53ddbff095 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 a79502240ad..42a9b05319c 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 a7d65c53f53..0430480aca7 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 cec0ca2761d..c7644668b19 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 4ef4262c099..a1aa4d46acf 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 d081c2e40e7..4b273798997 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 b7774d363ae..dbcde92a7d5 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 6a63881e546..a99eb0e747f 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 7d5ca6d6cee..51f5b27c928 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 d4736c7fdaf..8fd1028f36a 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 2d48ab1eb51..866d5655df7 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 8c80913838e..99c07af6c8c 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 536833fb789..6571bf9d01c 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 a782df161a6..8d172ccc105 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 f59abbd1c3c..d153d5e8aa2 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 97d81ac6995..f602cea6583 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 dabc7fe444f..e4adc394444 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 5dffa326ee1..560e1d35531 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 e743c85d251..fd0e8777696 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 eea64e79a09..7a1042010d6 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 045f0df72d5..9390a90fb8b 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 cd95e3742df..11a308ff85f 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 f912c830861..cc0a47d9111 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 a4a4cd6d29f..19885848647 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 cd03ba1c83f..f877696bdf1 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 1b935f0f2ba..2163edf5358 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 f2a293c8e53..80c3a6df4e1 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 ad7a89fddcf..d49fac5ce86 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 09a131bd2eb..f5d5a9a1777 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 61c5f745d80..78c2d9766dd 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 7ffe659480f..3a202de6d05 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 1309307aa1f..759f94f2f24 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 15e999188b3..cd961dc73d1 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 5c675547bcd..c7caa8f6a64 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 2faf55f2050..0bf38b826fe 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 46e46c4bc73..a6ff8803dcd 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 f96e5d80457..81d733f02fc 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 ef13de816c2..c1729307a8a 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 4f20eac56bb..8745580bbdd 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 9991bf45887..4116b247e84 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 f20c97df31a..4c7b6b8780e 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 83dd14d438e..f3bb6f89f43 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 7dde1c65b5d..1dd26ed7764 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 1d8b9b92533..8950b893d1c 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 1eabd5f39e0..0cc1d2d0f9d 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 f22edfdd2b3..33fba588308 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 a48415e71a6..3182fbd2e89 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 986910723f1..02648dc68a8 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 0a0d0cc5517..718e83f8c3b 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 4715ef103a9..5ddfde33d6c 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 9efaf9e74dc..28e440c9058 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 ec805c1510d..6a6c5814529 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 f4aebd30e9e..0df529a6cae 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 647bece64a8..34c3898f924 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 02452ddde48..4f0b3f30da7 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 e2d7604a2b7..310a5de3d28 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 91e62d69599..e2db26957c5 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 6d5f2bc4d03..5d1d46461db 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 c388dfc213b..9f656550cd3 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 af1715a4005..277868b8d1e 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 e90bc37afd2..dd0121a966f 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 ce1978cbdc3..ac246b3e200 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 584987a68a4..3ad57d5d40e 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 a9a2de76a86..05c5c8ed08f 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 7276a7b0d13..ad8c5f6465e 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 b84396bc0eb..cbd0ba8343e 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 f013b7e4d02..824d2a4d292 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 1eec8a83bd8..1c174dbf04c 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 c65685afa01..458dda552c0 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 a59013f1784..9b222017de8 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 9d554d37668..f8687aec06d 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 a27fdd86992..98a6d9ae364 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 db8c2acae02..47a4d6b8a8b 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 db6b519c2b1..885cf33377f 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 1966f95dea2..907157605d1 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 726dccf5564..751ee4ec650 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 644e03ec86a..3651ad34cc2 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 3e16eb22019..fbebd14c6a5 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 b9b3245e535..60b13b9827b 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 bbd12f869d3..d63ae974911 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 cb70a879bb8..9b4d68aafcd 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 f08648d145e..fcc4ad042a6 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 1669fef4ed0..042257e22b7 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 deb9ce3914b..fcf1eb02378 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 915b73d50b2..cb318a8a199 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 3f5675c37ec..272168a4f65 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 1a81e5cd6de..97a52345180 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 9d9f08653c9..4ef08c4bf9d 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 9f719a24c61..fdafa567b7a 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 7e2dab2ff25..49027b2a399 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 49f818613f2..9fe17842a0e 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 643f2eb3473..af88d9ee424 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 667b079fa7e..8f925002057 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 972399616ce..49a825da580 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 fdb9b3d45f7..f5a911f0674 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 3a8e7121f5d..6e1fd0ba544 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 0ed47c26d8e..f866f5cdfb2 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 32e3adc52ac..99b38252f48 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 5a10c800549..cd5870a449c 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 ff121ce8856..6f9b414f201 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 db463a40536..7f8270afe5b 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 bc4ca0a793f..40042e14d82 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 f4c376e8319..0c810f74b13 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 f5c790f53ca..3f39afab6ef 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 d11686b3e7c..fe7cc0a15aa 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 678588ecbf9..8758bcb25d2 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 97cbbd03155..aed6d8c90a5 100644 Binary files a/examples/zips/zpr.zip and b/examples/zips/zpr.zip differ diff --git a/go.mod b/go.mod index 44426c1d0a1..fe97d16728b 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.76.0 + github.com/oracle/oci-go-sdk/v65 v65.81.1 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.76.0 => ./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..d01f085556a 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.81.1 h1:JYc47bk8n/MUchA2KHu1ggsCQzlJZQLJ+tTKfOho00E= +github.com/oracle/oci-go-sdk/v65 v65.81.1/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 b875de40be8..6ac1cc901a9 100644 --- a/internal/globalvar/version.go +++ b/internal/globalvar/version.go @@ -7,9 +7,9 @@ import ( "log" ) -const Version = "6.20.0" +const Version = "6.21.0" -const ReleaseDate = "2024-12-11" +const ReleaseDate = "2024-12-22" func PrintVersion() { log.Printf("[INFO] terraform-provider-oci %s\n", Version) diff --git a/internal/integrationtest/bds_bds_cluster_version_test.go b/internal/integrationtest/bds_bds_cluster_version_test.go new file mode 100644 index 00000000000..6d81350b52e --- /dev/null +++ b/internal/integrationtest/bds_bds_cluster_version_test.go @@ -0,0 +1,52 @@ +// 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 ( + BdsBdsClusterVersionDataSourceRepresentation = map[string]interface{}{} + + BdsBdsClusterVersionResourceConfig = "" +) + +// issue-routing-tag: bds/default +func TestBdsBdsClusterVersionResource_basic(t *testing.T) { + httpreplay.SetScenario("TestBdsBdsClusterVersionResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + datasourceName := "data.oci_bds_bds_cluster_versions.test_bds_cluster_versions" + + acctest.SaveConfigContent("", "", "", t) + + acctest.ResourceTest(t, nil, []resource.TestStep{ + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_bds_bds_cluster_versions", "test_bds_cluster_versions", acctest.Required, acctest.Create, BdsBdsClusterVersionDataSourceRepresentation) + + compartmentIdVariableStr + BdsBdsClusterVersionResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + + resource.TestCheckResourceAttrSet(datasourceName, "bds_cluster_versions.#"), + resource.TestCheckResourceAttrSet(datasourceName, "bds_cluster_versions.0.bds_version"), + resource.TestCheckResourceAttrSet(datasourceName, "bds_cluster_versions.0.odh_version"), + ), + }, + }) +} diff --git a/internal/integrationtest/bds_bds_instance_api_key_test.go b/internal/integrationtest/bds_bds_instance_api_key_test.go index 7c22b56f0d3..1d190f4ade1 100644 --- a/internal/integrationtest/bds_bds_instance_api_key_test.go +++ b/internal/integrationtest/bds_bds_instance_api_key_test.go @@ -34,32 +34,36 @@ var ( BdsBdsbdsInstanceApiKeySingularDataSourceRepresentation = map[string]interface{}{ "api_key_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance_api_key.test_bds_instance_api_key.id}`}, - "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${var.bdsinstance_id}`}, } BdsBdsbdsInstanceApiKeyDataSourceRepresentation = map[string]interface{}{ - "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, - // "display_name": Representation{RepType: Optional, Create: `keyAlias`}, - "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, - // "user_id": Representation{RepType: Optional, Create: `${oci_identity_user.test_user.id}`}, - "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: BdsbdsInstanceApiKeyDataSourceFilterRepresentation}} + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${var.bdsinstance_id}`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: BdsbdsInstanceApiKeyDataSourceFilterRepresentation}} BdsbdsInstanceApiKeyDataSourceFilterRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_bds_bds_instance_api_key.test_bds_instance_api_key.id}`}}, } + BdsbdsInstanceApiKeyRequiredRepresentation = map[string]interface{}{ + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${var.bdsinstance_id}`}, + "key_alias": acctest.Representation{RepType: acctest.Required, Create: `keyAlias`}, + "passphrase": acctest.Representation{RepType: acctest.Required, Create: `V2VsY29tZTFA`}, + "user_id": acctest.Representation{RepType: acctest.Required, Create: `${var.user_id}`}, + "default_region": acctest.Representation{RepType: acctest.Optional, Create: `us-ashburn-1`}, + "domain_ocid": acctest.Representation{RepType: acctest.Optional, Create: `${var.domain_ocid}`}, + } BdsbdsInstanceApiKeyRepresentation = map[string]interface{}{ - "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${var.bdsinstance_id}`}, "key_alias": acctest.Representation{RepType: acctest.Required, Create: `keyAlias`}, - "passphrase": acctest.Representation{RepType: acctest.Required, Create: `V2VsY29tZTE=`}, - "user_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_identity_user.test_user.id}`}, + "passphrase": acctest.Representation{RepType: acctest.Required, Create: `V2VsY29tZTFA`}, + "user_id": acctest.Representation{RepType: acctest.Required, Create: `${var.user_id}`}, "default_region": acctest.Representation{RepType: acctest.Optional, Create: `us-ashburn-1`}, + "domain_ocid": acctest.Representation{RepType: acctest.Optional, Create: `${var.domain_ocid}`}, } - BdsBdsInstanceApiKeyResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Required, acctest.Create, bdsInstanceOdhRepresentation) + - acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + - acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) + - acctest.GenerateResourceFromRepresentationMap("oci_identity_user", "test_user", acctest.Required, acctest.Create, IdentityUserRepresentation) + BdsBdsInstanceApiKeyResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Required, acctest.Create, bdsInstanceOdhRepresentation) ) // issue-routing-tag: bds/default @@ -72,6 +76,15 @@ func TestBdsBdsInstanceApiKeyResource_basic(t *testing.T) { compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + bdsinstanceId := utils.GetEnvSettingWithBlankDefault("bdsinstance_ocid") + bdsinstanceIdVariableStr := fmt.Sprintf("variable \"bdsinstance_id\" { default = \"%s\" }\n", bdsinstanceId) + + userId := utils.GetEnvSettingWithBlankDefault("user_ocid") + userIdVariableStr := fmt.Sprintf("variable \"user_id\" { default = \"%s\" }\n", userId) + + domainOcid := utils.GetEnvSettingWithBlankDefault("domain_ocid") + domainOcidVariableStr := fmt.Sprintf("variable \"domain_ocid\" { default = \"%s\" }\n", domainOcid) + resourceName := "oci_bds_bds_instance_api_key.test_bds_instance_api_key" datasourceName := "data.oci_bds_bds_instance_api_keys.test_bds_instance_api_keys" singularDatasourceName := "data.oci_bds_bds_instance_api_key.test_bds_instance_api_key" @@ -84,35 +97,32 @@ func TestBdsBdsInstanceApiKeyResource_basic(t *testing.T) { acctest.ResourceTest(t, testAccCheckBdsBdsInstanceApiKeyDestroy, []resource.TestStep{ // verify Create { - Config: config + compartmentIdVariableStr + BdsBdsInstanceApiKeyResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_api_key", "test_bds_instance_api_key", acctest.Required, acctest.Create, BdsbdsInstanceApiKeyRepresentation), + Config: config + compartmentIdVariableStr + bdsinstanceIdVariableStr + userIdVariableStr + domainOcidVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_api_key", "test_bds_instance_api_key", acctest.Required, acctest.Create, BdsbdsInstanceApiKeyRequiredRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "bds_instance_id"), resource.TestCheckResourceAttr(resourceName, "key_alias", "keyAlias"), - resource.TestCheckResourceAttr(resourceName, "passphrase", "V2VsY29tZTE="), + resource.TestCheckResourceAttr(resourceName, "passphrase", "V2VsY29tZTFA"), resource.TestCheckResourceAttrSet(resourceName, "user_id"), ), }, // delete before next Create { - Config: config + compartmentIdVariableStr + BdsBdsInstanceApiKeyResourceDependencies, + Config: config + compartmentIdVariableStr, }, // verify Create with optionals { - Config: config + compartmentIdVariableStr + BdsBdsInstanceApiKeyResourceDependencies + + Config: config + compartmentIdVariableStr + bdsinstanceIdVariableStr + userIdVariableStr + domainOcidVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_api_key", "test_bds_instance_api_key", acctest.Optional, acctest.Create, BdsbdsInstanceApiKeyRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "bds_instance_id"), resource.TestCheckResourceAttr(resourceName, "default_region", "us-ashburn-1"), + resource.TestCheckResourceAttrSet(resourceName, "domain_ocid"), resource.TestCheckResourceAttrSet(resourceName, "fingerprint"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "key_alias", "keyAlias"), - resource.TestCheckResourceAttr(resourceName, "passphrase", "V2VsY29tZTE="), - resource.TestCheckResourceAttrSet(resourceName, "pemfilepath"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "tenant_id"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttr(resourceName, "passphrase", "V2VsY29tZTFA"), resource.TestCheckResourceAttrSet(resourceName, "user_id"), func(s *terraform.State) (err error) { @@ -131,14 +141,13 @@ func TestBdsBdsInstanceApiKeyResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_bds_bds_instance_api_keys", "test_bds_instance_api_keys", acctest.Optional, acctest.Update, BdsBdsbdsInstanceApiKeyDataSourceRepresentation) + - compartmentIdVariableStr + BdsBdsInstanceApiKeyResourceDependencies + + compartmentIdVariableStr + bdsinstanceIdVariableStr + userIdVariableStr + domainOcidVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_api_key", "test_bds_instance_api_key", acctest.Optional, acctest.Update, BdsbdsInstanceApiKeyRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(datasourceName, "bds_instance_id"), - // resource.TestCheckResourceAttr(datasourceName, "display_name", "keyAlias"), + // resource.TestCheckResourceAttr(datasourceName, "display_name", "keyAlias"), resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), - // resource.TestCheckResourceAttrSet(datasourceName, "user_id"), - + // resource.TestCheckResourceAttrSet(datasourceName, "user_id"), resource.TestCheckResourceAttr(datasourceName, "bds_api_keys.#", "1"), resource.TestCheckResourceAttr(datasourceName, "bds_api_keys.0.default_region", "us-ashburn-1"), resource.TestCheckResourceAttrSet(datasourceName, "bds_api_keys.0.id"), @@ -151,12 +160,13 @@ func TestBdsBdsInstanceApiKeyResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_bds_bds_instance_api_key", "test_bds_instance_api_key", acctest.Required, acctest.Create, BdsBdsbdsInstanceApiKeySingularDataSourceRepresentation) + - compartmentIdVariableStr + BdsBdsInstanceApiKeyResourceConfig, + compartmentIdVariableStr + bdsinstanceIdVariableStr + userIdVariableStr + domainOcidVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_api_key", "test_bds_instance_api_key", acctest.Optional, acctest.Update, BdsbdsInstanceApiKeyRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "api_key_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "bds_instance_id"), - resource.TestCheckResourceAttr(singularDatasourceName, "default_region", "us-ashburn-1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "domain_ocid"), resource.TestCheckResourceAttrSet(singularDatasourceName, "fingerprint"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttr(singularDatasourceName, "key_alias", "keyAlias"), diff --git a/internal/integrationtest/bds_bds_instance_identity_configuration_test.go b/internal/integrationtest/bds_bds_instance_identity_configuration_test.go new file mode 100644 index 00000000000..ca31da4f8b6 --- /dev/null +++ b/internal/integrationtest/bds_bds_instance_identity_configuration_test.go @@ -0,0 +1,393 @@ +// 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/resourcediscovery" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + oci_bds "github.com/oracle/oci-go-sdk/v65/bds" + "github.com/oracle/oci-go-sdk/v65/common" + + "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/tfresource" + "github.com/oracle/terraform-provider-oci/internal/utils" +) + +var ( + NamespaceSingularDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`}, + } + BdsBdsInstanceIdentityConfigurationRequiredOnlyResource = BdsBdsInstanceIdentityConfigurationResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Required, acctest.Create, BdsBdsInstanceIdentityConfigurationRepresentation) + + BdsBdsInstanceIdentityConfigurationResourceConfig = BdsBdsInstanceIdentityConfigurationResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Optional, acctest.Update, BdsBdsInstanceIdentityConfigurationRepresentation) + + BdsBdsInstanceIdentityConfigurationSingularDataSourceRepresentation = map[string]interface{}{ + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, + "identity_configuration_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance_identity_configuration.test_bds_instance_identity_configuration.id}`}, + } + + BdsBdsInstanceIdentityConfigurationDataSourceRepresentation = map[string]interface{}{ + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `identityDomainConfig`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: BdsBdsInstanceIdentityConfigurationDataSourceFilterRepresentation}} + BdsBdsInstanceIdentityConfigurationDataSourceFilterRepresentation = map[string]interface{}{ + "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, + "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_bds_bds_instance_identity_configuration.test_bds_instance_identity_configuration.id}`}}, + } + + BdsBdsInstanceIdentityConfigurationRepresentation = map[string]interface{}{ + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, + "cluster_admin_password": acctest.Representation{RepType: acctest.Required, Create: `T3JhY2xlVGVhbVVTQSExMjM=`}, + "confidential_application_id": acctest.Representation{RepType: acctest.Required, Create: `674459b3af89486da22ec1d2da61708f`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `identityDomainConfig`}, + "identity_domain_id": acctest.Representation{RepType: acctest.Required, Create: `${var.identity_domain_id}`}, + "iam_user_sync_configuration_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: BdsBdsInstanceIdentityConfigurationIamUserSyncConfigurationDetailsRepresentation}, + "upst_configuration_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: BdsBdsInstanceIdentityConfigurationUpstConfigurationDetailsRepresentation}, + "activate_iam_user_sync_configuration_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "activate_upst_configuration_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "refresh_confidential_application_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "refresh_upst_token_exchange_keytab_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + } + BdsBdsInstanceIdentityConfigurationIamUserSyncConfigurationDetailsRepresentation = map[string]interface{}{ + "is_posix_attributes_addition_required": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + } + BdsBdsInstanceIdentityConfigurationUpstConfigurationDetailsRepresentation = map[string]interface{}{ + "master_encryption_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.master_encryption_key_id}`}, + "vault_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.vault_id}`}, + } + + BdsBdsInstanceIdentityConfigurationResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Create, bdsInstanceOdhRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) +) + +// issue-routing-tag: bds/default +func TestBdsBdsInstanceIdentityConfigurationResource_basic(t *testing.T) { + httpreplay.SetScenario("TestBdsBdsInstanceIdentityConfigurationResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + subnetId := utils.GetEnvSettingWithBlankDefault("subnet_ocid") + subnetIdVariableStr := fmt.Sprintf("variable \"subnet_id\" { default = \"%s\" }\n", subnetId) + + identityDomainId := utils.GetEnvSettingWithBlankDefault("identity_domain_ocid") + identityDomainIdVariableStr := fmt.Sprintf("variable \"identity_domain_id\" { default = \"%s\" }\n", identityDomainId) + + vaultId := utils.GetEnvSettingWithBlankDefault("vault_ocid") + vaultIdVariableStr := fmt.Sprintf("variable \"vault_id\" { default = \"%s\" }\n", vaultId) + + masterEncryptionKeyId := utils.GetEnvSettingWithBlankDefault("master_encryption_key_ocid") + masterEncryptionKeyIdVariableStr := fmt.Sprintf("variable \"master_encryption_key_id\" { default = \"%s\" }\n", masterEncryptionKeyId) + + resourceName := "oci_bds_bds_instance_identity_configuration.test_bds_instance_identity_configuration" + datasourceName := "data.oci_bds_bds_instance_identity_configurations.test_bds_instance_identity_configurations" + singularDatasourceName := "data.oci_bds_bds_instance_identity_configuration.test_bds_instance_identity_configuration" + + var resId, resId2 string + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+subnetIdVariableStr+BdsBdsInstanceIdentityConfigurationResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Optional, acctest.Create, BdsBdsInstanceIdentityConfigurationRepresentation), "bds", "bdsInstanceIdentityConfiguration", t) + //fmt.Printf(config + compartmentIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Optional, acctest.Update, BdsBdsInstanceIdentityConfigurationRepresentation)) + acctest.ResourceTest(t, testAccCheckBdsBdsInstanceIdentityConfigurationDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + identityDomainIdVariableStr + vaultIdVariableStr + masterEncryptionKeyIdVariableStr + BdsBdsInstanceIdentityConfigurationResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Required, acctest.Create, BdsBdsInstanceIdentityConfigurationRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "bds_instance_id"), + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), + resource.TestCheckResourceAttrSet(resourceName, "confidential_application_id"), + resource.TestCheckResourceAttr(resourceName, "display_name", "identityDomainConfig"), + resource.TestCheckResourceAttrSet(resourceName, "identity_domain_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + BdsBdsInstanceIdentityConfigurationResourceDependencies, + }, + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + identityDomainIdVariableStr + vaultIdVariableStr + masterEncryptionKeyIdVariableStr + BdsBdsInstanceIdentityConfigurationResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Optional, acctest.Create, BdsBdsInstanceIdentityConfigurationRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "bds_instance_id"), + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), + resource.TestCheckResourceAttrSet(resourceName, "confidential_application_id"), + resource.TestCheckResourceAttr(resourceName, "display_name", "identityDomainConfig"), + resource.TestCheckResourceAttr(resourceName, "iam_user_sync_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "iam_user_sync_configuration_details.0.is_posix_attributes_addition_required", "false"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "identity_domain_id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + resource.TestCheckResourceAttr(resourceName, "upst_configuration_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "upst_configuration_details.0.master_encryption_key_id"), + resource.TestCheckResourceAttrSet(resourceName, "upst_configuration_details.0.vault_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + subnetIdVariableStr + identityDomainIdVariableStr + vaultIdVariableStr + masterEncryptionKeyIdVariableStr + BdsBdsInstanceIdentityConfigurationResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Optional, acctest.Update, BdsBdsInstanceIdentityConfigurationRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "bds_instance_id"), + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), + resource.TestCheckResourceAttrSet(resourceName, "confidential_application_id"), + resource.TestCheckResourceAttr(resourceName, "display_name", "identityDomainConfig"), + resource.TestCheckResourceAttr(resourceName, "iam_user_sync_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "iam_user_sync_configuration_details.0.is_posix_attributes_addition_required", "true"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "identity_domain_id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + resource.TestCheckResourceAttr(resourceName, "upst_configuration_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "upst_configuration_details.0.master_encryption_key_id"), + resource.TestCheckResourceAttrSet(resourceName, "upst_configuration_details.0.vault_id"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_bds_bds_instance_identity_configurations", "test_bds_instance_identity_configurations", acctest.Optional, acctest.Update, BdsBdsInstanceIdentityConfigurationDataSourceRepresentation) + + compartmentIdVariableStr + subnetIdVariableStr + identityDomainIdVariableStr + vaultIdVariableStr + masterEncryptionKeyIdVariableStr + BdsBdsInstanceIdentityConfigurationResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Optional, acctest.Update, BdsBdsInstanceIdentityConfigurationRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(datasourceName, "bds_instance_id"), + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "display_name", "identityDomainConfig"), + resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), + + resource.TestCheckResourceAttr(datasourceName, "identity_configurations.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "identity_configurations.0.display_name", "identityDomainConfig"), + resource.TestCheckResourceAttrSet(datasourceName, "identity_configurations.0.id"), + resource.TestCheckResourceAttrSet(datasourceName, "identity_configurations.0.state"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_bds_bds_instance_identity_configuration", "test_bds_instance_identity_configuration", acctest.Required, acctest.Create, BdsBdsInstanceIdentityConfigurationSingularDataSourceRepresentation) + + compartmentIdVariableStr + subnetIdVariableStr + identityDomainIdVariableStr + vaultIdVariableStr + masterEncryptionKeyIdVariableStr + BdsBdsInstanceIdentityConfigurationResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "bds_instance_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "identity_configuration_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "identityDomainConfig"), + resource.TestCheckResourceAttr(singularDatasourceName, "iam_user_sync_configuration.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + resource.TestCheckResourceAttr(singularDatasourceName, "upst_configuration.#", "1"), + ), + }, + // verify resource import + { + Config: config + BdsBdsInstanceIdentityConfigurationRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: getBdsIdentityConfigurationCompositeId(resourceName), + ImportStateVerifyIgnore: []string{ + "cluster_admin_password", + "iam_user_sync_configuration_details", + "upst_configuration_details", + "activate_iam_user_sync_configuration_trigger", + "activate_upst_configuration_trigger", + "refresh_confidential_application_trigger", + "refresh_upst_token_exchange_keytab_trigger", + }, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckBdsBdsInstanceIdentityConfigurationDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).BdsClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_bds_bds_instance_identity_configuration" { + noResourceFound = false + request := oci_bds.GetIdentityConfigurationRequest{} + + if value, ok := rs.Primary.Attributes["bds_instance_id"]; ok { + request.BdsInstanceId = &value + } + + if value, ok := rs.Primary.Attributes["id"]; ok { + request.IdentityConfigurationId = &value + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "bds") + + response, err := client.GetIdentityConfiguration(context.Background(), request) + + if err == nil { + deletedLifecycleStates := map[string]bool{ + string(oci_bds.IdentityConfigurationLifecycleStateDeleted): 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("BdsBdsInstanceIdentityConfiguration") { + resource.AddTestSweepers("BdsBdsInstanceIdentityConfiguration", &resource.Sweeper{ + Name: "BdsBdsInstanceIdentityConfiguration", + Dependencies: acctest.DependencyGraph["bdsInstanceIdentityConfiguration"], + F: sweepBdsBdsInstanceIdentityConfigurationResource, + }) + } +} + +func sweepBdsBdsInstanceIdentityConfigurationResource(compartment string) error { + bdsClient := acctest.GetTestClients(&schema.ResourceData{}).BdsClient() + bdsInstanceIdentityConfigurationIds, err := getBdsBdsInstanceIdentityConfigurationIds(compartment) + if err != nil { + return err + } + for _, bdsInstanceIdentityConfigurationId := range bdsInstanceIdentityConfigurationIds { + if ok := acctest.SweeperDefaultResourceId[bdsInstanceIdentityConfigurationId]; !ok { + deleteIdentityConfigurationRequest := oci_bds.DeleteIdentityConfigurationRequest{} + + deleteIdentityConfigurationRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "bds") + _, error := bdsClient.DeleteIdentityConfiguration(context.Background(), deleteIdentityConfigurationRequest) + if error != nil { + fmt.Printf("Error deleting BdsInstanceIdentityConfiguration %s %s, It is possible that the resource is already deleted. Please verify manually \n", bdsInstanceIdentityConfigurationId, error) + continue + } + acctest.WaitTillCondition(acctest.TestAccProvider, &bdsInstanceIdentityConfigurationId, BdsBdsInstanceIdentityConfigurationSweepWaitCondition, time.Duration(3*time.Minute), + BdsBdsInstanceIdentityConfigurationSweepResponseFetchOperation, "bds", true) + } + } + return nil +} + +func getBdsBdsInstanceIdentityConfigurationIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "BdsInstanceIdentityConfigurationId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + bdsClient := acctest.GetTestClients(&schema.ResourceData{}).BdsClient() + + listIdentityConfigurationsRequest := oci_bds.ListIdentityConfigurationsRequest{} + listIdentityConfigurationsRequest.CompartmentId = &compartmentId + + bdsInstanceIds, error := getBdsInstanceIds(compartment) + if error != nil { + return resourceIds, fmt.Errorf("Error getting bdsInstanceId required for BdsInstanceIdentityConfiguration resource requests \n") + } + for _, bdsInstanceId := range bdsInstanceIds { + listIdentityConfigurationsRequest.BdsInstanceId = &bdsInstanceId + + listIdentityConfigurationsRequest.LifecycleState = oci_bds.IdentityConfigurationLifecycleStateActive + listIdentityConfigurationsResponse, err := bdsClient.ListIdentityConfigurations(context.Background(), listIdentityConfigurationsRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting BdsInstanceIdentityConfiguration list for compartment id : %s , %s \n", compartmentId, err) + } + for _, bdsInstanceIdentityConfiguration := range listIdentityConfigurationsResponse.Items { + id := *bdsInstanceIdentityConfiguration.Id + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "BdsInstanceIdentityConfigurationId", id) + } + + } + return resourceIds, nil +} + +func BdsBdsInstanceIdentityConfigurationSweepWaitCondition(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 bdsInstanceIdentityConfigurationResponse, ok := response.Response.(oci_bds.GetIdentityConfigurationResponse); ok { + return bdsInstanceIdentityConfigurationResponse.LifecycleState != oci_bds.IdentityConfigurationLifecycleStateDeleted + } + return false +} + +func BdsBdsInstanceIdentityConfigurationSweepResponseFetchOperation(client *tf_client.OracleClients, resourceId *string, retryPolicy *common.RetryPolicy) error { + _, err := client.BdsClient().GetIdentityConfiguration(context.Background(), oci_bds.GetIdentityConfigurationRequest{RequestMetadata: common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + return err +} + +func getBdsIdentityConfigurationCompositeId(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("not found: %s", resourceName) + } + + return fmt.Sprintf("bdsInstances/%s/identityConfigurations/%s", rs.Primary.Attributes["bds_instance_id"], rs.Primary.Attributes["id"]), nil + } +} diff --git a/internal/integrationtest/bds_bds_instance_patch_action_test.go b/internal/integrationtest/bds_bds_instance_patch_action_test.go index f860b103047..0dca84e76de 100644 --- a/internal/integrationtest/bds_bds_instance_patch_action_test.go +++ b/internal/integrationtest/bds_bds_instance_patch_action_test.go @@ -8,32 +8,31 @@ import ( "strconv" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/oracle/terraform-provider-oci/httpreplay" "github.com/oracle/terraform-provider-oci/internal/acctest" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" "github.com/oracle/terraform-provider-oci/internal/utils" ) var ( - //BdsBdsInstancePatchActionRequiredOnlyResource = BdsBdsInstancePatchActionResourceDependencies + - //acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_patch_action", "test_bds_instance_patch_action", acctest.Required, acctest.Create, BdsBdsInstancePatchActionRepresentation) - BdsBdsInstancePatchActionRepresentation = map[string]interface{}{ - "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`}, - "cluster_admin_password": acctest.Representation{RepType: acctest.Required, Create: `clusterAdminPassword`}, - "version": acctest.Representation{RepType: acctest.Required, Create: `version`}, + "bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${var.bdsinstance_id}`}, + "cluster_admin_password": acctest.Representation{RepType: acctest.Required, Create: `T3JhY2xlVGVhbVVTQSExMjM=`}, + "version": acctest.Representation{RepType: acctest.Required, Create: `ODH-2.0.10.7-branch-ODH2-102024-7.tar.gz`}, "patching_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: BdsBdsInstancePatchActionPatchingConfigRepresentation}, "timeouts": acctest.RepresentationGroup{RepType: acctest.Required, Group: PatchTimeoutsRepresentation}, } + BdsBdsInstancePatchActionPatchingConfigRepresentation = map[string]interface{}{ - "patching_config_strategy": acctest.Representation{RepType: acctest.Required, Create: `DOWNTIME_BASED`}, - "batch_size": acctest.Representation{RepType: acctest.Required, Create: `3`}, - "wait_time_between_batch_in_seconds": acctest.Representation{RepType: acctest.Required, Create: `600`}, - "wait_time_between_domain_in_seconds": acctest.Representation{RepType: acctest.Required, Create: `600`}, + "patching_config_strategy": acctest.Representation{RepType: acctest.Required, Create: `DOMAIN_BASED`}, + "tolerance_threshold_per_batch": acctest.Representation{RepType: acctest.Optional, Create: `1`}, + "tolerance_threshold_per_domain": acctest.Representation{RepType: acctest.Optional, Create: `1`}, + "batch_size": acctest.Representation{RepType: acctest.Required, Create: `5`}, + "wait_time_between_batch_in_seconds": acctest.Representation{RepType: acctest.Required, Create: `0`}, + "wait_time_between_domain_in_seconds": acctest.Representation{RepType: acctest.Required, Create: `0`}, } PatchTimeoutsRepresentation = map[string]interface{}{ @@ -41,10 +40,6 @@ var ( "update": acctest.Representation{RepType: acctest.Required, Create: `24h`}, "delete": acctest.Representation{RepType: acctest.Required, Create: `24h`}, } - - BdsBdsInstancePatchActionResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Required, acctest.Create, bdsInstanceOdhRepresentation) + - acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + - acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) ) // issue-routing-tag: bds/default @@ -58,6 +53,9 @@ func TestBdsBdsInstancePatchActionResource_basic(t *testing.T) { compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + bdsinstanceId := utils.GetEnvSettingWithBlankDefault("bdsinstance_ocid") + bdsinstanceIdVariableStr := fmt.Sprintf("variable \"bdsinstance_id\" { default = \"%s\" }\n", bdsinstanceId) + resourceName := "oci_bds_bds_instance_patch_action.test_bds_instance_patch_action" var resId string @@ -68,32 +66,22 @@ func TestBdsBdsInstancePatchActionResource_basic(t *testing.T) { acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_patch_action", "test_bds_instance_patch_action", acctest.Optional, acctest.Create, BdsBdsInstancePatchActionRepresentation), "bds", "bdsInstancePatchAction", t) acctest.ResourceTest(t, nil, []resource.TestStep{ - // verify Create - { - Config: config + compartmentIdVariableStr + - acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_patch_action", "test_bds_instance_patch_action", acctest.Required, acctest.Create, BdsBdsInstancePatchActionRepresentation), - Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttrSet(resourceName, "bds_instance_id"), - ), - }, - // delete before next Create - { - Config: config + compartmentIdVariableStr + BdsBdsInstancePatchActionResourceDependencies, - }, - // verify Create with optionals + // verify Create { - Config: config + compartmentIdVariableStr + BdsBdsInstancePatchActionResourceDependencies + + Config: config + compartmentIdVariableStr + bdsinstanceIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance_patch_action", "test_bds_instance_patch_action", acctest.Optional, acctest.Create, BdsBdsInstancePatchActionRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "bds_instance_id"), - resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "clusterAdminPassword"), + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttr(resourceName, "patching_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "patching_config.0.batch_size", "3"), - resource.TestCheckResourceAttr(resourceName, "patching_config.0.patching_config_strategy", "DOWNTIME_BASED"), - resource.TestCheckResourceAttr(resourceName, "patching_config.0.wait_time_between_batch_in_seconds", "600"), - resource.TestCheckResourceAttr(resourceName, "patching_config.0.wait_time_between_domain_in_seconds", "600"), - resource.TestCheckResourceAttr(resourceName, "version", "version"), + resource.TestCheckResourceAttr(resourceName, "patching_config.0.batch_size", "5"), + resource.TestCheckResourceAttr(resourceName, "patching_config.0.patching_config_strategy", "DOMAIN_BASED"), + resource.TestCheckResourceAttr(resourceName, "patching_config.0.tolerance_threshold_per_batch", "1"), + resource.TestCheckResourceAttr(resourceName, "patching_config.0.tolerance_threshold_per_domain", "1"), + resource.TestCheckResourceAttr(resourceName, "patching_config.0.wait_time_between_batch_in_seconds", "0"), + resource.TestCheckResourceAttr(resourceName, "patching_config.0.wait_time_between_domain_in_seconds", "0"), + resource.TestCheckResourceAttr(resourceName, "version", "ODH-2.0.10.7-branch-ODH2-102024-7.tar.gz"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") diff --git a/internal/integrationtest/bds_odh_instance_resource_test.go b/internal/integrationtest/bds_odh_instance_resource_test.go index d3e7e058f47..99dd05c6bde 100644 --- a/internal/integrationtest/bds_odh_instance_resource_test.go +++ b/internal/integrationtest/bds_odh_instance_resource_test.go @@ -59,27 +59,24 @@ var ( "block_volume_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `150`}, "number_of_nodes": acctest.Representation{RepType: acctest.Required, Create: `3`, Update: `4`}, } - BdsBdsInstanceNetworkConfigRepresentation = map[string]interface{}{ - "cidr_block": acctest.Representation{RepType: acctest.Optional, Create: `111.112.0.0/16`}, - "is_nat_gateway_required": acctest.Representation{RepType: acctest.Optional, Create: `true`}, - } bdsInstanceOdhRepresentation = map[string]interface{}{ - "cluster_admin_password": acctest.Representation{RepType: acctest.Required, Create: `T3JhY2xlVGVhbVVTQSExMjM=`}, - "cluster_public_key": acctest.Representation{RepType: acctest.Required, Create: `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpUa4zUZKyU3AkW9yoJTBDO550wpWZOXdHswfRq75gbJ2ZYlMtifvwiO3qUL/RIZSC6e1wA5OL2LQ97UaHrLLPXgjvKGVIDRHqPkzTOayjJ4ZA7NPNhcu6f/OxhKkCYF3TAQObhMJmUSMrWSUeufaRIujDz1HHqazxOgFk09fj4i2dcGnfPcm32t8a9MzlsHSmgexYCUwxGisuuWTsnMgxbqsj6DaY51l+SEPi5tf10iFmUWqziF0eKDDQ/jHkwLJ8wgBJef9FSOmwJReHcBY+NviwFTatGj7Cwtnks6CVomsFD+rAMJ9uzM8SCv5agYunx07hnEXbR9r/TXqgXGfN bdsclusterkey@oracleoci.com`}, - "cluster_version": acctest.Representation{RepType: acctest.Required, Create: `ODH1`}, - "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, - "display_name": acctest.Representation{RepType: acctest.Required, Create: `displayName`, Update: `displayName2`}, - "is_high_availability": acctest.Representation{RepType: acctest.Required, Create: `true`}, - "is_secure": acctest.Representation{RepType: acctest.Required, Create: `true`}, - "cluster_profile": acctest.Representation{RepType: acctest.Optional, Create: `HADOOP`}, - "kerberos_realm_name": acctest.Representation{RepType: acctest.Optional, Create: `BDSCLOUDSERVICE.ORACLE.COM`}, - "master_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, - "util_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, - "worker_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodesOdhWorkerRepresentation}, - "bootstrap_script_url": acctest.Representation{RepType: acctest.Optional, Create: `${var.bootstrap_script_url}`, Update: `${var.bootstrap_script_urlU}`}, - "compute_only_worker_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, - "edge_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, + "cluster_admin_password": acctest.Representation{RepType: acctest.Required, Create: `T3JhY2xlVGVhbVVTQSExMjM=`}, + "cluster_public_key": acctest.Representation{RepType: acctest.Required, Create: `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpUa4zUZKyU3AkW9yoJTBDO550wpWZOXdHswfRq75gbJ2ZYlMtifvwiO3qUL/RIZSC6e1wA5OL2LQ97UaHrLLPXgjvKGVIDRHqPkzTOayjJ4ZA7NPNhcu6f/OxhKkCYF3TAQObhMJmUSMrWSUeufaRIujDz1HHqazxOgFk09fj4i2dcGnfPcm32t8a9MzlsHSmgexYCUwxGisuuWTsnMgxbqsj6DaY51l+SEPi5tf10iFmUWqziF0eKDDQ/jHkwLJ8wgBJef9FSOmwJReHcBY+NviwFTatGj7Cwtnks6CVomsFD+rAMJ9uzM8SCv5agYunx07hnEXbR9r/TXqgXGfN bdsclusterkey@oracleoci.com`}, + "cluster_version": acctest.Representation{RepType: acctest.Required, Create: `ODH2_0`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `displayName`, Update: `displayName2`}, + "is_high_availability": acctest.Representation{RepType: acctest.Required, Create: `true`}, + "is_secure": acctest.Representation{RepType: acctest.Required, Create: `true`}, + "bds_cluster_version_summary": acctest.RepresentationGroup{RepType: acctest.Optional, Group: BdsBdsInstanceBdsClusterVersionSummaryRepresentation}, + "cluster_profile": acctest.Representation{RepType: acctest.Optional, Create: `HADOOP`}, + "kerberos_realm_name": acctest.Representation{RepType: acctest.Optional, Create: `BDSCLOUDSERVICE.ORACLE.COM`}, + "master_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, + "util_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, + "worker_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodesOdhWorkerRepresentation}, + "bootstrap_script_url": acctest.Representation{RepType: acctest.Optional, Create: `${var.bootstrap_script_url}`, Update: `${var.bootstrap_script_urlU}`}, + "compute_only_worker_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, + "edge_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodeFlexShapeRepresentation}, "is_cloud_sql_configured": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.kms_key_id}`, Update: `${var.kms_key_id_for_update}`}, @@ -93,6 +90,20 @@ var ( //"os_patch_version": acctest.Representation{RepType: acctest.Optional, Update: `ol7.9-x86_64-1.28.0.619-0.0`}, // Test when patch is available } + bdsInstanceStartClusterShapeConfigRepresentation = map[string]interface{}{ + "node_type_shape_configs": acctest.RepresentationGroup{RepType: acctest.Optional, Group: bdsInstanceNodeTypeShapeConfigsRepresentation}, + } + + bdsInstanceNodeTypeShapeConfigsRepresentation = map[string]interface{}{ + "node_type": acctest.Representation{RepType: acctest.Optional, Create: `WORKER`}, + "shape": acctest.Representation{RepType: acctest.Optional, Create: `VM.Standard.E5.Flex`}, + } + + BdsBdsInstanceBdsClusterVersionSummaryRepresentation = map[string]interface{}{ + "bds_version": acctest.Representation{RepType: acctest.Required, Create: `3.0.26`}, + "odh_version": acctest.Representation{RepType: acctest.Optional, Create: `2.0.7`}, + } + bdsInstanceOdhWithFlexComputeAndRegularMasterUtilRepresentation = acctest.RepresentationCopyWithNewProperties(bdsInstanceOdhRepresentation, map[string]interface{}{ // Master & Util shape should be same @@ -126,15 +137,15 @@ var ( "number_of_nodes": acctest.Representation{RepType: acctest.Required, Create: `2`}, } bdsInstanceNodesOdhWorkerRepresentation = map[string]interface{}{ - "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.DenseIO.E5.Flex`, Update: `VM.DenseIO.Generic`}, - "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, - "number_of_nodes": acctest.Representation{RepType: acctest.Required, Create: `3`, Update: `4`}, - "shape_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodesWorkerShapeConfigRepresentation}, + "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard.E4.Flex`, Update: `VM.Standard.E5.Flex`}, + "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, + "block_volume_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `150`}, + "number_of_nodes": acctest.Representation{RepType: acctest.Required, Create: `3`, Update: `4`}, + "shape_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodesWorkerShapeConfigRepresentation}, } bdsInstanceNodesWorkerShapeConfigRepresentation = map[string]interface{}{ - "memory_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `96`, Update: `96`}, + "memory_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `120`, Update: `120`}, "ocpus": acctest.Representation{RepType: acctest.Required, Create: `8`, Update: `8`}, - "nvmes": acctest.Representation{RepType: acctest.Required, Create: `1`, Update: `1`}, } bdsInstanceNodeFlexShapeRepresentation = map[string]interface{}{ @@ -144,12 +155,7 @@ var ( "number_of_nodes": acctest.Representation{RepType: acctest.Required, Create: `2`}, "shape_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodesShapeConfigRepresentation}, } - bdsInstanceNodeDenseShapeRepresentation = map[string]interface{}{ - "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.DenseIO.E4.Flex`}, - "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, - "number_of_nodes": acctest.Representation{RepType: acctest.Required, Create: `3`, Update: `4`}, - "shape_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceNodesDenseShapeConfigRepresentation}, - } + bdsInstanceNodeFlex3ShapeRepresentation = map[string]interface{}{ "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard3.Flex`}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, @@ -174,7 +180,7 @@ var ( "util_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceOdhWithUpdateMasterUtilRepresentation}, }) bdsInstanceOdhWithUpdateMasterUtilRepresentation = map[string]interface{}{ - "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard.E4.Flex`}, + "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard.E5.Flex`}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, "block_volume_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `150`}, "number_of_nodes": acctest.Representation{RepType: acctest.Required, Update: `3`}, @@ -182,10 +188,10 @@ var ( } bdsInstanceOdhNetworkConfigRepresentation = map[string]interface{}{ "cidr_block": acctest.Representation{RepType: acctest.Optional, Create: `111.112.0.0/16`}, - "is_nat_gateway_required": acctest.Representation{RepType: acctest.Required, Create: `true`}, + "is_nat_gateway_required": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, } bdsInstanceKafkaBrokerNodeFlexShapeRepresentation = map[string]interface{}{ - "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard.E4.Flex`}, + "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard.E5.Flex`}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, "block_volume_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `150`}, "number_of_kafka_nodes": acctest.Representation{RepType: acctest.Required, Create: `3`}, @@ -250,7 +256,7 @@ func TestResourceBdsOdhInstance(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), - resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "is_high_availability", "true"), resource.TestCheckResourceAttr(resourceName, "is_secure", "true"), @@ -270,12 +276,10 @@ func TestResourceBdsOdhInstance(t *testing.T) { }, ), }, - // delete before next Create { Config: config + compartmentIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr, }, - // verify Create, cluster will be force stopped after create { Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr + bootstrapScriptUrlUVariableStr + @@ -287,7 +291,7 @@ func TestResourceBdsOdhInstance(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), - resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "is_high_availability", "true"), resource.TestCheckResourceAttr(resourceName, "is_secure", "true"), @@ -309,13 +313,14 @@ func TestResourceBdsOdhInstance(t *testing.T) { Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr + bootstrapScriptUrlUVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithNewProperties(bdsInstanceOdhRepresentation, map[string]interface{}{ - "is_force_stop_jobs": acctest.Representation{RepType: acctest.Required, Create: `true`}, - "state": acctest.Representation{RepType: acctest.Required, Create: `ACTIVE`}, + "is_force_stop_jobs": acctest.Representation{RepType: acctest.Required, Create: `true`}, + "state": acctest.Representation{RepType: acctest.Required, Create: `ACTIVE`}, + "start_cluster_shape_configs": acctest.RepresentationGroup{RepType: acctest.Optional, Group: bdsInstanceStartClusterShapeConfigRepresentation}, })), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), - resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "is_high_availability", "true"), resource.TestCheckResourceAttr(resourceName, "is_secure", "true"), @@ -326,22 +331,136 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "state", "ACTIVE"), ), }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr, + }, + // Create cluster with HADOOP_EXTENDED + { + Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr + bootstrapScriptUrlUVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(bdsInstanceOdhRepresentation, map[string]interface{}{ + "cluster_profile": acctest.Representation{RepType: acctest.Optional, Create: `HADOOP_EXTENDED`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `hadext1`, Update: `hadext1`}, + })), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), + resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "is_high_availability", "true"), + resource.TestCheckResourceAttr(resourceName, "is_secure", "true"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.node_type"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.shape"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.subnet_id"), + resource.TestCheckResourceAttr(resourceName, "state", "ACTIVE"), + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + // Add Kafka to cluster + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + kmsKeyIdVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr + bootstrapScriptUrlUVariableStr + kmsKeyIdUVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Update, + acctest.RepresentationCopyWithNewProperties(bdsInstanceOdhRepresentation, map[string]interface{}{ + "is_kafka_configured": acctest.Representation{RepType: acctest.Required, Create: `false`, Update: `true`}, + "cluster_profile": acctest.Representation{RepType: acctest.Optional, Create: `HADOOP_EXTENDED`, Update: `HADOOP_EXTENDED`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `hadext1`, Update: `hadext1`}, + "kafka_broker_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceKafkaBrokerNodeFlexShapeRepresentation}, + })), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), + resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "is_high_availability", "true"), + resource.TestCheckResourceAttr(resourceName, "is_secure", "true"), + resource.TestCheckResourceAttr(resourceName, "is_kafka_configured", "true"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.node_type"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.shape"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.subnet_id"), + resource.TestCheckResourceAttr(resourceName, "state", "ACTIVE"), + ), + }, + // Remove Kafka to cluster + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + kmsKeyIdVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr + bootstrapScriptUrlUVariableStr + kmsKeyIdUVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Update, + acctest.RepresentationCopyWithNewProperties(bdsInstanceOdhRepresentation, map[string]interface{}{ + "is_kafka_configured": acctest.Representation{RepType: acctest.Required, Create: `false`, Update: `false`}, + "cluster_profile": acctest.Representation{RepType: acctest.Optional, Create: `HADOOP_EXTENDED`, Update: `HADOOP_EXTENDED`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `hadext1`, Update: `hadext1`}, + })), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), + resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "is_high_availability", "true"), + resource.TestCheckResourceAttr(resourceName, "is_secure", "true"), + resource.TestCheckResourceAttr(resourceName, "is_kafka_configured", "false"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.node_type"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.shape"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.subnet_id"), + resource.TestCheckResourceAttr(resourceName, "state", "ACTIVE"), + ), + }, // delete before next Create { Config: config + compartmentIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr, }, + // verify Create with required fields Kafka cluster + { + Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Required, acctest.Create, + acctest.RepresentationCopyWithNewProperties(bdsInstanceOdhRepresentation, map[string]interface{}{ + "is_kafka_configured": acctest.Representation{RepType: acctest.Required, Create: `false`, Update: `false`}, + "cluster_profile": acctest.Representation{RepType: acctest.Optional, Create: `KAFKA`, Update: `HADOOP_EXTENDED`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `kafkacluster`, Update: `kafkacluster`}, + "kafka_broker_node": acctest.RepresentationGroup{RepType: acctest.Required, Group: bdsInstanceKafkaBrokerNodeFlexShapeRepresentation}, + })), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), + resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "is_high_availability", "true"), + resource.TestCheckResourceAttr(resourceName, "is_secure", "true"), + resource.TestCheckResourceAttr(resourceName, "is_kafka_configured", "false"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.node_type"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.shape"), + resource.TestCheckResourceAttrSet(resourceName, "nodes.0.subnet_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr, + }, // verify Create with optionals { Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + bootstrapScriptUrlVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Create, bdsInstanceOdhRepresentation), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "bootstrap_script_url", bootstrapScriptUrl), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.#", "1"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.bds_version", "3.0.26"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.odh_version", "2.0.7"), resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttr(resourceName, "cluster_profile", "HADOOP"), resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), - resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), @@ -365,10 +484,10 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "nodes.0.time_created"), resource.TestCheckResourceAttr(resourceName, "number_of_nodes", "11"), resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttr(resourceName, "util_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "master_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "compute_only_worker_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E4.Flex"), + resource.TestCheckResourceAttr(resourceName, "util_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "master_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "compute_only_worker_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E5.Flex"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -389,10 +508,13 @@ func TestResourceBdsOdhInstance(t *testing.T) { "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, })), Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.#", "1"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.bds_version", "3.0.26"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.odh_version", "2.0.7"), resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttr(resourceName, "cluster_profile", "HADOOP"), resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), - resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), @@ -419,8 +541,8 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttr(resourceName, "util_node.0.shape", "VM.Standard2.4"), resource.TestCheckResourceAttr(resourceName, "master_node.0.shape", "VM.Standard2.4"), - resource.TestCheckResourceAttr(resourceName, "compute_only_worker_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E4.Flex"), + resource.TestCheckResourceAttr(resourceName, "compute_only_worker_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E5.Flex"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -436,10 +558,13 @@ func TestResourceBdsOdhInstance(t *testing.T) { Config: config + compartmentIdVariableStr + kmsKeyIdUVariableStr + bootstrapScriptUrlVariableStr + bootstrapScriptUrlUVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Update, bdsInstanceOdhWithRegularComputeAndFlexMasterUtilRepresentation), Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.#", "1"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.bds_version", "3.0.26"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.odh_version", "2.0.7"), resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttr(resourceName, "cluster_profile", "HADOOP"), resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), - resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), @@ -464,10 +589,10 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "nodes.0.time_created"), resource.TestCheckResourceAttr(resourceName, "number_of_nodes", "12"), resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttr(resourceName, "util_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "master_node.0.shape", "VM.Standard.E4.Flex"), + resource.TestCheckResourceAttr(resourceName, "util_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "master_node.0.shape", "VM.Standard.E5.Flex"), resource.TestCheckResourceAttr(resourceName, "compute_only_worker_node.0.shape", "VM.Standard2.4"), - resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E4.Flex"), + resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E5.Flex"), resource.TestCheckResourceAttr(resourceName, "worker_node.0.number_of_nodes", "4"), func(s *terraform.State) (err error) { @@ -484,10 +609,13 @@ func TestResourceBdsOdhInstance(t *testing.T) { Config: config + compartmentIdVariableStr + kmsKeyIdUVariableStr + bootstrapScriptUrlVariableStr + bootstrapScriptUrlUVariableStr + subnetIdVariableStr + BdsInstanceOdhResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Optional, acctest.Update, bdsInstanceOdhWithAddMasterUtilRepresentation), Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.#", "1"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.bds_version", "3.0.26"), + resource.TestCheckResourceAttr(resourceName, "bds_cluster_version_summary.0.odh_version", "2.0.7"), resource.TestCheckResourceAttr(resourceName, "cluster_admin_password", "T3JhY2xlVGVhbVVTQSExMjM="), resource.TestCheckResourceAttr(resourceName, "cluster_profile", "HADOOP"), resource.TestCheckResourceAttrSet(resourceName, "cluster_public_key"), - resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(resourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), @@ -512,10 +640,10 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "nodes.0.time_created"), resource.TestCheckResourceAttr(resourceName, "number_of_nodes", "14"), resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttr(resourceName, "util_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "master_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "compute_only_worker_node.0.shape", "VM.Standard.E4.Flex"), - resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E4.Flex"), + resource.TestCheckResourceAttr(resourceName, "util_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "master_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "compute_only_worker_node.0.shape", "VM.Standard.E5.Flex"), + resource.TestCheckResourceAttr(resourceName, "edge_node.0.shape", "VM.Standard.E5.Flex"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -540,7 +668,7 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "is_kafka_configured", "false"), resource.TestCheckResourceAttr(datasourceName, "bds_instances.#", "1"), resource.TestCheckResourceAttr(datasourceName, "bds_instances.0.cluster_profile", "HADOOP"), - resource.TestCheckResourceAttr(datasourceName, "bds_instances.0.cluster_version", "ODH1"), + resource.TestCheckResourceAttr(datasourceName, "bds_instances.0.cluster_version", "ODH2_0"), resource.TestCheckResourceAttr(datasourceName, "bds_instances.0.compartment_id", compartmentId), resource.TestCheckResourceAttr(datasourceName, "bds_instances.0.display_name", "displayName2"), resource.TestCheckResourceAttr(datasourceName, "bds_instances.0.freeform_tags.%", "1"), @@ -566,7 +694,7 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "cloud_sql_details.#", "0"), resource.TestCheckResourceAttr(singularDatasourceName, "cluster_details.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "cluster_profile", "HADOOP"), - resource.TestCheckResourceAttr(singularDatasourceName, "cluster_version", "ODH1"), + resource.TestCheckResourceAttr(singularDatasourceName, "cluster_version", "ODH2_0"), resource.TestCheckResourceAttrSet(singularDatasourceName, "cluster_details.0.bd_cell_version"), resource.TestCheckResourceAttrSet(singularDatasourceName, "cluster_details.0.bds_version"), resource.TestCheckResourceAttrSet(singularDatasourceName, "cluster_details.0.csql_cell_version"), @@ -599,7 +727,7 @@ func TestResourceBdsOdhInstance(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "nodes.0.node_type", "MASTER"), resource.TestCheckResourceAttrSet(singularDatasourceName, "nodes.0.nvmes"), resource.TestCheckResourceAttrSet(singularDatasourceName, "nodes.0.ocpus"), - resource.TestCheckResourceAttr(singularDatasourceName, "nodes.0.shape", "VM.Standard.E4.Flex"), + resource.TestCheckResourceAttr(singularDatasourceName, "nodes.0.shape", "VM.Standard.E5.Flex"), resource.TestCheckResourceAttrSet(singularDatasourceName, "nodes.0.node_type"), resource.TestCheckResourceAttrSet(singularDatasourceName, "nodes.0.shape"), resource.TestCheckResourceAttrSet(singularDatasourceName, "nodes.0.state"), diff --git a/internal/integrationtest/core_volume_attachments_data_source_test.go b/internal/integrationtest/core_volume_attachments_data_source_test.go index f9e627a8943..5cfda26226f 100644 --- a/internal/integrationtest/core_volume_attachments_data_source_test.go +++ b/internal/integrationtest/core_volume_attachments_data_source_test.go @@ -73,6 +73,7 @@ func (s *DatasourceCoreVolumeAttachmentTestSuite) TestAccDatasourceCoreVolumeAtt resource.TestCheckResourceAttrSet(s.ResourceName, "volume_attachments.0.time_created"), resource.TestCheckResourceAttrSet(s.ResourceName, "volume_attachments.0.volume_id"), resource.TestCheckResourceAttr(s.ResourceName, "volume_attachments.0.is_read_only", "false"), + resource.TestCheckResourceAttr(s.ResourceName, "volume_attachments.0.is_shareable", "false"), resource.TestCheckResourceAttrSet(s.ResourceName, "volume_attachments.0.ipv4"), resource.TestCheckResourceAttrSet(s.ResourceName, "volume_attachments.0.port"), resource.TestCheckResourceAttrSet(s.ResourceName, "volume_attachments.0.iqn"), @@ -91,6 +92,7 @@ type customVolumeAttachment struct { id string instanceId string isReadOnly bool + isShareable bool volumeId string displayName string timeCreated common.SDKTime @@ -122,6 +124,11 @@ func (m customVolumeAttachment) GetIsReadOnly() *bool { return &m.isReadOnly } +// GetIsShareable return IsShareable +func (m customVolumeAttachment) GetIsShareable() *bool { + return &m.isShareable +} + // GetLifecycleState returns LifecycleState func (m customVolumeAttachment) GetLifecycleState() oci_core.VolumeAttachmentLifecycleStateEnum { return m.state diff --git a/internal/integrationtest/database_autonomous_database_lock_backup_retention_test.go b/internal/integrationtest/database_autonomous_database_lock_backup_retention_test.go new file mode 100644 index 00000000000..ea97ba44e09 --- /dev/null +++ b/internal/integrationtest/database_autonomous_database_lock_backup_retention_test.go @@ -0,0 +1,90 @@ +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/oracle/terraform-provider-oci/httpreplay" +) + +var ( + DatabaseAutonomousDatabaseRepresentationLockBckRetention = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "compute_model": acctest.Representation{RepType: acctest.Required, Create: `ECPU`}, + "compute_count": acctest.Representation{RepType: acctest.Required, Create: `4.0`}, + "data_storage_size_in_tbs": acctest.Representation{RepType: acctest.Required, Create: `1`}, + "db_name": acctest.Representation{RepType: acctest.Required, Create: adbName}, + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `BEstrO0ng_#11`, Update: `BEstrO0ng_#12`}, + "db_version": acctest.Representation{RepType: acctest.Optional, Create: `${data.oci_database_autonomous_db_versions.test_autonomous_db_versions.autonomous_db_versions.0.version}`}, + "db_workload": acctest.Representation{RepType: acctest.Optional, Create: `OLTP`}, + "character_set": acctest.Representation{RepType: acctest.Optional, Create: `AL32UTF8`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `example_autonomous_database`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "is_auto_scaling_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "is_auto_scaling_for_storage_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "is_dedicated": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "is_mtls_connection_required": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "is_backup_retention_locked": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "autonomous_maintenance_schedule_type": acctest.Representation{RepType: acctest.Optional, Create: `REGULAR`}, + "is_preview_version_with_service_terms_accepted": acctest.Representation{RepType: acctest.Optional, Create: `false`}, + "customer_contacts": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseCustomerContactsRepresentation}, + "license_model": acctest.Representation{RepType: acctest.Optional, Create: `LICENSE_INCLUDED`}, + "whitelisted_ips": acctest.Representation{RepType: acctest.Optional, Create: []string{`1.1.1.1/28`}}, + "operations_insights_status": acctest.Representation{RepType: acctest.Optional, Create: `NOT_ENABLED`, Update: `ENABLED`}, + "timeouts": acctest.RepresentationGroup{RepType: acctest.Required, Group: autonomousDatabaseTimeoutsRepresentation}, + "ncharacter_set": acctest.Representation{RepType: acctest.Optional, Create: `AL16UTF16`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `AVAILABLE`}, + } + + DatabaseAutonomousDatabaseResourceDependenciesLockBckRetention = DefinedTagsDependencies + KeyResourceDependencyConfigDbaas + + acctest.GenerateDataSourceFromRepresentationMap("oci_database_autonomous_db_versions", "test_autonomous_db_versions", acctest.Required, acctest.Create, DatabaseDatabaseAutonomousDbVersionDataSourceRepresentation) + + acctest.GenerateDataSourceFromRepresentationMap("oci_database_autonomous_db_versions", "test_autonomous_dw_versions", acctest.Required, acctest.Create, + acctest.RepresentationCopyWithNewProperties(DatabaseDatabaseAutonomousDbVersionDataSourceRepresentation, map[string]interface{}{ + "db_workload": acctest.Representation{RepType: acctest.Required, Create: `DW`}})) +) + +func TestDatabaseAutonomousDatabaseResource_lock_backup_retention(t *testing.T) { + httpreplay.SetScenario("TestDatabaseAutonomousDatabaseResource_lock_backup_retention") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + okvSecret = utils.GetEnvSettingWithBlankDefault("okv_secret") + OkvSecretVariableStr = fmt.Sprintf("variable \"okv_secret\" { default = \"%s\" }\n", okvSecret) + + resourceName := "oci_database_autonomous_database.test_autonomous_database" + + acctest.SaveConfigContent(config+compartmentIdVariableStr+DatabaseAutonomousDatabaseResourceDependenciesLockBckRetention+ + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, DatabaseAutonomousDatabaseRepresentationLockBckRetention), "database", "autonomousDatabase", t) + + acctest.ResourceTest(t, testAccCheckDatabaseAutonomousDatabaseDestroy, []resource.TestStep{ + //0. Verify Create + { + Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, DatabaseAutonomousDatabaseRepresentationLockBckRetention), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compute_model", "ECPU"), + resource.TestCheckResourceAttr(resourceName, "is_backup_retention_locked", "false"), + ), + }, + + //1. update backup retention from false to true + { + Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Update, + acctest.RepresentationCopyWithRemovedProperties(acctest.RepresentationCopyWithNewProperties(DatabaseAutonomousDatabaseRepresentationLockBckRetention, map[string]interface{}{ + "is_backup_retention_locked": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + }), []string{"admin_password", "customer_contacts", "freeform_tags", "display_name"})), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "is_backup_retention_locked", "true"), + ), + }, + }) +} diff --git a/internal/integrationtest/database_db_system_resource_amd_vm_test.go b/internal/integrationtest/database_db_system_resource_amd_vm_test.go index 8a21802c551..de00c81c58e 100644 --- a/internal/integrationtest/database_db_system_resource_amd_vm_test.go +++ b/internal/integrationtest/database_db_system_resource_amd_vm_test.go @@ -16,46 +16,45 @@ import ( ) var ( - amdDbSystemRepresentation = map[string]interface{}{ - "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.t.availability_domain}`}, + DbSystemAmdRepresentation = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, - "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.t.id}`}, + "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, "database_edition": acctest.Representation{RepType: acctest.Required, Create: `ENTERPRISE_EDITION`}, "disk_redundancy": acctest.Representation{RepType: acctest.Required, Create: `NORMAL`}, "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard.E4.Flex`}, "cpu_core_count": acctest.Representation{RepType: acctest.Required, Create: `2`}, "ssh_public_keys": acctest.Representation{RepType: acctest.Required, Create: []string{`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCBDM0G21Tc6IOp6H5fwUVhVcxDxbwRwb9I53lXDdfqytw/pRAfXxDAzlw1jMEWofoVxTVDyqxcEg5yg4ImKFYHIDrZuU9eHv5SoHYJvI9r+Dqm9z52MmEyoTuC4dUyOs79V0oER5vLcjoMQIqmGSKMSlIMoFV2d+AV//RhJSpRPWGQ6lAVPYAiaVk3EzYacayetk1ZCEnMGPV0OV1UWqovm3aAGDozs7+9Isq44HEMyJwdBTYmBu3F8OA8gss2xkwaBgK3EQjCJIRBgczDwioT7RF5WG3IkwKsDTl2bV0p5f5SeX0U8SGHnni9uNoc9wPAWaleZr3Jcp1yIcRFR9YV`}}, - "domain": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.t.subnet_domain_name}`}, + "domain": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.subnet_domain_name}`}, "hostname": acctest.Representation{RepType: acctest.Required, Create: `myOracleDB`}, "data_storage_size_in_gb": acctest.Representation{RepType: acctest.Required, Create: `256`}, "license_model": acctest.Representation{RepType: acctest.Required, Create: `LICENSE_INCLUDED`}, "node_count": acctest.Representation{RepType: acctest.Required, Create: `1`}, - "display_name": acctest.Representation{RepType: acctest.Required, Create: `tfDbSystemTest`}, - "db_home": acctest.RepresentationGroup{RepType: acctest.Required, Group: amdDbHomeRepresentation}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `tfDbSystemAmd`}, + "db_home": acctest.RepresentationGroup{RepType: acctest.Required, Group: DbSystemAmdDbHomeGroup}, "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${var.kms_key_id}`}, "kms_key_version_id": acctest.Representation{RepType: acctest.Required, Update: `${var.kms_key_version_id}`}, } - amdDbHomeRepresentation = map[string]interface{}{ - "db_version": acctest.Representation{RepType: acctest.Required, Create: `19.24.0.0`}, - "display_name": acctest.Representation{RepType: acctest.Required, Create: `dbHome1`}, - "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: amdDatabaseRepresentation}, + DbSystemAmdDbHomeGroup = map[string]interface{}{ + "db_version": acctest.Representation{RepType: acctest.Required, Create: `19.0.0.0`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `tfDbHome`}, + "database": acctest.RepresentationGroup{RepType: acctest.Required, Group: DbSystemAmdDatabaseGroup}, } - amdDatabaseRepresentation = map[string]interface{}{ + DbSystemAmdDatabaseGroup = map[string]interface{}{ "admin_password": acctest.Representation{RepType: acctest.Required, Create: `BEstrO0ng_#11`, Update: nil}, - "db_name": acctest.Representation{RepType: acctest.Required, Create: `aTFdb`}, + "db_name": acctest.Representation{RepType: acctest.Required, Create: `tfDb`}, "character_set": acctest.Representation{RepType: acctest.Required, Create: `AL32UTF8`}, "ncharacter_set": acctest.Representation{RepType: acctest.Required, Create: `AL16UTF16`}, "db_workload": acctest.Representation{RepType: acctest.Required, Create: `OLTP`}, - "pdb_name": acctest.Representation{RepType: acctest.Required, Create: `pdbName`}, - "db_backup_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: amdDbBackupConfigRepresentation}, - "db_unique_name": acctest.Representation{RepType: acctest.Required, Create: `aTFdb_xyz`}, + "pdb_name": acctest.Representation{RepType: acctest.Required, Create: `tfPdb`}, + "db_backup_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: DbSystemAmdDbBackupConfigGroup}, "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${var.kms_key_id}`}, "vault_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vault_id}`}, } - amdDbBackupConfigRepresentation = map[string]interface{}{ + DbSystemAmdDbBackupConfigGroup = map[string]interface{}{ "auto_backup_enabled": acctest.Representation{RepType: acctest.Required, Create: `false`}, } ) @@ -73,18 +72,14 @@ func TestResourceDatabaseDBSystemAmdVM(t *testing.T) { vaultId := utils.GetEnvSettingWithBlankDefault("vault_id") vaultIdVariableStr := fmt.Sprintf("variable \"vault_id\" { default = \"%s\" }\n", vaultId) - resourceName := "oci_database_db_system.t" - - // 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(ResourceDatabaseBaseConfig+kmsKeyIdVariableStr+kmsKeyVersionIdVariableStr+vaultIdVariableStr+ - acctest.GenerateResourceFromRepresentationMap("oci_database_db_system", "t", acctest.Optional, acctest.Create, amdDbSystemRepresentation), "database", "dbSystem", t) + resourceName := "oci_database_db_system.test_amd_db_system" acctest.ResourceTest(t, nil, []resource.TestStep{ // verify create { Config: ResourceDatabaseBaseConfig + kmsKeyIdVariableStr + vaultIdVariableStr + kmsKeyVersionIdVariableStr + - acctest.GenerateResourceFromRepresentationMap("oci_database_db_system", "t", acctest.Required, acctest.Create, amdDbSystemRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_database_db_system", "test_amd_db_system", acctest.Optional, acctest.Create, DbSystemAmdRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( // DB System Resource tests resource.TestCheckResourceAttrSet(resourceName, "id"), @@ -101,14 +96,13 @@ func TestResourceDatabaseDBSystemAmdVM(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "node_count", "1"), resource.TestCheckResourceAttrSet(resourceName, "db_home.0.db_version"), resource.TestCheckResourceAttrSet(resourceName, "db_home.0.display_name"), - resource.TestCheckResourceAttr(ResourceDatabaseResourceName, "db_home.0.database.0.db_unique_name", "aTFdb_xyz"), resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), ), }, // verify update { Config: ResourceDatabaseBaseConfig + kmsKeyIdVariableStr + vaultIdVariableStr + kmsKeyVersionIdVariableStr + - acctest.GenerateResourceFromRepresentationMap("oci_database_db_system", "t", acctest.Required, acctest.Update, amdDbSystemRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_database_db_system", "test_amd_db_system", acctest.Optional, acctest.Update, DbSystemAmdRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( // DB System Resource tests resource.TestCheckResourceAttr(resourceName, "kms_key_version_id", kmsKeyVersionId), diff --git a/internal/integrationtest/datascience_data_science_private_endpoint_test.go b/internal/integrationtest/datascience_data_science_private_endpoint_test.go index ca580276646..6dcc1bbe8de 100644 --- a/internal/integrationtest/datascience_data_science_private_endpoint_test.go +++ b/internal/integrationtest/datascience_data_science_private_endpoint_test.go @@ -31,9 +31,18 @@ var ( DataSciencePrivateEndpointResourceConfig = DataSciencePrivateEndpointResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_private_endpoint", acctest.Optional, acctest.Update, DataSciencePrivateEndpointRepresentation) + DataScienceMDPrivateEndpointRequiredOnlyResource = DataSciencePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Required, acctest.Create, DataScienceMDPrivateEndpointRepresentation) + + DataScienceMDPrivateEndpointResourceConfig = DataSciencePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Optional, acctest.Update, DataScienceMDPrivateEndpointRepresentation) + DataSciencePrivateEndpointSingularDataSourceRepresentation = map[string]interface{}{ "data_science_private_endpoint_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_datascience_private_endpoint.test_data_science_private_endpoint.id}`}, } + DataScienceMDPrivateEndpointSingularDataSourceRepresentation = map[string]interface{}{ + "data_science_private_endpoint_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_datascience_private_endpoint.test_data_science_md_private_endpoint.id}`}, + } DataSciencePrivateEndpointDataSourceRepresentation = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, @@ -43,11 +52,24 @@ var ( "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: DataSciencePrivateEndpointDataSourceFilterRepresentation}} + DataScienceMDPrivateEndpointDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "created_by": acctest.Representation{RepType: acctest.Optional, Create: `${var.user_id}`}, + "data_science_resource_type": acctest.Representation{RepType: acctest.Optional, Create: `MODEL_DEPLOYMENT`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `MD_PE`, Update: `Updated_MD_PE`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: DataScienceMDPrivateEndpointDataSourceFilterRepresentation}} + DataSciencePrivateEndpointDataSourceFilterRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_datascience_private_endpoint.test_data_science_private_endpoint.id}`}}, } + DataScienceMDPrivateEndpointDataSourceFilterRepresentation = map[string]interface{}{ + "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, + "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_datascience_private_endpoint.test_data_science_md_private_endpoint.id}`}}, + } + DataSciencePrivateEndpointRepresentation = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "data_science_resource_type": acctest.Representation{RepType: acctest.Required, Create: `NOTEBOOK_SESSION`}, @@ -60,6 +82,18 @@ var ( "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: dataSciencePrivateEndpointIgnoreRepresentation}, } + DataScienceMDPrivateEndpointRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "data_science_resource_type": acctest.Representation{RepType: acctest.Required, Create: `MODEL_DEPLOYMENT`}, + "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `MD_PE`, Update: `Updated_MD_PE`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "sub_domain": acctest.Representation{RepType: acctest.Optional, Create: `subDomain`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: dataSciencePrivateEndpointIgnoreRepresentation}, + } + dataSciencePrivateEndpointIgnoreRepresentation = map[string]interface{}{ "ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`}}, } @@ -266,6 +300,201 @@ func TestDatascienceDataSciencePrivateEndpointResource_basic(t *testing.T) { }) } +func TestDatascienceDataScienceMDPrivateEndpointResource_basic(t *testing.T) { + httpreplay.SetScenario("TestDatascienceDataScienceMDPrivateEndpointResource_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) + + userId := utils.GetEnvSettingWithBlankDefault("user_ocid") + userIdVariableStr := fmt.Sprintf("variable \"user_id\" { default = \"%s\" }\n", userId) + + resourceName := "oci_datascience_private_endpoint.test_data_science_md_private_endpoint" + datasourceName := "data.oci_datascience_private_endpoints.test_data_science_md_private_endpoint" + singularDatasourceName := "data.oci_datascience_private_endpoint.test_data_science_md_private_endpoint" + + var resId, resId2 string + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+DataSciencePrivateEndpointResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Optional, acctest.Create, DataScienceMDPrivateEndpointRepresentation), "datascience", "dataSciencePrivateEndpoint", t) + + acctest.ResourceTest(t, testAccCheckDatascienceDataSciencePrivateEndpointDestroy, []resource.TestStep{ + // 0. verify Create + { + Config: config + compartmentIdVariableStr + DataSciencePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Required, acctest.Create, DataScienceMDPrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "data_science_resource_type", "MODEL_DEPLOYMENT"), + resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // 1. delete before next Create + { + Config: config + compartmentIdVariableStr + DataSciencePrivateEndpointResourceDependencies, + }, + // 2. verify Create with optionals + { + Config: config + compartmentIdVariableStr + DataSciencePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Optional, acctest.Create, DataScienceMDPrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "data_science_resource_type", "MODEL_DEPLOYMENT"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "MD_PE"), + resource.TestCheckResourceAttrSet(resourceName, "fqdn"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "sub_domain", "subDomain"), + resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "false")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // 3. verify Update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DataSciencePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(DataScienceMDPrivateEndpointRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "data_science_resource_type", "MODEL_DEPLOYMENT"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "MD_PE"), + resource.TestCheckResourceAttrSet(resourceName, "fqdn"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "sub_domain", "subDomain"), + resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + + // 4. verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + DataSciencePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Optional, acctest.Update, DataScienceMDPrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "data_science_resource_type", "MODEL_DEPLOYMENT"), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + resource.TestCheckResourceAttr(resourceName, "display_name", "Updated_MD_PE"), + resource.TestCheckResourceAttrSet(resourceName, "fqdn"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "sub_domain", "subDomain"), + resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // 5. verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_datascience_private_endpoints", "test_data_science_md_private_endpoint", acctest.Optional, acctest.Update, DataScienceMDPrivateEndpointDataSourceRepresentation) + + compartmentIdVariableStr + userIdVariableStr + DataSciencePrivateEndpointResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Optional, acctest.Update, DataScienceMDPrivateEndpointRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "data_science_resource_type", "MODEL_DEPLOYMENT"), + resource.TestCheckResourceAttr(datasourceName, "display_name", "Updated_MD_PE"), + resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), + + resource.TestCheckResourceAttr(datasourceName, "data_science_private_endpoints.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "data_science_private_endpoints.0.compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "data_science_private_endpoints.0.data_science_resource_type", "MODEL_DEPLOYMENT"), + resource.TestCheckResourceAttr(datasourceName, "data_science_private_endpoints.0.display_name", "Updated_MD_PE"), + resource.TestCheckResourceAttrSet(datasourceName, "data_science_private_endpoints.0.fqdn"), + resource.TestCheckResourceAttr(datasourceName, "data_science_private_endpoints.0.freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "data_science_private_endpoints.0.id"), + resource.TestCheckResourceAttrSet(datasourceName, "data_science_private_endpoints.0.state"), + resource.TestCheckResourceAttrSet(datasourceName, "data_science_private_endpoints.0.subnet_id"), + resource.TestCheckResourceAttrSet(datasourceName, "data_science_private_endpoints.0.time_created"), + resource.TestCheckResourceAttrSet(datasourceName, "data_science_private_endpoints.0.time_updated"), + ), + }, + // 6. verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_datascience_private_endpoint", "test_data_science_md_private_endpoint", acctest.Required, acctest.Create, DataScienceMDPrivateEndpointSingularDataSourceRepresentation) + + compartmentIdVariableStr + DataScienceMDPrivateEndpointResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "data_science_private_endpoint_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + // resource.TestCheckResourceAttrSet(singularDatasourceName, "created_by"), + resource.TestCheckResourceAttr(singularDatasourceName, "data_science_resource_type", "MODEL_DEPLOYMENT"), + resource.TestCheckResourceAttr(singularDatasourceName, "description", "description2"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "Updated_MD_PE"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "fqdn"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + ), + }, + // 7. verify resource import + { + Config: config + DataScienceMDPrivateEndpointRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "sub_domain", + }, + ResourceName: resourceName, + }, + }) +} + func testAccCheckDatascienceDataSciencePrivateEndpointDestroy(s *terraform.State) error { noResourceFound := true client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).DataScienceClient() diff --git a/internal/integrationtest/datascience_model_deployment_private_endpoint_test.go b/internal/integrationtest/datascience_model_deployment_private_endpoint_test.go new file mode 100644 index 00000000000..52d820be1a7 --- /dev/null +++ b/internal/integrationtest/datascience_model_deployment_private_endpoint_test.go @@ -0,0 +1,458 @@ +package integrationtest + +import ( + "fmt" + "strconv" + "testing" + + "github.com/oracle/terraform-provider-oci/internal/acctest" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" + + "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 ( + DatasciencePrivateModelDeploymentRequiredOnlyResource = DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Required, acctest.Create, DatasciencePrivateModelDeploymentRepresentation) + + DatasciencePrivateModelDeploymentResourceConfig = DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Optional, acctest.Update, DatasciencePrivateModelDeploymentRepresentation) + + DatascienceDatasciencePrivateModelDeploymentSingularDataSourceRepresentation = map[string]interface{}{ + "model_deployment_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_datascience_model_deployment.test_model_deployment.id}`}, + } + + DatascienceDatasciencePrivateModelDeploymentDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "created_by": acctest.Representation{RepType: acctest.Optional, Create: `${oci_datascience_model_deployment.test_model_deployment.created_by}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, + "id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_datascience_model_deployment.test_model_deployment.id}`}, + "project_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_datascience_project.test_project.id}`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: DatascienceModelDeploymentDataSourceFilterRepresentation}} + + DatasciencePrivateModelDeploymentRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "model_deployment_configuration_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: DatasciencePrivateModelDeploymentModelDeploymentConfigurationDetailsRepresentation}, + "project_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_datascience_project.test_project.id}`}, + "category_log_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatascienceModelDeploymentCategoryLogDetailsRepresentation}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: definedTagsIgnoreMDRepresentation}, + } + + DatasciencePrivateModelDeploymentModelDeploymentConfigurationDetailsModelConfigurationDetailsInstanceConfigurationRepresentation = map[string]interface{}{ + "instance_shape_name": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard.E4.Flex`, Update: `VM.Standard.E3.Flex`}, + "model_deployment_instance_shape_config_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatascienceModelDeploymentModelDeploymentConfigurationDetailsModelConfigurationDetailsInstanceConfigurationModelDeploymentInstanceShapeConfigDetailsRepresentation}, + "private_endpoint_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_datascience_private_endpoint.test_md_private_endpoint.id}`}, + "subnet_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_core_subnet.test_subnet.id}`}, + } + + DatasciencePrivateModelDeploymentModelDeploymentConfigurationDetailsModelConfigurationDetailsRepresentation = map[string]interface{}{ + "instance_configuration": acctest.RepresentationGroup{RepType: acctest.Required, Group: DatasciencePrivateModelDeploymentModelDeploymentConfigurationDetailsModelConfigurationDetailsInstanceConfigurationRepresentation}, + "model_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_datascience_model.test_model.id}`, Update: `${oci_datascience_model.test_model_update.id}`}, + "bandwidth_mbps": acctest.Representation{RepType: acctest.Optional, Create: `10`}, + "maximum_bandwidth_mbps": acctest.Representation{RepType: acctest.Optional, Create: `10`}, + "scaling_policy": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatascienceModelDeploymentModelDeploymentConfigurationDetailsModelConfigurationDetailsScalingPolicyRepresentation}, + } + + DatasciencePrivateModelDeploymentModelDeploymentConfigurationDetailsRepresentation = map[string]interface{}{ + "deployment_type": acctest.Representation{RepType: acctest.Required, Create: `SINGLE_MODEL`}, + "model_configuration_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: DatasciencePrivateModelDeploymentModelDeploymentConfigurationDetailsModelConfigurationDetailsRepresentation}, + } + + DatasciencePrivateModelDeploymentResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_datascience_model", "test_model", acctest.Optional, acctest.Create, modelForModelDeploymentRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model", "test_model_update", acctest.Optional, acctest.Create, modelForUpdateModelDeploymentRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, ModelDeploymentCoreSubnetRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_private_endpoint", "test_md_private_endpoint", acctest.Required, acctest.Create, DataScienceMDPrivateEndpointRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_project", "test_project", acctest.Required, acctest.Create, DatascienceProjectRepresentation) + + DefinedTagsDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_logging_log_group", "test_log_group", acctest.Required, acctest.Create, logGroupMDRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_logging_log", "test_access_log", acctest.Required, acctest.Create, customAccessLogRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_logging_log", "test_predict_log", acctest.Required, acctest.Create, customPredictLogRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_logging_log_group", "test_update_log_group", acctest.Required, acctest.Create, logGroupUpdateMDRepresentation) +) + +func TestDatasciencePrivateModelDeploymentResource_basic(t *testing.T) { + httpreplay.SetScenario("TestDatasciencePrivateModelDeploymentResource_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) + + resourceName := "oci_datascience_model_deployment.test_model_deployment" + datasourceName := "data.oci_datascience_model_deployments.test_model_deployments" + singularDatasourceName := "data.oci_datascience_model_deployment.test_model_deployment" + + var resId, resId2 string + + acctest.ResourceTest(t, testAccCheckDatascienceModelDeploymentDestroy, []resource.TestStep{ + // 0. verify Create with optionals + { + Config: config + compartmentIdVariableStr + DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Optional, acctest.Create, DatasciencePrivateModelDeploymentRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "category_log_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.access.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.predict.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.deployment_type", "SINGLE_MODEL"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.instance_shape_name"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.cpu_baseline", "BASELINE_1_8"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.private_endpoint_id"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.subnet_id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.maximum_bandwidth_mbps", "10"), + + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.memory_in_gbs", "6"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.ocpus", "1"), + + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.model_id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_url"), + resource.TestCheckResourceAttrSet(resourceName, "project_id"), + 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 + }, + )}, + + // 1. verify Deactivate model deployment + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(DatascienceModelDeploymentRepresentation, map[string]interface{}{ + "state": acctest.Representation{RepType: acctest.Optional, Create: `INACTIVE`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "category_log_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.access.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.predict.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.deployment_type", "SINGLE_MODEL"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.maximum_bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.instance_shape_name"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.cpu_baseline", "BASELINE_1_8"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.model_id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_url"), + resource.TestCheckResourceAttrSet(resourceName, "project_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttr(resourceName, "state", "INACTIVE"), + + 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 + }, + ), + }, + + // 2. verify Activate model deployment + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(DatasciencePrivateModelDeploymentRepresentation, map[string]interface{}{ + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "category_log_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.access.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.predict.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.deployment_type", "SINGLE_MODEL"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.maximum_bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.instance_shape_name"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.cpu_baseline", "BASELINE_1_8"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.model_id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_url"), + resource.TestCheckResourceAttrSet(resourceName, "project_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttr(resourceName, "state", "ACTIVE"), + + 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 + }, + ), + }, + + // 3. verify Update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(DatasciencePrivateModelDeploymentRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "category_log_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.access.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.predict.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.deployment_type", "SINGLE_MODEL"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.instance_shape_name"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.cpu_baseline", "BASELINE_1_8"), + + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.private_endpoint_id"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.subnet_id"), + + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.maximum_bandwidth_mbps", "10"), + + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.memory_in_gbs", "6"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.ocpus", "1"), + + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.model_id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_url"), + resource.TestCheckResourceAttrSet(resourceName, "project_id"), + 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 + }, + ), + }, + + // 4. verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Optional, acctest.Update, DatasciencePrivateModelDeploymentRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "category_log_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.access.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.access.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "category_log_details.0.predict.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "category_log_details.0.predict.0.log_id"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "created_by"), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.deployment_type", "SINGLE_MODEL"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.instance_shape_name"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.cpu_baseline", "BASELINE_1_2"), + + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.private_endpoint_id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.maximum_bandwidth_mbps", "10"), + + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.memory_in_gbs", "12"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.ocpus", "2"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.subnet_id"), + + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.model_id"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "2"), + resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_url"), + resource.TestCheckResourceAttrSet(resourceName, "project_id"), + 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 + }, + ), + }, + + // 5. verify datasource - list model deployments + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_datascience_model_deployments", "test_model_deployments", acctest.Optional, acctest.Update, DatascienceDatasciencePrivateModelDeploymentDataSourceRepresentation) + + compartmentIdVariableStr + DatasciencePrivateModelDeploymentResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Optional, acctest.Update, DatasciencePrivateModelDeploymentRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttrSet(datasourceName, "id"), + resource.TestCheckResourceAttrSet(datasourceName, "project_id"), + resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.category_log_details.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.category_log_details.0.access.#", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.category_log_details.0.access.0.log_group_id"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.category_log_details.0.access.0.log_id"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.category_log_details.0.predict.#", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.category_log_details.0.predict.0.log_group_id"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.category_log_details.0.predict.0.log_id"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.created_by"), + //resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.description", "description2"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.id"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.deployment_type", "SINGLE_MODEL"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.#", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.instance_shape_name"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.cpu_baseline", "BASELINE_1_2"), + + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.private_endpoint_id"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.maximum_bandwidth_mbps", "10"), + + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.memory_in_gbs", "12"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.ocpus", "2"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.subnet_id"), + + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.model_id"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "2"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.model_deployment_url"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.project_id"), + resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.state", "ACTIVE"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.time_created"), + ), + }, + + // 6. verify singular datasource - get model deployment + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_datascience_model_deployment", "test_model_deployment", acctest.Required, acctest.Create, DatascienceDatasciencePrivateModelDeploymentSingularDataSourceRepresentation) + + compartmentIdVariableStr + DatasciencePrivateModelDeploymentResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "model_deployment_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "category_log_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "category_log_details.0.access.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "category_log_details.0.predict.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(singularDatasourceName, "created_by"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.deployment_type", "SINGLE_MODEL"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.cpu_baseline", "BASELINE_1_2"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.maximum_bandwidth_mbps", "10"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "2"), + resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "model_deployment_url"), + resource.TestCheckNoResourceAttr(singularDatasourceName, "model_deployment_system_data.#"), + resource.TestCheckResourceAttr(singularDatasourceName, "state", "ACTIVE"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + ), + }, + + // 7. verify resource import + { + Config: config + DatasciencePrivateModelDeploymentRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "description", + }, + ResourceName: resourceName, + }, + }) +} diff --git a/internal/integrationtest/datascience_model_deployment_test.go b/internal/integrationtest/datascience_model_deployment_test.go index dc72dc06155..c5a6bf213dd 100644 --- a/internal/integrationtest/datascience_model_deployment_test.go +++ b/internal/integrationtest/datascience_model_deployment_test.go @@ -463,6 +463,7 @@ func TestDatascienceModelDeploymentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.memory_in_gbs", "12"), resource.TestCheckResourceAttr(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.ocpus", "2"), + resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.subnet_id"), resource.TestCheckResourceAttrSet(resourceName, "model_deployment_configuration_details.0.model_configuration_details.0.model_id"), @@ -521,6 +522,7 @@ func TestDatascienceModelDeploymentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.memory_in_gbs", "12"), resource.TestCheckResourceAttr(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.model_deployment_instance_shape_config_details.0.ocpus", "2"), + resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.instance_configuration.0.subnet_id"), resource.TestCheckResourceAttrSet(datasourceName, "model_deployments.0.model_deployment_configuration_details.0.model_configuration_details.0.model_id"), @@ -563,7 +565,7 @@ func TestDatascienceModelDeploymentResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.instance_count", "2"), resource.TestCheckResourceAttr(singularDatasourceName, "model_deployment_configuration_details.0.model_configuration_details.0.scaling_policy.0.policy_type", "FIXED_SIZE"), resource.TestCheckResourceAttrSet(singularDatasourceName, "model_deployment_url"), - resource.TestCheckNoResourceAttr(singularDatasourceName, "model_deployment_system_data"), + resource.TestCheckNoResourceAttr(singularDatasourceName, "model_deployment_system_data.#"), resource.TestCheckResourceAttr(singularDatasourceName, "state", "ACTIVE"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), ), diff --git a/internal/integrationtest/golden_gate_pipeline_running_process_test.go b/internal/integrationtest/golden_gate_pipeline_running_process_test.go new file mode 100644 index 00000000000..71ee66d7dbb --- /dev/null +++ b/internal/integrationtest/golden_gate_pipeline_running_process_test.go @@ -0,0 +1,56 @@ +// 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 ( + GoldenGatePipelineRunningProcessDataSourceRepresentation = map[string]interface{}{ + "pipeline_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_golden_gate_pipeline.test_pipeline.id}`}, + } + + GoldenGatePipelineRunningProcessResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Required, acctest.Create, GoldenGatePipelineRepresentation) +) + +// issue-routing-tag: golden_gate/default +func TestGoldenGatePipelineRunningProcessResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGoldenGatePipelineRunningProcessResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + makeVariableStr("source_connection_id", t) + + makeVariableStr("target_connection_id", t) + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + datasourceName := "data.oci_golden_gate_pipeline_running_processes.test_pipeline_running_processes" + + acctest.SaveConfigContent("", "", "", t) + + acctest.ResourceTest(t, nil, []resource.TestStep{ + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_golden_gate_pipeline_running_processes", "test_pipeline_running_processes", acctest.Required, acctest.Create, GoldenGatePipelineRunningProcessDataSourceRepresentation) + + compartmentIdVariableStr + GoldenGatePipelineRunningProcessResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_id"), + + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_running_process_collection.#"), + resource.TestCheckResourceAttr(datasourceName, "pipeline_running_process_collection.0.items.#", "0"), + ), + }, + }) +} diff --git a/internal/integrationtest/golden_gate_pipeline_schema_table_test.go b/internal/integrationtest/golden_gate_pipeline_schema_table_test.go new file mode 100644 index 00000000000..b420ea034f6 --- /dev/null +++ b/internal/integrationtest/golden_gate_pipeline_schema_table_test.go @@ -0,0 +1,66 @@ +// 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 ( + GoldenGatePipelineSchemaTableDataSourceRepresentation = map[string]interface{}{ + "pipeline_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_golden_gate_pipeline.test_pipeline.id}`}, + "source_schema_name": acctest.Representation{RepType: acctest.Required, Create: `${var.source_schema}`}, + "target_schema_name": acctest.Representation{RepType: acctest.Required, Create: `${var.target_schema}`}, + } + + GoldenGatePipelineSchemaTableResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Required, acctest.Create, GoldenGatePipelineRepresentation) +) + +// issue-routing-tag: golden_gate/default +func TestGoldenGatePipelineSchemaTableResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGoldenGatePipelineSchemaTableResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + makeVariableStr("source_connection_id", t) + + makeVariableStr("target_connection_id", t) + + makeVariableStr("source_schema", t) + + makeVariableStr("target_schema", t) + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + sourceSchema := utils.GetEnvSettingWithBlankDefault("source_schema") + targetSchema := utils.GetEnvSettingWithBlankDefault("target_schema") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + datasourceName := "data.oci_golden_gate_pipeline_schema_tables.test_pipeline_schema_tables" + + acctest.SaveConfigContent("", "", "", t) + + acctest.ResourceTest(t, nil, []resource.TestStep{ + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_golden_gate_pipeline_schema_tables", "test_pipeline_schema_tables", acctest.Required, acctest.Create, GoldenGatePipelineSchemaTableDataSourceRepresentation) + + compartmentIdVariableStr + GoldenGatePipelineSchemaTableResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_id"), + resource.TestCheckResourceAttr(datasourceName, "source_schema_name", sourceSchema), + resource.TestCheckResourceAttr(datasourceName, "target_schema_name", targetSchema), + + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_schema_table_collection.#"), + resource.TestCheckResourceAttr(datasourceName, "pipeline_schema_table_collection.0.items.#", "2"), + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_schema_table_collection.0.items.0.source_table_name"), + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_schema_table_collection.0.items.0.target_table_name"), + ), + }, + }) +} diff --git a/internal/integrationtest/golden_gate_pipeline_schema_test.go b/internal/integrationtest/golden_gate_pipeline_schema_test.go new file mode 100644 index 00000000000..f0ad9273ead --- /dev/null +++ b/internal/integrationtest/golden_gate_pipeline_schema_test.go @@ -0,0 +1,56 @@ +// 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 ( + GoldenGatePipelineSchemaDataSourceRepresentation = map[string]interface{}{ + "pipeline_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_golden_gate_pipeline.test_pipeline.id}`}, + } + + GoldenGatePipelineSchemaResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Required, acctest.Create, GoldenGatePipelineRepresentation) +) + +// issue-routing-tag: golden_gate/default +func TestGoldenGatePipelineSchemaResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGoldenGatePipelineSchemaResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + makeVariableStr("source_connection_id", t) + + makeVariableStr("target_connection_id", t) + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + datasourceName := "data.oci_golden_gate_pipeline_schemas.test_pipeline_schemas" + + acctest.SaveConfigContent("", "", "", t) + + acctest.ResourceTest(t, nil, []resource.TestStep{ + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_golden_gate_pipeline_schemas", "test_pipeline_schemas", acctest.Required, acctest.Create, GoldenGatePipelineSchemaDataSourceRepresentation) + + compartmentIdVariableStr + GoldenGatePipelineSchemaResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_id"), + + resource.TestCheckResourceAttrSet(datasourceName, "pipeline_schema_collection.#"), + //resource.TestCheckResourceAttr(datasourceName, "pipeline_schema_collection.0.items.#", "1"), + ), + }, + }) +} diff --git a/internal/integrationtest/golden_gate_pipeline_test.go b/internal/integrationtest/golden_gate_pipeline_test.go new file mode 100644 index 00000000000..371f6a739da --- /dev/null +++ b/internal/integrationtest/golden_gate_pipeline_test.go @@ -0,0 +1,443 @@ +// 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" + "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_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "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/tfresource" + "github.com/oracle/terraform-provider-oci/internal/utils" +) + +var ( + GoldenGatePipelineRequiredOnlyResource = GoldenGatePipelineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Required, acctest.Create, GoldenGatePipelineRepresentation) + + GoldenGatePipelineResourceConfig = GoldenGatePipelineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Optional, acctest.Update, GoldenGatePipelineRepresentation) + + GoldenGatePipelineSingularDataSourceRepresentation = map[string]interface{}{ + "pipeline_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_golden_gate_pipeline.test_pipeline.id}`}, + } + + GoldenGatePipelineDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, + "lifecycle_sub_state": acctest.Representation{RepType: acctest.Optional, Create: `STOPPED`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: GoldenGatePipelineDataSourceFilterRepresentation}} + GoldenGatePipelineDataSourceFilterRepresentation = map[string]interface{}{ + "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, + "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_golden_gate_pipeline.test_pipeline.id}`}}, + } + + GoldenGatePipelineRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `displayName`, Update: `displayName2`}, + "license_model": acctest.Representation{RepType: acctest.Required, Create: `LICENSE_INCLUDED`}, + "recipe_type": acctest.Representation{RepType: acctest.Required, Create: `ZERO_ETL`}, + "source_connection_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GoldenGatePipelineSourceConnectionDetailsRepresentation}, + "target_connection_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GoldenGatePipelineTargetConnectionDetailsRepresentation}, + "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + //"locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GoldenGatePipelineLocksRepresentation}, + "process_options": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GoldenGatePipelineProcessOptionsRepresentation}, + } + GoldenGatePipelineSourceConnectionDetailsRepresentation = map[string]interface{}{ + //"connection_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_golden_gate_connection.test_connection.id}`}, + "connection_id": acctest.Representation{RepType: acctest.Required, Create: `${var.source_connection_id}`}, + } + GoldenGatePipelineTargetConnectionDetailsRepresentation = map[string]interface{}{ + //"connection_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_golden_gate_connection.test_connection.id}`}, + "connection_id": acctest.Representation{RepType: acctest.Required, Create: `${var.target_connection_id}`}, + } + //GoldenGatePipelineLocksRepresentation = map[string]interface{}{ + // "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + // "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + //} + GoldenGatePipelineProcessOptionsRepresentation = map[string]interface{}{ + "initial_data_load": acctest.RepresentationGroup{RepType: acctest.Required, Group: GoldenGatePipelineProcessOptionsInitialDataLoadRepresentation}, + "replicate_schema_change": acctest.RepresentationGroup{RepType: acctest.Required, Group: GoldenGatePipelineProcessOptionsReplicateSchemaChangeRepresentation}, + "should_restart_on_failure": acctest.Representation{RepType: acctest.Required, Create: `ENABLED`, Update: `DISABLED`}, + } + GoldenGatePipelineProcessOptionsInitialDataLoadRepresentation = map[string]interface{}{ + "is_initial_load": acctest.Representation{RepType: acctest.Required, Create: `ENABLED`, Update: `DISABLED`}, + "action_on_existing_table": acctest.Representation{RepType: acctest.Optional, Create: `TRUNCATE`, Update: `REPLACE`}, + } + GoldenGatePipelineProcessOptionsReplicateSchemaChangeRepresentation = map[string]interface{}{ + "can_replicate_schema_change": acctest.Representation{RepType: acctest.Required, Create: `ENABLED`, Update: `DISABLED`}, + "action_on_ddl_error": acctest.Representation{RepType: acctest.Optional, Create: `TERMINATE`, Update: `DISCARD`}, + "action_on_dml_error": acctest.Representation{RepType: acctest.Optional, Create: `TERMINATE`, Update: `DISCARD`}, + } + + GoldenGatePipelineResourceDependencies = "" +) + +// issue-routing-tag: golden_gate/default +func TestGoldenGatePipelineResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGoldenGatePipelineResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + makeVariableStr("source_connection_id", t) + + makeVariableStr("target_connection_id", t) + + 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) + + resourceName := "oci_golden_gate_pipeline.test_pipeline" + datasourceName := "data.oci_golden_gate_pipelines.test_pipelines" + singularDatasourceName := "data.oci_golden_gate_pipeline.test_pipeline" + + 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+GoldenGatePipelineResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Optional, acctest.Create, GoldenGatePipelineRepresentation), "goldengate", "pipeline", t) + + acctest.ResourceTest(t, testAccCheckGoldenGatePipelineDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + GoldenGatePipelineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Required, acctest.Create, GoldenGatePipelineRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), + resource.TestCheckResourceAttr(resourceName, "recipe_type", "ZERO_ETL"), + resource.TestCheckResourceAttr(resourceName, "source_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "source_connection_details.0.connection_id"), + resource.TestCheckResourceAttr(resourceName, "target_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "target_connection_details.0.connection_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + GoldenGatePipelineResourceDependencies, + }, + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + GoldenGatePipelineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Optional, acctest.Create, GoldenGatePipelineRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "cpu_core_count"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "is_auto_scaling_enabled"), + resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), + resource.TestCheckResourceAttr(resourceName, "process_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.0.action_on_existing_table", "TRUNCATE"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.0.is_initial_load", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.action_on_ddl_error", "TERMINATE"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.action_on_dml_error", "TERMINATE"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.can_replicate_schema_change", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.should_restart_on_failure", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "recipe_type", "ZERO_ETL"), + resource.TestCheckResourceAttr(resourceName, "source_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "source_connection_details.0.connection_id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "target_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "target_connection_details.0.connection_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // verify Update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + GoldenGatePipelineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(GoldenGatePipelineRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttrSet(resourceName, "cpu_core_count"), + resource.TestCheckResourceAttr(resourceName, "description", "description"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "is_auto_scaling_enabled"), + resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), + resource.TestCheckResourceAttr(resourceName, "process_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.0.action_on_existing_table", "TRUNCATE"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.0.is_initial_load", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.action_on_ddl_error", "TERMINATE"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.action_on_dml_error", "TERMINATE"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.can_replicate_schema_change", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.should_restart_on_failure", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "recipe_type", "ZERO_ETL"), + resource.TestCheckResourceAttr(resourceName, "source_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "source_connection_details.0.connection_id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "target_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "target_connection_details.0.connection_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + GoldenGatePipelineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Optional, acctest.Update, GoldenGatePipelineRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(resourceName, "cpu_core_count"), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "is_auto_scaling_enabled"), + resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), + resource.TestCheckResourceAttr(resourceName, "process_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.0.action_on_existing_table", "REPLACE"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.initial_data_load.0.is_initial_load", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.#", "1"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.action_on_ddl_error", "DISCARD"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.action_on_dml_error", "DISCARD"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.replicate_schema_change.0.can_replicate_schema_change", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "process_options.0.should_restart_on_failure", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "recipe_type", "ZERO_ETL"), + resource.TestCheckResourceAttr(resourceName, "source_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "source_connection_details.0.connection_id"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttr(resourceName, "target_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "target_connection_details.0.connection_id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_golden_gate_pipelines", "test_pipelines", acctest.Optional, acctest.Update, GoldenGatePipelineDataSourceRepresentation) + + compartmentIdVariableStr + GoldenGatePipelineResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Optional, acctest.Update, GoldenGatePipelineRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "lifecycle_sub_state", "STOPPED"), + resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), + + resource.TestCheckResourceAttr(datasourceName, "pipeline_collection.#", "1"), + //resource.TestCheckResourceAttr(datasourceName, "pipeline_collection.0.items.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_golden_gate_pipeline", "test_pipeline", acctest.Required, acctest.Create, GoldenGatePipelineSingularDataSourceRepresentation) + + compartmentIdVariableStr + GoldenGatePipelineResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "pipeline_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(singularDatasourceName, "cpu_core_count"), + resource.TestCheckResourceAttr(singularDatasourceName, "description", "description2"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "is_auto_scaling_enabled"), + resource.TestCheckResourceAttr(singularDatasourceName, "license_model", "LICENSE_INCLUDED"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "lifecycle_sub_state"), + resource.TestCheckResourceAttr(singularDatasourceName, "mapping_rules.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.initial_data_load.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.initial_data_load.0.action_on_existing_table", "REPLACE"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.initial_data_load.0.is_initial_load", "DISABLED"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.replicate_schema_change.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.replicate_schema_change.0.action_on_ddl_error", "DISCARD"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.replicate_schema_change.0.action_on_dml_error", "DISCARD"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.replicate_schema_change.0.can_replicate_schema_change", "DISABLED"), + resource.TestCheckResourceAttr(singularDatasourceName, "process_options.0.should_restart_on_failure", "DISABLED"), + resource.TestCheckResourceAttr(singularDatasourceName, "recipe_type", "ZERO_ETL"), + resource.TestCheckResourceAttr(singularDatasourceName, "source_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttr(singularDatasourceName, "target_connection_details.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + //resource.TestCheckResourceAttrSet(singularDatasourceName, "time_last_recorded"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + ), + }, + // verify resource import + { + Config: config + GoldenGatePipelineRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{}, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckGoldenGatePipelineDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).GoldenGateClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_golden_gate_pipeline" { + noResourceFound = false + request := oci_golden_gate.GetPipelineRequest{} + + tmp := rs.Primary.ID + request.PipelineId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "golden_gate") + + response, err := client.GetPipeline(context.Background(), request) + + if err == nil { + deletedLifecycleStates := map[string]bool{ + string(oci_golden_gate.PipelineLifecycleStateDeleted): 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("GoldenGatePipeline") { + resource.AddTestSweepers("GoldenGatePipeline", &resource.Sweeper{ + Name: "GoldenGatePipeline", + Dependencies: acctest.DependencyGraph["pipeline"], + F: sweepGoldenGatePipelineResource, + }) + } +} + +func sweepGoldenGatePipelineResource(compartment string) error { + goldenGateClient := acctest.GetTestClients(&schema.ResourceData{}).GoldenGateClient() + pipelineIds, err := getGoldenGatePipelineIds(compartment) + if err != nil { + return err + } + for _, pipelineId := range pipelineIds { + if ok := acctest.SweeperDefaultResourceId[pipelineId]; !ok { + deletePipelineRequest := oci_golden_gate.DeletePipelineRequest{} + + deletePipelineRequest.PipelineId = &pipelineId + + deletePipelineRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "golden_gate") + _, error := goldenGateClient.DeletePipeline(context.Background(), deletePipelineRequest) + if error != nil { + fmt.Printf("Error deleting Pipeline %s %s, It is possible that the resource is already deleted. Please verify manually \n", pipelineId, error) + continue + } + acctest.WaitTillCondition(acctest.TestAccProvider, &pipelineId, GoldenGatePipelineSweepWaitCondition, time.Duration(3*time.Minute), + GoldenGatePipelineSweepResponseFetchOperation, "golden_gate", true) + } + } + return nil +} + +func getGoldenGatePipelineIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "PipelineId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + goldenGateClient := acctest.GetTestClients(&schema.ResourceData{}).GoldenGateClient() + + listPipelinesRequest := oci_golden_gate.ListPipelinesRequest{} + listPipelinesRequest.CompartmentId = &compartmentId + listPipelinesRequest.LifecycleState = oci_golden_gate.PipelineLifecycleStateActive + listPipelinesResponse, err := goldenGateClient.ListPipelines(context.Background(), listPipelinesRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting Pipeline list for compartment id : %s , %s \n", compartmentId, err) + } + for _, pipeline := range listPipelinesResponse.Items { + id := *pipeline.GetId() + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "PipelineId", id) + } + return resourceIds, nil +} + +func GoldenGatePipelineSweepWaitCondition(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 pipelineResponse, ok := response.Response.(oci_golden_gate.GetPipelineResponse); ok { + return pipelineResponse.GetLifecycleState() != oci_golden_gate.PipelineLifecycleStateDeleted + } + return false +} + +func GoldenGatePipelineSweepResponseFetchOperation(client *tf_client.OracleClients, resourceId *string, retryPolicy *common.RetryPolicy) error { + _, err := client.GoldenGateClient().GetPipeline(context.Background(), oci_golden_gate.GetPipelineRequest{ + PipelineId: resourceId, + RequestMetadata: common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + return err +} diff --git a/internal/integrationtest/golden_gate_recipe_test.go b/internal/integrationtest/golden_gate_recipe_test.go new file mode 100644 index 00000000000..5370a1e1779 --- /dev/null +++ b/internal/integrationtest/golden_gate_recipe_test.go @@ -0,0 +1,57 @@ +// 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 ( + GoldenGateRecipeDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`}, + "recipe_type": acctest.Representation{RepType: acctest.Optional, Create: `ZERO_ETL`}, + } + + GoldenGateRecipeResourceConfig = "" +) + +// issue-routing-tag: golden_gate/default +func TestGoldenGateRecipeResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGoldenGateRecipeResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + datasourceName := "data.oci_golden_gate_recipes.test_recipes" + + acctest.SaveConfigContent("", "", "", t) + + acctest.ResourceTest(t, nil, []resource.TestStep{ + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_golden_gate_recipes", "test_recipes", acctest.Required, acctest.Create, GoldenGateRecipeDataSourceRepresentation) + + compartmentIdVariableStr + GoldenGateRecipeResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + + resource.TestCheckResourceAttrSet(datasourceName, "recipe_summary_collection.#"), + resource.TestCheckResourceAttr(datasourceName, "recipe_summary_collection.0.items.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "recipe_summary_collection.0.items.0.recipe_type", "ZERO_ETL"), + ), + }, + }) +} diff --git a/internal/integrationtest/stack_monitoring_metric_extension_test.go b/internal/integrationtest/stack_monitoring_metric_extension_test.go index a0543ac4343..8c8e8ae1549 100644 --- a/internal/integrationtest/stack_monitoring_metric_extension_test.go +++ b/internal/integrationtest/stack_monitoring_metric_extension_test.go @@ -30,19 +30,21 @@ var ( acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Required, acctest.Create, StackMonitoringMetricExtensionRepresentation) StackMonitoringMetricExtensionResourceConfig = StackMonitoringMetricExtensionResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionInParamRepresentation) StackMonitoringMetricExtensionSingularDataSourceRepresentation = map[string]interface{}{ "metric_extension_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_stack_monitoring_metric_extension.test_metric_extension.id}`}, } StackMonitoringMetricExtensionDataSourceRepresentation = map[string]interface{}{ - "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, - "name": acctest.Representation{RepType: acctest.Optional, Create: `ME_CountOfRunningInstances`}, - "resource_type": acctest.Representation{RepType: acctest.Optional, Create: `ebs_instance`}, - "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, - "status": acctest.Representation{RepType: acctest.Optional, Create: `DRAFT`}, - "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionDataSourceFilterRepresentation}} + "compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`}, + "metric_extension_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_stack_monitoring_metric_extension.test_metric_extension.id}`}, + "name": acctest.Representation{RepType: acctest.Optional, Create: `ME_CountOfRunningInstances`}, + "resource_type": acctest.Representation{RepType: acctest.Optional, Create: `ebs_instance`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, + "status": acctest.Representation{RepType: acctest.Optional, Create: `DRAFT`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionDataSourceFilterRepresentation}, + } StackMonitoringMetricExtensionDataSourceFilterRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, @@ -60,6 +62,7 @@ var ( "description": acctest.Representation{RepType: acctest.Optional, Create: `Collects count of instances in 'UP' status in staging compartments from monitoring table`, Update: `Gives value 1 when All servers are in 'UP' status in production compartments in monitoring table`}, "publish_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, } + StackMonitoringMetricExtensionMetricListRepresentation = map[string]interface{}{ "data_type": acctest.Representation{RepType: acctest.Required, Create: `NUMBER`}, "name": acctest.Representation{RepType: acctest.Required, Create: `CountOfRunningInstances`, Update: `AllServerStatus`}, @@ -70,6 +73,7 @@ var ( "metric_category": acctest.Representation{RepType: acctest.Optional, Create: `AVAILABILITY`, Update: `UTILIZATION`}, "unit": acctest.Representation{RepType: acctest.Optional, Create: `count`, Update: ` `}, } + StackMonitoringMetricExtensionQueryPropertiesRepresentation = map[string]interface{}{ "collection_method": acctest.Representation{RepType: acctest.Required, Create: `SQL`}, "in_param_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: StackMonitoringMetricExtensionQueryPropertiesInParamDetailsRepresentation}, @@ -77,17 +81,45 @@ var ( "sql_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionQueryPropertiesSqlDetailsRepresentation}, "sql_type": acctest.Representation{RepType: acctest.Required, Create: `STATEMENT`, Update: `STATEMENT`}, } + StackMonitoringMetricExtensionQueryPropertiesInParamDetailsRepresentation = map[string]interface{}{ "in_param_position": acctest.Representation{RepType: acctest.Optional, Create: `1`, Update: `2`}, "in_param_value": acctest.Representation{RepType: acctest.Optional, Create: `staging`, Update: `production`}, } + StackMonitoringMetricExtensionQueryPropertiesOutParamDetailsRepresentation = map[string]interface{}{ + "out_param_name": acctest.Representation{RepType: acctest.Optional, Create: `outParamName`, Update: `outParamName2`}, "out_param_position": acctest.Representation{RepType: acctest.Optional, Create: `2`, Update: `3`}, "out_param_type": acctest.Representation{RepType: acctest.Optional, Create: `SQL_CURSOR`, Update: `ARRAY`}, } StackMonitoringMetricExtensionQueryPropertiesSqlDetailsRepresentation = map[string]interface{}{ - "content": acctest.Representation{RepType: acctest.Required, Create: `U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJyBBTkQgY29tcGFydG1lbnRfdHlwZSA9IDox`, Update: `U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJyBBTkQgY29tcGFydG1lbnRfdHlwZSA9IDoy`}, + "content": acctest.Representation{RepType: acctest.Required, Create: `U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJw==`, Update: `U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJw==`}, + "script_file_name": acctest.Representation{RepType: acctest.Optional, Create: `No-File`, Update: ` `}, + } + + StackMonitoringMetricExtensionInParamRepresentation = map[string]interface{}{ + "collection_recurrences": acctest.Representation{RepType: acctest.Required, Create: `FREQ=MINUTELY;INTERVAL=10`, Update: `FREQ=MINUTELY;INTERVAL=5`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `Count of Running Instances`, Update: `All Server Instances Running Factor`}, + "metric_list": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionMetricListRepresentation}, + "name": acctest.Representation{RepType: acctest.Required, Create: `ME_CountOfRunningInstances`}, + "query_properties": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionQueryPropertiesInParamRepresentation}, + "resource_type": acctest.Representation{RepType: acctest.Required, Create: `ebs_instance`}, + "description": acctest.Representation{RepType: acctest.Optional, Create: `Collects count of instances in 'UP' status in staging compartments from monitoring table`, Update: `Gives value 1 when All servers are in 'UP' status in production compartments in monitoring table`}, + "publish_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, + } + + StackMonitoringMetricExtensionQueryPropertiesInParamRepresentation = map[string]interface{}{ + "collection_method": acctest.Representation{RepType: acctest.Required, Create: `SQL`}, + "in_param_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: StackMonitoringMetricExtensionQueryPropertiesInParamDetailsRepresentation}, + "out_param_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: StackMonitoringMetricExtensionQueryPropertiesOutParamDetailsRepresentation}, + "sql_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionQueryPropertiesSqlDetailsInParamRepresentation}, + "sql_type": acctest.Representation{RepType: acctest.Required, Create: `STATEMENT`, Update: `STATEMENT`}, + } + + StackMonitoringMetricExtensionQueryPropertiesSqlDetailsInParamRepresentation = map[string]interface{}{ + "content": acctest.Representation{RepType: acctest.Required, Create: `U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBpbnRvIDoyIEZST00gbW9uaXRvcmluZ190YWJsZSBXSEVSRSBzdGF0dXMgPSAnVVAnIEFORCBjb21wYXJ0bWVudF90eXBlID0gOjE=`, Update: `U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBpbnRvIDozIEZST00gbW9uaXRvcmluZ190YWJsZSBXSEVSRSBzdGF0dXMgPSAnVVAnIEFORCBjb21wYXJ0bWVudF90eXBlID0gOjI=`}, "script_file_name": acctest.Representation{RepType: acctest.Optional, Create: `No-File`, Update: ` `}, } @@ -146,6 +178,7 @@ var ( "metric_category": acctest.Representation{RepType: acctest.Optional, Create: `UTILIZATION`}, "unit": acctest.Representation{RepType: acctest.Optional, Create: `percent`}, } + StackMonitoringMetricExtensionQueryPropertiesForPublishRepresentation = map[string]interface{}{ "collection_method": acctest.Representation{RepType: acctest.Required, Create: `OS_COMMAND`}, "command": acctest.Representation{RepType: acctest.Optional, Create: `/bin/bash`}, @@ -173,12 +206,14 @@ var ( "description": acctest.Representation{RepType: acctest.Optional, Create: `Collects TotalPhysicalMemoryInGB for server named PIA in Giga bytes`, Update: `Collects TotalPhysicalMemoryInGB for server named PIA in GBs`}, "publish_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, } + StackMonitoringMetricExtensionJmxMetricList0Representation = map[string]interface{}{ "data_type": acctest.Representation{RepType: acctest.Required, Create: `NUMBER`}, "name": acctest.Representation{RepType: acctest.Required, Create: `TotalPhysicalMemorySize`, Update: `TotalPhysicalMemorySizeInBytes`}, "is_dimension": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, "is_hidden": acctest.Representation{RepType: acctest.Optional, Create: `true`, Update: `true`}, } + StackMonitoringMetricExtensionJmxMetricList1Representation = map[string]interface{}{ "data_type": acctest.Representation{RepType: acctest.Required, Create: `NUMBER`}, "name": acctest.Representation{RepType: acctest.Required, Create: `TotalPhysicalMemorySizeGigaBytes`, Update: `TotalPhysicalMemorySizeGB`}, @@ -187,6 +222,7 @@ var ( "is_dimension": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, "is_hidden": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, } + StackMonitoringMetricExtensionJmxQueryPropertiesRepresentation = map[string]interface{}{ "collection_method": acctest.Representation{RepType: acctest.Required, Create: `JMX`}, "managed_bean_query": acctest.Representation{RepType: acctest.Required, Create: `java.lang:type=OperatingSystem,Location=PIA`}, @@ -194,6 +230,50 @@ var ( "auto_row_prefix": acctest.Representation{RepType: acctest.Optional, Create: `PseudoKey`}, } + StackMonitoringMetricExtensionHttpRequiredOnlyResource = StackMonitoringMetricExtensionResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension_http", acctest.Required, acctest.Create, StackMonitoringMetricExtensionHttpRepresentation) + + StackMonitoringMetricExtensionHttpRepresentation = map[string]interface{}{ + "collection_recurrences": acctest.Representation{RepType: acctest.Required, Create: `FREQ=MINUTELY;INTERVAL=10`, Update: `FREQ=MINUTELY;INTERVAL=5`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `IO Performance`, Update: `IO Process Performance`}, + "metric_list": []acctest.RepresentationGroup{{RepType: acctest.Required, Group: StackMonitoringMetricExtensionHttpMetricList0Representation}, {RepType: acctest.Required, Group: StackMonitoringMetricExtensionHttpMetricList1Representation}}, + "name": acctest.Representation{RepType: acctest.Required, Create: `ME_GoldenGateIoPerformance`}, + "query_properties": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionHttpQueryPropertiesRepresentation}, + "resource_type": acctest.Representation{RepType: acctest.Required, Create: `oracle_goldengate_admin_server`}, + "description": acctest.Representation{RepType: acctest.Optional, Create: `Collects IO Performance Data`, Update: `Collects IO Process Performance Data`}, + "publish_trigger": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, + } + + StackMonitoringMetricExtensionHttpMetricList0Representation = map[string]interface{}{ + "data_type": acctest.Representation{RepType: acctest.Required, Create: `NUMBER`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `IoReadBytes`, Update: `IoProcessReadBytes`}, + "is_dimension": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, + "is_hidden": acctest.Representation{RepType: acctest.Optional, Create: `true`, Update: `true`}, + } + + StackMonitoringMetricExtensionHttpMetricList1Representation = map[string]interface{}{ + "data_type": acctest.Representation{RepType: acctest.Required, Create: `NUMBER`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `IoReadRate`, Update: `IoProcessReadRate`}, + "compute_expression": acctest.Representation{RepType: acctest.Optional, Create: `(IoReadBytes > 0 ? (__interval == 0 ? 0 : (IoReadBytes > _IoReadBytes ? (((IoReadBytes - _IoReadBytes) / __interval) / (1024 * 1024)) : 0)) : 0)`, Update: `(IoProcessReadBytes > 0 ? (__interval == 0 ? 0 : (IoProcessReadBytes > _IoProcessReadBytes ? (((IoProcessReadBytes - _IoProcessReadBytes) / __interval) / (1024 * 1024)) : 0)) : 0)`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `IO Read Rate`, Update: `IO Process Read Rate`}, + "is_dimension": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, + "is_hidden": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, + } + + StackMonitoringMetricExtensionHttpQueryPropertiesRepresentation = map[string]interface{}{ + "collection_method": acctest.Representation{RepType: acctest.Required, Create: `HTTP`}, + "url": acctest.Representation{RepType: acctest.Required, Create: `%pm_server_url%/services/v2/mpoints/%api_process_name%/processPerformance`, Update: `url2`}, + "protocol_type": acctest.Representation{RepType: acctest.Optional, Create: `HTTPS`, Update: `HTTPS`}, + "response_content_type": acctest.Representation{RepType: acctest.Required, Create: `APPLICATION_JSON`, Update: `TEXT_HTML`}, + "script_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: StackMonitoringMetricExtensionHttpQueryPropertiesScriptDetailsRepresentation}, + } + + StackMonitoringMetricExtensionHttpQueryPropertiesScriptDetailsRepresentation = map[string]interface{}{ + "content": acctest.Representation{RepType: acctest.Required, Create: `ZnVuY3Rpb24gcnVuTWV0aG9kKG1ldHJpY09ic2VydmF0aW9uLCBzb3VyY2VQcm9wcykKewogICAgbGV0IHJlc3BvbnNlX3JhdyA9IEpTT04ucGFyc2UobWV0cmljT2JzZXJ2YXRpb24pOwogICAgbGV0IHJlc3BvbnNlID0gcmVzcG9uc2VfcmF3LnJlc3BvbnNlOwogICAgbGV0IGlvUmVhZEJ5dGVzID0gcmVzcG9uc2VbImlvUmVhZEJ5dGVzIl07CiAgICByZXR1cm4gW1tpb1JlYWRCeXRlc11dOwp9`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `process_performance.js`}, + } + StackMonitoringMetricExtensionResourceDependencies = "" ) @@ -217,9 +297,10 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { resourceNameForPublish := "oci_stack_monitoring_metric_extension.test_metric_extension_for_publish" var resId, resId2, resId3, resId4 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+StackMonitoringMetricExtensionResourceDependencies+ - acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Create, StackMonitoringMetricExtensionRepresentation), "stackmonitoring", "metricExtension", t) + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Create, StackMonitoringMetricExtensionInParamRepresentation), "stackmonitoring", "metricExtension", t) acctest.ResourceTest(t, testAccCheckStackMonitoringMetricExtensionDestroy, []resource.TestStep{ // verify Create @@ -237,7 +318,7 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "query_properties.#", "1"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.collection_method", "SQL"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.#", "1"), - resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJyBBTkQgY29tcGFydG1lbnRfdHlwZSA9IDox"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJw=="), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_type", "STATEMENT"), resource.TestCheckResourceAttr(resourceName, "resource_type", "ebs_instance"), resource.TestCheckResourceAttr(resourceName, "status", "DRAFT"), @@ -253,25 +334,26 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { { Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies, }, + // verify Create with optionals { Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Create, StackMonitoringMetricExtensionRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Create, StackMonitoringMetricExtensionInParamRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "collection_method"), resource.TestCheckResourceAttr(resourceName, "collection_recurrences", "FREQ=MINUTELY;INTERVAL=10"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(resourceName, "description", "Collects count of instances in 'UP' status in staging compartments from monitoring table"), resource.TestCheckResourceAttr(resourceName, "display_name", "Count of Running Instances"), + resource.TestCheckResourceAttr(resourceName, "description", "Collects count of instances in 'UP' status in staging compartments from monitoring table"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "metric_list.#", "1"), - resource.TestCheckResourceAttr(resourceName, "metric_list.0.compute_expression", "CountOfRunningInstances - _CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "CountOfRunningInstances"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.compute_expression", "CountOfRunningInstances - _CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.display_name", "Count of Running Instances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_dimension", "false"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_hidden", "false"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.metric_category", "AVAILABILITY"), - resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.unit", "count"), resource.TestCheckResourceAttr(resourceName, "name", "ME_CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "query_properties.#", "1"), @@ -280,10 +362,11 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "query_properties.0.in_param_details.0.in_param_position", "1"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.in_param_details.0.in_param_value", "staging"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_name", "outParamName"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_position", "2"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_type", "SQL_CURSOR"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.#", "1"), - resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJyBBTkQgY29tcGFydG1lbnRfdHlwZSA9IDox"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBpbnRvIDoyIEZST00gbW9uaXRvcmluZ190YWJsZSBXSEVSRSBzdGF0dXMgPSAnVVAnIEFORCBjb21wYXJ0bWVudF90eXBlID0gOjE="), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.script_file_name", "No-File"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_type", "STATEMENT"), resource.TestCheckResourceAttr(resourceName, "resource_type", "ebs_instance"), @@ -306,31 +389,37 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + StackMonitoringMetricExtensionResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Create, - acctest.RepresentationCopyWithNewProperties(StackMonitoringMetricExtensionRepresentation, map[string]interface{}{ + acctest.RepresentationCopyWithNewProperties(StackMonitoringMetricExtensionInParamRepresentation, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, })), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "collection_method"), resource.TestCheckResourceAttr(resourceName, "collection_recurrences", "FREQ=MINUTELY;INTERVAL=10"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), - resource.TestCheckResourceAttr(resourceName, "description", "Collects count of instances in 'UP' status in staging compartments from monitoring table"), resource.TestCheckResourceAttr(resourceName, "display_name", "Count of Running Instances"), + resource.TestCheckResourceAttr(resourceName, "description", "Collects count of instances in 'UP' status in staging compartments from monitoring table"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "metric_list.#", "1"), - resource.TestCheckResourceAttr(resourceName, "metric_list.0.compute_expression", "CountOfRunningInstances - _CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "CountOfRunningInstances"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.compute_expression", "CountOfRunningInstances - _CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.display_name", "Count of Running Instances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_dimension", "false"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_hidden", "false"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.metric_category", "AVAILABILITY"), - resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.unit", "count"), resource.TestCheckResourceAttr(resourceName, "name", "ME_CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "query_properties.#", "1"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.collection_method", "SQL"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.in_param_details.#", "1"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.in_param_details.0.in_param_position", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.in_param_details.0.in_param_value", "staging"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_name", "outParamName"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_position", "2"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_type", "SQL_CURSOR"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.#", "1"), - resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJyBBTkQgY29tcGFydG1lbnRfdHlwZSA9IDox"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBpbnRvIDoyIEZST00gbW9uaXRvcmluZ190YWJsZSBXSEVSRSBzdGF0dXMgPSAnVVAnIEFORCBjb21wYXJ0bWVudF90eXBlID0gOjE="), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.script_file_name", "No-File"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_type", "STATEMENT"), resource.TestCheckResourceAttr(resourceName, "resource_type", "ebs_instance"), @@ -350,22 +439,22 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { // verify updates to updatable parameters { Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionInParamRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "collection_method"), resource.TestCheckResourceAttr(resourceName, "collection_recurrences", "FREQ=MINUTELY;INTERVAL=5"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(resourceName, "description", "Gives value 1 when All servers are in 'UP' status in production compartments in monitoring table"), resource.TestCheckResourceAttr(resourceName, "display_name", "All Server Instances Running Factor"), + resource.TestCheckResourceAttr(resourceName, "description", "Gives value 1 when All servers are in 'UP' status in production compartments in monitoring table"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "metric_list.#", "1"), - resource.TestCheckResourceAttr(resourceName, "metric_list.0.compute_expression", "(AllServerStatus >= _AllServerStatus) ? 1 : 0"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "AllServerStatus"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.compute_expression", "(AllServerStatus >= _AllServerStatus) ? 1 : 0"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.display_name", "All Server Running Factor"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_dimension", "false"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_hidden", "false"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.metric_category", "UTILIZATION"), - resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "AllServerStatus"), resource.TestCheckResourceAttr(resourceName, "metric_list.0.unit", " "), resource.TestCheckResourceAttr(resourceName, "name", "ME_CountOfRunningInstances"), resource.TestCheckResourceAttr(resourceName, "query_properties.#", "1"), @@ -374,10 +463,11 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "query_properties.0.in_param_details.0.in_param_position", "2"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.in_param_details.0.in_param_value", "production"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_name", "outParamName2"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_position", "3"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.out_param_details.0.out_param_type", "ARRAY"), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.#", "1"), - resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJyBBTkQgY29tcGFydG1lbnRfdHlwZSA9IDoy"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBpbnRvIDozIEZST00gbW9uaXRvcmluZ190YWJsZSBXSEVSRSBzdGF0dXMgPSAnVVAnIEFORCBjb21wYXJ0bWVudF90eXBlID0gOjI="), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_details.0.script_file_name", " "), resource.TestCheckResourceAttr(resourceName, "query_properties.0.sql_type", "STATEMENT"), resource.TestCheckResourceAttr(resourceName, "resource_type", "ebs_instance"), @@ -387,7 +477,7 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { 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 fmt.Errorf("resource recreated when it was supposed to be updated") } return err }, @@ -399,9 +489,10 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_stack_monitoring_metric_extensions", "test_metric_extensions", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionDataSourceRepresentation) + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionInParamRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttrSet(datasourceName, "metric_extension_id"), resource.TestCheckResourceAttr(datasourceName, "name", "ME_CountOfRunningInstances"), resource.TestCheckResourceAttr(datasourceName, "resource_type", "ebs_instance"), resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), @@ -418,13 +509,12 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { compartmentIdVariableStr + StackMonitoringMetricExtensionResourceConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "metric_extension_id"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "collection_method"), resource.TestCheckResourceAttr(singularDatasourceName, "collection_recurrences", "FREQ=MINUTELY;INTERVAL=5"), resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttrSet(singularDatasourceName, "created_by"), - resource.TestCheckResourceAttr(singularDatasourceName, "description", "Gives value 1 when All servers are in 'UP' status in production compartments in monitoring table"), resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "All Server Instances Running Factor"), + resource.TestCheckResourceAttr(singularDatasourceName, "description", "Gives value 1 when All servers are in 'UP' status in production compartments in monitoring table"), resource.TestCheckResourceAttr(singularDatasourceName, "enabled_on_resources.#", "0"), resource.TestCheckResourceAttr(singularDatasourceName, "enabled_on_resources_count", "0"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), @@ -444,10 +534,11 @@ func TestStackMonitoringMetricExtensionResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.in_param_details.0.in_param_position", "2"), resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.in_param_details.0.in_param_value", "production"), resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.out_param_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.out_param_details.0.out_param_name", "outParamName2"), resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.out_param_details.0.out_param_position", "3"), resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.out_param_details.0.out_param_type", "ARRAY"), resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.sql_details.#", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBGUk9NIG1vbml0b3JpbmdfdGFibGUgV0hFUkUgc3RhdHVzID0gJ1VQJyBBTkQgY29tcGFydG1lbnRfdHlwZSA9IDoy"), + resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.sql_details.0.content", "U0VMRUNUIGNvdW50KGluc3RhbmNlX2lkKSBpbnRvIDozIEZST00gbW9uaXRvcmluZ190YWJsZSBXSEVSRSBzdGF0dXMgPSAnVVAnIEFORCBjb21wYXJ0bWVudF90eXBlID0gOjI="), resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.sql_details.0.script_file_name", " "), resource.TestCheckResourceAttr(singularDatasourceName, "query_properties.0.sql_type", "STATEMENT"), resource.TestCheckResourceAttr(singularDatasourceName, "resource_type", "ebs_instance"), @@ -737,7 +828,7 @@ func TestStackMonitoringMetricExtensionResource_jmx(t *testing.T) { 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 fmt.Errorf("resource recreated when it was supposed to be updated") } return err }, @@ -760,6 +851,168 @@ func TestStackMonitoringMetricExtensionResource_jmx(t *testing.T) { }) } +func TestStackMonitoringMetricExtensionResource_http(t *testing.T) { + httpreplay.SetScenario("TestStackMonitoringMetricExtensionResource_http") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + resourceName := "oci_stack_monitoring_metric_extension.test_metric_extension_http" + + 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+StackMonitoringMetricExtensionResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension_http", acctest.Optional, acctest.Create, StackMonitoringMetricExtensionHttpRepresentation), "stackmonitoring", "metricExtension", t) + + acctest.ResourceTest(t, testAccCheckStackMonitoringMetricExtensionDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension_http", acctest.Required, acctest.Create, StackMonitoringMetricExtensionHttpRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "collection_recurrences", "FREQ=MINUTELY;INTERVAL=10"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "IO Performance"), + resource.TestCheckResourceAttr(resourceName, "metric_list.#", "2"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "IoReadBytes"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.name", "IoReadRate"), + resource.TestCheckResourceAttr(resourceName, "name", "ME_GoldenGateIoPerformance"), + resource.TestCheckResourceAttr(resourceName, "query_properties.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.collection_method", "HTTP"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.url", "%pm_server_url%/services/v2/mpoints/%api_process_name%/processPerformance"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.response_content_type", "APPLICATION_JSON"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.0.content", "ZnVuY3Rpb24gcnVuTWV0aG9kKG1ldHJpY09ic2VydmF0aW9uLCBzb3VyY2VQcm9wcykKewogICAgbGV0IHJlc3BvbnNlX3JhdyA9IEpTT04ucGFyc2UobWV0cmljT2JzZXJ2YXRpb24pOwogICAgbGV0IHJlc3BvbnNlID0gcmVzcG9uc2VfcmF3LnJlc3BvbnNlOwogICAgbGV0IGlvUmVhZEJ5dGVzID0gcmVzcG9uc2VbImlvUmVhZEJ5dGVzIl07CiAgICByZXR1cm4gW1tpb1JlYWRCeXRlc11dOwp9"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.0.name", "process_performance.js"), + resource.TestCheckResourceAttr(resourceName, "resource_type", "oracle_goldengate_admin_server"), + resource.TestCheckResourceAttr(resourceName, "status", "DRAFT"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies, + }, + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension_http", acctest.Optional, acctest.Create, StackMonitoringMetricExtensionHttpRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "collection_method"), + resource.TestCheckResourceAttr(resourceName, "collection_recurrences", "FREQ=MINUTELY;INTERVAL=10"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "IO Performance"), + resource.TestCheckResourceAttr(resourceName, "description", "Collects IO Performance Data"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "metric_list.#", "2"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "IoReadBytes"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_hidden", "true"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_dimension", "false"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.name", "IoReadRate"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.compute_expression", "(IoReadBytes > 0 ? (__interval == 0 ? 0 : (IoReadBytes > _IoReadBytes ? (((IoReadBytes - _IoReadBytes) / __interval) / (1024 * 1024)) : 0)) : 0)"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.display_name", "IO Read Rate"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.is_hidden", "false"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.is_dimension", "false"), + resource.TestCheckResourceAttr(resourceName, "name", "ME_GoldenGateIoPerformance"), + resource.TestCheckResourceAttr(resourceName, "query_properties.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.collection_method", "HTTP"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.url", "%pm_server_url%/services/v2/mpoints/%api_process_name%/processPerformance"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.response_content_type", "APPLICATION_JSON"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.protocol_type", "HTTPS"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.0.content", "ZnVuY3Rpb24gcnVuTWV0aG9kKG1ldHJpY09ic2VydmF0aW9uLCBzb3VyY2VQcm9wcykKewogICAgbGV0IHJlc3BvbnNlX3JhdyA9IEpTT04ucGFyc2UobWV0cmljT2JzZXJ2YXRpb24pOwogICAgbGV0IHJlc3BvbnNlID0gcmVzcG9uc2VfcmF3LnJlc3BvbnNlOwogICAgbGV0IGlvUmVhZEJ5dGVzID0gcmVzcG9uc2VbImlvUmVhZEJ5dGVzIl07CiAgICByZXR1cm4gW1tpb1JlYWRCeXRlc11dOwp9"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.0.name", "process_performance.js"), + resource.TestCheckResourceAttr(resourceName, "resource_type", "oracle_goldengate_admin_server"), + resource.TestCheckResourceAttr(resourceName, "status", "DRAFT"), + resource.TestCheckResourceAttrSet(resourceName, "status"), + resource.TestCheckResourceAttrSet(resourceName, "tenant_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_stack_monitoring_metric_extension", "test_metric_extension_http", acctest.Optional, acctest.Update, StackMonitoringMetricExtensionHttpRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "collection_method"), + resource.TestCheckResourceAttr(resourceName, "collection_recurrences", "FREQ=MINUTELY;INTERVAL=5"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "IO Process Performance"), + resource.TestCheckResourceAttr(resourceName, "description", "Collects IO Process Performance Data"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "metric_list.#", "2"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.name", "IoProcessReadBytes"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_hidden", "true"), + resource.TestCheckResourceAttr(resourceName, "metric_list.0.is_dimension", "false"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.data_type", "NUMBER"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.name", "IoProcessReadRate"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.compute_expression", "(IoProcessReadBytes > 0 ? (__interval == 0 ? 0 : (IoProcessReadBytes > _IoProcessReadBytes ? (((IoProcessReadBytes - _IoProcessReadBytes) / __interval) / (1024 * 1024)) : 0)) : 0)"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.display_name", "IO Process Read Rate"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.is_hidden", "false"), + resource.TestCheckResourceAttr(resourceName, "metric_list.1.is_dimension", "false"), + resource.TestCheckResourceAttr(resourceName, "name", "ME_GoldenGateIoPerformance"), + resource.TestCheckResourceAttr(resourceName, "query_properties.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.collection_method", "HTTP"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.url", "url2"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.response_content_type", "TEXT_HTML"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.protocol_type", "HTTPS"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.0.content", "ZnVuY3Rpb24gcnVuTWV0aG9kKG1ldHJpY09ic2VydmF0aW9uLCBzb3VyY2VQcm9wcykKewogICAgbGV0IHJlc3BvbnNlX3JhdyA9IEpTT04ucGFyc2UobWV0cmljT2JzZXJ2YXRpb24pOwogICAgbGV0IHJlc3BvbnNlID0gcmVzcG9uc2VfcmF3LnJlc3BvbnNlOwogICAgbGV0IGlvUmVhZEJ5dGVzID0gcmVzcG9uc2VbImlvUmVhZEJ5dGVzIl07CiAgICByZXR1cm4gW1tpb1JlYWRCeXRlc11dOwp9"), + resource.TestCheckResourceAttr(resourceName, "query_properties.0.script_details.0.name", "process_performance.js"), + resource.TestCheckResourceAttr(resourceName, "resource_type", "oracle_goldengate_admin_server"), + resource.TestCheckResourceAttr(resourceName, "status", "DRAFT"), + resource.TestCheckResourceAttrSet(resourceName, "status"), + resource.TestCheckResourceAttrSet(resourceName, "tenant_id"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + + // verify resource import + { + Config: config + StackMonitoringMetricExtensionHttpRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{}, + ResourceName: resourceName, + }, + + // delete http resource from previous step + { + Config: config + compartmentIdVariableStr + StackMonitoringMetricExtensionResourceDependencies, + }, + }) +} + func testAccCheckStackMonitoringMetricExtensionDestroy(s *terraform.State) error { noResourceFound := true client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).StackMonitoringClient() diff --git a/internal/provider/register_datasource.go b/internal/provider/register_datasource.go index a29af650477..8720d610067 100644 --- a/internal/provider/register_datasource.go +++ b/internal/provider/register_datasource.go @@ -52,7 +52,6 @@ import ( tf_devops "github.com/oracle/terraform-provider-oci/internal/service/devops" tf_disaster_recovery "github.com/oracle/terraform-provider-oci/internal/service/disaster_recovery" tf_dns "github.com/oracle/terraform-provider-oci/internal/service/dns" - tf_em_warehouse "github.com/oracle/terraform-provider-oci/internal/service/em_warehouse" tf_email "github.com/oracle/terraform-provider-oci/internal/service/email" tf_events "github.com/oracle/terraform-provider-oci/internal/service/events" tf_file_storage "github.com/oracle/terraform-provider-oci/internal/service/file_storage" @@ -274,9 +273,6 @@ func init() { if common.CheckForEnabledServices("dns") { tf_dns.RegisterDatasource() } - if common.CheckForEnabledServices("emwarehouse") { - tf_em_warehouse.RegisterDatasource() - } if common.CheckForEnabledServices("email") { tf_email.RegisterDatasource() } diff --git a/internal/provider/register_resource.go b/internal/provider/register_resource.go index af280cfa64f..62b6f603535 100644 --- a/internal/provider/register_resource.go +++ b/internal/provider/register_resource.go @@ -52,7 +52,6 @@ import ( tf_devops "github.com/oracle/terraform-provider-oci/internal/service/devops" tf_disaster_recovery "github.com/oracle/terraform-provider-oci/internal/service/disaster_recovery" tf_dns "github.com/oracle/terraform-provider-oci/internal/service/dns" - tf_em_warehouse "github.com/oracle/terraform-provider-oci/internal/service/em_warehouse" tf_email "github.com/oracle/terraform-provider-oci/internal/service/email" tf_events "github.com/oracle/terraform-provider-oci/internal/service/events" tf_file_storage "github.com/oracle/terraform-provider-oci/internal/service/file_storage" @@ -274,9 +273,6 @@ func init() { if common.CheckForEnabledServices("dns") { tf_dns.RegisterResource() } - if common.CheckForEnabledServices("emwarehouse") { - tf_em_warehouse.RegisterResource() - } if common.CheckForEnabledServices("email") { tf_email.RegisterResource() } diff --git a/internal/service/bds/bds_bds_cluster_versions_data_source.go b/internal/service/bds/bds_bds_cluster_versions_data_source.go new file mode 100644 index 00000000000..e9aeee9f147 --- /dev/null +++ b/internal/service/bds/bds_bds_cluster_versions_data_source.go @@ -0,0 +1,121 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package bds + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_bds "github.com/oracle/oci-go-sdk/v65/bds" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func BdsBdsClusterVersionsDataSource() *schema.Resource { + return &schema.Resource{ + Read: readBdsBdsClusterVersions, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "bds_cluster_versions": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "bds_version": { + Type: schema.TypeString, + Computed: true, + }, + "odh_version": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func readBdsBdsClusterVersions(d *schema.ResourceData, m interface{}) error { + sync := &BdsBdsClusterVersionsDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).BdsClient() + + return tfresource.ReadResource(sync) +} + +type BdsBdsClusterVersionsDataSourceCrud struct { + D *schema.ResourceData + Client *oci_bds.BdsClient + Res *oci_bds.ListBdsClusterVersionsResponse +} + +func (s *BdsBdsClusterVersionsDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *BdsBdsClusterVersionsDataSourceCrud) Get() error { + request := oci_bds.ListBdsClusterVersionsRequest{} + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "bds") + + response, err := s.Client.ListBdsClusterVersions(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListBdsClusterVersions(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 *BdsBdsClusterVersionsDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("BdsBdsClusterVersionsDataSource-", BdsBdsClusterVersionsDataSource(), s.D)) + resources := []map[string]interface{}{} + + for _, r := range s.Res.Items { + bdsClusterVersion := map[string]interface{}{} + + if r.BdsVersion != nil { + bdsClusterVersion["bds_version"] = *r.BdsVersion + } + + if r.OdhVersion != nil { + bdsClusterVersion["odh_version"] = *r.OdhVersion + } + + resources = append(resources, bdsClusterVersion) + } + + if f, fOk := s.D.GetOkExists("filter"); fOk { + resources = tfresource.ApplyFilters(f.(*schema.Set), resources, BdsBdsClusterVersionsDataSource().Schema["bds_cluster_versions"].Elem.(*schema.Resource).Schema) + } + + if err := s.D.Set("bds_cluster_versions", resources); err != nil { + return err + } + + return nil +} diff --git a/internal/service/bds/bds_bds_instance_api_key_data_source.go b/internal/service/bds/bds_bds_instance_api_key_data_source.go index e03e9c147c7..821f32d64f1 100644 --- a/internal/service/bds/bds_bds_instance_api_key_data_source.go +++ b/internal/service/bds/bds_bds_instance_api_key_data_source.go @@ -79,6 +79,10 @@ func (s *BdsBdsInstanceApiKeyDataSourceCrud) SetData() error { s.D.Set("default_region", *s.Res.DefaultRegion) } + if s.Res.DomainOcid != nil { + s.D.Set("domain_ocid", *s.Res.DomainOcid) + } + if s.Res.Fingerprint != nil { s.D.Set("fingerprint", *s.Res.Fingerprint) } diff --git a/internal/service/bds/bds_bds_instance_api_key_resource.go b/internal/service/bds/bds_bds_instance_api_key_resource.go index 31c28b61b91..bf8fc3ffff4 100644 --- a/internal/service/bds/bds_bds_instance_api_key_resource.go +++ b/internal/service/bds/bds_bds_instance_api_key_resource.go @@ -63,6 +63,12 @@ func BdsBdsInstanceApiKeyResource() *schema.Resource { Computed: true, ForceNew: true, }, + "domain_ocid": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, // Computed "fingerprint": { @@ -170,6 +176,11 @@ func (s *BdsBdsInstanceApiKeyResourceCrud) Create() error { request.DefaultRegion = &tmp } + if domainOcid, ok := s.D.GetOkExists("domain_ocid"); ok { + tmp := domainOcid.(string) + request.DomainOcid = &tmp + } + if keyAlias, ok := s.D.GetOkExists("key_alias"); ok { tmp := keyAlias.(string) request.KeyAlias = &tmp @@ -418,6 +429,10 @@ func (s *BdsBdsInstanceApiKeyResourceCrud) SetData() error { s.D.Set("default_region", *s.Res.DefaultRegion) } + if s.Res.DomainOcid != nil { + s.D.Set("domain_ocid", *s.Res.DomainOcid) + } + if s.Res.Fingerprint != nil { s.D.Set("fingerprint", *s.Res.Fingerprint) } diff --git a/internal/service/bds/bds_bds_instance_data_source.go b/internal/service/bds/bds_bds_instance_data_source.go index c388d6cbe14..5c0e8eb0c58 100644 --- a/internal/service/bds/bds_bds_instance_data_source.go +++ b/internal/service/bds/bds_bds_instance_data_source.go @@ -66,6 +66,12 @@ func (s *BdsBdsInstanceDataSourceCrud) SetData() error { s.D.SetId(*s.Res.Id) + if s.Res.BdsClusterVersionSummary != nil { + s.D.Set("bds_cluster_version_summary", []interface{}{BdsClusterVersionSummaryToMap(s.Res.BdsClusterVersionSummary)}) + } else { + s.D.Set("bds_cluster_version_summary", nil) + } + if s.Res.BootstrapScriptUrl != nil { s.D.Set("bootstrap_script_url", *s.Res.BootstrapScriptUrl) } diff --git a/internal/service/bds/bds_bds_instance_identity_configuration_data_source.go b/internal/service/bds/bds_bds_instance_identity_configuration_data_source.go new file mode 100644 index 00000000000..d4437cecdd1 --- /dev/null +++ b/internal/service/bds/bds_bds_instance_identity_configuration_data_source.go @@ -0,0 +1,113 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package bds + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_bds "github.com/oracle/oci-go-sdk/v65/bds" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func BdsBdsInstanceIdentityConfigurationDataSource() *schema.Resource { + fieldMap := make(map[string]*schema.Schema) + fieldMap["bds_instance_id"] = &schema.Schema{ + Type: schema.TypeString, + Required: true, + } + fieldMap["identity_configuration_id"] = &schema.Schema{ + Type: schema.TypeString, + Required: true, + } + return tfresource.GetSingularDataSourceItemSchema(BdsBdsInstanceIdentityConfigurationResource(), fieldMap, readSingularBdsBdsInstanceIdentityConfiguration) +} + +func readSingularBdsBdsInstanceIdentityConfiguration(d *schema.ResourceData, m interface{}) error { + sync := &BdsBdsInstanceIdentityConfigurationDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).BdsClient() + + return tfresource.ReadResource(sync) +} + +type BdsBdsInstanceIdentityConfigurationDataSourceCrud struct { + D *schema.ResourceData + Client *oci_bds.BdsClient + Res *oci_bds.GetIdentityConfigurationResponse +} + +func (s *BdsBdsInstanceIdentityConfigurationDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *BdsBdsInstanceIdentityConfigurationDataSourceCrud) Get() error { + request := oci_bds.GetIdentityConfigurationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if identityConfigurationId, ok := s.D.GetOkExists("identity_configuration_id"); ok { + tmp := identityConfigurationId.(string) + request.IdentityConfigurationId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "bds") + + response, err := s.Client.GetIdentityConfiguration(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + return nil +} + +func (s *BdsBdsInstanceIdentityConfigurationDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(*s.Res.Id) + + if s.Res.ConfidentialApplicationId != nil { + s.D.Set("confidential_application_id", *s.Res.ConfidentialApplicationId) + } + + if s.Res.DisplayName != nil { + s.D.Set("display_name", *s.Res.DisplayName) + } + + if s.Res.IamUserSyncConfiguration != nil { + s.D.Set("iam_user_sync_configuration", []interface{}{IamUserSyncConfigurationToMap(s.Res.IamUserSyncConfiguration)}) + } else { + s.D.Set("iam_user_sync_configuration", nil) + } + + if s.Res.IdentityDomainId != nil { + s.D.Set("identity_domain_id", *s.Res.IdentityDomainId) + } + + s.D.Set("state", s.Res.LifecycleState) + + if s.Res.TimeCreated != nil { + s.D.Set("time_created", s.Res.TimeCreated.String()) + } + + if s.Res.TimeUpdated != nil { + s.D.Set("time_updated", s.Res.TimeUpdated.String()) + } + + if s.Res.UpstConfiguration != nil { + s.D.Set("upst_configuration", []interface{}{UpstConfigurationToMap(s.Res.UpstConfiguration)}) + } else { + s.D.Set("upst_configuration", nil) + } + + return nil +} diff --git a/internal/service/bds/bds_bds_instance_identity_configuration_resource.go b/internal/service/bds/bds_bds_instance_identity_configuration_resource.go new file mode 100644 index 00000000000..17c7f039891 --- /dev/null +++ b/internal/service/bds/bds_bds_instance_identity_configuration_resource.go @@ -0,0 +1,1037 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package bds + +import ( + "context" + "fmt" + "log" + "net/url" + "regexp" + "strings" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + + oci_bds "github.com/oracle/oci-go-sdk/v65/bds" + oci_common "github.com/oracle/oci-go-sdk/v65/common" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func BdsBdsInstanceIdentityConfigurationResource() *schema.Resource { + return &schema.Resource{ + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: tfresource.DefaultTimeout, + Create: createBdsBdsInstanceIdentityConfiguration, + Read: readBdsBdsInstanceIdentityConfiguration, + Update: updateBdsBdsInstanceIdentityConfiguration, + Delete: deleteBdsBdsInstanceIdentityConfiguration, + Schema: map[string]*schema.Schema{ + // Required + "bds_instance_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "cluster_admin_password": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "confidential_application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "display_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "identity_domain_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "iam_user_sync_configuration_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "is_posix_attributes_addition_required": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "upst_configuration_details": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "master_encryption_key_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "activate_iam_user_sync_configuration_trigger": { + Type: schema.TypeString, + Optional: true, + }, + "activate_upst_configuration_trigger": { + Type: schema.TypeString, + Optional: true, + }, + "refresh_confidential_application_trigger": { + Type: schema.TypeString, + Optional: true, + }, + "refresh_upst_token_exchange_keytab_trigger": { + Type: schema.TypeString, + Optional: true, + }, + + // Computed + "iam_user_sync_configuration": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "is_posix_attributes_addition_required": { + Type: schema.TypeBool, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + "upst_configuration": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "keytab_content": { + Type: schema.TypeString, + Computed: true, + }, + "master_encryption_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "secret_id": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_token_exchange_keytab_last_refreshed": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + "token_exchange_principal_name": { + Type: schema.TypeString, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func createBdsBdsInstanceIdentityConfiguration(d *schema.ResourceData, m interface{}) error { + sync := &BdsBdsInstanceIdentityConfigurationResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).BdsClient() + + if e := tfresource.CreateResource(d, sync); e != nil { + return e + } + return nil + +} + +func readBdsBdsInstanceIdentityConfiguration(d *schema.ResourceData, m interface{}) error { + sync := &BdsBdsInstanceIdentityConfigurationResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).BdsClient() + return tfresource.ReadResource(sync) +} + +func updateBdsBdsInstanceIdentityConfiguration(d *schema.ResourceData, m interface{}) error { + + sync := &BdsBdsInstanceIdentityConfigurationResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).BdsClient() + + if triggerVal, ok := sync.D.GetOkExists("activate_iam_user_sync_configuration_trigger"); ok && sync.D.HasChange("activate_iam_user_sync_configuration_trigger") { + if triggerVal.(string) == "true" { + err := sync.ActivateIamUserSyncConfiguration() + + if err != nil { + return err + } + } + } + + if triggerVal, ok := sync.D.GetOkExists("activate_upst_configuration_trigger"); ok && sync.D.HasChange("activate_upst_configuration_trigger") { + if triggerVal.(string) == "true" { + err := sync.ActivateUpstConfiguration() + + if err != nil { + return err + } + } + } + + if refreshTrigger, ok := sync.D.GetOkExists("refresh_confidential_application_trigger"); ok { + if refreshTrigger.(string) == "true" { + err := sync.RefreshConfidentialApplication() + if err != nil { + return err + } + } + } + + if refreshTrigger, ok := sync.D.GetOkExists("refresh_upst_token_exchange_keytab_trigger"); ok { + if refreshTrigger.(string) == "true" { + err := sync.RefreshUpstTokenExchangeKeytab() + if err != nil { + return err + } + } + } + + if _, ok := sync.D.GetOkExists("activate_iam_user_sync_configuration_trigger"); ok && sync.D.HasChange("activate_iam_user_sync_configuration_trigger") { + triggerVal := sync.D.Get("activate_iam_user_sync_configuration_trigger") + if triggerVal.(string) == "false" { + err := sync.DeactivateIamUserSyncConfiguration() + + if err != nil { + return err + } + } + } + + if _, ok := sync.D.GetOkExists("activate_upst_configuration_trigger"); ok && sync.D.HasChange("activate_upst_configuration_trigger") { + triggerVal := sync.D.Get("activate_upst_configuration_trigger") + if triggerVal.(string) == "false" { + err := sync.DeactivateUpstConfiguration() + + if err != nil { + return err + } + } + } + + if err := tfresource.UpdateResource(d, sync); err != nil { + return err + } + + return nil +} + +func deleteBdsBdsInstanceIdentityConfiguration(d *schema.ResourceData, m interface{}) error { + + sync := &BdsBdsInstanceIdentityConfigurationResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).BdsClient() + sync.DisableNotFoundRetries = true + + return tfresource.DeleteResource(d, sync) +} + +type BdsBdsInstanceIdentityConfigurationResourceCrud struct { + tfresource.BaseCrud + Client *oci_bds.BdsClient + Res *oci_bds.IdentityConfiguration + DisableNotFoundRetries bool +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) ID() string { + return GetBdsInstanceIdentityConfigurationCompositeId(s.D.Get("bds_instance_id").(string), *s.Res.Id) +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) CreatedPending() []string { + return []string{} +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) CreatedTarget() []string { + return []string{ + string(oci_bds.IdentityConfigurationLifecycleStateActive), + } +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) DeletedPending() []string { + return []string{} +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) DeletedTarget() []string { + return []string{ + string(oci_bds.IdentityConfigurationLifecycleStateDeleted), + } +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) Create() error { + request := oci_bds.CreateIdentityConfigurationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + if confidentialApplicationId, ok := s.D.GetOkExists("confidential_application_id"); ok { + tmp := confidentialApplicationId.(string) + request.ConfidentialApplicationId = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if _, ok := s.D.GetOkExists("activate_iam_user_sync_configuration_trigger"); ok { + triggerVal := s.D.Get("activate_iam_user_sync_configuration_trigger") + if iamUserSyncConfigurationDetails, ok := s.D.GetOkExists("iam_user_sync_configuration_details"); ok && triggerVal.(string) == "true" { + if tmpList := iamUserSyncConfigurationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "iam_user_sync_configuration_details", 0) + tmp, err := s.mapToiamUserSyncConfigurationDetails(fieldKeyFormat) + if err != nil { + return err + } + request.IamUserSyncConfigurationDetails = &tmp + } + } + } + + if identityDomainId, ok := s.D.GetOkExists("identity_domain_id"); ok { + tmp := identityDomainId.(string) + request.IdentityDomainId = &tmp + } + + if _, ok := s.D.GetOkExists("activate_upst_configuration_trigger"); ok { + triggerVal := s.D.Get("activate_upst_configuration_trigger") + if upstConfigurationDetails, ok := s.D.GetOkExists("upst_configuration_details"); ok && triggerVal.(string) == "true" { + if tmpList := upstConfigurationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "upst_configuration_details", 0) + tmp, err := s.mapToupstConfigurationDetails(fieldKeyFormat) + if err != nil { + return err + } + request.UpstConfigurationDetails = &tmp + } + } + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.CreateIdentityConfiguration(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesCreated, s.D.Timeout(schema.TimeoutCreate)) +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) getBdsInstanceIdentityConfigurationFromWorkRequest(workId *string, retryPolicy *oci_common.RetryPolicy, + actionTypeEnum oci_bds.ActionTypesEnum, timeout time.Duration) error { + // Wait until it finishes + bdsInstanceIdentityConfigurationId, err := bdsInstanceIdentityConfigurationWaitForWorkRequest(workId, "bdsidentityconfig", + actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) + if err != nil { + return err + } + s.D.SetId(*bdsInstanceIdentityConfigurationId) + return s.Get() +} + +func bdsInstanceIdentityConfigurationWorkRequestShouldRetryFunc(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, "bds", startTime) { + return true + } + + // Only stop if the time Finished is set + if workRequestResponse, ok := response.Response.(oci_bds.GetWorkRequestResponse); ok { + return workRequestResponse.TimeFinished == nil + } + return false + } +} + +func bdsInstanceIdentityConfigurationWaitForWorkRequest(wId *string, entityType string, action oci_bds.ActionTypesEnum, + timeout time.Duration, disableFoundRetries bool, client *oci_bds.BdsClient) (*string, error) { + retryPolicy := tfresource.GetRetryPolicy(disableFoundRetries, "bds") + retryPolicy.ShouldRetryOperation = bdsInstanceIdentityConfigurationWorkRequestShouldRetryFunc(timeout) + response := oci_bds.GetWorkRequestResponse{} + stateConf := &resource.StateChangeConf{ + Pending: []string{ + string(oci_bds.OperationStatusInProgress), + string(oci_bds.OperationStatusAccepted), + string(oci_bds.OperationStatusCanceling), + }, + Target: []string{ + string(oci_bds.OperationStatusSucceeded), + string(oci_bds.OperationStatusFailed), + string(oci_bds.OperationStatusCanceled), + }, + Refresh: func() (interface{}, string, error) { + var err error + response, err = client.GetWorkRequest(context.Background(), + oci_bds.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_bds.OperationStatusFailed || response.Status == oci_bds.OperationStatusCanceled { + return nil, getErrorFromBdsBdsInstanceIdentityConfigurationWorkRequest(client, wId, retryPolicy, entityType, action) + } + return identifier, nil +} + +func getErrorFromBdsBdsInstanceIdentityConfigurationWorkRequest(client *oci_bds.BdsClient, workId *string, retryPolicy *oci_common.RetryPolicy, entityType string, action oci_bds.ActionTypesEnum) error { + response, err := client.ListWorkRequestErrors(context.Background(), + oci_bds.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 *BdsBdsInstanceIdentityConfigurationResourceCrud) Get() error { + request := oci_bds.GetIdentityConfigurationRequest{} + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + bdsInstanceId, identityConfigurationId, err := parseBdsInstanceIdentityConfigurationCompositeId(s.D.Id()) + if err == nil { + request.BdsInstanceId = &bdsInstanceId + request.IdentityConfigurationId = &identityConfigurationId + } else { + log.Printf("[WARN] Get() unable to parse current ID: %s", s.D.Id()) + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.GetIdentityConfiguration(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.IdentityConfiguration + return nil +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) Update() error { + request := oci_bds.UpdateIdentityConfigurationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + if iamUserSyncConfigurationDetails, ok := s.D.GetOkExists("iam_user_sync_configuration_details"); ok { + if tmpList := iamUserSyncConfigurationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "iam_user_sync_configuration_details", 0) + tmp, err := s.mapToiamUserSyncConfigurationDetails(fieldKeyFormat) + if err != nil { + return err + } + request.IamUserSyncConfigurationDetails = &tmp + } + } + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + if upstConfigurationDetails, ok := s.D.GetOkExists("upst_configuration_details"); ok { + if tmpList := upstConfigurationDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "upst_configuration_details", 0) + tmp, err := s.mapToupstConfigurationDetails(fieldKeyFormat) + if err != nil { + return err + } + request.UpstConfigurationDetails = &tmp + } + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.UpdateIdentityConfiguration(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) Delete() error { + request := oci_bds.DeleteIdentityConfigurationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + if trigger, ok := s.D.GetOkExists("activate_iam_user_sync_configuration_trigger"); ok { + if trigger.(string) == "true" { + err := s.DeactivateIamUserSyncConfiguration() + if err != nil { + return err + } + } + } + + if trigger, ok := s.D.GetOkExists("activate_upst_configuration_trigger"); ok { + if trigger.(string) == "true" { + err := s.DeactivateUpstConfiguration() + + if err != nil { + return err + } + } + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.DeleteIdentityConfiguration(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, delWorkRequestErr := bdsInstanceIdentityConfigurationWaitForWorkRequest(workId, "bdsidentityconfig", + oci_bds.ActionTypesDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries, s.Client) + return delWorkRequestErr +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) SetData() error { + bdsInstanceId, identityConfigurationId, err := parseBdsInstanceIdentityConfigurationCompositeId(s.D.Id()) + if err == nil { + s.D.Set("bds_instance_id", &bdsInstanceId) + s.D.SetId(identityConfigurationId) + + } else { + log.Printf("[WARN] SetData() unable to parse current ID: %s", s.D.Id()) + } + + if s.Res.ConfidentialApplicationId != nil { + s.D.Set("confidential_application_id", *s.Res.ConfidentialApplicationId) + } + + if s.Res.DisplayName != nil { + s.D.Set("display_name", *s.Res.DisplayName) + } + + if s.Res.IamUserSyncConfiguration != nil { + s.D.Set("iam_user_sync_configuration", []interface{}{IamUserSyncConfigurationToMap(s.Res.IamUserSyncConfiguration)}) + } else { + s.D.Set("iam_user_sync_configuration", nil) + } + + if s.Res.IdentityDomainId != nil { + s.D.Set("identity_domain_id", *s.Res.IdentityDomainId) + } + + s.D.Set("state", s.Res.LifecycleState) + + if s.Res.TimeCreated != nil { + s.D.Set("time_created", s.Res.TimeCreated.String()) + } + + if s.Res.TimeUpdated != nil { + s.D.Set("time_updated", s.Res.TimeUpdated.String()) + } + + if s.Res.UpstConfiguration != nil { + s.D.Set("upst_configuration", []interface{}{UpstConfigurationToMap(s.Res.UpstConfiguration)}) + } else { + s.D.Set("upst_configuration", nil) + } + return nil +} + +func GetBdsInstanceIdentityConfigurationCompositeId(bdsInstanceId string, identityConfigurationId string) string { + bdsInstanceId = url.PathEscape(bdsInstanceId) + identityConfigurationId = url.PathEscape(identityConfigurationId) + compositeId := "bdsInstances/" + bdsInstanceId + "/identityConfigurations/" + identityConfigurationId + return compositeId +} + +func parseBdsInstanceIdentityConfigurationCompositeId(compositeId string) (bdsInstanceId string, identityConfigurationId string, err error) { + parts := strings.Split(compositeId, "/") + match, _ := regexp.MatchString("bdsInstances/.*/identityConfigurations/.*", compositeId) + if !match || len(parts) != 4 { + err = fmt.Errorf("illegal compositeId %s encountered", compositeId) + return + } + bdsInstanceId, _ = url.PathUnescape(parts[1]) + identityConfigurationId, _ = url.PathUnescape(parts[3]) + return +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) ActivateIamUserSyncConfiguration() error { + request := oci_bds.ActivateIamUserSyncConfigurationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + if isPosixAttributesAdditionRequired, ok := s.D.GetOkExists("iam_user_sync_configuration_details.0.is_posix_attributes_addition_required"); ok { + tmp := isPosixAttributesAdditionRequired.(bool) + request.IsPosixAttributesAdditionRequired = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.ActivateIamUserSyncConfiguration(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + workId := response.OpcWorkRequestId + val := s.D.Get("activate_iam_user_sync_configuration_trigger") + s.D.Set("activate_iam_user_sync_configuration_trigger", val) + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutCreate)) + +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) ActivateUpstConfiguration() error { + request := oci_bds.ActivateUpstConfigurationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + if masterEncryptionKeyId, ok := s.D.GetOkExists("upst_configuration_details.0.master_encryption_key_id"); ok { + tmp := masterEncryptionKeyId.(string) + request.MasterEncryptionKeyId = &tmp + } + + if vaultId, ok := s.D.GetOkExists("upst_configuration_details.0.vault_id"); ok { + tmp := vaultId.(string) + request.VaultId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.ActivateUpstConfiguration(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + workId := response.OpcWorkRequestId + val := s.D.Get("activate_upst_configuration_trigger") + s.D.Set("activate_upst_configuration_trigger", val) + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutCreate)) + +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) DeactivateIamUserSyncConfiguration() error { + request := oci_bds.DeactivateIamUserSyncConfigurationRequest{} + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.DeactivateIamUserSyncConfiguration(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + workId := response.OpcWorkRequestId + val := s.D.Get("activate_iam_user_sync_configuration_trigger") + s.D.Set("activate_iam_user_sync_configuration_trigger", val) + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutUpdate)) + +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) DeactivateUpstConfiguration() error { + request := oci_bds.DeactivateUpstConfigurationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.DeactivateUpstConfiguration(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + workId := response.OpcWorkRequestId + val := s.D.Get("activate_upst_configuration_trigger") + s.D.Set("activate_upst_configuration_trigger", val) + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutUpdate)) + +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) RefreshConfidentialApplication() error { + request := oci_bds.RefreshConfidentialApplicationRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.RefreshConfidentialApplication(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + workId := response.OpcWorkRequestId + + //s.D.Set("refresh_confidential_application_trigger", "false") + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutCreate)) + +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) RefreshUpstTokenExchangeKeytab() error { + request := oci_bds.RefreshUpstTokenExchangeKeytabRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + tmp := s.D.Id() + request.IdentityConfigurationId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.RefreshUpstTokenExchangeKeytab(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + workId := response.OpcWorkRequestId + + //s.D.Set("refresh_upst_token_exchange_keytab_trigger", "false") + return s.getBdsInstanceIdentityConfigurationFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutCreate)) + +} + +func IamUserSyncConfigurationToMap(obj *oci_bds.IamUserSyncConfiguration) map[string]interface{} { + result := map[string]interface{}{} + + if obj.IsPosixAttributesAdditionRequired != nil { + result["is_posix_attributes_addition_required"] = bool(*obj.IsPosixAttributesAdditionRequired) + } + + result["state"] = string(obj.LifecycleState) + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.String() + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.String() + } + return result +} + +func UpstConfigurationToMap(obj *oci_bds.UpstConfiguration) map[string]interface{} { + result := map[string]interface{}{} + + if obj.KeytabContent != nil { + result["keytab_content"] = string(*obj.KeytabContent) + } + + if obj.MasterEncryptionKeyId != nil { + result["master_encryption_key_id"] = string(*obj.MasterEncryptionKeyId) + } + + if obj.SecretId != nil { + result["secret_id"] = string(*obj.SecretId) + } + + result["state"] = string(obj.LifecycleState) + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.String() + } + + if obj.TimeTokenExchangeKeytabLastRefreshed != nil { + result["time_token_exchange_keytab_last_refreshed"] = obj.TimeTokenExchangeKeytabLastRefreshed.String() + } + + if obj.TimeUpdated != nil { + result["time_updated"] = obj.TimeUpdated.String() + } + + if obj.TokenExchangePrincipalName != nil { + result["token_exchange_principal_name"] = string(*obj.TokenExchangePrincipalName) + } + + if obj.VaultId != nil { + result["vault_id"] = string(*obj.VaultId) + } + return result +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) mapToiamUserSyncConfigurationDetails(fieldKeyFormat string) (oci_bds.IamUserSyncConfigurationDetails, error) { + result := oci_bds.IamUserSyncConfigurationDetails{} + + if isPosixAttributesAdditionRequired, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_posix_attributes_addition_required")); ok { + tmp := isPosixAttributesAdditionRequired.(bool) + result.IsPosixAttributesAdditionRequired = &tmp + } + return result, nil +} + +func iamUserSyncConfigurationDetailsToMap(obj *oci_bds.IamUserSyncConfigurationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.IsPosixAttributesAdditionRequired != nil { + result["is_posix_attributes_addition_required"] = bool(*obj.IsPosixAttributesAdditionRequired) + } + return result +} + +func (s *BdsBdsInstanceIdentityConfigurationResourceCrud) mapToupstConfigurationDetails(fieldKeyFormat string) (oci_bds.UpstConfigurationDetails, error) { + result := oci_bds.UpstConfigurationDetails{} + + if masterEncryptionKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "master_encryption_key_id")); ok { + tmp := masterEncryptionKeyId.(string) + result.MasterEncryptionKeyId = &tmp + } + + if vaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_id")); ok { + tmp := vaultId.(string) + result.VaultId = &tmp + } + return result, nil +} + +func upstConfigurationDetailsToMap(obj *oci_bds.UpstConfigurationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.MasterEncryptionKeyId != nil { + result["master_encryption_key_id"] = string(*obj.MasterEncryptionKeyId) + } + + if obj.VaultId != nil { + result["vault_id"] = string(*obj.VaultId) + } + return result +} diff --git a/internal/service/bds/bds_bds_instance_identity_configurations_data_source.go b/internal/service/bds/bds_bds_instance_identity_configurations_data_source.go new file mode 100644 index 00000000000..2770aa88c08 --- /dev/null +++ b/internal/service/bds/bds_bds_instance_identity_configurations_data_source.go @@ -0,0 +1,142 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package bds + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_bds "github.com/oracle/oci-go-sdk/v65/bds" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func BdsBdsInstanceIdentityConfigurationsDataSource() *schema.Resource { + return &schema.Resource{ + Read: readBdsBdsInstanceIdentityConfigurations, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "bds_instance_id": { + Type: schema.TypeString, + Required: true, + }, + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Optional: true, + }, + "state": { + Type: schema.TypeString, + Optional: true, + }, + "identity_configurations": { + Type: schema.TypeList, + Computed: true, + Elem: tfresource.GetDataSourceItemSchema(BdsBdsInstanceIdentityConfigurationResource()), + }, + }, + } +} + +func readBdsBdsInstanceIdentityConfigurations(d *schema.ResourceData, m interface{}) error { + sync := &BdsBdsInstanceIdentityConfigurationsDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).BdsClient() + + return tfresource.ReadResource(sync) +} + +type BdsBdsInstanceIdentityConfigurationsDataSourceCrud struct { + D *schema.ResourceData + Client *oci_bds.BdsClient + Res *oci_bds.ListIdentityConfigurationsResponse +} + +func (s *BdsBdsInstanceIdentityConfigurationsDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *BdsBdsInstanceIdentityConfigurationsDataSourceCrud) Get() error { + request := oci_bds.ListIdentityConfigurationsRequest{} + + if bdsInstanceId, ok := s.D.GetOkExists("bds_instance_id"); ok { + tmp := bdsInstanceId.(string) + request.BdsInstanceId = &tmp + } + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if state, ok := s.D.GetOkExists("state"); ok { + request.LifecycleState = oci_bds.IdentityConfigurationLifecycleStateEnum(state.(string)) + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "bds") + + response, err := s.Client.ListIdentityConfigurations(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListIdentityConfigurations(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 *BdsBdsInstanceIdentityConfigurationsDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("BdsBdsInstanceIdentityConfigurationsDataSource-", BdsBdsInstanceIdentityConfigurationsDataSource(), s.D)) + resources := []map[string]interface{}{} + + for _, r := range s.Res.Items { + bdsInstanceIdentityConfiguration := map[string]interface{}{} + + if r.DisplayName != nil { + bdsInstanceIdentityConfiguration["display_name"] = *r.DisplayName + } + + if r.Id != nil { + bdsInstanceIdentityConfiguration["id"] = *r.Id + } + + bdsInstanceIdentityConfiguration["state"] = r.LifecycleState + + resources = append(resources, bdsInstanceIdentityConfiguration) + } + + if f, fOk := s.D.GetOkExists("filter"); fOk { + resources = tfresource.ApplyFilters(f.(*schema.Set), resources, BdsBdsInstanceIdentityConfigurationsDataSource().Schema["identity_configurations"].Elem.(*schema.Resource).Schema) + } + + if err := s.D.Set("identity_configurations", resources); err != nil { + return err + } + + return nil +} diff --git a/internal/service/bds/bds_bds_instance_patch_action_resource.go b/internal/service/bds/bds_bds_instance_patch_action_resource.go index e24b879da4e..d050ea6fa33 100644 --- a/internal/service/bds/bds_bds_instance_patch_action_resource.go +++ b/internal/service/bds/bds_bds_instance_patch_action_resource.go @@ -79,6 +79,18 @@ func BdsBdsInstancePatchActionResource() *schema.Resource { Computed: true, ForceNew: true, }, + "tolerance_threshold_per_batch": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tolerance_threshold_per_domain": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, "wait_time_between_batch_in_seconds": { Type: schema.TypeInt, Optional: true, @@ -302,6 +314,10 @@ func (s *BdsBdsInstancePatchActionResourceCrud) mapToOdhPatchingConfig(fieldKeyF tmp := batchSize.(int) details.BatchSize = &tmp } + if toleranceThresholdPerBatch, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "tolerance_threshold_per_batch")); ok { + tmp := toleranceThresholdPerBatch.(int) + details.ToleranceThresholdPerBatch = &tmp + } if waitTimeBetweenBatchInSeconds, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "wait_time_between_batch_in_seconds")); ok { tmp := waitTimeBetweenBatchInSeconds.(int) details.WaitTimeBetweenBatchInSeconds = &tmp @@ -309,6 +325,10 @@ func (s *BdsBdsInstancePatchActionResourceCrud) mapToOdhPatchingConfig(fieldKeyF baseObject = details case strings.ToLower("DOMAIN_BASED"): details := oci_bds.DomainBasedOdhPatchingConfig{} + if toleranceThresholdPerDomain, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "tolerance_threshold_per_domain")); ok { + tmp := toleranceThresholdPerDomain.(int) + details.ToleranceThresholdPerDomain = &tmp + } if waitTimeBetweenDomainInSeconds, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "wait_time_between_domain_in_seconds")); ok { tmp := waitTimeBetweenDomainInSeconds.(int) details.WaitTimeBetweenDomainInSeconds = &tmp @@ -333,12 +353,20 @@ func (s *BdsBdsInstancePatchActionResourceCrud) mapToOdhPatchingConfig(fieldKeyF result["batch_size"] = int(*v.BatchSize) } + if v.ToleranceThresholdPerBatch != nil { + result["tolerance_threshold_per_batch"] = int(*v.ToleranceThresholdPerBatch) + } + if v.WaitTimeBetweenBatchInSeconds != nil { result["wait_time_between_batch_in_seconds"] = int(*v.WaitTimeBetweenBatchInSeconds) } case oci_bds.DomainBasedOdhPatchingConfig: result["patching_config_strategy"] = "DOMAIN_BASED" + if v.ToleranceThresholdPerDomain != nil { + result["tolerance_threshold_per_domain"] = int(*v.ToleranceThresholdPerDomain) + } + if v.WaitTimeBetweenDomainInSeconds != nil { result["wait_time_between_domain_in_seconds"] = int(*v.WaitTimeBetweenDomainInSeconds) } diff --git a/internal/service/bds/bds_bds_instance_resource.go b/internal/service/bds/bds_bds_instance_resource.go index 5dc256c0ea2..81330efcbfc 100644 --- a/internal/service/bds/bds_bds_instance_resource.go +++ b/internal/service/bds/bds_bds_instance_resource.go @@ -72,6 +72,37 @@ func BdsBdsInstanceResource() *schema.Resource { Required: true, ForceNew: true, }, + "is_force_remove_enabled": { + Type: schema.TypeBool, + Optional: true, + }, + "start_cluster_shape_configs": { + Type: schema.TypeList, + Optional: true, + Computed: false, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "node_type_shape_configs": { + Type: schema.TypeList, + Optional: true, + Computed: false, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "node_type": { + Type: schema.TypeString, + Optional: true, + }, + "shape": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, "master_node": { Type: schema.TypeList, Required: true, @@ -537,6 +568,36 @@ func BdsBdsInstanceResource() *schema.Resource { }, }, }, + + // Optional + "bds_cluster_version_summary": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "bds_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "odh_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // Computed + }, + }, + }, "cluster_profile": { Type: schema.TypeString, Optional: true, @@ -571,7 +632,6 @@ func BdsBdsInstanceResource() *schema.Resource { Type: schema.TypeList, Optional: true, Computed: true, - ForceNew: true, MaxItems: 1, MinItems: 1, Elem: &schema.Resource{ @@ -608,6 +668,10 @@ func BdsBdsInstanceResource() *schema.Resource { Type: schema.TypeBool, Optional: true, }, + "remove_node": { + Type: schema.TypeString, + Optional: true, + }, "os_patch_version": { Type: schema.TypeString, Optional: true, @@ -705,6 +769,10 @@ func BdsBdsInstanceResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "odh_version": { + Type: schema.TypeString, + Computed: true, + }, "shape": { Type: schema.TypeString, Computed: true, @@ -925,12 +993,15 @@ func updateBdsBdsInstance(d *schema.ResourceData, m interface{}) error { sync.D.Set("state", oci_bds.BdsInstanceLifecycleStateActive) } - //if _, ok := sync.D.GetOkExists("os_patch_version"); ok { - // err := sync.InstallOsPatch() - // if err != nil { - // return err - // } - //} + if removeNode, ok := sync.D.GetOkExists("remove_node"); ok { + if removeNode != "" { + err := sync.RemoveNode() + if err != nil { + return err + } + } + + } if err := tfresource.UpdateResource(d, sync); err != nil { return err @@ -1006,6 +1077,29 @@ func (s *BdsBdsInstanceResourceCrud) DeletedTarget() []string { func (s *BdsBdsInstanceResourceCrud) Create() error { request := oci_bds.CreateBdsInstanceRequest{} + if _, ok := s.D.GetOkExists("start_cluster_shape_configs"); ok { + return fmt.Errorf("[ERROR] start_cluster_shape_configs is not permitted during create bds instance") + } + + if _, ok := s.D.GetOkExists("is_force_remove_enabled"); ok { + return fmt.Errorf("[ERROR] is_force_remove_enabled is not permitted during create bds instance") + } + + if _, ok := s.D.GetOkExists("remove_node"); ok { + return fmt.Errorf("[ERROR] remove_node is not permitted during create bds instance") + } + + if bdsClusterVersionSummary, ok := s.D.GetOkExists("bds_cluster_version_summary"); ok { + if tmpList := bdsClusterVersionSummary.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "bds_cluster_version_summary", 0) + tmp, err := s.mapToBdsClusterVersionSummary(fieldKeyFormat) + if err != nil { + return err + } + request.BdsClusterVersionSummary = &tmp + } + } + if bootstrapScriptUrl, ok := s.D.GetOkExists("bootstrap_script_url"); ok { tmp := bootstrapScriptUrl.(string) request.BootstrapScriptUrl = &tmp @@ -1502,9 +1596,11 @@ func (s *BdsBdsInstanceResourceCrud) Update() error { isKafkaBrokerAdded = isKafkaBrokerAdded1 } - err := s.ExecuteBootstrapScript() - if err != nil { - return err + if _, ok := s.D.GetOkExists("bootstrap_script_url"); ok { + err := s.ExecuteBootstrapScript() + if err != nil { + return err + } } if compartment, ok := s.D.GetOkExists("compartment_id"); ok && s.D.HasChange("compartment_id") { @@ -1851,6 +1947,17 @@ func (s *BdsBdsInstanceResourceCrud) Update() error { request.KmsKeyId = &tmp } + if networkConfig, ok := s.D.GetOkExists("network_config"); ok && s.D.HasChange("network_config") { + if tmpList := networkConfig.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "network_config", 0) + tmp, err := s.mapToNetworkConfig(fieldKeyFormat) + if err != nil { + return err + } + request.NetworkConfig = &tmp + } + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") response, err := s.Client.UpdateBdsInstance(context.Background(), request) @@ -2016,6 +2123,12 @@ func (s *BdsBdsInstanceResourceCrud) Delete() error { } func (s *BdsBdsInstanceResourceCrud) SetData() error { + if s.Res.BdsClusterVersionSummary != nil { + s.D.Set("bds_cluster_version_summary", []interface{}{BdsClusterVersionSummaryToMap(s.Res.BdsClusterVersionSummary)}) + } else { + s.D.Set("bds_cluster_version_summary", nil) + } + if s.Res.BootstrapScriptUrl != nil { s.D.Set("bootstrap_script_url", *s.Res.BootstrapScriptUrl) } @@ -2149,6 +2262,17 @@ func (s *BdsBdsInstanceResourceCrud) StartBdsInstance() error { request.ClusterAdminPassword = &tmp } + if startClusterShapeConfigs, ok := s.D.GetOkExists("start_cluster_shape_configs"); ok { + if tmpList := startClusterShapeConfigs.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "start_cluster_shape_configs", 0) + tmp, err := s.mapToStartClusterShapeConfigs(fieldKeyFormat) + if err != nil { + return err + } + request.StartClusterShapeConfigs = &tmp + } + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") _, err := s.Client.StartBdsInstance(context.Background(), request) @@ -2290,7 +2414,6 @@ func (s *BdsBdsInstanceResourceCrud) deleteShapeConfigIfMissingInInput(node_type } } } - func (s *BdsBdsInstanceResourceCrud) RemoveKafka() error { request := oci_bds.RemoveKafkaRequest{} @@ -2317,6 +2440,112 @@ func (s *BdsBdsInstanceResourceCrud) RemoveKafka() error { return s.getBdsInstanceFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutUpdate)) } +func (s *BdsBdsInstanceResourceCrud) RemoveNode() error { + request := oci_bds.RemoveNodeRequest{} + + idTmp := s.D.Id() + request.BdsInstanceId = &idTmp + + if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok { + tmp := clusterAdminPassword.(string) + request.ClusterAdminPassword = &tmp + } + + if isForceRemoveEnabled, ok := s.D.GetOkExists("is_force_remove_enabled"); ok { + tmp := isForceRemoveEnabled.(bool) + request.IsForceRemoveEnabled = &tmp + } + + if nodeId, ok := s.D.GetOkExists("remove_node"); ok { + tmp := nodeId.(string) + request.NodeId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds") + + response, err := s.Client.RemoveNode(context.Background(), request) + if err != nil { + return err + } + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + if err != nil { + return err + } + workId := response.OpcWorkRequestId + return s.getBdsInstanceFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} + +func (s *BdsBdsInstanceResourceCrud) mapToBdsClusterVersionSummary(fieldKeyFormat string) (oci_bds.BdsClusterVersionSummary, error) { + result := oci_bds.BdsClusterVersionSummary{} + + if bdsVersion, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "bds_version")); ok { + tmp := bdsVersion.(string) + result.BdsVersion = &tmp + } + + if odhVersion, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "odh_version")); ok { + tmp := odhVersion.(string) + result.OdhVersion = &tmp + } + + return result, nil +} + +func (s *BdsBdsInstanceResourceCrud) mapToStartClusterShapeConfigs(fieldKeyFormat string) (oci_bds.StartClusterShapeConfigs, error) { + request := oci_bds.StartClusterShapeConfigs{} + + if nodeTypeShapeConfigs, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "node_type_shape_configs")); ok { + interfaces := nodeTypeShapeConfigs.([]interface{}) + tmp := make([]oci_bds.NodeTypeShapeConfig, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%s.%d.%%s", "start_cluster_shape_configs.0", "node_type_shape_configs", stateDataIndex) + converted, err := s.mapToNodeTypeShapeConfig(fieldKeyFormatNextLevel) + if err != nil { + return request, err + } + tmp[i] = converted + + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "node_type_shape_configs")) { + request.NodeTypeShapeConfigs = tmp + } + } + } + return request, nil +} +func (s *BdsBdsInstanceResourceCrud) mapToNodeTypeShapeConfig(fieldKeyFormat string) (oci_bds.NodeTypeShapeConfig, error) { + request := oci_bds.NodeTypeShapeConfig{} + + if shape, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "shape")); ok { + tmp := shape.(string) + request.Shape = &tmp + } + if nodeType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "node_type")); ok { + tmp := oci_bds.NodeNodeTypeEnum(nodeType.(string)) + request.NodeType = tmp + } + + return request, nil +} + +func BdsClusterVersionSummaryToMap(obj *oci_bds.BdsClusterVersionSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.BdsVersion != nil { + result["bds_version"] = string(*obj.BdsVersion) + } + + if obj.OdhVersion != nil { + result["odh_version"] = string(*obj.OdhVersion) + } + + return result +} + func CloudSqlDetailsToMap(obj *oci_bds.CloudSqlDetails) map[string]interface{} { result := map[string]interface{}{} diff --git a/internal/service/bds/bds_export.go b/internal/service/bds/bds_export.go index 9c70c500f21..0d9cfc01193 100644 --- a/internal/service/bds/bds_export.go +++ b/internal/service/bds/bds_export.go @@ -10,9 +10,11 @@ import ( func init() { exportBdsBdsInstanceApiKeyHints.GetIdFn = getBdsBdsInstanceApiKeyId - exportBdsBdsInstanceResourcePrincipalConfigurationHints.GetIdFn = getBdsBdsInstanceResourcePrincipalConfigurationId + exportBdsBdsInstanceMetastoreConfigHints.GetIdFn = getBdsBdsInstanceMetastoreConfigId + exportBdsBdsInstanceIdentityConfigurationHints.GetIdFn = getBdsBdsInstanceIdentityConfigurationId exportBdsBdsInstanceApiKeyHints.ProcessDiscoveredResourcesFn = processBdsInstanceApiKeys exportBdsBdsInstanceMetastoreConfigHints.ProcessDiscoveredResourcesFn = processBdsInstanceMetastoreConfigs + exportBdsBdsInstanceIdentityConfigurationHints.ProcessDiscoveredResourcesFn = processBdsInstanceIdentityConfigurations tf_export.RegisterCompartmentGraphs("bds", bdsResourceGraph) } @@ -37,6 +39,14 @@ func processBdsInstanceApiKeys(ctx *tf_export.ResourceDiscoveryContext, resource } return resources, nil } +func processBdsInstanceIdentityConfigurations(ctx *tf_export.ResourceDiscoveryContext, resources []*tf_export.OCIResource) ([]*tf_export.OCIResource, error) { + for _, resource := range resources { + identityConfigurationId := resource.Id + bdsInstanceId := resource.SourceAttributes["bds_instance_id"].(string) + resource.ImportId = GetBdsInstanceIdentityConfigurationCompositeId(bdsInstanceId, identityConfigurationId) + } + return resources, nil +} func getBdsBdsInstanceApiKeyId(resource *tf_export.OCIResource) (string, error) { @@ -48,14 +58,24 @@ func getBdsBdsInstanceApiKeyId(resource *tf_export.OCIResource) (string, error) return GetBdsInstanceApiKeyCompositeId(apiKeyId, bdsInstanceId), nil } -func getBdsBdsInstanceResourcePrincipalConfigurationId(resource *tf_export.OCIResource) (string, error) { +func getBdsBdsInstanceMetastoreConfigId(resource *tf_export.OCIResource) (string, error) { bdsInstanceId := resource.Parent.Id - resourcePrincipalConfigurationId, ok := resource.SourceAttributes["resource_principal_configuration_id"].(string) + metastoreConfigId, ok := resource.SourceAttributes["metastore_config_id"].(string) if !ok { - return "", fmt.Errorf("[ERROR] unable to find resourcePrincipalConfigurationId for Bds BdsInstanceResourcePrincipalConfiguration") + return "", fmt.Errorf("[ERROR] unable to find metastoreConfigId for Bds BdsInstanceMetastoreConfig") } - return GetBdsInstanceResourcePrincipalConfigurationCompositeId(bdsInstanceId, resourcePrincipalConfigurationId), nil + return GetBdsInstanceMetastoreConfigCompositeId(bdsInstanceId, metastoreConfigId), nil +} + +func getBdsBdsInstanceIdentityConfigurationId(resource *tf_export.OCIResource) (string, error) { + + bdsInstanceId := resource.Parent.Id + identityConfigurationId, ok := resource.SourceAttributes["id"].(string) + if !ok { + return "", fmt.Errorf("[ERROR] unable to find identityConfigurationId for Bds BdsInstanceIdentityConfiguration") + } + return GetBdsInstanceIdentityConfigurationCompositeId(bdsInstanceId, identityConfigurationId), nil } // Hints for discovering and exporting this resource to configuration and state files @@ -91,14 +111,14 @@ var exportBdsBdsInstanceMetastoreConfigHints = &tf_export.TerraformResourceHints }, } -var exportBdsBdsInstanceResourcePrincipalConfigurationHints = &tf_export.TerraformResourceHints{ - ResourceClass: "oci_bds_bds_instance_resource_principal_configuration", - DatasourceClass: "oci_bds_bds_instance_resource_principal_configurations", - DatasourceItemsAttr: "resource_principal_configurations", - ResourceAbbreviation: "bds_instance_resource_principal_configuration", +var exportBdsBdsInstanceIdentityConfigurationHints = &tf_export.TerraformResourceHints{ + ResourceClass: "oci_bds_bds_instance_identity_configuration", + DatasourceClass: "oci_bds_bds_instance_identity_configurations", + DatasourceItemsAttr: "identity_configurations", + ResourceAbbreviation: "bds_instance_identity_configuration", RequireResourceRefresh: true, DiscoverableLifecycleStates: []string{ - string(oci_bds.ResourcePrincipalConfigurationLifecycleStateActive), + string(oci_bds.IdentityConfigurationLifecycleStateActive), }, } @@ -114,13 +134,13 @@ var bdsResourceGraph = tf_export.TerraformResourceGraph{ }, }, { - TerraformResourceHints: exportBdsBdsInstanceMetastoreConfigHints, + TerraformResourceHints: exportBdsBdsInstanceIdentityConfigurationHints, DatasourceQueryParams: map[string]string{ "bds_instance_id": "id", }, }, { - TerraformResourceHints: exportBdsBdsInstanceResourcePrincipalConfigurationHints, + TerraformResourceHints: exportBdsBdsInstanceMetastoreConfigHints, DatasourceQueryParams: map[string]string{ "bds_instance_id": "id", }, diff --git a/internal/service/bds/register_datasource.go b/internal/service/bds/register_datasource.go index d88fc030c2b..e08c0127c2f 100644 --- a/internal/service/bds/register_datasource.go +++ b/internal/service/bds/register_datasource.go @@ -7,11 +7,14 @@ import "github.com/oracle/terraform-provider-oci/internal/tfresource" func RegisterDatasource() { tfresource.RegisterDatasource("oci_bds_auto_scaling_configuration", BdsAutoScalingConfigurationDataSource()) + tfresource.RegisterDatasource("oci_bds_bds_cluster_versions", BdsBdsClusterVersionsDataSource()) tfresource.RegisterDatasource("oci_bds_auto_scaling_configurations", BdsAutoScalingConfigurationsDataSource()) tfresource.RegisterDatasource("oci_bds_bds_instance", BdsBdsInstanceDataSource()) tfresource.RegisterDatasource("oci_bds_bds_instance_api_key", BdsBdsInstanceApiKeyDataSource()) tfresource.RegisterDatasource("oci_bds_bds_instance_api_keys", BdsBdsInstanceApiKeysDataSource()) tfresource.RegisterDatasource("oci_bds_bds_instance_get_os_patch", BdsBdsInstanceGetOsPatchDataSource()) + tfresource.RegisterDatasource("oci_bds_bds_instance_identity_configuration", BdsBdsInstanceIdentityConfigurationDataSource()) + tfresource.RegisterDatasource("oci_bds_bds_instance_identity_configurations", BdsBdsInstanceIdentityConfigurationsDataSource()) tfresource.RegisterDatasource("oci_bds_bds_instance_list_os_patches", BdsBdsInstanceListOsPatchesDataSource()) tfresource.RegisterDatasource("oci_bds_bds_instance_metastore_config", BdsBdsInstanceMetastoreConfigDataSource()) tfresource.RegisterDatasource("oci_bds_bds_instance_metastore_configs", BdsBdsInstanceMetastoreConfigsDataSource()) diff --git a/internal/service/bds/register_resource.go b/internal/service/bds/register_resource.go index 2cee6a6ce47..1008b4e9d71 100644 --- a/internal/service/bds/register_resource.go +++ b/internal/service/bds/register_resource.go @@ -9,6 +9,7 @@ func RegisterResource() { tfresource.RegisterResource("oci_bds_auto_scaling_configuration", BdsAutoScalingConfigurationResource()) tfresource.RegisterResource("oci_bds_bds_instance", BdsBdsInstanceResource()) tfresource.RegisterResource("oci_bds_bds_instance_api_key", BdsBdsInstanceApiKeyResource()) + tfresource.RegisterResource("oci_bds_bds_instance_identity_configuration", BdsBdsInstanceIdentityConfigurationResource()) tfresource.RegisterResource("oci_bds_bds_instance_metastore_config", BdsBdsInstanceMetastoreConfigResource()) tfresource.RegisterResource("oci_bds_bds_instance_operation_certificate_managements_management", BdsBdsInstanceOperationCertificateManagementsManagementResource()) tfresource.RegisterResource("oci_bds_bds_instance_patch_action", BdsBdsInstancePatchActionResource()) diff --git a/internal/service/core/core_volume_attachments_data_source.go b/internal/service/core/core_volume_attachments_data_source.go index 690b5b0d064..7afbfa1f264 100644 --- a/internal/service/core/core_volume_attachments_data_source.go +++ b/internal/service/core/core_volume_attachments_data_source.go @@ -158,6 +158,10 @@ func (s *CoreVolumeAttachmentsDataSourceCrud) SetData() error { result["is_read_only"] = bool(*v.IsReadOnly) } + if v.IsShareable != nil { + result["is_shareable"] = bool(*v.IsShareable) + } + if v.IsVolumeCreatedDuringLaunch != nil { result["is_volume_created_during_launch"] = bool(*v.IsVolumeCreatedDuringLaunch) } @@ -244,6 +248,10 @@ func (s *CoreVolumeAttachmentsDataSourceCrud) SetData() error { result["is_read_only"] = bool(*v.IsReadOnly) } + if v.IsShareable != nil { + result["is_shareable"] = bool(*v.IsShareable) + } + if v.IsVolumeCreatedDuringLaunch != nil { result["is_volume_created_during_launch"] = bool(*v.IsVolumeCreatedDuringLaunch) } @@ -298,6 +306,10 @@ func (s *CoreVolumeAttachmentsDataSourceCrud) SetData() error { result["is_read_only"] = bool(*v.IsReadOnly) } + if v.IsShareable != nil { + result["is_shareable"] = bool(*v.IsShareable) + } + if v.IsVolumeCreatedDuringLaunch != nil { result["is_volume_created_during_launch"] = bool(*v.IsVolumeCreatedDuringLaunch) } diff --git a/internal/service/database/database_autonomous_database_data_source.go b/internal/service/database/database_autonomous_database_data_source.go index 7c5ace7dadc..95109a60609 100644 --- a/internal/service/database/database_autonomous_database_data_source.go +++ b/internal/service/database/database_autonomous_database_data_source.go @@ -253,6 +253,10 @@ func (s *DatabaseAutonomousDatabaseDataSourceCrud) SetData() error { s.D.Set("is_auto_scaling_for_storage_enabled", *s.Res.IsAutoScalingForStorageEnabled) } + if s.Res.IsBackupRetentionLocked != nil { + s.D.Set("is_backup_retention_locked", *s.Res.IsBackupRetentionLocked) + } + if s.Res.IsDataGuardEnabled != nil { s.D.Set("is_data_guard_enabled", *s.Res.IsDataGuardEnabled) } diff --git a/internal/service/database/database_autonomous_database_resource.go b/internal/service/database/database_autonomous_database_resource.go index 2f274ce61ce..52e41843d82 100644 --- a/internal/service/database/database_autonomous_database_resource.go +++ b/internal/service/database/database_autonomous_database_resource.go @@ -363,6 +363,11 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { Optional: true, Computed: true, }, + "is_backup_retention_locked": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "is_data_guard_enabled": { Type: schema.TypeBool, Optional: true, @@ -1957,6 +1962,11 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error { request.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok && s.D.HasChange("is_backup_retention_locked") { + tmp := isBackupRetentionLocked.(bool) + request.IsBackupRetentionLocked = &tmp + } + if isDataGuardEnabled, ok := s.D.GetOkExists("is_data_guard_enabled"); ok && s.D.HasChange("is_data_guard_enabled") { tmp := isDataGuardEnabled.(bool) request.IsDataGuardEnabled = &tmp @@ -2401,6 +2411,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) SetData() error { s.D.Set("is_auto_scaling_for_storage_enabled", *s.Res.IsAutoScalingForStorageEnabled) } + if s.Res.IsBackupRetentionLocked != nil { + s.D.Set("is_backup_retention_locked", *s.Res.IsBackupRetentionLocked) + } + if s.Res.IsDataGuardEnabled != nil { s.D.Set("is_data_guard_enabled", *s.Res.IsDataGuardEnabled) } @@ -3420,6 +3434,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingForStorageEnabled.(bool) details.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if _, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { details.IsDataGuardEnabled = nil } @@ -3721,6 +3739,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingForStorageEnabled.(bool) details.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if _, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { details.IsDataGuardEnabled = nil } @@ -4017,6 +4039,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingForStorageEnabled.(bool) details.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if _, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { details.IsDataGuardEnabled = nil } @@ -4305,6 +4331,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingEnabled.(bool) details.IsAutoScalingEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if _, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { details.IsDataGuardEnabled = nil } @@ -4585,6 +4615,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingForStorageEnabled.(bool) details.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if isDataGuardEnabled, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { tmp := isDataGuardEnabled.(bool) details.IsDataGuardEnabled = &tmp @@ -4833,6 +4867,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingForStorageEnabled.(bool) details.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if _, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { details.IsDataGuardEnabled = nil } @@ -5113,6 +5151,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingForStorageEnabled.(bool) details.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if _, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { details.IsDataGuardEnabled = nil } @@ -5396,6 +5438,10 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := isAutoScalingForStorageEnabled.(bool) details.IsAutoScalingForStorageEnabled = &tmp } + if isBackupRetentionLocked, ok := s.D.GetOkExists("is_backup_retention_locked"); ok { + tmp := isBackupRetentionLocked.(bool) + details.IsBackupRetentionLocked = &tmp + } if _, ok := s.D.GetOkExists("is_data_guard_enabled"); ok { details.IsDataGuardEnabled = nil } diff --git a/internal/service/database/database_autonomous_databases_clones_data_source.go b/internal/service/database/database_autonomous_databases_clones_data_source.go index dea0d807ea9..2c7dc09c454 100644 --- a/internal/service/database/database_autonomous_databases_clones_data_source.go +++ b/internal/service/database/database_autonomous_databases_clones_data_source.go @@ -577,6 +577,10 @@ func DatabaseAutonomousDatabasesClonesDataSource() *schema.Resource { Type: schema.TypeBool, Computed: true, }, + "is_backup_retention_locked": { + Type: schema.TypeBool, + Computed: true, + }, "is_data_guard_enabled": { Type: schema.TypeBool, Computed: true, @@ -1399,6 +1403,10 @@ func (s *DatabaseAutonomousDatabasesClonesDataSourceCrud) SetData() error { autonomousDatabasesClone["is_auto_scaling_for_storage_enabled"] = *r.IsAutoScalingForStorageEnabled } + if r.IsBackupRetentionLocked != nil { + autonomousDatabasesClone["is_backup_retention_locked"] = *r.IsBackupRetentionLocked + } + if r.IsDataGuardEnabled != nil { autonomousDatabasesClone["is_data_guard_enabled"] = *r.IsDataGuardEnabled } diff --git a/internal/service/database/database_autonomous_databases_data_source.go b/internal/service/database/database_autonomous_databases_data_source.go index bec2f61fac0..7c0d391b5ae 100644 --- a/internal/service/database/database_autonomous_databases_data_source.go +++ b/internal/service/database/database_autonomous_databases_data_source.go @@ -376,6 +376,10 @@ func (s *DatabaseAutonomousDatabasesDataSourceCrud) SetData() error { autonomousDatabase["is_auto_scaling_for_storage_enabled"] = *r.IsAutoScalingForStorageEnabled } + if r.IsBackupRetentionLocked != nil { + autonomousDatabase["is_backup_retention_locked"] = *r.IsBackupRetentionLocked + } + if r.IsDataGuardEnabled != nil { autonomousDatabase["is_data_guard_enabled"] = *r.IsDataGuardEnabled } diff --git a/internal/service/datascience/datascience_model_deployment_resource.go b/internal/service/datascience/datascience_model_deployment_resource.go index 0aa446f802f..11b9c982d15 100644 --- a/internal/service/datascience/datascience_model_deployment_resource.go +++ b/internal/service/datascience/datascience_model_deployment_resource.go @@ -110,6 +110,11 @@ func DatascienceModelDeploymentResource() *schema.Resource { }, }, }, + "private_endpoint_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "subnet_id": { Type: schema.TypeString, Optional: true, @@ -1304,6 +1309,13 @@ func (s *DatascienceModelDeploymentResourceCrud) mapToInstanceConfiguration(fiel } } + if privateEndpointId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "private_endpoint_id")); ok { + tmp := privateEndpointId.(string) + if tmp != "" { + result.PrivateEndpointId = &tmp + } + } + if subnetId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "subnet_id")); ok { tmp := subnetId.(string) result.SubnetId = &tmp @@ -1323,6 +1335,14 @@ func InstanceConfigurationToMap(obj *oci_datascience.InstanceConfiguration) map[ result["model_deployment_instance_shape_config_details"] = []interface{}{ModelDeploymentInstanceShapeConfigDetailsToMap(obj.ModelDeploymentInstanceShapeConfigDetails)} } + if obj.PrivateEndpointId != nil { + if *obj.PrivateEndpointId == "" { + result["private_endpoint_id"] = nil + } else { + result["private_endpoint_id"] = string(*obj.PrivateEndpointId) + } + } + if obj.SubnetId != nil { if *obj.SubnetId == "" { result["subnet_id"] = nil diff --git a/internal/service/golden_gate/golden_gate_export.go b/internal/service/golden_gate/golden_gate_export.go index f9a6cc6597c..b34cafe406a 100644 --- a/internal/service/golden_gate/golden_gate_export.go +++ b/internal/service/golden_gate/golden_gate_export.go @@ -104,6 +104,19 @@ var exportGoldenGateDeploymentCertificateHints = &tf_export.TerraformResourceHin }, } +var exportGoldenGatePipelineHints = &tf_export.TerraformResourceHints{ + ResourceClass: "oci_golden_gate_pipeline", + DatasourceClass: "oci_golden_gate_pipelines", + DatasourceItemsAttr: "pipeline_collection", + IsDatasourceCollection: true, + ResourceAbbreviation: "pipeline", + RequireResourceRefresh: true, + DiscoverableLifecycleStates: []string{ + string(oci_golden_gate.PipelineLifecycleStateActive), + string(oci_golden_gate.PipelineLifecycleStateNeedsAttention), + }, +} + var goldenGateResourceGraph = tf_export.TerraformResourceGraph{ "oci_identity_compartment": { {TerraformResourceHints: exportGoldenGateDatabaseRegistrationHints}, @@ -111,6 +124,7 @@ var goldenGateResourceGraph = tf_export.TerraformResourceGraph{ {TerraformResourceHints: exportGoldenGateDeploymentBackupHints}, {TerraformResourceHints: exportGoldenGateConnectionAssignmentHints}, {TerraformResourceHints: exportGoldenGateConnectionHints}, + {TerraformResourceHints: exportGoldenGatePipelineHints}, }, "oci_golden_gate_deployment": { { diff --git a/internal/service/golden_gate/golden_gate_pipeline_data_source.go b/internal/service/golden_gate/golden_gate_pipeline_data_source.go new file mode 100644 index 00000000000..a33e50e0659 --- /dev/null +++ b/internal/service/golden_gate/golden_gate_pipeline_data_source.go @@ -0,0 +1,161 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package golden_gate + +import ( + "context" + "log" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GoldenGatePipelineDataSource() *schema.Resource { + fieldMap := make(map[string]*schema.Schema) + fieldMap["pipeline_id"] = &schema.Schema{ + Type: schema.TypeString, + Required: true, + } + return tfresource.GetSingularDataSourceItemSchema(GoldenGatePipelineResource(), fieldMap, readSingularGoldenGatePipeline) +} + +func readSingularGoldenGatePipeline(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.ReadResource(sync) +} + +type GoldenGatePipelineDataSourceCrud struct { + D *schema.ResourceData + Client *oci_golden_gate.GoldenGateClient + Res *oci_golden_gate.GetPipelineResponse +} + +func (s *GoldenGatePipelineDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GoldenGatePipelineDataSourceCrud) Get() error { + request := oci_golden_gate.GetPipelineRequest{} + + if pipelineId, ok := s.D.GetOkExists("pipeline_id"); ok { + tmp := pipelineId.(string) + request.PipelineId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "golden_gate") + + response, err := s.Client.GetPipeline(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + return nil +} + +func (s *GoldenGatePipelineDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(*s.Res.GetId()) + switch v := (s.Res.Pipeline).(type) { + case oci_golden_gate.ZeroEtlPipeline: + s.D.Set("recipe_type", "ZERO_ETL") + + mappingRules := []interface{}{} + for _, item := range v.MappingRules { + mappingRules = append(mappingRules, MappingRuleToMap(item)) + } + s.D.Set("mapping_rules", mappingRules) + + if v.ProcessOptions != nil { + s.D.Set("process_options", []interface{}{ProcessOptionsToMap(v.ProcessOptions)}) + } else { + s.D.Set("process_options", nil) + } + + if v.TimeLastRecorded != nil { + s.D.Set("time_last_recorded", v.TimeLastRecorded.Format(time.RFC3339Nano)) + } + + if v.CompartmentId != nil { + s.D.Set("compartment_id", *v.CompartmentId) + } + + if v.CpuCoreCount != nil { + s.D.Set("cpu_core_count", *v.CpuCoreCount) + } + + if v.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(v.DefinedTags)) + } + + if v.Description != nil { + s.D.Set("description", *v.Description) + } + + if v.DisplayName != nil { + s.D.Set("display_name", *v.DisplayName) + } + + s.D.Set("freeform_tags", v.FreeformTags) + + if v.IsAutoScalingEnabled != nil { + s.D.Set("is_auto_scaling_enabled", *v.IsAutoScalingEnabled) + } + + s.D.Set("license_model", v.LicenseModel) + + if v.LifecycleDetails != nil { + s.D.Set("lifecycle_details", *v.LifecycleDetails) + } + + s.D.Set("lifecycle_sub_state", v.LifecycleSubState) + + locks := []interface{}{} + for _, item := range v.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + + if v.SourceConnectionDetails != nil { + s.D.Set("source_connection_details", []interface{}{SourcePipelineConnectionDetailsToMap(v.SourceConnectionDetails)}) + } else { + s.D.Set("source_connection_details", nil) + } + + s.D.Set("state", v.LifecycleState) + + if v.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(v.SystemTags)) + } + + if v.TargetConnectionDetails != nil { + s.D.Set("target_connection_details", []interface{}{TargetPipelineConnectionDetailsToMap(v.TargetConnectionDetails)}) + } else { + s.D.Set("target_connection_details", nil) + } + + if v.TimeCreated != nil { + s.D.Set("time_created", v.TimeCreated.String()) + } + + if v.TimeUpdated != nil { + s.D.Set("time_updated", v.TimeUpdated.String()) + } + default: + log.Printf("[WARN] Received 'recipe_type' of unknown type %v", s.Res.Pipeline) + return nil + } + + return nil +} diff --git a/internal/service/golden_gate/golden_gate_pipeline_resource.go b/internal/service/golden_gate/golden_gate_pipeline_resource.go new file mode 100644 index 00000000000..5ff78b1ccf0 --- /dev/null +++ b/internal/service/golden_gate/golden_gate_pipeline_resource.go @@ -0,0 +1,1068 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package golden_gate + +import ( + "context" + "fmt" + "log" + "strings" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + oci_common "github.com/oracle/oci-go-sdk/v65/common" + oci_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GoldenGatePipelineResource() *schema.Resource { + return &schema.Resource{ + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: tfresource.DefaultTimeout, + Create: createGoldenGatePipeline, + Read: readGoldenGatePipeline, + Update: updateGoldenGatePipeline, + Delete: deleteGoldenGatePipeline, + Schema: map[string]*schema.Schema{ + // Required + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Required: true, + }, + "license_model": { + Type: schema.TypeString, + Required: true, + }, + "recipe_type": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "ZERO_ETL", + }, true), + }, + "source_connection_details": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + + // Computed + }, + }, + }, + "target_connection_details": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + + // Computed + }, + }, + }, + + // Optional + "defined_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + DiffSuppressFunc: tfresource.DefinedTagsDiffSuppressFunction, + Elem: schema.TypeString, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "freeform_tags": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + Elem: schema.TypeString, + }, + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // Computed + }, + }, + }, + "process_options": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "initial_data_load": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "is_initial_load": { + Type: schema.TypeString, + Required: true, + }, + + // Optional + "action_on_existing_table": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "replicate_schema_change": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "can_replicate_schema_change": { + Type: schema.TypeString, + Required: true, + }, + + // Optional + "action_on_ddl_error": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "action_on_dml_error": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "should_restart_on_failure": { + Type: schema.TypeString, + Required: true, + }, + + // Optional + + // Computed + }, + }, + }, + + // Computed + "cpu_core_count": { + Type: schema.TypeInt, + Computed: true, + }, + "is_auto_scaling_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "lifecycle_details": { + Type: schema.TypeString, + Computed: true, + }, + "lifecycle_sub_state": { + Type: schema.TypeString, + Computed: true, + }, + "mapping_rules": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "mapping_type": { + Type: schema.TypeString, + Computed: true, + }, + "source": { + Type: schema.TypeString, + Computed: true, + }, + "target": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "system_tags": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + "time_created": { + Type: schema.TypeString, + Computed: true, + }, + "time_last_recorded": { + Type: schema.TypeString, + Computed: true, + }, + "time_updated": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func createGoldenGatePipeline(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.CreateResource(d, sync) +} + +func readGoldenGatePipeline(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.ReadResource(sync) +} + +func updateGoldenGatePipeline(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.UpdateResource(d, sync) +} + +func deleteGoldenGatePipeline(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineResourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + sync.DisableNotFoundRetries = true + + return tfresource.DeleteResource(d, sync) +} + +type GoldenGatePipelineResourceCrud struct { + tfresource.BaseCrud + Client *oci_golden_gate.GoldenGateClient + Res *oci_golden_gate.Pipeline + DisableNotFoundRetries bool +} + +func (s *GoldenGatePipelineResourceCrud) ID() string { + pipeline := *s.Res + return *pipeline.GetId() +} + +func (s *GoldenGatePipelineResourceCrud) CreatedPending() []string { + return []string{ + string(oci_golden_gate.PipelineLifecycleStateCreating), + } +} + +func (s *GoldenGatePipelineResourceCrud) CreatedTarget() []string { + return []string{ + string(oci_golden_gate.PipelineLifecycleStateActive), + string(oci_golden_gate.PipelineLifecycleStateNeedsAttention), + } +} + +func (s *GoldenGatePipelineResourceCrud) DeletedPending() []string { + return []string{ + string(oci_golden_gate.PipelineLifecycleStateDeleting), + } +} + +func (s *GoldenGatePipelineResourceCrud) DeletedTarget() []string { + return []string{ + string(oci_golden_gate.PipelineLifecycleStateDeleted), + } +} + +func (s *GoldenGatePipelineResourceCrud) Create() error { + request := oci_golden_gate.CreatePipelineRequest{} + err := s.populateTopLevelPolymorphicCreatePipelineRequest(&request) + if err != nil { + return err + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate") + + response, err := s.Client.CreatePipeline(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + var identifier *string + identifier = response.GetId() + if identifier != nil { + s.D.SetId(*identifier) + } + return s.getPipelineFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate"), oci_golden_gate.ActionTypeCreated, s.D.Timeout(schema.TimeoutCreate)) +} + +func (s *GoldenGatePipelineResourceCrud) getPipelineFromWorkRequest(workId *string, retryPolicy *oci_common.RetryPolicy, + actionTypeEnum oci_golden_gate.ActionTypeEnum, timeout time.Duration) error { + + // Wait until it finishes + pipelineId, err := pipelineWaitForWorkRequest(workId, "pipeline", + actionTypeEnum, timeout, s.DisableNotFoundRetries, s.Client) + + if err != nil { + return err + } + s.D.SetId(*pipelineId) + + return s.Get() +} + +func pipelineWorkRequestShouldRetryFunc(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, "golden_gate", startTime) { + return true + } + + // Only stop if the time Finished is set + if workRequestResponse, ok := response.Response.(oci_golden_gate.GetWorkRequestResponse); ok { + return workRequestResponse.TimeFinished == nil + } + return false + } +} + +func pipelineWaitForWorkRequest(wId *string, entityType string, action oci_golden_gate.ActionTypeEnum, + timeout time.Duration, disableFoundRetries bool, client *oci_golden_gate.GoldenGateClient) (*string, error) { + retryPolicy := tfresource.GetRetryPolicy(disableFoundRetries, "golden_gate") + retryPolicy.ShouldRetryOperation = pipelineWorkRequestShouldRetryFunc(timeout) + + response := oci_golden_gate.GetWorkRequestResponse{} + stateConf := &resource.StateChangeConf{ + Pending: []string{ + string(oci_golden_gate.OperationStatusInProgress), + string(oci_golden_gate.OperationStatusAccepted), + }, + Target: []string{ + string(oci_golden_gate.OperationStatusSucceeded), + string(oci_golden_gate.OperationStatusFailed), + string(oci_golden_gate.OperationStatusCanceled), + }, + Refresh: func() (interface{}, string, error) { + var err error + response, err = client.GetWorkRequest(context.Background(), + oci_golden_gate.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_golden_gate.OperationStatusFailed || response.Status == oci_golden_gate.OperationStatusCanceled { + return nil, getErrorFromGoldenGatePipelineWorkRequest(client, wId, retryPolicy, entityType, action) + } + + return identifier, nil +} + +func getErrorFromGoldenGatePipelineWorkRequest(client *oci_golden_gate.GoldenGateClient, workId *string, retryPolicy *oci_common.RetryPolicy, entityType string, action oci_golden_gate.ActionTypeEnum) error { + response, err := client.ListWorkRequestErrors(context.Background(), + oci_golden_gate.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 *GoldenGatePipelineResourceCrud) Get() error { + request := oci_golden_gate.GetPipelineRequest{} + + tmp := s.D.Id() + request.PipelineId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate") + + response, err := s.Client.GetPipeline(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response.Pipeline + return nil +} + +func (s *GoldenGatePipelineResourceCrud) Update() error { + if compartment, ok := s.D.GetOkExists("compartment_id"); ok && s.D.HasChange("compartment_id") { + oldRaw, newRaw := s.D.GetChange("compartment_id") + if newRaw != "" && oldRaw != "" { + err := s.updateCompartment(compartment) + if err != nil { + return err + } + } + } + request := oci_golden_gate.UpdatePipelineRequest{} + err := s.populateTopLevelPolymorphicUpdatePipelineRequest(&request) + if err != nil { + return err + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate") + + response, err := s.Client.UpdatePipeline(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getPipelineFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate"), oci_golden_gate.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} + +func (s *GoldenGatePipelineResourceCrud) Delete() error { + request := oci_golden_gate.DeletePipelineRequest{} + + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + + tmp := s.D.Id() + request.PipelineId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate") + + response, err := s.Client.DeletePipeline(context.Background(), request) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + // Wait until it finishes + _, delWorkRequestErr := pipelineWaitForWorkRequest(workId, "pipeline", + oci_golden_gate.ActionTypeDeleted, s.D.Timeout(schema.TimeoutDelete), s.DisableNotFoundRetries, s.Client) + return delWorkRequestErr +} + +func (s *GoldenGatePipelineResourceCrud) SetData() error { + switch v := (*s.Res).(type) { + case oci_golden_gate.ZeroEtlPipeline: + s.D.Set("recipe_type", "ZERO_ETL") + + mappingRules := []interface{}{} + for _, item := range v.MappingRules { + mappingRules = append(mappingRules, MappingRuleToMap(item)) + } + s.D.Set("mapping_rules", mappingRules) + + if v.ProcessOptions != nil { + s.D.Set("process_options", []interface{}{ProcessOptionsToMap(v.ProcessOptions)}) + } else { + s.D.Set("process_options", nil) + } + + if v.TimeLastRecorded != nil { + s.D.Set("time_last_recorded", v.TimeLastRecorded.Format(time.RFC3339Nano)) + } + + if v.CompartmentId != nil { + s.D.Set("compartment_id", *v.CompartmentId) + } + + if v.CpuCoreCount != nil { + s.D.Set("cpu_core_count", *v.CpuCoreCount) + } + + if v.DefinedTags != nil { + s.D.Set("defined_tags", tfresource.DefinedTagsToMap(v.DefinedTags)) + } + + if v.Description != nil { + s.D.Set("description", *v.Description) + } + + if v.DisplayName != nil { + s.D.Set("display_name", *v.DisplayName) + } + + s.D.Set("freeform_tags", v.FreeformTags) + + if v.Id != nil { + s.D.SetId(*v.Id) + } + + if v.IsAutoScalingEnabled != nil { + s.D.Set("is_auto_scaling_enabled", *v.IsAutoScalingEnabled) + } + + s.D.Set("license_model", v.LicenseModel) + + if v.LifecycleDetails != nil { + s.D.Set("lifecycle_details", *v.LifecycleDetails) + } + + s.D.Set("lifecycle_sub_state", v.LifecycleSubState) + + locks := []interface{}{} + for _, item := range v.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + + if v.SourceConnectionDetails != nil { + s.D.Set("source_connection_details", []interface{}{SourcePipelineConnectionDetailsToMap(v.SourceConnectionDetails)}) + } else { + s.D.Set("source_connection_details", nil) + } + + s.D.Set("state", v.LifecycleState) + + if v.SystemTags != nil { + s.D.Set("system_tags", tfresource.SystemTagsToMap(v.SystemTags)) + } + + if v.TargetConnectionDetails != nil { + s.D.Set("target_connection_details", []interface{}{TargetPipelineConnectionDetailsToMap(v.TargetConnectionDetails)}) + } else { + s.D.Set("target_connection_details", nil) + } + + if v.TimeCreated != nil { + s.D.Set("time_created", v.TimeCreated.String()) + } + + if v.TimeUpdated != nil { + s.D.Set("time_updated", v.TimeUpdated.String()) + } + default: + log.Printf("[WARN] Received 'recipe_type' of unknown type %v", *s.Res) + return nil + } + return nil +} + +func (s *GoldenGatePipelineResourceCrud) mapToInitialDataLoad(fieldKeyFormat string) (oci_golden_gate.InitialDataLoad, error) { + result := oci_golden_gate.InitialDataLoad{} + + if actionOnExistingTable, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "action_on_existing_table")); ok { + result.ActionOnExistingTable = oci_golden_gate.InitialLoadActionEnum(actionOnExistingTable.(string)) + } + + if isInitialLoad, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_initial_load")); ok { + result.IsInitialLoad = oci_golden_gate.InitialDataLoadIsInitialLoadEnum(isInitialLoad.(string)) + } + + return result, nil +} + +func InitialDataLoadToMap(obj *oci_golden_gate.InitialDataLoad) map[string]interface{} { + result := map[string]interface{}{} + + result["action_on_existing_table"] = string(obj.ActionOnExistingTable) + + result["is_initial_load"] = string(obj.IsInitialLoad) + + return result +} + +func (s *GoldenGatePipelineResourceCrud) mapToMappingRule(fieldKeyFormat string) (oci_golden_gate.MappingRule, error) { + result := oci_golden_gate.MappingRule{} + + if mappingType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "mapping_type")); ok { + result.MappingType = oci_golden_gate.MappingTypeEnum(mappingType.(string)) + } + + if source, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source")); ok { + tmp := source.(string) + result.Source = &tmp + } + + if target, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "target")); ok { + tmp := target.(string) + result.Target = &tmp + } + + return result, nil +} + +func MappingRuleToMap(obj oci_golden_gate.MappingRule) map[string]interface{} { + result := map[string]interface{}{} + + result["mapping_type"] = string(obj.MappingType) + + if obj.Source != nil { + result["source"] = string(*obj.Source) + } + + if obj.Target != nil { + result["target"] = string(*obj.Target) + } + + return result +} + +func PipelineSummaryToMap(obj oci_golden_gate.PipelineSummary) map[string]interface{} { + result := map[string]interface{}{} + switch v := (obj).(type) { + case oci_golden_gate.ZeroEtlPipelineSummary: + result["recipe_type"] = "ZERO_ETL" + + if v.ProcessOptions != nil { + result["process_options"] = []interface{}{ProcessOptionsToMap(v.ProcessOptions)} + } + + if v.TimeLastRecorded != nil { + result["time_last_recorded"] = v.TimeLastRecorded.Format(time.RFC3339Nano) + } + default: + log.Printf("[WARN] Received 'recipe_type' of unknown type %v", obj) + return nil + } + + return result +} + +func (s *GoldenGatePipelineResourceCrud) mapToProcessOptions(fieldKeyFormat string) (oci_golden_gate.ProcessOptions, error) { + result := oci_golden_gate.ProcessOptions{} + + if initialDataLoad, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "initial_data_load")); ok { + if tmpList := initialDataLoad.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "initial_data_load"), 0) + tmp, err := s.mapToInitialDataLoad(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert initial_data_load, encountered error: %v", err) + } + result.InitialDataLoad = &tmp + } + } + + if replicateSchemaChange, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "replicate_schema_change")); ok { + if tmpList := replicateSchemaChange.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "replicate_schema_change"), 0) + tmp, err := s.mapToReplicateSchemaChange(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert replicate_schema_change, encountered error: %v", err) + } + result.ReplicateSchemaChange = &tmp + } + } + + if shouldRestartOnFailure, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "should_restart_on_failure")); ok { + result.ShouldRestartOnFailure = oci_golden_gate.ProcessOptionsShouldRestartOnFailureEnum(shouldRestartOnFailure.(string)) + } + + return result, nil +} + +func ProcessOptionsToMap(obj *oci_golden_gate.ProcessOptions) map[string]interface{} { + result := map[string]interface{}{} + + if obj.InitialDataLoad != nil { + result["initial_data_load"] = []interface{}{InitialDataLoadToMap(obj.InitialDataLoad)} + } + + if obj.ReplicateSchemaChange != nil { + result["replicate_schema_change"] = []interface{}{ReplicateSchemaChangeToMap(obj.ReplicateSchemaChange)} + } + + result["should_restart_on_failure"] = string(obj.ShouldRestartOnFailure) + + return result +} + +func (s *GoldenGatePipelineResourceCrud) mapToReplicateSchemaChange(fieldKeyFormat string) (oci_golden_gate.ReplicateSchemaChange, error) { + result := oci_golden_gate.ReplicateSchemaChange{} + + if actionOnDdlError, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "action_on_ddl_error")); ok { + result.ActionOnDdlError = oci_golden_gate.ReplicateDdlErrorActionEnum(actionOnDdlError.(string)) + } + + if actionOnDmlError, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "action_on_dml_error")); ok { + result.ActionOnDmlError = oci_golden_gate.ReplicateDmlErrorActionEnum(actionOnDmlError.(string)) + } + + if canReplicateSchemaChange, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "can_replicate_schema_change")); ok { + result.CanReplicateSchemaChange = oci_golden_gate.ReplicateSchemaChangeCanReplicateSchemaChangeEnum(canReplicateSchemaChange.(string)) + } + + return result, nil +} + +func ReplicateSchemaChangeToMap(obj *oci_golden_gate.ReplicateSchemaChange) map[string]interface{} { + result := map[string]interface{}{} + + result["action_on_ddl_error"] = string(obj.ActionOnDdlError) + + result["action_on_dml_error"] = string(obj.ActionOnDmlError) + + result["can_replicate_schema_change"] = string(obj.CanReplicateSchemaChange) + + return result +} + +func (s *GoldenGatePipelineResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_golden_gate.ResourceLock, error) { + result := oci_golden_gate.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_golden_gate.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} + +func (s *GoldenGatePipelineResourceCrud) mapToSourcePipelineConnectionDetails(fieldKeyFormat string) (oci_golden_gate.SourcePipelineConnectionDetails, error) { + result := oci_golden_gate.SourcePipelineConnectionDetails{} + + if connectionId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "connection_id")); ok { + tmp := connectionId.(string) + result.ConnectionId = &tmp + } + + return result, nil +} + +func SourcePipelineConnectionDetailsToMap(obj *oci_golden_gate.SourcePipelineConnectionDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.ConnectionId != nil { + result["connection_id"] = string(*obj.ConnectionId) + } + + return result +} + +func (s *GoldenGatePipelineResourceCrud) mapToTargetPipelineConnectionDetails(fieldKeyFormat string) (oci_golden_gate.TargetPipelineConnectionDetails, error) { + result := oci_golden_gate.TargetPipelineConnectionDetails{} + + if connectionId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "connection_id")); ok { + tmp := connectionId.(string) + result.ConnectionId = &tmp + } + + return result, nil +} + +func TargetPipelineConnectionDetailsToMap(obj *oci_golden_gate.TargetPipelineConnectionDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.ConnectionId != nil { + result["connection_id"] = string(*obj.ConnectionId) + } + + return result +} + +func (s *GoldenGatePipelineResourceCrud) populateTopLevelPolymorphicCreatePipelineRequest(request *oci_golden_gate.CreatePipelineRequest) error { + //discriminator + recipeTypeRaw, ok := s.D.GetOkExists("recipe_type") + var recipeType string + if ok { + recipeType = recipeTypeRaw.(string) + } else { + recipeType = "" // default value + } + switch strings.ToLower(recipeType) { + case strings.ToLower("ZERO_ETL"): + details := oci_golden_gate.CreateZeroEtlPipelineDetails{} + if processOptions, ok := s.D.GetOkExists("process_options"); ok { + if tmpList := processOptions.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "process_options", 0) + tmp, err := s.mapToProcessOptions(fieldKeyFormat) + if err != nil { + return err + } + details.ProcessOptions = &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 description, ok := s.D.GetOkExists("description"); ok { + tmp := description.(string) + details.Description = &tmp + } + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + details.DisplayName = &tmp + } + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + if licenseModel, ok := s.D.GetOkExists("license_model"); ok { + details.LicenseModel = oci_golden_gate.LicenseModelEnum(licenseModel.(string)) + } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_golden_gate.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + details.Locks = tmp + } + } + if sourceConnectionDetails, ok := s.D.GetOkExists("source_connection_details"); ok { + if tmpList := sourceConnectionDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "source_connection_details", 0) + tmp, err := s.mapToSourcePipelineConnectionDetails(fieldKeyFormat) + if err != nil { + return err + } + details.SourceConnectionDetails = &tmp + } + } + if targetConnectionDetails, ok := s.D.GetOkExists("target_connection_details"); ok { + if tmpList := targetConnectionDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "target_connection_details", 0) + tmp, err := s.mapToTargetPipelineConnectionDetails(fieldKeyFormat) + if err != nil { + return err + } + details.TargetConnectionDetails = &tmp + } + } + request.CreatePipelineDetails = details + default: + return fmt.Errorf("unknown recipe_type '%v' was specified", recipeType) + } + return nil +} + +func (s *GoldenGatePipelineResourceCrud) populateTopLevelPolymorphicUpdatePipelineRequest(request *oci_golden_gate.UpdatePipelineRequest) error { + //discriminator + recipeTypeRaw, ok := s.D.GetOkExists("recipe_type") + var recipeType string + if ok { + recipeType = recipeTypeRaw.(string) + } else { + recipeType = "" // default value + } + switch strings.ToLower(recipeType) { + case strings.ToLower("ZERO_ETL"): + details := oci_golden_gate.UpdateZeroEtlPipelineDetails{} + if mappingRules, ok := s.D.GetOkExists("mapping_rules"); ok { + interfaces := mappingRules.([]interface{}) + tmp := make([]oci_golden_gate.MappingRule, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "mapping_rules", stateDataIndex) + converted, err := s.mapToMappingRule(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("mapping_rules") { + details.MappingRules = tmp + } + } + if processOptions, ok := s.D.GetOkExists("process_options"); ok { + if tmpList := processOptions.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "process_options", 0) + tmp, err := s.mapToProcessOptions(fieldKeyFormat) + if err != nil { + return err + } + details.ProcessOptions = &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 description, ok := s.D.GetOkExists("description"); ok { + tmp := description.(string) + details.Description = &tmp + } + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + details.DisplayName = &tmp + } + if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { + details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) + } + if licenseModel, ok := s.D.GetOkExists("license_model"); ok { + details.LicenseModel = oci_golden_gate.LicenseModelEnum(licenseModel.(string)) + } + tmp := s.D.Id() + request.PipelineId = &tmp + request.UpdatePipelineDetails = details + default: + return fmt.Errorf("unknown recipe_type '%v' was specified", recipeType) + } + return nil +} + +func (s *GoldenGatePipelineResourceCrud) updateCompartment(compartment interface{}) error { + changeCompartmentRequest := oci_golden_gate.ChangePipelineCompartmentRequest{} + + compartmentTmp := compartment.(string) + changeCompartmentRequest.CompartmentId = &compartmentTmp + + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + changeCompartmentRequest.IsLockOverride = &tmp + } + + idTmp := s.D.Id() + changeCompartmentRequest.PipelineId = &idTmp + + changeCompartmentRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate") + + response, err := s.Client.ChangePipelineCompartment(context.Background(), changeCompartmentRequest) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getPipelineFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "golden_gate"), oci_golden_gate.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) +} diff --git a/internal/service/golden_gate/golden_gate_pipeline_running_processes_data_source.go b/internal/service/golden_gate/golden_gate_pipeline_running_processes_data_source.go new file mode 100644 index 00000000000..fd53620ed1b --- /dev/null +++ b/internal/service/golden_gate/golden_gate_pipeline_running_processes_data_source.go @@ -0,0 +1,172 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package golden_gate + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GoldenGatePipelineRunningProcessesDataSource() *schema.Resource { + return &schema.Resource{ + Read: readGoldenGatePipelineRunningProcesses, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "pipeline_id": { + Type: schema.TypeString, + Required: true, + }, + "pipeline_running_process_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "items": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "last_record_lag_in_seconds": { + Type: schema.TypeFloat, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "process_type": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "time_last_processed": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func readGoldenGatePipelineRunningProcesses(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineRunningProcessesDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.ReadResource(sync) +} + +type GoldenGatePipelineRunningProcessesDataSourceCrud struct { + D *schema.ResourceData + Client *oci_golden_gate.GoldenGateClient + Res *oci_golden_gate.ListPipelineRunningProcessesResponse +} + +func (s *GoldenGatePipelineRunningProcessesDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GoldenGatePipelineRunningProcessesDataSourceCrud) Get() error { + request := oci_golden_gate.ListPipelineRunningProcessesRequest{} + + if pipelineId, ok := s.D.GetOkExists("pipeline_id"); ok { + tmp := pipelineId.(string) + request.PipelineId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "golden_gate") + + response, err := s.Client.ListPipelineRunningProcesses(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListPipelineRunningProcesses(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 *GoldenGatePipelineRunningProcessesDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("GoldenGatePipelineRunningProcessesDataSource-", GoldenGatePipelineRunningProcessesDataSource(), s.D)) + resources := []map[string]interface{}{} + pipelineRunningProcess := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, PipelineRunningProcessSummaryToMap(item)) + } + pipelineRunningProcess["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, GoldenGatePipelineRunningProcessesDataSource().Schema["pipeline_running_process_collection"].Elem.(*schema.Resource).Schema) + pipelineRunningProcess["items"] = items + } + + resources = append(resources, pipelineRunningProcess) + if err := s.D.Set("pipeline_running_process_collection", resources); err != nil { + return err + } + + return nil +} + +func PipelineRunningProcessSummaryToMap(obj oci_golden_gate.PipelineRunningProcessSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.LastRecordLagInSeconds != nil { + result["last_record_lag_in_seconds"] = float32(*obj.LastRecordLagInSeconds) + } + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + result["process_type"] = string(obj.ProcessType) + + result["status"] = string(obj.Status) + + if obj.TimeLastProcessed != nil { + result["time_last_processed"] = obj.TimeLastProcessed.String() + } + + return result +} diff --git a/internal/service/golden_gate/golden_gate_pipeline_schema_tables_data_source.go b/internal/service/golden_gate/golden_gate_pipeline_schema_tables_data_source.go new file mode 100644 index 00000000000..3b94cd497f6 --- /dev/null +++ b/internal/service/golden_gate/golden_gate_pipeline_schema_tables_data_source.go @@ -0,0 +1,187 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package golden_gate + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GoldenGatePipelineSchemaTablesDataSource() *schema.Resource { + return &schema.Resource{ + Read: readGoldenGatePipelineSchemaTables, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "display_name": { + Type: schema.TypeString, + Optional: true, + }, + "pipeline_id": { + Type: schema.TypeString, + Required: true, + }, + "source_schema_name": { + Type: schema.TypeString, + Required: true, + }, + "target_schema_name": { + Type: schema.TypeString, + Required: true, + }, + "pipeline_schema_table_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "items": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "source_table_name": { + Type: schema.TypeString, + Computed: true, + }, + "target_table_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "source_schema_name": { + Type: schema.TypeString, + Computed: true, + }, + "target_schema_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func readGoldenGatePipelineSchemaTables(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineSchemaTablesDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.ReadResource(sync) +} + +type GoldenGatePipelineSchemaTablesDataSourceCrud struct { + D *schema.ResourceData + Client *oci_golden_gate.GoldenGateClient + Res *oci_golden_gate.ListPipelineSchemaTablesResponse +} + +func (s *GoldenGatePipelineSchemaTablesDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GoldenGatePipelineSchemaTablesDataSourceCrud) Get() error { + request := oci_golden_gate.ListPipelineSchemaTablesRequest{} + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if pipelineId, ok := s.D.GetOkExists("pipeline_id"); ok { + tmp := pipelineId.(string) + request.PipelineId = &tmp + } + + if sourceSchemaName, ok := s.D.GetOkExists("source_schema_name"); ok { + tmp := sourceSchemaName.(string) + request.SourceSchemaName = &tmp + } + + if targetSchemaName, ok := s.D.GetOkExists("target_schema_name"); ok { + tmp := targetSchemaName.(string) + request.TargetSchemaName = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "golden_gate") + + response, err := s.Client.ListPipelineSchemaTables(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListPipelineSchemaTables(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 *GoldenGatePipelineSchemaTablesDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("GoldenGatePipelineSchemaTablesDataSource-", GoldenGatePipelineSchemaTablesDataSource(), s.D)) + resources := []map[string]interface{}{} + pipelineSchemaTable := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, PipelineSchemaTableSummaryToMap(item)) + } + pipelineSchemaTable["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, GoldenGatePipelineSchemaTablesDataSource().Schema["pipeline_schema_table_collection"].Elem.(*schema.Resource).Schema) + pipelineSchemaTable["items"] = items + } + + resources = append(resources, pipelineSchemaTable) + if err := s.D.Set("pipeline_schema_table_collection", resources); err != nil { + return err + } + + return nil +} + +func PipelineSchemaTableSummaryToMap(obj oci_golden_gate.PipelineSchemaTableSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.SourceTableName != nil { + result["source_table_name"] = string(*obj.SourceTableName) + } + + if obj.TargetTableName != nil { + result["target_table_name"] = string(*obj.TargetTableName) + } + + return result +} diff --git a/internal/service/golden_gate/golden_gate_pipeline_schemas_data_source.go b/internal/service/golden_gate/golden_gate_pipeline_schemas_data_source.go new file mode 100644 index 00000000000..435c9c30884 --- /dev/null +++ b/internal/service/golden_gate/golden_gate_pipeline_schemas_data_source.go @@ -0,0 +1,161 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package golden_gate + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GoldenGatePipelineSchemasDataSource() *schema.Resource { + return &schema.Resource{ + Read: readGoldenGatePipelineSchemas, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "display_name": { + Type: schema.TypeString, + Optional: true, + }, + "pipeline_id": { + Type: schema.TypeString, + Required: true, + }, + "pipeline_schema_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "items": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "source_schema_name": { + Type: schema.TypeString, + Computed: true, + }, + "target_schema_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func readGoldenGatePipelineSchemas(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelineSchemasDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.ReadResource(sync) +} + +type GoldenGatePipelineSchemasDataSourceCrud struct { + D *schema.ResourceData + Client *oci_golden_gate.GoldenGateClient + Res *oci_golden_gate.ListPipelineSchemasResponse +} + +func (s *GoldenGatePipelineSchemasDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GoldenGatePipelineSchemasDataSourceCrud) Get() error { + request := oci_golden_gate.ListPipelineSchemasRequest{} + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if pipelineId, ok := s.D.GetOkExists("pipeline_id"); ok { + tmp := pipelineId.(string) + request.PipelineId = &tmp + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "golden_gate") + + response, err := s.Client.ListPipelineSchemas(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListPipelineSchemas(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 *GoldenGatePipelineSchemasDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("GoldenGatePipelineSchemasDataSource-", GoldenGatePipelineSchemasDataSource(), s.D)) + resources := []map[string]interface{}{} + pipelineSchema := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, PipelineSchemaSummaryToMap(item)) + } + pipelineSchema["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, GoldenGatePipelineSchemasDataSource().Schema["pipeline_schema_collection"].Elem.(*schema.Resource).Schema) + pipelineSchema["items"] = items + } + + resources = append(resources, pipelineSchema) + if err := s.D.Set("pipeline_schema_collection", resources); err != nil { + return err + } + + return nil +} + +func PipelineSchemaSummaryToMap(obj oci_golden_gate.PipelineSchemaSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.SourceSchemaName != nil { + result["source_schema_name"] = string(*obj.SourceSchemaName) + } + + if obj.TargetSchemaName != nil { + result["target_schema_name"] = string(*obj.TargetSchemaName) + } + + return result +} diff --git a/internal/service/golden_gate/golden_gate_pipelines_data_source.go b/internal/service/golden_gate/golden_gate_pipelines_data_source.go new file mode 100644 index 00000000000..7ab760a53b8 --- /dev/null +++ b/internal/service/golden_gate/golden_gate_pipelines_data_source.go @@ -0,0 +1,143 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package golden_gate + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GoldenGatePipelinesDataSource() *schema.Resource { + return &schema.Resource{ + Read: readGoldenGatePipelines, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Optional: true, + }, + "lifecycle_sub_state": { + Type: schema.TypeString, + Optional: true, + }, + "state": { + Type: schema.TypeString, + Optional: true, + }, + "pipeline_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + + "items": { + Type: schema.TypeList, + Computed: true, + Elem: tfresource.GetDataSourceItemSchema(GoldenGatePipelineResource()), + }, + }, + }, + }, + }, + } +} + +func readGoldenGatePipelines(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGatePipelinesDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.ReadResource(sync) +} + +type GoldenGatePipelinesDataSourceCrud struct { + D *schema.ResourceData + Client *oci_golden_gate.GoldenGateClient + Res *oci_golden_gate.ListPipelinesResponse +} + +func (s *GoldenGatePipelinesDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GoldenGatePipelinesDataSourceCrud) Get() error { + request := oci_golden_gate.ListPipelinesRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if lifecycleSubState, ok := s.D.GetOkExists("lifecycle_sub_state"); ok { + request.LifecycleSubState = oci_golden_gate.ListPipelinesLifecycleSubStateEnum(lifecycleSubState.(string)) + } + + if state, ok := s.D.GetOkExists("state"); ok { + request.LifecycleState = oci_golden_gate.PipelineLifecycleStateEnum(state.(string)) + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "golden_gate") + + response, err := s.Client.ListPipelines(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListPipelines(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 *GoldenGatePipelinesDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("GoldenGatePipelinesDataSource-", GoldenGatePipelinesDataSource(), s.D)) + resources := []map[string]interface{}{} + pipeline := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, PipelineSummaryToMap(item)) + } + pipeline["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, GoldenGatePipelinesDataSource().Schema["pipeline_collection"].Elem.(*schema.Resource).Schema) + pipeline["items"] = items + } + + resources = append(resources, pipeline) + if err := s.D.Set("pipeline_collection", resources); err != nil { + return err + } + + return nil +} diff --git a/internal/service/golden_gate/golden_gate_recipes_data_source.go b/internal/service/golden_gate/golden_gate_recipes_data_source.go new file mode 100644 index 00000000000..21f2dfd4e0f --- /dev/null +++ b/internal/service/golden_gate/golden_gate_recipes_data_source.go @@ -0,0 +1,201 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package golden_gate + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_golden_gate "github.com/oracle/oci-go-sdk/v65/goldengate" + + "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/tfresource" +) + +func GoldenGateRecipesDataSource() *schema.Resource { + return &schema.Resource{ + Read: readGoldenGateRecipes, + Schema: map[string]*schema.Schema{ + "filter": tfresource.DataSourceFiltersSchema(), + "compartment_id": { + Type: schema.TypeString, + Required: true, + }, + "display_name": { + Type: schema.TypeString, + Optional: true, + }, + "recipe_type": { + Type: schema.TypeString, + Optional: true, + }, + "recipe_summary_collection": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "items": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "description": { + Type: schema.TypeString, + Computed: true, + }, + "display_name": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "recipe_type": { + Type: schema.TypeString, + Computed: true, + }, + "supported_source_technology_types": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "supported_target_technology_types": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func readGoldenGateRecipes(d *schema.ResourceData, m interface{}) error { + sync := &GoldenGateRecipesDataSourceCrud{} + sync.D = d + sync.Client = m.(*client.OracleClients).GoldenGateClient() + + return tfresource.ReadResource(sync) +} + +type GoldenGateRecipesDataSourceCrud struct { + D *schema.ResourceData + Client *oci_golden_gate.GoldenGateClient + Res *oci_golden_gate.ListRecipesResponse +} + +func (s *GoldenGateRecipesDataSourceCrud) VoidState() { + s.D.SetId("") +} + +func (s *GoldenGateRecipesDataSourceCrud) Get() error { + request := oci_golden_gate.ListRecipesRequest{} + + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { + tmp := compartmentId.(string) + request.CompartmentId = &tmp + } + + if displayName, ok := s.D.GetOkExists("display_name"); ok { + tmp := displayName.(string) + request.DisplayName = &tmp + } + + if recipeType, ok := s.D.GetOkExists("recipe_type"); ok { + request.RecipeType = oci_golden_gate.ListRecipesRecipeTypeEnum(recipeType.(string)) + } + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "golden_gate") + + response, err := s.Client.ListRecipes(context.Background(), request) + if err != nil { + return err + } + + s.Res = &response + request.Page = s.Res.OpcNextPage + + for request.Page != nil { + listResponse, err := s.Client.ListRecipes(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 *GoldenGateRecipesDataSourceCrud) SetData() error { + if s.Res == nil { + return nil + } + + s.D.SetId(tfresource.GenerateDataSourceHashID("GoldenGateRecipesDataSource-", GoldenGateRecipesDataSource(), s.D)) + resources := []map[string]interface{}{} + recipe := map[string]interface{}{} + + items := []interface{}{} + for _, item := range s.Res.Items { + items = append(items, RecipeSummaryToMap(item)) + } + recipe["items"] = items + + if f, fOk := s.D.GetOkExists("filter"); fOk { + items = tfresource.ApplyFiltersInCollection(f.(*schema.Set), items, GoldenGateRecipesDataSource().Schema["recipe_summary_collection"].Elem.(*schema.Resource).Schema) + recipe["items"] = items + } + + resources = append(resources, recipe) + if err := s.D.Set("recipe_summary_collection", resources); err != nil { + return err + } + + return nil +} + +func RecipeSummaryToMap(obj oci_golden_gate.RecipeSummary) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Description != nil { + result["description"] = string(*obj.Description) + } + + if obj.DisplayName != nil { + result["display_name"] = string(*obj.DisplayName) + } + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + result["recipe_type"] = string(obj.RecipeType) + + result["supported_source_technology_types"] = obj.SupportedSourceTechnologyTypes + + result["supported_target_technology_types"] = obj.SupportedTargetTechnologyTypes + + return result +} diff --git a/internal/service/golden_gate/register_datasource.go b/internal/service/golden_gate/register_datasource.go index e07793e87d1..777716e1744 100644 --- a/internal/service/golden_gate/register_datasource.go +++ b/internal/service/golden_gate/register_datasource.go @@ -26,6 +26,12 @@ func RegisterDatasource() { tfresource.RegisterDatasource("oci_golden_gate_deployments", GoldenGateDeploymentsDataSource()) tfresource.RegisterDatasource("oci_golden_gate_message", GoldenGateMessageDataSource()) tfresource.RegisterDatasource("oci_golden_gate_messages", GoldenGateMessagesDataSource()) + tfresource.RegisterDatasource("oci_golden_gate_pipeline", GoldenGatePipelineDataSource()) + tfresource.RegisterDatasource("oci_golden_gate_pipeline_running_processes", GoldenGatePipelineRunningProcessesDataSource()) + tfresource.RegisterDatasource("oci_golden_gate_pipeline_schema_tables", GoldenGatePipelineSchemaTablesDataSource()) + tfresource.RegisterDatasource("oci_golden_gate_pipeline_schemas", GoldenGatePipelineSchemasDataSource()) + tfresource.RegisterDatasource("oci_golden_gate_pipelines", GoldenGatePipelinesDataSource()) + tfresource.RegisterDatasource("oci_golden_gate_recipes", GoldenGateRecipesDataSource()) tfresource.RegisterDatasource("oci_golden_gate_trail_file", GoldenGateTrailFileDataSource()) tfresource.RegisterDatasource("oci_golden_gate_trail_files", GoldenGateTrailFilesDataSource()) tfresource.RegisterDatasource("oci_golden_gate_trail_sequence", GoldenGateTrailSequenceDataSource()) diff --git a/internal/service/golden_gate/register_resource.go b/internal/service/golden_gate/register_resource.go index c7ffb0ade0a..854aab32518 100644 --- a/internal/service/golden_gate/register_resource.go +++ b/internal/service/golden_gate/register_resource.go @@ -12,4 +12,5 @@ func RegisterResource() { tfresource.RegisterResource("oci_golden_gate_deployment", GoldenGateDeploymentResource()) tfresource.RegisterResource("oci_golden_gate_deployment_backup", GoldenGateDeploymentBackupResource()) tfresource.RegisterResource("oci_golden_gate_deployment_certificate", GoldenGateDeploymentCertificateResource()) + tfresource.RegisterResource("oci_golden_gate_pipeline", GoldenGatePipelineResource()) } diff --git a/internal/service/stack_monitoring/stack_monitoring_metric_extension_resource.go b/internal/service/stack_monitoring/stack_monitoring_metric_extension_resource.go index 54707c6008f..fbe8cf1344a 100644 --- a/internal/service/stack_monitoring/stack_monitoring_metric_extension_resource.go +++ b/internal/service/stack_monitoring/stack_monitoring_metric_extension_resource.go @@ -111,6 +111,7 @@ func StackMonitoringMetricExtensionResource() *schema.Resource { Required: true, DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, ValidateFunc: validation.StringInSlice([]string{ + "HTTP", "JMX", "OS_COMMAND", "SQL", @@ -191,6 +192,11 @@ func StackMonitoringMetricExtensionResource() *schema.Resource { // Required // Optional + "out_param_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "out_param_position": { Type: schema.TypeInt, Required: true, @@ -204,6 +210,16 @@ func StackMonitoringMetricExtensionResource() *schema.Resource { }, }, }, + "protocol_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "response_content_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "script_details": { Type: schema.TypeList, Optional: true, @@ -263,6 +279,11 @@ func StackMonitoringMetricExtensionResource() *schema.Resource { Optional: true, Computed: true, }, + "url": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, // Computed }, @@ -779,6 +800,52 @@ func EnabledResourceDetailsToMap(obj oci_stack_monitoring.EnabledResourceDetails return result } +func (s *StackMonitoringMetricExtensionResourceCrud) mapToHttpScriptFileDetails(fieldKeyFormat string) (oci_stack_monitoring.HttpScriptFileDetails, error) { + result := oci_stack_monitoring.HttpScriptFileDetails{} + + if content, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "content")); ok { + tmp := content.(string) + result.Content = &tmp + } + + if name, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "name")); ok { + tmp := name.(string) + result.Name = &tmp + } + + return result, nil +} + +func (s *StackMonitoringMetricExtensionResourceCrud) mapToUpdateHttpScriptFileDetails(fieldKeyFormat string) (oci_stack_monitoring.UpdateHttpScriptFileDetails, error) { + result := oci_stack_monitoring.UpdateHttpScriptFileDetails{} + + if content, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "content")); ok { + tmp := content.(string) + result.Content = &tmp + } + + if name, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "name")); ok { + tmp := name.(string) + result.Name = &tmp + } + + return result, nil +} + +func HttpScriptFileDetailsToMap(obj *oci_stack_monitoring.HttpScriptFileDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Content != nil { + result["content"] = string(*obj.Content) + } + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + return result +} + func (s *StackMonitoringMetricExtensionResourceCrud) mapToMetric(fieldKeyFormat string) (oci_stack_monitoring.Metric, error) { result := oci_stack_monitoring.Metric{} @@ -868,6 +935,29 @@ func (s *StackMonitoringMetricExtensionResourceCrud) mapToMetricExtensionQueryPr collectionMethod = "" // default value } switch strings.ToLower(collectionMethod) { + case strings.ToLower("HTTP"): + details := oci_stack_monitoring.HttpUpdateQueryProperties{} + if protocolType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "protocol_type")); ok { + details.ProtocolType = oci_stack_monitoring.HttpProtocolTypesEnum(protocolType.(string)) + } + if responseContentType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "response_content_type")); ok { + details.ResponseContentType = oci_stack_monitoring.HttpResponseContentTypesEnum(responseContentType.(string)) + } + if scriptDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "script_details")); ok { + if tmpList := scriptDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "script_details"), 0) + tmp, err := s.mapToUpdateHttpScriptFileDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert script_details, encountered error: %v", err) + } + details.ScriptDetails = &tmp + } + } + if url, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "url")); ok { + tmp := url.(string) + details.Url = &tmp + } + baseObject = details case strings.ToLower("JMX"): details := oci_stack_monitoring.JmxUpdateQueryProperties{} if autoRowPrefix, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "auto_row_prefix")); ok { @@ -979,6 +1069,29 @@ func (s *StackMonitoringMetricExtensionResourceCrud) mapToMetricExtensionUpdateQ collectionMethod = "" // default value } switch strings.ToLower(collectionMethod) { + case strings.ToLower("HTTP"): + details := oci_stack_monitoring.HttpUpdateQueryProperties{} + if protocolType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "protocol_type")); ok { + details.ProtocolType = oci_stack_monitoring.HttpProtocolTypesEnum(protocolType.(string)) + } + if responseContentType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "response_content_type")); ok { + details.ResponseContentType = oci_stack_monitoring.HttpResponseContentTypesEnum(responseContentType.(string)) + } + if scriptDetails, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "script_details")); ok { + if tmpList := scriptDetails.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "script_details"), 0) + tmp, err := s.mapToUpdateHttpScriptFileDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert script_details, encountered error: %v", err) + } + details.ScriptDetails = &tmp + } + } + if url, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "url")); ok { + tmp := url.(string) + details.Url = &tmp + } + baseObject = details case strings.ToLower("JMX"): details := oci_stack_monitoring.JmxUpdateQueryProperties{} if autoRowPrefix, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "auto_row_prefix")); ok { @@ -1082,6 +1195,20 @@ func (s *StackMonitoringMetricExtensionResourceCrud) mapToMetricExtensionUpdateQ func MetricExtensionQueryPropertiesToMap(obj *oci_stack_monitoring.MetricExtensionQueryProperties) map[string]interface{} { result := map[string]interface{}{} switch v := (*obj).(type) { + case oci_stack_monitoring.HttpQueryProperties: + result["collection_method"] = "HTTP" + + result["protocol_type"] = string(v.ProtocolType) + + result["response_content_type"] = string(v.ResponseContentType) + + if v.ScriptDetails != nil { + result["script_details"] = []interface{}{HttpScriptFileDetailsToMap(v.ScriptDetails)} + } + + if v.Url != nil { + result["url"] = string(*v.Url) + } case oci_stack_monitoring.JmxQueryProperties: result["collection_method"] = "JMX" @@ -1297,6 +1424,11 @@ func SqlInParamDetailsToMap(obj oci_stack_monitoring.SqlInParamDetails) map[stri func (s *StackMonitoringMetricExtensionResourceCrud) mapToSqlOutParamDetails(fieldKeyFormat string) (oci_stack_monitoring.SqlOutParamDetails, error) { result := oci_stack_monitoring.SqlOutParamDetails{} + if outParamName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "out_param_name")); ok { + tmp := outParamName.(string) + result.OutParamName = &tmp + } + if outParamPosition, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "out_param_position")); ok { tmp := outParamPosition.(int) result.OutParamPosition = &tmp @@ -1312,6 +1444,10 @@ func (s *StackMonitoringMetricExtensionResourceCrud) mapToSqlOutParamDetails(fie func SqlOutParamDetailsToMap(obj *oci_stack_monitoring.SqlOutParamDetails) map[string]interface{} { result := map[string]interface{}{} + if obj.OutParamName != nil { + result["out_param_name"] = string(*obj.OutParamName) + } + if obj.OutParamPosition != nil { result["out_param_position"] = int(*obj.OutParamPosition) } @@ -1321,6 +1457,20 @@ func SqlOutParamDetailsToMap(obj *oci_stack_monitoring.SqlOutParamDetails) map[s return result } +func UpdateHttpScriptFileDetailsToMap(obj *oci_stack_monitoring.UpdateHttpScriptFileDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Content != nil { + result["content"] = string(*obj.Content) + } + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + return result +} + func (s *StackMonitoringMetricExtensionResourceCrud) updateCompartment(compartment interface{}) error { changeCompartmentRequest := oci_stack_monitoring.ChangeMetricExtensionCompartmentRequest{} diff --git a/internal/service/stack_monitoring/stack_monitoring_metric_extensions_data_source.go b/internal/service/stack_monitoring/stack_monitoring_metric_extensions_data_source.go index 06f15ac7256..acc82f8341c 100644 --- a/internal/service/stack_monitoring/stack_monitoring_metric_extensions_data_source.go +++ b/internal/service/stack_monitoring/stack_monitoring_metric_extensions_data_source.go @@ -20,12 +20,16 @@ func StackMonitoringMetricExtensionsDataSource() *schema.Resource { "filter": tfresource.DataSourceFiltersSchema(), "compartment_id": { Type: schema.TypeString, - Required: true, + Optional: true, }, "enabled_on_resource_id": { Type: schema.TypeString, Optional: true, }, + "metric_extension_id": { + Type: schema.TypeString, + Optional: true, + }, "name": { Type: schema.TypeString, Optional: true, @@ -91,6 +95,11 @@ func (s *StackMonitoringMetricExtensionsDataSourceCrud) Get() error { request.EnabledOnResourceId = &tmp } + if metricExtensionId, ok := s.D.GetOkExists("id"); ok { + tmp := metricExtensionId.(string) + request.MetricExtensionId = &tmp + } + if name, ok := s.D.GetOkExists("name"); ok { tmp := name.(string) request.Name = &tmp diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/aivision_aiservicevision_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/aivision_aiservicevision_client.go index f4a2f8bebd9..405505cd4d9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/aivision_aiservicevision_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/aivision_aiservicevision_client.go @@ -321,6 +321,63 @@ func (client AIServiceVisionClient) cancelImageJob(ctx context.Context, request return response, err } +// CancelVideoJob Cancel a video analysis job. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CancelVideoJob.go.html to see an example of how to use CancelVideoJob API. +func (client AIServiceVisionClient) CancelVideoJob(ctx context.Context, request CancelVideoJobRequest) (response CancelVideoJobResponse, 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.cancelVideoJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CancelVideoJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CancelVideoJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CancelVideoJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CancelVideoJobResponse") + } + return +} + +// cancelVideoJob implements the OCIOperation interface (enables retrying operations) +func (client AIServiceVisionClient) cancelVideoJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/videoJobs/{videoJobId}/actions/cancel", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CancelVideoJobResponse + 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/vision/20220125/VideoJob/CancelVideoJob" + err = common.PostProcessServiceError(err, "AIServiceVision", "CancelVideoJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CancelWorkRequest Cancel the work request with the given ID. // // # See also @@ -740,6 +797,68 @@ func (client AIServiceVisionClient) createProject(ctx context.Context, request c return response, err } +// CreateVideoJob Create a video analysis job with given inputs and features. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CreateVideoJob.go.html to see an example of how to use CreateVideoJob API. +func (client AIServiceVisionClient) CreateVideoJob(ctx context.Context, request CreateVideoJobRequest) (response CreateVideoJobResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVideoJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVideoJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVideoJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVideoJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVideoJobResponse") + } + return +} + +// createVideoJob implements the OCIOperation interface (enables retrying operations) +func (client AIServiceVisionClient) createVideoJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/videoJobs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateVideoJobResponse + 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/vision/20220125/VideoJob/CreateVideoJob" + err = common.PostProcessServiceError(err, "AIServiceVision", "CreateVideoJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteModel Delete a model by identifier. // // # See also @@ -1082,6 +1201,63 @@ func (client AIServiceVisionClient) getProject(ctx context.Context, request comm return response, err } +// GetVideoJob Get details of a video analysis job. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/GetVideoJob.go.html to see an example of how to use GetVideoJob API. +func (client AIServiceVisionClient) GetVideoJob(ctx context.Context, request GetVideoJobRequest) (response GetVideoJobResponse, 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.getVideoJob, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVideoJobResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVideoJobResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVideoJobResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVideoJobResponse") + } + return +} + +// getVideoJob implements the OCIOperation interface (enables retrying operations) +func (client AIServiceVisionClient) getVideoJob(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/videoJobs/{videoJobId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetVideoJobResponse + 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/vision/20220125/VideoJob/GetVideoJob" + err = common.PostProcessServiceError(err, "AIServiceVision", "GetVideoJob", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetWorkRequest Gets the status of the work request with the given ID. // // # See also diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/analyze_video_result.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/analyze_video_result.go new file mode 100644 index 00000000000..468db355c03 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/analyze_video_result.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AnalyzeVideoResult Video analysis results. +type AnalyzeVideoResult struct { + VideoMetadata *VideoMetadata `mandatory:"true" json:"videoMetadata"` + + // Detected labels in a video. + VideoLabels []VideoLabel `mandatory:"false" json:"videoLabels"` + + // Detected objects in a video. + VideoObjects []VideoObject `mandatory:"false" json:"videoObjects"` + + // Tracked objects in a video. + VideoTrackedObjects []VideoTrackedObject `mandatory:"false" json:"videoTrackedObjects"` + + // Detected text in a video. + VideoText []VideoText `mandatory:"false" json:"videoText"` + + // Detected faces in a video. + VideoFaces []VideoFace `mandatory:"false" json:"videoFaces"` + + // The ontologyClasses of video labels. + OntologyClasses []OntologyClass `mandatory:"false" json:"ontologyClasses"` + + // Label Detection model version. + LabelDetectionModelVersion *string `mandatory:"false" json:"labelDetectionModelVersion"` + + // Object Detection model version. + ObjectDetectionModelVersion *string `mandatory:"false" json:"objectDetectionModelVersion"` + + // Object Tracking model version. + ObjectTrackingModelVersion *string `mandatory:"false" json:"objectTrackingModelVersion"` + + // Text Detection model version. + TextDetectionModelVersion *string `mandatory:"false" json:"textDetectionModelVersion"` + + // Face Detection model version. + FaceDetectionModelVersion *string `mandatory:"false" json:"faceDetectionModelVersion"` + + // Array of possible errors. + Errors []ProcessingError `mandatory:"false" json:"errors"` +} + +func (m AnalyzeVideoResult) 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 AnalyzeVideoResult) 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/aivision/cancel_video_job_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/cancel_video_job_request_response.go new file mode 100644 index 00000000000..4990bf2c164 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/cancel_video_job_request_response.go @@ -0,0 +1,94 @@ +// 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 aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CancelVideoJobRequest wrapper for the CancelVideoJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CancelVideoJob.go.html to see an example of how to use CancelVideoJobRequest. +type CancelVideoJobRequest struct { + + // Video job id. + VideoJobId *string `mandatory:"true" contributesTo:"path" name:"videoJobId"` + + // 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 CancelVideoJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CancelVideoJobRequest) 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 CancelVideoJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CancelVideoJobRequest) 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 CancelVideoJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CancelVideoJobResponse wrapper for the CancelVideoJob operation +type CancelVideoJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A 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 CancelVideoJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CancelVideoJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/create_video_job_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/create_video_job_details.go new file mode 100644 index 00000000000..29e0a398e02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/create_video_job_details.go @@ -0,0 +1,109 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVideoJobDetails Details about the video analysis. +type CreateVideoJobDetails struct { + InputLocation InputLocation `mandatory:"true" json:"inputLocation"` + + // a list of video analysis features. + Features []VideoFeature `mandatory:"true" json:"features"` + + OutputLocation *OutputLocation `mandatory:"true" json:"outputLocation"` + + // Compartment identifier from the requester. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Video job display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. + // For 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. + // For example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateVideoJobDetails) 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 CreateVideoJobDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateVideoJobDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + InputLocation inputlocation `json:"inputLocation"` + Features []videofeature `json:"features"` + OutputLocation *OutputLocation `json:"outputLocation"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompartmentId = model.CompartmentId + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + nn, e = model.InputLocation.UnmarshalPolymorphicJSON(model.InputLocation.JsonData) + if e != nil { + return + } + if nn != nil { + m.InputLocation = nn.(InputLocation) + } else { + m.InputLocation = nil + } + + m.Features = make([]VideoFeature, len(model.Features)) + for i, n := range model.Features { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Features[i] = nn.(VideoFeature) + } else { + m.Features[i] = nil + } + } + m.OutputLocation = model.OutputLocation + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/create_video_job_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/create_video_job_request_response.go new file mode 100644 index 00000000000..3bea1d26186 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/create_video_job_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVideoJobRequest wrapper for the CreateVideoJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/CreateVideoJob.go.html to see an example of how to use CreateVideoJobRequest. +type CreateVideoJobRequest struct { + + // Details about the video analysis. + CreateVideoJobDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without the risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVideoJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVideoJobRequest) 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 CreateVideoJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVideoJobRequest) 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 CreateVideoJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVideoJobResponse wrapper for the CreateVideoJob operation +type CreateVideoJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VideoJob instance + VideoJob `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A 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 CreateVideoJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVideoJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/get_video_job_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/get_video_job_request_response.go new file mode 100644 index 00000000000..e39fcf1158d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/get_video_job_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVideoJobRequest wrapper for the GetVideoJob operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/aivision/GetVideoJob.go.html to see an example of how to use GetVideoJobRequest. +type GetVideoJobRequest struct { + + // Video job id. + VideoJobId *string `mandatory:"true" contributesTo:"path" name:"videoJobId"` + + // 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 GetVideoJobRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVideoJobRequest) 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 GetVideoJobRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVideoJobRequest) 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 GetVideoJobRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVideoJobResponse wrapper for the GetVideoJob operation +type GetVideoJobResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VideoJob instance + VideoJob `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A 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 GetVideoJobResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVideoJobResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/object_property.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/object_property.go new file mode 100644 index 00000000000..8f88604edf1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/object_property.go @@ -0,0 +1,44 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ObjectProperty A property of a tracked object in a frame. +type ObjectProperty struct { + + // Property name + Name *string `mandatory:"true" json:"name"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` +} + +func (m ObjectProperty) 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 ObjectProperty) 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/aivision/video_face.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face.go new file mode 100644 index 00000000000..a939c68552c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFace Detected face in a video. +type VideoFace struct { + + // Face segments in a video. + Segments []VideoFaceSegment `mandatory:"true" json:"segments"` +} + +func (m VideoFace) 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 VideoFace) 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/aivision/video_face_detection_feature.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face_detection_feature.go new file mode 100644 index 00000000000..798e807abb4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face_detection_feature.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFaceDetectionFeature Video face detection feature +type VideoFaceDetectionFeature struct { + + // The maximum number of results per frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // Whether or not return face landmarks. + IsLandmarkRequired *bool `mandatory:"false" json:"isLandmarkRequired"` + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` +} + +func (m VideoFaceDetectionFeature) 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 VideoFaceDetectionFeature) 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 VideoFaceDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoFaceDetectionFeature VideoFaceDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoFaceDetectionFeature + }{ + "FACE_DETECTION", + (MarshalTypeVideoFaceDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face_frame.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face_frame.go new file mode 100644 index 00000000000..1ac80baaf6e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face_frame.go @@ -0,0 +1,50 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFaceFrame A face frame. +type VideoFaceFrame struct { + + // Time offset(Milliseconds) in the video. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // The quality score of the face detected, between 0 and 1. + QualityScore *float32 `mandatory:"true" json:"qualityScore"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` + + // Face landmarks. + Landmarks []Landmark `mandatory:"false" json:"landmarks"` +} + +func (m VideoFaceFrame) 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 VideoFaceFrame) 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/aivision/video_face_segment.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face_segment.go new file mode 100644 index 00000000000..5e7bbf612e1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_face_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFaceSegment A face segment in a video. +type VideoFaceSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Face frames in a segment. + Frames []VideoFaceFrame `mandatory:"true" json:"frames"` +} + +func (m VideoFaceSegment) 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 VideoFaceSegment) 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/aivision/video_feature.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_feature.go new file mode 100644 index 00000000000..6f8f523cbb0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_feature.go @@ -0,0 +1,147 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoFeature Details about a video feature request. +type VideoFeature interface { +} + +type videofeature struct { + JsonData []byte + FeatureType string `json:"featureType"` +} + +// UnmarshalJSON unmarshals json +func (m *videofeature) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalervideofeature videofeature + s := struct { + Model Unmarshalervideofeature + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.FeatureType = s.Model.FeatureType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *videofeature) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.FeatureType { + case "OBJECT_DETECTION": + mm := VideoObjectDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "FACE_DETECTION": + mm := VideoFaceDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "TEXT_DETECTION": + mm := VideoTextDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "OBJECT_TRACKING": + mm := VideoObjectTrackingFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + case "LABEL_DETECTION": + mm := VideoLabelDetectionFeature{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for VideoFeature: %s.", m.FeatureType) + return *m, nil + } +} + +func (m videofeature) 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 videofeature) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VideoFeatureFeatureTypeEnum Enum with underlying type: string +type VideoFeatureFeatureTypeEnum string + +// Set of constants representing the allowable values for VideoFeatureFeatureTypeEnum +const ( + VideoFeatureFeatureTypeLabelDetection VideoFeatureFeatureTypeEnum = "LABEL_DETECTION" + VideoFeatureFeatureTypeObjectDetection VideoFeatureFeatureTypeEnum = "OBJECT_DETECTION" + VideoFeatureFeatureTypeTextDetection VideoFeatureFeatureTypeEnum = "TEXT_DETECTION" + VideoFeatureFeatureTypeFaceDetection VideoFeatureFeatureTypeEnum = "FACE_DETECTION" + VideoFeatureFeatureTypeObjectTracking VideoFeatureFeatureTypeEnum = "OBJECT_TRACKING" +) + +var mappingVideoFeatureFeatureTypeEnum = map[string]VideoFeatureFeatureTypeEnum{ + "LABEL_DETECTION": VideoFeatureFeatureTypeLabelDetection, + "OBJECT_DETECTION": VideoFeatureFeatureTypeObjectDetection, + "TEXT_DETECTION": VideoFeatureFeatureTypeTextDetection, + "FACE_DETECTION": VideoFeatureFeatureTypeFaceDetection, + "OBJECT_TRACKING": VideoFeatureFeatureTypeObjectTracking, +} + +var mappingVideoFeatureFeatureTypeEnumLowerCase = map[string]VideoFeatureFeatureTypeEnum{ + "label_detection": VideoFeatureFeatureTypeLabelDetection, + "object_detection": VideoFeatureFeatureTypeObjectDetection, + "text_detection": VideoFeatureFeatureTypeTextDetection, + "face_detection": VideoFeatureFeatureTypeFaceDetection, + "object_tracking": VideoFeatureFeatureTypeObjectTracking, +} + +// GetVideoFeatureFeatureTypeEnumValues Enumerates the set of values for VideoFeatureFeatureTypeEnum +func GetVideoFeatureFeatureTypeEnumValues() []VideoFeatureFeatureTypeEnum { + values := make([]VideoFeatureFeatureTypeEnum, 0) + for _, v := range mappingVideoFeatureFeatureTypeEnum { + values = append(values, v) + } + return values +} + +// GetVideoFeatureFeatureTypeEnumStringValues Enumerates the set of values in String for VideoFeatureFeatureTypeEnum +func GetVideoFeatureFeatureTypeEnumStringValues() []string { + return []string{ + "LABEL_DETECTION", + "OBJECT_DETECTION", + "TEXT_DETECTION", + "FACE_DETECTION", + "OBJECT_TRACKING", + } +} + +// GetMappingVideoFeatureFeatureTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVideoFeatureFeatureTypeEnum(val string) (VideoFeatureFeatureTypeEnum, bool) { + enum, ok := mappingVideoFeatureFeatureTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_job.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_job.go new file mode 100644 index 00000000000..64c369df2af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_job.go @@ -0,0 +1,265 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoJob Job details for a video analysis. +type VideoJob struct { + + // Id of the job. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that starts the job. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // a list of document analysis features. + Features []VideoFeature `mandatory:"true" json:"features"` + + // Job accepted time. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + OutputLocation *OutputLocation `mandatory:"true" json:"outputLocation"` + + // The current state of the batch document job. + LifecycleState VideoJobLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Video job display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + InputLocation InputLocation `mandatory:"false" json:"inputLocation"` + + // Job started time. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // Job finished time. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` + + // How much progress the operation has made, vs the total amount of work that must be performed. + PercentComplete *float32 `mandatory:"false" json:"percentComplete"` + + // Detailed status of FAILED state. + LifecycleDetails VideoJobLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. + // For 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. + // For example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // For example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m VideoJob) 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 VideoJob) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVideoJobLifecycleStateEnum(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(GetVideoJobLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingVideoJobLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetVideoJobLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *VideoJob) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + InputLocation inputlocation `json:"inputLocation"` + TimeStarted *common.SDKTime `json:"timeStarted"` + TimeFinished *common.SDKTime `json:"timeFinished"` + PercentComplete *float32 `json:"percentComplete"` + LifecycleDetails VideoJobLifecycleDetailsEnum `json:"lifecycleDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + Features []videofeature `json:"features"` + TimeAccepted *common.SDKTime `json:"timeAccepted"` + OutputLocation *OutputLocation `json:"outputLocation"` + LifecycleState VideoJobLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + nn, e = model.InputLocation.UnmarshalPolymorphicJSON(model.InputLocation.JsonData) + if e != nil { + return + } + if nn != nil { + m.InputLocation = nn.(InputLocation) + } else { + m.InputLocation = nil + } + + m.TimeStarted = model.TimeStarted + + m.TimeFinished = model.TimeFinished + + m.PercentComplete = model.PercentComplete + + m.LifecycleDetails = model.LifecycleDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.Features = make([]VideoFeature, len(model.Features)) + for i, n := range model.Features { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Features[i] = nn.(VideoFeature) + } else { + m.Features[i] = nil + } + } + m.TimeAccepted = model.TimeAccepted + + m.OutputLocation = model.OutputLocation + + m.LifecycleState = model.LifecycleState + + return +} + +// VideoJobLifecycleStateEnum Enum with underlying type: string +type VideoJobLifecycleStateEnum string + +// Set of constants representing the allowable values for VideoJobLifecycleStateEnum +const ( + VideoJobLifecycleStateSucceeded VideoJobLifecycleStateEnum = "SUCCEEDED" + VideoJobLifecycleStateFailed VideoJobLifecycleStateEnum = "FAILED" + VideoJobLifecycleStateAccepted VideoJobLifecycleStateEnum = "ACCEPTED" + VideoJobLifecycleStateCanceled VideoJobLifecycleStateEnum = "CANCELED" + VideoJobLifecycleStateInProgress VideoJobLifecycleStateEnum = "IN_PROGRESS" + VideoJobLifecycleStateCanceling VideoJobLifecycleStateEnum = "CANCELING" +) + +var mappingVideoJobLifecycleStateEnum = map[string]VideoJobLifecycleStateEnum{ + "SUCCEEDED": VideoJobLifecycleStateSucceeded, + "FAILED": VideoJobLifecycleStateFailed, + "ACCEPTED": VideoJobLifecycleStateAccepted, + "CANCELED": VideoJobLifecycleStateCanceled, + "IN_PROGRESS": VideoJobLifecycleStateInProgress, + "CANCELING": VideoJobLifecycleStateCanceling, +} + +var mappingVideoJobLifecycleStateEnumLowerCase = map[string]VideoJobLifecycleStateEnum{ + "succeeded": VideoJobLifecycleStateSucceeded, + "failed": VideoJobLifecycleStateFailed, + "accepted": VideoJobLifecycleStateAccepted, + "canceled": VideoJobLifecycleStateCanceled, + "in_progress": VideoJobLifecycleStateInProgress, + "canceling": VideoJobLifecycleStateCanceling, +} + +// GetVideoJobLifecycleStateEnumValues Enumerates the set of values for VideoJobLifecycleStateEnum +func GetVideoJobLifecycleStateEnumValues() []VideoJobLifecycleStateEnum { + values := make([]VideoJobLifecycleStateEnum, 0) + for _, v := range mappingVideoJobLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVideoJobLifecycleStateEnumStringValues Enumerates the set of values in String for VideoJobLifecycleStateEnum +func GetVideoJobLifecycleStateEnumStringValues() []string { + return []string{ + "SUCCEEDED", + "FAILED", + "ACCEPTED", + "CANCELED", + "IN_PROGRESS", + "CANCELING", + } +} + +// GetMappingVideoJobLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVideoJobLifecycleStateEnum(val string) (VideoJobLifecycleStateEnum, bool) { + enum, ok := mappingVideoJobLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VideoJobLifecycleDetailsEnum Enum with underlying type: string +type VideoJobLifecycleDetailsEnum string + +// Set of constants representing the allowable values for VideoJobLifecycleDetailsEnum +const ( + VideoJobLifecycleDetailsPartiallySucceeded VideoJobLifecycleDetailsEnum = "PARTIALLY_SUCCEEDED" + VideoJobLifecycleDetailsCompletelyFailed VideoJobLifecycleDetailsEnum = "COMPLETELY_FAILED" +) + +var mappingVideoJobLifecycleDetailsEnum = map[string]VideoJobLifecycleDetailsEnum{ + "PARTIALLY_SUCCEEDED": VideoJobLifecycleDetailsPartiallySucceeded, + "COMPLETELY_FAILED": VideoJobLifecycleDetailsCompletelyFailed, +} + +var mappingVideoJobLifecycleDetailsEnumLowerCase = map[string]VideoJobLifecycleDetailsEnum{ + "partially_succeeded": VideoJobLifecycleDetailsPartiallySucceeded, + "completely_failed": VideoJobLifecycleDetailsCompletelyFailed, +} + +// GetVideoJobLifecycleDetailsEnumValues Enumerates the set of values for VideoJobLifecycleDetailsEnum +func GetVideoJobLifecycleDetailsEnumValues() []VideoJobLifecycleDetailsEnum { + values := make([]VideoJobLifecycleDetailsEnum, 0) + for _, v := range mappingVideoJobLifecycleDetailsEnum { + values = append(values, v) + } + return values +} + +// GetVideoJobLifecycleDetailsEnumStringValues Enumerates the set of values in String for VideoJobLifecycleDetailsEnum +func GetVideoJobLifecycleDetailsEnumStringValues() []string { + return []string{ + "PARTIALLY_SUCCEEDED", + "COMPLETELY_FAILED", + } +} + +// GetMappingVideoJobLifecycleDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVideoJobLifecycleDetailsEnum(val string) (VideoJobLifecycleDetailsEnum, bool) { + enum, ok := mappingVideoJobLifecycleDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label.go new file mode 100644 index 00000000000..91cc7c97d90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoLabel Detected label in a video. +type VideoLabel struct { + + // Detected label name. + Name *string `mandatory:"true" json:"name"` + + // Label segments in a video. + Segments []VideoLabelSegment `mandatory:"true" json:"segments"` +} + +func (m VideoLabel) 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 VideoLabel) 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/aivision/video_label_detection_feature.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label_detection_feature.go new file mode 100644 index 00000000000..aee575fe010 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label_detection_feature.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoLabelDetectionFeature Video label detection feature +type VideoLabelDetectionFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` + + // The maximum number of results per video frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // The custom model ID. + ModelId *string `mandatory:"false" json:"modelId"` +} + +func (m VideoLabelDetectionFeature) 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 VideoLabelDetectionFeature) 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 VideoLabelDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoLabelDetectionFeature VideoLabelDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoLabelDetectionFeature + }{ + "LABEL_DETECTION", + (MarshalTypeVideoLabelDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label_segment.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label_segment.go new file mode 100644 index 00000000000..ca2955002ad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_label_segment.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoLabelSegment A label segment in a video. +type VideoLabelSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` +} + +func (m VideoLabelSegment) 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 VideoLabelSegment) 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/aivision/video_metadata.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_metadata.go new file mode 100644 index 00000000000..0972b561180 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_metadata.go @@ -0,0 +1,48 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoMetadata Video information. +type VideoMetadata struct { + + // Total number of frames. + FrameCount *int `mandatory:"true" json:"frameCount"` + + // Video framerate. + FrameRate *float32 `mandatory:"true" json:"frameRate"` + + // Width of each frame. + FrameWidth *int `mandatory:"true" json:"frameWidth"` + + // Height of each frame. + FrameHeight *int `mandatory:"true" json:"frameHeight"` +} + +func (m VideoMetadata) 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 VideoMetadata) 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/aivision/video_object.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object.go new file mode 100644 index 00000000000..79728d80d10 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObject Detected object in a video. +type VideoObject struct { + + // Detected object name. + Name *string `mandatory:"true" json:"name"` + + // Object segments in a video. + Segments []VideoObjectSegment `mandatory:"true" json:"segments"` +} + +func (m VideoObject) 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 VideoObject) 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/aivision/video_object_detection_feature.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_detection_feature.go new file mode 100644 index 00000000000..e39ed35f7f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_detection_feature.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectDetectionFeature Video object detection feature +type VideoObjectDetectionFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` + + // The maximum number of results per frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // The custom model ID. + ModelId *string `mandatory:"false" json:"modelId"` +} + +func (m VideoObjectDetectionFeature) 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 VideoObjectDetectionFeature) 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 VideoObjectDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoObjectDetectionFeature VideoObjectDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoObjectDetectionFeature + }{ + "OBJECT_DETECTION", + (MarshalTypeVideoObjectDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_frame.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_frame.go new file mode 100644 index 00000000000..1b7e2d92741 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_frame.go @@ -0,0 +1,44 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectFrame An object frame. +type VideoObjectFrame struct { + + // Time offset(Milliseconds) in the video. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` +} + +func (m VideoObjectFrame) 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 VideoObjectFrame) 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/aivision/video_object_segment.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_segment.go new file mode 100644 index 00000000000..d34feaff6c3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectSegment An object segment in a video. +type VideoObjectSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Object frame in a segment. + Frames []VideoObjectFrame `mandatory:"true" json:"frames"` +} + +func (m VideoObjectSegment) 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 VideoObjectSegment) 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/aivision/video_object_tracking_feature.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_tracking_feature.go new file mode 100644 index 00000000000..bf73197b266 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_object_tracking_feature.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoObjectTrackingFeature Video object tracking feature +type VideoObjectTrackingFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` + + // The maximum number of results per frame to return. + MaxResults *int `mandatory:"false" json:"maxResults"` + + // The custom model ID. + ModelId *string `mandatory:"false" json:"modelId"` +} + +func (m VideoObjectTrackingFeature) 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 VideoObjectTrackingFeature) 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 VideoObjectTrackingFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoObjectTrackingFeature VideoObjectTrackingFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoObjectTrackingFeature + }{ + "OBJECT_TRACKING", + (MarshalTypeVideoObjectTrackingFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_segment.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_segment.go new file mode 100644 index 00000000000..48793a9c638 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_segment.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoSegment A sequence of frames that was (or appears to be) continuously captured for a label/object/text?. +type VideoSegment struct { + + // Video start time offset(Milliseconds). + StartTimeOffsetMs *int `mandatory:"true" json:"startTimeOffsetMs"` + + // Video end time offset(Milliseconds). + EndTimeOffsetMs *int `mandatory:"true" json:"endTimeOffsetMs"` +} + +func (m VideoSegment) 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 VideoSegment) 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/aivision/video_text.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text.go new file mode 100644 index 00000000000..460544ead15 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoText Detected text in a video. +type VideoText struct { + + // Detected text. + Text *string `mandatory:"true" json:"text"` + + // Text segments in a video. + Segments []VideoTextSegment `mandatory:"true" json:"segments"` +} + +func (m VideoText) 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 VideoText) 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/aivision/video_text_detection_feature.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text_detection_feature.go new file mode 100644 index 00000000000..dbe85539dcb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text_detection_feature.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTextDetectionFeature Video text detection feature +type VideoTextDetectionFeature struct { + + // The minimum confidence score, between 0 and 1, + // when the value is set, results with lower confidence will not be returned. + MinConfidence *float32 `mandatory:"false" json:"minConfidence"` +} + +func (m VideoTextDetectionFeature) 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 VideoTextDetectionFeature) 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 VideoTextDetectionFeature) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVideoTextDetectionFeature VideoTextDetectionFeature + s := struct { + DiscriminatorParam string `json:"featureType"` + MarshalTypeVideoTextDetectionFeature + }{ + "TEXT_DETECTION", + (MarshalTypeVideoTextDetectionFeature)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text_frame.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text_frame.go new file mode 100644 index 00000000000..8be10d808e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text_frame.go @@ -0,0 +1,44 @@ +// 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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTextFrame A text frame. +type VideoTextFrame struct { + + // Time offset(Milliseconds) in the video. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` +} + +func (m VideoTextFrame) 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 VideoTextFrame) 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/aivision/video_text_segment.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text_segment.go new file mode 100644 index 00000000000..27d962f9722 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_text_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTextSegment A text segment in a video. +type VideoTextSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Text frame in a segment. + Frames []VideoTextFrame `mandatory:"true" json:"frames"` +} + +func (m VideoTextSegment) 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 VideoTextSegment) 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/aivision/video_tracked_object.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracked_object.go new file mode 100644 index 00000000000..3f2239f6636 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracked_object.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackedObject Tracked object in a video. +type VideoTrackedObject struct { + + // Name of the object category label. + Name *string `mandatory:"true" json:"name"` + + // Unique identifier for the object. + ObjectId *int `mandatory:"true" json:"objectId"` + + // Segments for the tracked object. + Segments []VideoTrackedObjectSegment `mandatory:"true" json:"segments"` + + Properties *VideoTrackedObjectProperties `mandatory:"false" json:"properties"` +} + +func (m VideoTrackedObject) 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 VideoTrackedObject) 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/aivision/video_tracked_object_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracked_object_properties.go new file mode 100644 index 00000000000..b6c74583d6d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracked_object_properties.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. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackedObjectProperties Properties of a tracked object in a video. +type VideoTrackedObjectProperties struct { + + // The axle count value of a tracked vehicle. + AxleCount *int `mandatory:"false" json:"axleCount"` +} + +func (m VideoTrackedObjectProperties) 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 VideoTrackedObjectProperties) 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/aivision/video_tracked_object_segment.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracked_object_segment.go new file mode 100644 index 00000000000..c98485961da --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracked_object_segment.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackedObjectSegment A segment of a tracked object in a video. +type VideoTrackedObjectSegment struct { + VideoSegment *VideoSegment `mandatory:"true" json:"videoSegment"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + // Frames within the segment. + Frames []VideoTrackingFrame `mandatory:"true" json:"frames"` +} + +func (m VideoTrackedObjectSegment) 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 VideoTrackedObjectSegment) 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/aivision/video_tracking_frame.go b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracking_frame.go new file mode 100644 index 00000000000..1a40aaa4d32 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/aivision/video_tracking_frame.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Vision API +// +// Using Vision, you can upload images to detect and classify objects in them. If you have lots of images, you can process them in batch using asynchronous API endpoints. Vision's features are thematically split between Document AI for document-centric images, and Image Analysis for object and scene-based images. Pretrained models and custom models are supported. +// + +package aivision + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VideoTrackingFrame A frame capturing a tracked object. +type VideoTrackingFrame struct { + + // Time offset(Milliseconds) of the frame. + TimeOffsetMs *int `mandatory:"true" json:"timeOffsetMs"` + + // The confidence score, between 0 and 1. + Confidence *float32 `mandatory:"true" json:"confidence"` + + BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` + + // Properties associated with the tracked object in the frame. + Properties []ObjectProperty `mandatory:"false" json:"properties"` +} + +func (m VideoTrackingFrame) 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 VideoTrackingFrame) 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/bds/activate_iam_user_sync_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_iam_user_sync_configuration_details.go new file mode 100644 index 00000000000..9cfae80bafd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_iam_user_sync_configuration_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActivateIamUserSyncConfigurationDetails Details for activating IAM user sync configuration +type ActivateIamUserSyncConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // whether posix attribute needs to be appended to users + IsPosixAttributesAdditionRequired *bool `mandatory:"false" json:"isPosixAttributesAdditionRequired"` +} + +func (m ActivateIamUserSyncConfigurationDetails) 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 ActivateIamUserSyncConfigurationDetails) 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/bds/activate_iam_user_sync_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_iam_user_sync_configuration_request_response.go new file mode 100644 index 00000000000..6a4796d06a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_iam_user_sync_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ActivateIamUserSyncConfigurationRequest wrapper for the ActivateIamUserSyncConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateIamUserSyncConfiguration.go.html to see an example of how to use ActivateIamUserSyncConfigurationRequest. +type ActivateIamUserSyncConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for activating a new IAM user sync config. + ActivateIamUserSyncConfigurationDetails `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 ActivateIamUserSyncConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ActivateIamUserSyncConfigurationRequest) 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 ActivateIamUserSyncConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ActivateIamUserSyncConfigurationRequest) 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 ActivateIamUserSyncConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ActivateIamUserSyncConfigurationResponse wrapper for the ActivateIamUserSyncConfiguration operation +type ActivateIamUserSyncConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 ActivateIamUserSyncConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ActivateIamUserSyncConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_upst_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_upst_configuration_details.go new file mode 100644 index 00000000000..9fc0813c630 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_upst_configuration_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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActivateUpstConfigurationDetails Details for activating UPST config on the cluster +type ActivateUpstConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // OCID of the vault to store token exchange service principal keyta, required for creating UPST configb + VaultId *string `mandatory:"true" json:"vaultId"` + + // OCID of the master encryption key in vault for encrypting token exchange service principal keytab, required for creating UPST config + MasterEncryptionKeyId *string `mandatory:"true" json:"masterEncryptionKeyId"` +} + +func (m ActivateUpstConfigurationDetails) 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 ActivateUpstConfigurationDetails) 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/bds/activate_upst_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_upst_configuration_request_response.go new file mode 100644 index 00000000000..51f95a17985 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/activate_upst_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ActivateUpstConfigurationRequest wrapper for the ActivateUpstConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateUpstConfiguration.go.html to see an example of how to use ActivateUpstConfigurationRequest. +type ActivateUpstConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for activating UPST config + ActivateUpstConfigurationDetails `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 ActivateUpstConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ActivateUpstConfigurationRequest) 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 ActivateUpstConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ActivateUpstConfigurationRequest) 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 ActivateUpstConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ActivateUpstConfigurationResponse wrapper for the ActivateUpstConfiguration operation +type ActivateUpstConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 ActivateUpstConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ActivateUpstConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/batching_based_odh_patching_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/batching_based_odh_patching_config.go index d8d63a9379b..b6f7779fa94 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/batching_based_odh_patching_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/batching_based_odh_patching_config.go @@ -24,6 +24,9 @@ type BatchingBasedOdhPatchingConfig struct { // The wait time between batches in seconds. WaitTimeBetweenBatchInSeconds *int `mandatory:"true" json:"waitTimeBetweenBatchInSeconds"` + + // Acceptable number of failed-to-be-patched nodes in each batch. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of non-utility and non-master nodes. + ToleranceThresholdPerBatch *int `mandatory:"false" json:"toleranceThresholdPerBatch"` } func (m BatchingBasedOdhPatchingConfig) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_api_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_api_key.go index 8f5e511aca9..2c5c3e18a00 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_api_key.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_api_key.go @@ -46,6 +46,9 @@ type BdsApiKey struct { // The time the API key was created, shown as an RFC 3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Identity domain OCID ,where user is present. For default domain ,this field will be optional. + DomainOcid *string `mandatory:"false" json:"domainOcid"` } func (m BdsApiKey) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_client.go index 9ebc455438d..aa0a06b0ae2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_client.go @@ -153,6 +153,130 @@ func (client BdsClient) activateBdsMetastoreConfiguration(ctx context.Context, r return response, err } +// ActivateIamUserSyncConfiguration Activate IAM user sync configuration for the given identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateIamUserSyncConfiguration.go.html to see an example of how to use ActivateIamUserSyncConfiguration API. +func (client BdsClient) ActivateIamUserSyncConfiguration(ctx context.Context, request ActivateIamUserSyncConfigurationRequest) (response ActivateIamUserSyncConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.activateIamUserSyncConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ActivateIamUserSyncConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ActivateIamUserSyncConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ActivateIamUserSyncConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ActivateIamUserSyncConfigurationResponse") + } + return +} + +// activateIamUserSyncConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) activateIamUserSyncConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/activateIamUserSyncConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ActivateIamUserSyncConfigurationResponse + 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/bigdata/20190531/IdentityConfiguration/ActivateIamUserSyncConfiguration" + err = common.PostProcessServiceError(err, "Bds", "ActivateIamUserSyncConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ActivateUpstConfiguration Activate UPST configuration for the given identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ActivateUpstConfiguration.go.html to see an example of how to use ActivateUpstConfiguration API. +func (client BdsClient) ActivateUpstConfiguration(ctx context.Context, request ActivateUpstConfigurationRequest) (response ActivateUpstConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.activateUpstConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ActivateUpstConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ActivateUpstConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ActivateUpstConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ActivateUpstConfigurationResponse") + } + return +} + +// activateUpstConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) activateUpstConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/activateUpstConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ActivateUpstConfigurationResponse + 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/bigdata/20190531/IdentityConfiguration/ActivateUpstConfiguration" + err = common.PostProcessServiceError(err, "Bds", "ActivateUpstConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // AddAutoScalingConfiguration Add an autoscale configuration to the cluster. // // # See also @@ -1021,6 +1145,68 @@ func (client BdsClient) createBdsMetastoreConfiguration(ctx context.Context, req return response, err } +// CreateIdentityConfiguration Create an identity configuration for the cluster +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CreateIdentityConfiguration.go.html to see an example of how to use CreateIdentityConfiguration API. +func (client BdsClient) CreateIdentityConfiguration(ctx context.Context, request CreateIdentityConfigurationRequest) (response CreateIdentityConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createIdentityConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateIdentityConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateIdentityConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIdentityConfigurationResponse") + } + return +} + +// createIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) createIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateIdentityConfigurationResponse + 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/bigdata/20190531/IdentityConfiguration/CreateIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "CreateIdentityConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateNodeBackupConfiguration Add a node volume backup configuration to the cluster for an indicated node type or node. // // # See also @@ -1207,6 +1393,130 @@ func (client BdsClient) createResourcePrincipalConfiguration(ctx context.Context return response, err } +// DeactivateIamUserSyncConfiguration Deactivate the IAM user sync configuration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateIamUserSyncConfiguration.go.html to see an example of how to use DeactivateIamUserSyncConfiguration API. +func (client BdsClient) DeactivateIamUserSyncConfiguration(ctx context.Context, request DeactivateIamUserSyncConfigurationRequest) (response DeactivateIamUserSyncConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deactivateIamUserSyncConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeactivateIamUserSyncConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeactivateIamUserSyncConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeactivateIamUserSyncConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeactivateIamUserSyncConfigurationResponse") + } + return +} + +// deactivateIamUserSyncConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) deactivateIamUserSyncConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/deactivateIamUserSyncConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeactivateIamUserSyncConfigurationResponse + 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/bigdata/20190531/IdentityConfiguration/DeactivateIamUserSyncConfiguration" + err = common.PostProcessServiceError(err, "Bds", "DeactivateIamUserSyncConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeactivateUpstConfiguration Deactivate the UPST configuration represented by the provided ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateUpstConfiguration.go.html to see an example of how to use DeactivateUpstConfiguration API. +func (client BdsClient) DeactivateUpstConfiguration(ctx context.Context, request DeactivateUpstConfigurationRequest) (response DeactivateUpstConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deactivateUpstConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeactivateUpstConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeactivateUpstConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeactivateUpstConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeactivateUpstConfigurationResponse") + } + return +} + +// deactivateUpstConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) deactivateUpstConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/deactivateUpstConfiguration", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeactivateUpstConfigurationResponse + 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/bigdata/20190531/IdentityConfiguration/DeactivateUpstConfiguration" + err = common.PostProcessServiceError(err, "Bds", "DeactivateUpstConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteBdsApiKey Deletes the user's API key represented by the provided ID. // // # See also @@ -1378,6 +1688,63 @@ func (client BdsClient) deleteBdsMetastoreConfiguration(ctx context.Context, req return response, err } +// DeleteIdentityConfiguration Delete the identity configuration represented by the provided ID. Deletion is only allowed if this identity configuration is not associated with any active IAM user sync configuration or UPST configuration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeleteIdentityConfiguration.go.html to see an example of how to use DeleteIdentityConfiguration API. +func (client BdsClient) DeleteIdentityConfiguration(ctx context.Context, request DeleteIdentityConfigurationRequest) (response DeleteIdentityConfigurationResponse, 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.deleteIdentityConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteIdentityConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteIdentityConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIdentityConfigurationResponse") + } + return +} + +// deleteIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) deleteIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteIdentityConfigurationResponse + 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/bigdata/20190531/IdentityConfiguration/DeleteIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "DeleteIdentityConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteNodeBackup Delete the NodeBackup represented by the provided ID. // // # See also @@ -1888,22 +2255,79 @@ func (client BdsClient) GetBdsInstance(ctx context.Context, request GetBdsInstan return } -// getBdsInstance implements the OCIOperation interface (enables retrying operations) -func (client BdsClient) getBdsInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getBdsInstance implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) getBdsInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetBdsInstanceResponse + 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/bigdata/20190531/BdsInstance/GetBdsInstance" + err = common.PostProcessServiceError(err, "Bds", "GetBdsInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBdsMetastoreConfiguration Returns the BDS Metastore configuration information for the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetBdsMetastoreConfiguration.go.html to see an example of how to use GetBdsMetastoreConfiguration API. +func (client BdsClient) GetBdsMetastoreConfiguration(ctx context.Context, request GetBdsMetastoreConfigurationRequest) (response GetBdsMetastoreConfigurationResponse, 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.getBdsMetastoreConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBdsMetastoreConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBdsMetastoreConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBdsMetastoreConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBdsMetastoreConfigurationResponse") + } + return +} + +// getBdsMetastoreConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) getBdsMetastoreConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetBdsInstanceResponse + var response GetBdsMetastoreConfigurationResponse 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/bigdata/20190531/BdsInstance/GetBdsInstance" - err = common.PostProcessServiceError(err, "Bds", "GetBdsInstance", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/BdsMetastoreConfiguration/GetBdsMetastoreConfiguration" + err = common.PostProcessServiceError(err, "Bds", "GetBdsMetastoreConfiguration", apiReferenceLink) return response, err } @@ -1911,12 +2335,12 @@ func (client BdsClient) getBdsInstance(ctx context.Context, request common.OCIRe return response, err } -// GetBdsMetastoreConfiguration Returns the BDS Metastore configuration information for the given ID. +// GetIdentityConfiguration Get details of one identity config on the cluster // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetBdsMetastoreConfiguration.go.html to see an example of how to use GetBdsMetastoreConfiguration API. -func (client BdsClient) GetBdsMetastoreConfiguration(ctx context.Context, request GetBdsMetastoreConfigurationRequest) (response GetBdsMetastoreConfigurationResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetIdentityConfiguration.go.html to see an example of how to use GetIdentityConfiguration API. +func (client BdsClient) GetIdentityConfiguration(ctx context.Context, request GetIdentityConfigurationRequest) (response GetIdentityConfigurationResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1925,42 +2349,42 @@ func (client BdsClient) GetBdsMetastoreConfiguration(ctx context.Context, reques if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getBdsMetastoreConfiguration, policy) + ociResponse, err = common.Retry(ctx, request, client.getIdentityConfiguration, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetBdsMetastoreConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetBdsMetastoreConfigurationResponse{} + response = GetIdentityConfigurationResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetBdsMetastoreConfigurationResponse); ok { + if convertedResponse, ok := ociResponse.(GetIdentityConfigurationResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetBdsMetastoreConfigurationResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetIdentityConfigurationResponse") } return } -// getBdsMetastoreConfiguration implements the OCIOperation interface (enables retrying operations) -func (client BdsClient) getBdsMetastoreConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) getIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/metastoreConfigs/{metastoreConfigId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetBdsMetastoreConfigurationResponse + var response GetIdentityConfigurationResponse 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/bigdata/20190531/BdsMetastoreConfiguration/GetBdsMetastoreConfiguration" - err = common.PostProcessServiceError(err, "Bds", "GetBdsMetastoreConfiguration", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/bigdata/20190531/IdentityConfiguration/GetIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "GetIdentityConfiguration", apiReferenceLink) return response, err } @@ -2553,6 +2977,63 @@ func (client BdsClient) listBdsApiKeys(ctx context.Context, request common.OCIRe return response, err } +// ListBdsClusterVersions Returns a list of cluster versions with associated odh and bds versions. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListBdsClusterVersions.go.html to see an example of how to use ListBdsClusterVersions API. +func (client BdsClient) ListBdsClusterVersions(ctx context.Context, request ListBdsClusterVersionsRequest) (response ListBdsClusterVersionsResponse, 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.listBdsClusterVersions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBdsClusterVersionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBdsClusterVersionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBdsClusterVersionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBdsClusterVersionsResponse") + } + return +} + +// listBdsClusterVersions implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) listBdsClusterVersions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsClusterVersions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListBdsClusterVersionsResponse + 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/bigdata/20190531/BdsClusterVersionSummary/ListBdsClusterVersions" + err = common.PostProcessServiceError(err, "Bds", "ListBdsClusterVersions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListBdsInstances Returns a list of all Big Data Service clusters in a compartment. // // # See also @@ -2667,6 +3148,63 @@ func (client BdsClient) listBdsMetastoreConfigurations(ctx context.Context, requ return response, err } +// ListIdentityConfigurations Returns a list of all identity configurations associated with this Big Data Service cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListIdentityConfigurations.go.html to see an example of how to use ListIdentityConfigurations API. +func (client BdsClient) ListIdentityConfigurations(ctx context.Context, request ListIdentityConfigurationsRequest) (response ListIdentityConfigurationsResponse, 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.listIdentityConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListIdentityConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListIdentityConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListIdentityConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListIdentityConfigurationsResponse") + } + return +} + +// listIdentityConfigurations implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) listIdentityConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/bdsInstances/{bdsInstanceId}/identityConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListIdentityConfigurationsResponse + 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/bigdata/20190531/IdentityConfiguration/ListIdentityConfigurations" + err = common.PostProcessServiceError(err, "Bds", "ListIdentityConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListNodeBackupConfigurations Returns information about the NodeBackupConfigurations. // // # See also @@ -3242,6 +3780,130 @@ func (client BdsClient) listWorkRequests(ctx context.Context, request common.OCI return response, err } +// RefreshConfidentialApplication Refresh confidential application for the given identity configuration in case of any update to the confidential application (e.g. regenerated client secret) +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshConfidentialApplication.go.html to see an example of how to use RefreshConfidentialApplication API. +func (client BdsClient) RefreshConfidentialApplication(ctx context.Context, request RefreshConfidentialApplicationRequest) (response RefreshConfidentialApplicationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.refreshConfidentialApplication, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RefreshConfidentialApplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RefreshConfidentialApplicationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RefreshConfidentialApplicationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RefreshConfidentialApplicationResponse") + } + return +} + +// refreshConfidentialApplication implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) refreshConfidentialApplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/refreshConfidentialApplication", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RefreshConfidentialApplicationResponse + 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/bigdata/20190531/IdentityConfiguration/RefreshConfidentialApplication" + err = common.PostProcessServiceError(err, "Bds", "RefreshConfidentialApplication", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RefreshUpstTokenExchangeKeytab Refresh token exchange kerberos principal keytab for the UPST enabled identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshUpstTokenExchangeKeytab.go.html to see an example of how to use RefreshUpstTokenExchangeKeytab API. +func (client BdsClient) RefreshUpstTokenExchangeKeytab(ctx context.Context, request RefreshUpstTokenExchangeKeytabRequest) (response RefreshUpstTokenExchangeKeytabResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.refreshUpstTokenExchangeKeytab, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RefreshUpstTokenExchangeKeytabResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RefreshUpstTokenExchangeKeytabResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RefreshUpstTokenExchangeKeytabResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RefreshUpstTokenExchangeKeytabResponse") + } + return +} + +// refreshUpstTokenExchangeKeytab implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) refreshUpstTokenExchangeKeytab(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}/actions/refreshUpstTokenExchangeKeytab", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RefreshUpstTokenExchangeKeytabResponse + 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/bigdata/20190531/IdentityConfiguration/RefreshUpstTokenExchangeKeytab" + err = common.PostProcessServiceError(err, "Bds", "RefreshUpstTokenExchangeKeytab", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RemoveAutoScalingConfiguration Deletes an autoscale configuration. // // # See also @@ -4194,6 +4856,68 @@ func (client BdsClient) updateBdsMetastoreConfiguration(ctx context.Context, req return response, err } +// UpdateIdentityConfiguration Update the IAM user sync and UPST configuration for the specified identity configuration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/UpdateIdentityConfiguration.go.html to see an example of how to use UpdateIdentityConfiguration API. +func (client BdsClient) UpdateIdentityConfiguration(ctx context.Context, request UpdateIdentityConfigurationRequest) (response UpdateIdentityConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.updateIdentityConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateIdentityConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateIdentityConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateIdentityConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateIdentityConfigurationResponse") + } + return +} + +// updateIdentityConfiguration implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) updateIdentityConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateIdentityConfigurationResponse + 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/bigdata/20190531/IdentityConfiguration/UpdateIdentityConfiguration" + err = common.PostProcessServiceError(err, "Bds", "UpdateIdentityConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateNodeBackupConfiguration Updates fields on NodeBackupConfiguration, including the name, the schedule. // // # See also diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_cluster_version_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_cluster_version_summary.go new file mode 100644 index 00000000000..5cd1d111e9f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_cluster_version_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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BdsClusterVersionSummary Cluster version details including bds and odh version information. +type BdsClusterVersionSummary struct { + + // BDS version to be used for cluster creation + BdsVersion *string `mandatory:"true" json:"bdsVersion"` + + // ODH version to be used for cluster creation + OdhVersion *string `mandatory:"false" json:"odhVersion"` +} + +func (m BdsClusterVersionSummary) 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 BdsClusterVersionSummary) 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/bds/bds_instance.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_instance.go index 572b2c8a4c2..09276ee6367 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_instance.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/bds_instance.go @@ -85,6 +85,8 @@ type BdsInstance struct { // Profile of the Big Data Service cluster. ClusterProfile BdsInstanceClusterProfileEnum `mandatory:"false" json:"clusterProfile,omitempty"` + + BdsClusterVersionSummary *BdsClusterVersionSummary `mandatory:"false" json:"bdsClusterVersionSummary"` } func (m BdsInstance) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_api_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_api_key_details.go index 8d192dcddac..d6db1f9d848 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_api_key_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_api_key_details.go @@ -31,6 +31,9 @@ type CreateBdsApiKeyDetails struct { // The name of the region to establish the Object Storage endpoint. See https://docs.oracle.com/en-us/iaas/api/#/en/identity/20160918/Region/ // for additional information. DefaultRegion *string `mandatory:"false" json:"defaultRegion"` + + // Identity domain OCID , where user is present. For default domain , this field will be optional. + DomainOcid *string `mandatory:"false" json:"domainOcid"` } func (m CreateBdsApiKeyDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_instance_details.go index 9c509da1577..0bcb2d6ad88 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_bds_instance_details.go @@ -63,6 +63,8 @@ type CreateBdsInstanceDetails struct { // Profile of the Big Data Service cluster. ClusterProfile BdsInstanceClusterProfileEnum `mandatory:"false" json:"clusterProfile,omitempty"` + + BdsClusterVersionSummary *BdsClusterVersionSummary `mandatory:"false" json:"bdsClusterVersionSummary"` } func (m CreateBdsInstanceDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_identity_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_identity_configuration_details.go new file mode 100644 index 00000000000..06d1ddc65c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_identity_configuration_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateIdentityConfigurationDetails Details for creating the identity configuration. +type CreateIdentityConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // Display name of the identity configuration, required for creating identity configuration. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Identity domain OCID to use for identity config, required for creating identity configuration + IdentityDomainId *string `mandatory:"true" json:"identityDomainId"` + + // Identity domain confidential application ID for the identity config, required for creating identity configuration + ConfidentialApplicationId *string `mandatory:"true" json:"confidentialApplicationId"` + + UpstConfigurationDetails *UpstConfigurationDetails `mandatory:"false" json:"upstConfigurationDetails"` + + IamUserSyncConfigurationDetails *IamUserSyncConfigurationDetails `mandatory:"false" json:"iamUserSyncConfigurationDetails"` +} + +func (m CreateIdentityConfigurationDetails) 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 CreateIdentityConfigurationDetails) 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/bds/create_identity_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_identity_configuration_request_response.go new file mode 100644 index 00000000000..6ef71823366 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/create_identity_configuration_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateIdentityConfigurationRequest wrapper for the CreateIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CreateIdentityConfiguration.go.html to see an example of how to use CreateIdentityConfigurationRequest. +type CreateIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Details for creating an identity configuration + CreateIdentityConfigurationDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error, without risk of executing that same action again. Retry tokens expire after 24 + // hours but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateIdentityConfigurationRequest) 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 CreateIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateIdentityConfigurationRequest) 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 CreateIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateIdentityConfigurationResponse wrapper for the CreateIdentityConfiguration operation +type CreateIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 CreateIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_iam_user_sync_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_iam_user_sync_configuration_details.go new file mode 100644 index 00000000000..845bc49d6e0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_iam_user_sync_configuration_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeactivateIamUserSyncConfigurationDetails Details for deactivating an IAM user sync configuration +type DeactivateIamUserSyncConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m DeactivateIamUserSyncConfigurationDetails) 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 DeactivateIamUserSyncConfigurationDetails) 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/bds/deactivate_iam_user_sync_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_iam_user_sync_configuration_request_response.go new file mode 100644 index 00000000000..71d8ff75434 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_iam_user_sync_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeactivateIamUserSyncConfigurationRequest wrapper for the DeactivateIamUserSyncConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateIamUserSyncConfiguration.go.html to see an example of how to use DeactivateIamUserSyncConfigurationRequest. +type DeactivateIamUserSyncConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for deactivating the IAM user sync config + DeactivateIamUserSyncConfigurationDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error, without risk of executing that same action again. Retry tokens expire after 24 + // hours but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeactivateIamUserSyncConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeactivateIamUserSyncConfigurationRequest) 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 DeactivateIamUserSyncConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeactivateIamUserSyncConfigurationRequest) 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 DeactivateIamUserSyncConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeactivateIamUserSyncConfigurationResponse wrapper for the DeactivateIamUserSyncConfiguration operation +type DeactivateIamUserSyncConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 DeactivateIamUserSyncConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeactivateIamUserSyncConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_upst_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_upst_configuration_details.go new file mode 100644 index 00000000000..5daf66643bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_upst_configuration_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeactivateUpstConfigurationDetails Details for deleting UPST config from cluster +type DeactivateUpstConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m DeactivateUpstConfigurationDetails) 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 DeactivateUpstConfigurationDetails) 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/bds/deactivate_upst_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_upst_configuration_request_response.go new file mode 100644 index 00000000000..22fe33fbd5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/deactivate_upst_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeactivateUpstConfigurationRequest wrapper for the DeactivateUpstConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeactivateUpstConfiguration.go.html to see an example of how to use DeactivateUpstConfigurationRequest. +type DeactivateUpstConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for deactivating the UPST config + DeactivateUpstConfigurationDetails `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"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeactivateUpstConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeactivateUpstConfigurationRequest) 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 DeactivateUpstConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeactivateUpstConfigurationRequest) 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 DeactivateUpstConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeactivateUpstConfigurationResponse wrapper for the DeactivateUpstConfiguration operation +type DeactivateUpstConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 DeactivateUpstConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeactivateUpstConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/delete_identity_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/delete_identity_configuration_request_response.go new file mode 100644 index 00000000000..cf7d43fecf9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/delete_identity_configuration_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteIdentityConfigurationRequest wrapper for the DeleteIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DeleteIdentityConfiguration.go.html to see an example of how to use DeleteIdentityConfigurationRequest. +type DeleteIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteIdentityConfigurationRequest) 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 DeleteIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteIdentityConfigurationRequest) 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 DeleteIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteIdentityConfigurationResponse wrapper for the DeleteIdentityConfiguration operation +type DeleteIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 DeleteIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/domain_based_odh_patching_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/domain_based_odh_patching_config.go index bf9e25eb44d..0afe5094887 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/domain_based_odh_patching_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/domain_based_odh_patching_config.go @@ -21,6 +21,9 @@ type DomainBasedOdhPatchingConfig struct { // The wait time between AD/FD in seconds. WaitTimeBetweenDomainInSeconds *int `mandatory:"true" json:"waitTimeBetweenDomainInSeconds"` + + // Acceptable number of failed-to-be-patched nodes in each domain. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of non-utility and non-master nodes. + ToleranceThresholdPerDomain *int `mandatory:"false" json:"toleranceThresholdPerDomain"` } func (m DomainBasedOdhPatchingConfig) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/get_identity_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/get_identity_configuration_request_response.go new file mode 100644 index 00000000000..1fa9ed1ddf7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/get_identity_configuration_request_response.go @@ -0,0 +1,198 @@ +// 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 bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetIdentityConfigurationRequest wrapper for the GetIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/GetIdentityConfiguration.go.html to see an example of how to use GetIdentityConfigurationRequest. +type GetIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + SortBy GetIdentityConfigurationSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder GetIdentityConfigurationSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // 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 GetIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetIdentityConfigurationRequest) 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 GetIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetIdentityConfigurationRequest) 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 GetIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGetIdentityConfigurationSortByEnum(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(GetGetIdentityConfigurationSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingGetIdentityConfigurationSortOrderEnum(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(GetGetIdentityConfigurationSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetIdentityConfigurationResponse wrapper for the GetIdentityConfiguration operation +type GetIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of IdentityConfiguration instances + IdentityConfiguration `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 GetIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetIdentityConfigurationSortByEnum Enum with underlying type: string +type GetIdentityConfigurationSortByEnum string + +// Set of constants representing the allowable values for GetIdentityConfigurationSortByEnum +const ( + GetIdentityConfigurationSortByTimecreated GetIdentityConfigurationSortByEnum = "timeCreated" + GetIdentityConfigurationSortByDisplayname GetIdentityConfigurationSortByEnum = "displayName" +) + +var mappingGetIdentityConfigurationSortByEnum = map[string]GetIdentityConfigurationSortByEnum{ + "timeCreated": GetIdentityConfigurationSortByTimecreated, + "displayName": GetIdentityConfigurationSortByDisplayname, +} + +var mappingGetIdentityConfigurationSortByEnumLowerCase = map[string]GetIdentityConfigurationSortByEnum{ + "timecreated": GetIdentityConfigurationSortByTimecreated, + "displayname": GetIdentityConfigurationSortByDisplayname, +} + +// GetGetIdentityConfigurationSortByEnumValues Enumerates the set of values for GetIdentityConfigurationSortByEnum +func GetGetIdentityConfigurationSortByEnumValues() []GetIdentityConfigurationSortByEnum { + values := make([]GetIdentityConfigurationSortByEnum, 0) + for _, v := range mappingGetIdentityConfigurationSortByEnum { + values = append(values, v) + } + return values +} + +// GetGetIdentityConfigurationSortByEnumStringValues Enumerates the set of values in String for GetIdentityConfigurationSortByEnum +func GetGetIdentityConfigurationSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingGetIdentityConfigurationSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetIdentityConfigurationSortByEnum(val string) (GetIdentityConfigurationSortByEnum, bool) { + enum, ok := mappingGetIdentityConfigurationSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// GetIdentityConfigurationSortOrderEnum Enum with underlying type: string +type GetIdentityConfigurationSortOrderEnum string + +// Set of constants representing the allowable values for GetIdentityConfigurationSortOrderEnum +const ( + GetIdentityConfigurationSortOrderAsc GetIdentityConfigurationSortOrderEnum = "ASC" + GetIdentityConfigurationSortOrderDesc GetIdentityConfigurationSortOrderEnum = "DESC" +) + +var mappingGetIdentityConfigurationSortOrderEnum = map[string]GetIdentityConfigurationSortOrderEnum{ + "ASC": GetIdentityConfigurationSortOrderAsc, + "DESC": GetIdentityConfigurationSortOrderDesc, +} + +var mappingGetIdentityConfigurationSortOrderEnumLowerCase = map[string]GetIdentityConfigurationSortOrderEnum{ + "asc": GetIdentityConfigurationSortOrderAsc, + "desc": GetIdentityConfigurationSortOrderDesc, +} + +// GetGetIdentityConfigurationSortOrderEnumValues Enumerates the set of values for GetIdentityConfigurationSortOrderEnum +func GetGetIdentityConfigurationSortOrderEnumValues() []GetIdentityConfigurationSortOrderEnum { + values := make([]GetIdentityConfigurationSortOrderEnum, 0) + for _, v := range mappingGetIdentityConfigurationSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetGetIdentityConfigurationSortOrderEnumStringValues Enumerates the set of values in String for GetIdentityConfigurationSortOrderEnum +func GetGetIdentityConfigurationSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingGetIdentityConfigurationSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetIdentityConfigurationSortOrderEnum(val string) (GetIdentityConfigurationSortOrderEnum, bool) { + enum, ok := mappingGetIdentityConfigurationSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/iam_user_sync_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/iam_user_sync_configuration.go new file mode 100644 index 00000000000..16d4b2d29db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/iam_user_sync_configuration.go @@ -0,0 +1,109 @@ +// 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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IamUserSyncConfiguration Information about the IAM user sync configuration. +type IamUserSyncConfiguration struct { + + // whether to append POSIX attributes to IAM users + IsPosixAttributesAdditionRequired *bool `mandatory:"true" json:"isPosixAttributesAdditionRequired"` + + // Lifecycle state of the IAM user sync config + LifecycleState IamUserSyncConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Time when this IAM user sync config was created, shown as an RFC 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Time when this IAM user sync config was updated, shown as an RFC 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` +} + +func (m IamUserSyncConfiguration) 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 IamUserSyncConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIamUserSyncConfigurationLifecycleStateEnum(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(GetIamUserSyncConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IamUserSyncConfigurationLifecycleStateEnum Enum with underlying type: string +type IamUserSyncConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for IamUserSyncConfigurationLifecycleStateEnum +const ( + IamUserSyncConfigurationLifecycleStateCreating IamUserSyncConfigurationLifecycleStateEnum = "CREATING" + IamUserSyncConfigurationLifecycleStateActive IamUserSyncConfigurationLifecycleStateEnum = "ACTIVE" + IamUserSyncConfigurationLifecycleStateInactive IamUserSyncConfigurationLifecycleStateEnum = "INACTIVE" + IamUserSyncConfigurationLifecycleStateDeleting IamUserSyncConfigurationLifecycleStateEnum = "DELETING" + IamUserSyncConfigurationLifecycleStateUpdating IamUserSyncConfigurationLifecycleStateEnum = "UPDATING" + IamUserSyncConfigurationLifecycleStateFailed IamUserSyncConfigurationLifecycleStateEnum = "FAILED" +) + +var mappingIamUserSyncConfigurationLifecycleStateEnum = map[string]IamUserSyncConfigurationLifecycleStateEnum{ + "CREATING": IamUserSyncConfigurationLifecycleStateCreating, + "ACTIVE": IamUserSyncConfigurationLifecycleStateActive, + "INACTIVE": IamUserSyncConfigurationLifecycleStateInactive, + "DELETING": IamUserSyncConfigurationLifecycleStateDeleting, + "UPDATING": IamUserSyncConfigurationLifecycleStateUpdating, + "FAILED": IamUserSyncConfigurationLifecycleStateFailed, +} + +var mappingIamUserSyncConfigurationLifecycleStateEnumLowerCase = map[string]IamUserSyncConfigurationLifecycleStateEnum{ + "creating": IamUserSyncConfigurationLifecycleStateCreating, + "active": IamUserSyncConfigurationLifecycleStateActive, + "inactive": IamUserSyncConfigurationLifecycleStateInactive, + "deleting": IamUserSyncConfigurationLifecycleStateDeleting, + "updating": IamUserSyncConfigurationLifecycleStateUpdating, + "failed": IamUserSyncConfigurationLifecycleStateFailed, +} + +// GetIamUserSyncConfigurationLifecycleStateEnumValues Enumerates the set of values for IamUserSyncConfigurationLifecycleStateEnum +func GetIamUserSyncConfigurationLifecycleStateEnumValues() []IamUserSyncConfigurationLifecycleStateEnum { + values := make([]IamUserSyncConfigurationLifecycleStateEnum, 0) + for _, v := range mappingIamUserSyncConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetIamUserSyncConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for IamUserSyncConfigurationLifecycleStateEnum +func GetIamUserSyncConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "INACTIVE", + "DELETING", + "UPDATING", + "FAILED", + } +} + +// GetMappingIamUserSyncConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIamUserSyncConfigurationLifecycleStateEnum(val string) (IamUserSyncConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingIamUserSyncConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/iam_user_sync_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/iam_user_sync_configuration_details.go new file mode 100644 index 00000000000..240ada05f86 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/iam_user_sync_configuration_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IamUserSyncConfigurationDetails Details for activating/updating an IAM user sync configuration +type IamUserSyncConfigurationDetails struct { + + // whether posix attribute needs to be appended to users, required for updating IAM user sync configuration + IsPosixAttributesAdditionRequired *bool `mandatory:"false" json:"isPosixAttributesAdditionRequired"` +} + +func (m IamUserSyncConfigurationDetails) 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 IamUserSyncConfigurationDetails) 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/bds/identity_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/identity_configuration.go new file mode 100644 index 00000000000..ffc00e99f74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/identity_configuration.go @@ -0,0 +1,106 @@ +// 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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IdentityConfiguration Details about the identity configuration +type IdentityConfiguration struct { + + // The id of the UPST config + Id *string `mandatory:"true" json:"id"` + + // the display name of the identity configuration + DisplayName *string `mandatory:"true" json:"displayName"` + + // Identity domain to use for identity config + IdentityDomainId *string `mandatory:"true" json:"identityDomainId"` + + // identity domain confidential application ID for the identity config + ConfidentialApplicationId *string `mandatory:"true" json:"confidentialApplicationId"` + + // Lifecycle state of the identity configuration + LifecycleState IdentityConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Time when this identity configuration was created, shown as an RFC 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Time when this identity configuration config was updated, shown as an RFC 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + IamUserSyncConfiguration *IamUserSyncConfiguration `mandatory:"false" json:"iamUserSyncConfiguration"` + + UpstConfiguration *UpstConfiguration `mandatory:"false" json:"upstConfiguration"` +} + +func (m IdentityConfiguration) 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 IdentityConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIdentityConfigurationLifecycleStateEnum(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(GetIdentityConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IdentityConfigurationLifecycleStateEnum Enum with underlying type: string +type IdentityConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for IdentityConfigurationLifecycleStateEnum +const ( + IdentityConfigurationLifecycleStateActive IdentityConfigurationLifecycleStateEnum = "ACTIVE" + IdentityConfigurationLifecycleStateDeleted IdentityConfigurationLifecycleStateEnum = "DELETED" +) + +var mappingIdentityConfigurationLifecycleStateEnum = map[string]IdentityConfigurationLifecycleStateEnum{ + "ACTIVE": IdentityConfigurationLifecycleStateActive, + "DELETED": IdentityConfigurationLifecycleStateDeleted, +} + +var mappingIdentityConfigurationLifecycleStateEnumLowerCase = map[string]IdentityConfigurationLifecycleStateEnum{ + "active": IdentityConfigurationLifecycleStateActive, + "deleted": IdentityConfigurationLifecycleStateDeleted, +} + +// GetIdentityConfigurationLifecycleStateEnumValues Enumerates the set of values for IdentityConfigurationLifecycleStateEnum +func GetIdentityConfigurationLifecycleStateEnumValues() []IdentityConfigurationLifecycleStateEnum { + values := make([]IdentityConfigurationLifecycleStateEnum, 0) + for _, v := range mappingIdentityConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetIdentityConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for IdentityConfigurationLifecycleStateEnum +func GetIdentityConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + } +} + +// GetMappingIdentityConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIdentityConfigurationLifecycleStateEnum(val string) (IdentityConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingIdentityConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/identity_configuration_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/identity_configuration_summary.go new file mode 100644 index 00000000000..a5e4a26ac45 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/identity_configuration_summary.go @@ -0,0 +1,48 @@ +// 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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IdentityConfigurationSummary Summary of the identity config +type IdentityConfigurationSummary struct { + + // The id of the identity config + Id *string `mandatory:"true" json:"id"` + + // Display name of the identity config + DisplayName *string `mandatory:"true" json:"displayName"` + + // Lifecycle state of the identity config + LifecycleState IdentityConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +func (m IdentityConfigurationSummary) 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 IdentityConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingIdentityConfigurationLifecycleStateEnum(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(GetIdentityConfigurationLifecycleStateEnumStringValues(), ","))) + } + + 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/bds/list_bds_cluster_versions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/list_bds_cluster_versions_request_response.go new file mode 100644 index 00000000000..d18e42155ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/list_bds_cluster_versions_request_response.go @@ -0,0 +1,190 @@ +// 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 bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBdsClusterVersionsRequest wrapper for the ListBdsClusterVersions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListBdsClusterVersions.go.html to see an example of how to use ListBdsClusterVersionsRequest. +type ListBdsClusterVersionsRequest struct { + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. If no value is specified bdsVersion is default. + SortBy ListBdsClusterVersionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListBdsClusterVersionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // 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 ListBdsClusterVersionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBdsClusterVersionsRequest) 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 ListBdsClusterVersionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBdsClusterVersionsRequest) 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 ListBdsClusterVersionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListBdsClusterVersionsSortByEnum(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(GetListBdsClusterVersionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListBdsClusterVersionsSortOrderEnum(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(GetListBdsClusterVersionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBdsClusterVersionsResponse wrapper for the ListBdsClusterVersions operation +type ListBdsClusterVersionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []BdsClusterVersionSummary instances + Items []BdsClusterVersionSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 ListBdsClusterVersionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBdsClusterVersionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBdsClusterVersionsSortByEnum Enum with underlying type: string +type ListBdsClusterVersionsSortByEnum string + +// Set of constants representing the allowable values for ListBdsClusterVersionsSortByEnum +const ( + ListBdsClusterVersionsSortByBdsversion ListBdsClusterVersionsSortByEnum = "bdsVersion" +) + +var mappingListBdsClusterVersionsSortByEnum = map[string]ListBdsClusterVersionsSortByEnum{ + "bdsVersion": ListBdsClusterVersionsSortByBdsversion, +} + +var mappingListBdsClusterVersionsSortByEnumLowerCase = map[string]ListBdsClusterVersionsSortByEnum{ + "bdsversion": ListBdsClusterVersionsSortByBdsversion, +} + +// GetListBdsClusterVersionsSortByEnumValues Enumerates the set of values for ListBdsClusterVersionsSortByEnum +func GetListBdsClusterVersionsSortByEnumValues() []ListBdsClusterVersionsSortByEnum { + values := make([]ListBdsClusterVersionsSortByEnum, 0) + for _, v := range mappingListBdsClusterVersionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListBdsClusterVersionsSortByEnumStringValues Enumerates the set of values in String for ListBdsClusterVersionsSortByEnum +func GetListBdsClusterVersionsSortByEnumStringValues() []string { + return []string{ + "bdsVersion", + } +} + +// GetMappingListBdsClusterVersionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBdsClusterVersionsSortByEnum(val string) (ListBdsClusterVersionsSortByEnum, bool) { + enum, ok := mappingListBdsClusterVersionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListBdsClusterVersionsSortOrderEnum Enum with underlying type: string +type ListBdsClusterVersionsSortOrderEnum string + +// Set of constants representing the allowable values for ListBdsClusterVersionsSortOrderEnum +const ( + ListBdsClusterVersionsSortOrderAsc ListBdsClusterVersionsSortOrderEnum = "ASC" + ListBdsClusterVersionsSortOrderDesc ListBdsClusterVersionsSortOrderEnum = "DESC" +) + +var mappingListBdsClusterVersionsSortOrderEnum = map[string]ListBdsClusterVersionsSortOrderEnum{ + "ASC": ListBdsClusterVersionsSortOrderAsc, + "DESC": ListBdsClusterVersionsSortOrderDesc, +} + +var mappingListBdsClusterVersionsSortOrderEnumLowerCase = map[string]ListBdsClusterVersionsSortOrderEnum{ + "asc": ListBdsClusterVersionsSortOrderAsc, + "desc": ListBdsClusterVersionsSortOrderDesc, +} + +// GetListBdsClusterVersionsSortOrderEnumValues Enumerates the set of values for ListBdsClusterVersionsSortOrderEnum +func GetListBdsClusterVersionsSortOrderEnumValues() []ListBdsClusterVersionsSortOrderEnum { + values := make([]ListBdsClusterVersionsSortOrderEnum, 0) + for _, v := range mappingListBdsClusterVersionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListBdsClusterVersionsSortOrderEnumStringValues Enumerates the set of values in String for ListBdsClusterVersionsSortOrderEnum +func GetListBdsClusterVersionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListBdsClusterVersionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBdsClusterVersionsSortOrderEnum(val string) (ListBdsClusterVersionsSortOrderEnum, bool) { + enum, ok := mappingListBdsClusterVersionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/list_identity_configurations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/list_identity_configurations_request_response.go new file mode 100644 index 00000000000..d4626ddf7a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/list_identity_configurations_request_response.go @@ -0,0 +1,209 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIdentityConfigurationsRequest wrapper for the ListIdentityConfigurations operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/ListIdentityConfigurations.go.html to see an example of how to use ListIdentityConfigurationsRequest. +type ListIdentityConfigurationsRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + SortBy ListIdentityConfigurationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListIdentityConfigurationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The state of the identity config + LifecycleState IdentityConfigurationLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIdentityConfigurationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIdentityConfigurationsRequest) 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 ListIdentityConfigurationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIdentityConfigurationsRequest) 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 ListIdentityConfigurationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListIdentityConfigurationsSortByEnum(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(GetListIdentityConfigurationsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListIdentityConfigurationsSortOrderEnum(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(GetListIdentityConfigurationsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingIdentityConfigurationLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetIdentityConfigurationLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIdentityConfigurationsResponse wrapper for the ListIdentityConfigurations operation +type ListIdentityConfigurationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []IdentityConfigurationSummary instances + Items []IdentityConfigurationSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 ListIdentityConfigurationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIdentityConfigurationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListIdentityConfigurationsSortByEnum Enum with underlying type: string +type ListIdentityConfigurationsSortByEnum string + +// Set of constants representing the allowable values for ListIdentityConfigurationsSortByEnum +const ( + ListIdentityConfigurationsSortByTimecreated ListIdentityConfigurationsSortByEnum = "timeCreated" + ListIdentityConfigurationsSortByDisplayname ListIdentityConfigurationsSortByEnum = "displayName" +) + +var mappingListIdentityConfigurationsSortByEnum = map[string]ListIdentityConfigurationsSortByEnum{ + "timeCreated": ListIdentityConfigurationsSortByTimecreated, + "displayName": ListIdentityConfigurationsSortByDisplayname, +} + +var mappingListIdentityConfigurationsSortByEnumLowerCase = map[string]ListIdentityConfigurationsSortByEnum{ + "timecreated": ListIdentityConfigurationsSortByTimecreated, + "displayname": ListIdentityConfigurationsSortByDisplayname, +} + +// GetListIdentityConfigurationsSortByEnumValues Enumerates the set of values for ListIdentityConfigurationsSortByEnum +func GetListIdentityConfigurationsSortByEnumValues() []ListIdentityConfigurationsSortByEnum { + values := make([]ListIdentityConfigurationsSortByEnum, 0) + for _, v := range mappingListIdentityConfigurationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListIdentityConfigurationsSortByEnumStringValues Enumerates the set of values in String for ListIdentityConfigurationsSortByEnum +func GetListIdentityConfigurationsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListIdentityConfigurationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIdentityConfigurationsSortByEnum(val string) (ListIdentityConfigurationsSortByEnum, bool) { + enum, ok := mappingListIdentityConfigurationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListIdentityConfigurationsSortOrderEnum Enum with underlying type: string +type ListIdentityConfigurationsSortOrderEnum string + +// Set of constants representing the allowable values for ListIdentityConfigurationsSortOrderEnum +const ( + ListIdentityConfigurationsSortOrderAsc ListIdentityConfigurationsSortOrderEnum = "ASC" + ListIdentityConfigurationsSortOrderDesc ListIdentityConfigurationsSortOrderEnum = "DESC" +) + +var mappingListIdentityConfigurationsSortOrderEnum = map[string]ListIdentityConfigurationsSortOrderEnum{ + "ASC": ListIdentityConfigurationsSortOrderAsc, + "DESC": ListIdentityConfigurationsSortOrderDesc, +} + +var mappingListIdentityConfigurationsSortOrderEnumLowerCase = map[string]ListIdentityConfigurationsSortOrderEnum{ + "asc": ListIdentityConfigurationsSortOrderAsc, + "desc": ListIdentityConfigurationsSortOrderDesc, +} + +// GetListIdentityConfigurationsSortOrderEnumValues Enumerates the set of values for ListIdentityConfigurationsSortOrderEnum +func GetListIdentityConfigurationsSortOrderEnumValues() []ListIdentityConfigurationsSortOrderEnum { + values := make([]ListIdentityConfigurationsSortOrderEnum, 0) + for _, v := range mappingListIdentityConfigurationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListIdentityConfigurationsSortOrderEnumStringValues Enumerates the set of values in String for ListIdentityConfigurationsSortOrderEnum +func GetListIdentityConfigurationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListIdentityConfigurationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIdentityConfigurationsSortOrderEnum(val string) (ListIdentityConfigurationsSortOrderEnum, bool) { + enum, ok := mappingListIdentityConfigurationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/node_type_shape_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/node_type_shape_config.go new file mode 100644 index 00000000000..7ed40d0e169 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/node_type_shape_config.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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeTypeShapeConfig Shape configuration at node type level. Start cluster will start all nodes as is if no config is specified. +type NodeTypeShapeConfig struct { + + // The Big Data Service cluster node type. + NodeType NodeNodeTypeEnum `mandatory:"true" json:"nodeType"` + + // Shape of the node. This has to be specified when starting the cluster. Defaults to wn0 for homogeneous clusters and remains empty for heterogeneous clusters. + // If provided, all nodes in the node type will adopt the specified shape; otherwise, nodes retain their original shapes. + Shape *string `mandatory:"true" json:"shape"` +} + +func (m NodeTypeShapeConfig) 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 NodeTypeShapeConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingNodeNodeTypeEnum(string(m.NodeType)); !ok && m.NodeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NodeType: %s. Supported values are: %s.", m.NodeType, strings.Join(GetNodeNodeTypeEnumStringValues(), ","))) + } + + 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/bds/operation_types.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/operation_types.go index c11a4ba8dc9..8b17f6ba4c4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/operation_types.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/operation_types.go @@ -67,6 +67,15 @@ const ( OperationTypesDeleteResourcePrincipalConfiguration OperationTypesEnum = "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION" OperationTypesUpdateResourcePrincipalConfiguration OperationTypesEnum = "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION" OperationTypesRefreshResourcePrincipal OperationTypesEnum = "REFRESH_RESOURCE_PRINCIPAL" + OperationTypesCreateIdentityConfig OperationTypesEnum = "CREATE_IDENTITY_CONFIG" + OperationTypesDeleteIdentityConfig OperationTypesEnum = "DELETE_IDENTITY_CONFIG" + OperationTypesUpdateIdentityConfig OperationTypesEnum = "UPDATE_IDENTITY_CONFIG" + OperationTypesActivateUpstConfig OperationTypesEnum = "ACTIVATE_UPST_CONFIG" + OperationTypesDeactivateUpstConfig OperationTypesEnum = "DEACTIVATE_UPST_CONFIG" + OperationTypesRefreshConfidentialApplication OperationTypesEnum = "REFRESH_CONFIDENTIAL_APPLICATION" + OperationTypesRefreshTokenExchangeKeytab OperationTypesEnum = "REFRESH_TOKEN_EXCHANGE_KEYTAB" + OperationTypesActivateIamUserSyncConfig OperationTypesEnum = "ACTIVATE_IAM_USER_SYNC_CONFIG" + OperationTypesDeactivateIamUserSyncConfig OperationTypesEnum = "DEACTIVATE_IAM_USER_SYNC_CONFIG" ) var mappingOperationTypesEnum = map[string]OperationTypesEnum{ @@ -119,6 +128,15 @@ var mappingOperationTypesEnum = map[string]OperationTypesEnum{ "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION": OperationTypesDeleteResourcePrincipalConfiguration, "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION": OperationTypesUpdateResourcePrincipalConfiguration, "REFRESH_RESOURCE_PRINCIPAL": OperationTypesRefreshResourcePrincipal, + "CREATE_IDENTITY_CONFIG": OperationTypesCreateIdentityConfig, + "DELETE_IDENTITY_CONFIG": OperationTypesDeleteIdentityConfig, + "UPDATE_IDENTITY_CONFIG": OperationTypesUpdateIdentityConfig, + "ACTIVATE_UPST_CONFIG": OperationTypesActivateUpstConfig, + "DEACTIVATE_UPST_CONFIG": OperationTypesDeactivateUpstConfig, + "REFRESH_CONFIDENTIAL_APPLICATION": OperationTypesRefreshConfidentialApplication, + "REFRESH_TOKEN_EXCHANGE_KEYTAB": OperationTypesRefreshTokenExchangeKeytab, + "ACTIVATE_IAM_USER_SYNC_CONFIG": OperationTypesActivateIamUserSyncConfig, + "DEACTIVATE_IAM_USER_SYNC_CONFIG": OperationTypesDeactivateIamUserSyncConfig, } var mappingOperationTypesEnumLowerCase = map[string]OperationTypesEnum{ @@ -171,6 +189,15 @@ var mappingOperationTypesEnumLowerCase = map[string]OperationTypesEnum{ "delete_resource_principal_configuration": OperationTypesDeleteResourcePrincipalConfiguration, "update_resource_principal_configuration": OperationTypesUpdateResourcePrincipalConfiguration, "refresh_resource_principal": OperationTypesRefreshResourcePrincipal, + "create_identity_config": OperationTypesCreateIdentityConfig, + "delete_identity_config": OperationTypesDeleteIdentityConfig, + "update_identity_config": OperationTypesUpdateIdentityConfig, + "activate_upst_config": OperationTypesActivateUpstConfig, + "deactivate_upst_config": OperationTypesDeactivateUpstConfig, + "refresh_confidential_application": OperationTypesRefreshConfidentialApplication, + "refresh_token_exchange_keytab": OperationTypesRefreshTokenExchangeKeytab, + "activate_iam_user_sync_config": OperationTypesActivateIamUserSyncConfig, + "deactivate_iam_user_sync_config": OperationTypesDeactivateIamUserSyncConfig, } // GetOperationTypesEnumValues Enumerates the set of values for OperationTypesEnum @@ -234,6 +261,15 @@ func GetOperationTypesEnumStringValues() []string { "DELETE_RESOURCE_PRINCIPAL_CONFIGURATION", "UPDATE_RESOURCE_PRINCIPAL_CONFIGURATION", "REFRESH_RESOURCE_PRINCIPAL", + "CREATE_IDENTITY_CONFIG", + "DELETE_IDENTITY_CONFIG", + "UPDATE_IDENTITY_CONFIG", + "ACTIVATE_UPST_CONFIG", + "DEACTIVATE_UPST_CONFIG", + "REFRESH_CONFIDENTIAL_APPLICATION", + "REFRESH_TOKEN_EXCHANGE_KEYTAB", + "ACTIVATE_IAM_USER_SYNC_CONFIG", + "DEACTIVATE_IAM_USER_SYNC_CONFIG", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_confidential_application_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_confidential_application_details.go new file mode 100644 index 00000000000..bdbe870eddf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_confidential_application_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RefreshConfidentialApplicationDetails Details for refreshing confidential application +type RefreshConfidentialApplicationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m RefreshConfidentialApplicationDetails) 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 RefreshConfidentialApplicationDetails) 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/bds/refresh_confidential_application_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_confidential_application_request_response.go new file mode 100644 index 00000000000..4d7318ef760 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_confidential_application_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RefreshConfidentialApplicationRequest wrapper for the RefreshConfidentialApplication operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshConfidentialApplication.go.html to see an example of how to use RefreshConfidentialApplicationRequest. +type RefreshConfidentialApplicationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for refreshing confidential application + RefreshConfidentialApplicationDetails `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 RefreshConfidentialApplicationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RefreshConfidentialApplicationRequest) 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 RefreshConfidentialApplicationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RefreshConfidentialApplicationRequest) 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 RefreshConfidentialApplicationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RefreshConfidentialApplicationResponse wrapper for the RefreshConfidentialApplication operation +type RefreshConfidentialApplicationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 RefreshConfidentialApplicationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RefreshConfidentialApplicationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_upst_token_exchange_keytab_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_upst_token_exchange_keytab_details.go new file mode 100644 index 00000000000..77ee3663a71 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_upst_token_exchange_keytab_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RefreshUpstTokenExchangeKeytabDetails Details for refreshing User Principal Session (UPST) token exchange keytab +type RefreshUpstTokenExchangeKeytabDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` +} + +func (m RefreshUpstTokenExchangeKeytabDetails) 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 RefreshUpstTokenExchangeKeytabDetails) 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/bds/refresh_upst_token_exchange_keytab_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_upst_token_exchange_keytab_request_response.go new file mode 100644 index 00000000000..c780e929e2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/refresh_upst_token_exchange_keytab_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RefreshUpstTokenExchangeKeytabRequest wrapper for the RefreshUpstTokenExchangeKeytab operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RefreshUpstTokenExchangeKeytab.go.html to see an example of how to use RefreshUpstTokenExchangeKeytabRequest. +type RefreshUpstTokenExchangeKeytabRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for refreshing User Principal Session (UPST) token exchange keytab + RefreshUpstTokenExchangeKeytabDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error, without risk of executing that same action again. Retry tokens expire after 24 + // hours but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RefreshUpstTokenExchangeKeytabRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RefreshUpstTokenExchangeKeytabRequest) 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 RefreshUpstTokenExchangeKeytabRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RefreshUpstTokenExchangeKeytabRequest) 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 RefreshUpstTokenExchangeKeytabRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RefreshUpstTokenExchangeKeytabResponse wrapper for the RefreshUpstTokenExchangeKeytab operation +type RefreshUpstTokenExchangeKeytabResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 RefreshUpstTokenExchangeKeytabResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RefreshUpstTokenExchangeKeytabResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/start_bds_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/start_bds_instance_details.go index fba6785365c..cdc092e6a0f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/start_bds_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/start_bds_instance_details.go @@ -20,6 +20,8 @@ type StartBdsInstanceDetails struct { // Base-64 encoded password for the cluster admin user. ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + StartClusterShapeConfigs *StartClusterShapeConfigs `mandatory:"false" json:"startClusterShapeConfigs"` } func (m StartBdsInstanceDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/start_cluster_shape_configs.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/start_cluster_shape_configs.go new file mode 100644 index 00000000000..bb67c485ae5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/start_cluster_shape_configs.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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StartClusterShapeConfigs The shape configuration to be used to start the cluster. If the value is not set, the start cluster operation will try to start the cluster as is. +type StartClusterShapeConfigs struct { + + // Shape configurations for each node type. + NodeTypeShapeConfigs []NodeTypeShapeConfig `mandatory:"true" json:"nodeTypeShapeConfigs"` +} + +func (m StartClusterShapeConfigs) 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 StartClusterShapeConfigs) 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/bds/update_bds_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_bds_instance_details.go index 788cd3d725a..7be9d0bc80b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_bds_instance_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_bds_instance_details.go @@ -34,6 +34,8 @@ type UpdateBdsInstanceDetails struct { // The OCID of the Key Management master encryption key. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + NetworkConfig *NetworkConfig `mandatory:"false" json:"networkConfig"` } func (m UpdateBdsInstanceDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_identity_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_identity_configuration_details.go new file mode 100644 index 00000000000..249a7a98176 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_identity_configuration_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateIdentityConfigurationDetails Details for updating identity config on the cluster +type UpdateIdentityConfigurationDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + UpstConfigurationDetails *UpstConfigurationDetails `mandatory:"false" json:"upstConfigurationDetails"` + + IamUserSyncConfigurationDetails *IamUserSyncConfigurationDetails `mandatory:"false" json:"iamUserSyncConfigurationDetails"` +} + +func (m UpdateIdentityConfigurationDetails) 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 UpdateIdentityConfigurationDetails) 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/bds/update_identity_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_identity_configuration_request_response.go new file mode 100644 index 00000000000..ca07aceee59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/update_identity_configuration_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateIdentityConfigurationRequest wrapper for the UpdateIdentityConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/UpdateIdentityConfiguration.go.html to see an example of how to use UpdateIdentityConfigurationRequest. +type UpdateIdentityConfigurationRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // The OCID of the identity configuration + IdentityConfigurationId *string `mandatory:"true" contributesTo:"path" name:"identityConfigurationId"` + + // Details for updating an identity configuration + UpdateIdentityConfigurationDetails `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 UpdateIdentityConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateIdentityConfigurationRequest) 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 UpdateIdentityConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateIdentityConfigurationRequest) 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 UpdateIdentityConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateIdentityConfigurationResponse wrapper for the UpdateIdentityConfiguration operation +type UpdateIdentityConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 UpdateIdentityConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateIdentityConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/upst_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/upst_configuration.go new file mode 100644 index 00000000000..decac52f09d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/upst_configuration.go @@ -0,0 +1,124 @@ +// 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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpstConfiguration Information about the UPST configuration. +type UpstConfiguration struct { + + // The instance OCID of the node, which is the resource from which the node backup was acquired. + VaultId *string `mandatory:"true" json:"vaultId"` + + // Master Encryption key used for encrypting token exchange keytab. + MasterEncryptionKeyId *string `mandatory:"true" json:"masterEncryptionKeyId"` + + // Secret ID for token exchange keytab + SecretId *string `mandatory:"true" json:"secretId"` + + // Time when the keytab for token exchange principal is last refreshed, shown as an RFC 3339 formatted datetime string. + TimeTokenExchangeKeytabLastRefreshed *common.SDKTime `mandatory:"true" json:"timeTokenExchangeKeytabLastRefreshed"` + + // Lifecycle state of the UPST config + LifecycleState UpstConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Time when this UPST config was created, shown as an RFC 3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Time when this UPST config was updated, shown as an RFC 3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The kerberos keytab content used for creating identity propagation trust config, in base64 format + KeytabContent *string `mandatory:"true" json:"keytabContent"` + + // Token exchange kerberos Principal name in cluster + TokenExchangePrincipalName *string `mandatory:"false" json:"tokenExchangePrincipalName"` +} + +func (m UpstConfiguration) 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 UpstConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingUpstConfigurationLifecycleStateEnum(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(GetUpstConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpstConfigurationLifecycleStateEnum Enum with underlying type: string +type UpstConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for UpstConfigurationLifecycleStateEnum +const ( + UpstConfigurationLifecycleStateCreating UpstConfigurationLifecycleStateEnum = "CREATING" + UpstConfigurationLifecycleStateActive UpstConfigurationLifecycleStateEnum = "ACTIVE" + UpstConfigurationLifecycleStateDeleting UpstConfigurationLifecycleStateEnum = "DELETING" + UpstConfigurationLifecycleStateInactive UpstConfigurationLifecycleStateEnum = "INACTIVE" + UpstConfigurationLifecycleStateUpdating UpstConfigurationLifecycleStateEnum = "UPDATING" + UpstConfigurationLifecycleStateFailed UpstConfigurationLifecycleStateEnum = "FAILED" +) + +var mappingUpstConfigurationLifecycleStateEnum = map[string]UpstConfigurationLifecycleStateEnum{ + "CREATING": UpstConfigurationLifecycleStateCreating, + "ACTIVE": UpstConfigurationLifecycleStateActive, + "DELETING": UpstConfigurationLifecycleStateDeleting, + "INACTIVE": UpstConfigurationLifecycleStateInactive, + "UPDATING": UpstConfigurationLifecycleStateUpdating, + "FAILED": UpstConfigurationLifecycleStateFailed, +} + +var mappingUpstConfigurationLifecycleStateEnumLowerCase = map[string]UpstConfigurationLifecycleStateEnum{ + "creating": UpstConfigurationLifecycleStateCreating, + "active": UpstConfigurationLifecycleStateActive, + "deleting": UpstConfigurationLifecycleStateDeleting, + "inactive": UpstConfigurationLifecycleStateInactive, + "updating": UpstConfigurationLifecycleStateUpdating, + "failed": UpstConfigurationLifecycleStateFailed, +} + +// GetUpstConfigurationLifecycleStateEnumValues Enumerates the set of values for UpstConfigurationLifecycleStateEnum +func GetUpstConfigurationLifecycleStateEnumValues() []UpstConfigurationLifecycleStateEnum { + values := make([]UpstConfigurationLifecycleStateEnum, 0) + for _, v := range mappingUpstConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetUpstConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for UpstConfigurationLifecycleStateEnum +func GetUpstConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETING", + "INACTIVE", + "UPDATING", + "FAILED", + } +} + +// GetMappingUpstConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpstConfigurationLifecycleStateEnum(val string) (UpstConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingUpstConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/bds/upst_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/bds/upst_configuration_details.go new file mode 100644 index 00000000000..07d2ad9a2e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/bds/upst_configuration_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpstConfigurationDetails Details for activating/updating UPST config on the cluster +type UpstConfigurationDetails struct { + + // OCID of the vault to store token exchange service principal keyta, required for activating UPST config + VaultId *string `mandatory:"false" json:"vaultId"` + + // OCID of the master encryption key in vault for encrypting token exchange service principal keytab, required for activating UPST config + MasterEncryptionKeyId *string `mandatory:"false" json:"masterEncryptionKeyId"` +} + +func (m UpstConfigurationDetails) 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 UpstConfigurationDetails) 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/blockchain/blockchain_platform.go b/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/blockchain_platform.go index e95f9f34f54..a20516a09f1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/blockchain_platform.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/blockchain_platform.go @@ -30,7 +30,7 @@ type BlockchainPlatform struct { // Role of platform - FOUNDER or PARTICIPANT PlatformRole BlockchainPlatformPlatformRoleEnum `mandatory:"true" json:"platformRole"` - // Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM + // Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM or DIGITAL_ASSETS_MEDIUM or DIGITAL_ASSETS_LARGE or DIGITAL_ASSETS_EXTRA_LARGE ComputeShape BlockchainPlatformComputeShapeEnum `mandatory:"true" json:"computeShape"` // Platform Instance Description @@ -172,30 +172,39 @@ type BlockchainPlatformComputeShapeEnum string // Set of constants representing the allowable values for BlockchainPlatformComputeShapeEnum const ( - BlockchainPlatformComputeShapeStandard BlockchainPlatformComputeShapeEnum = "STANDARD" - BlockchainPlatformComputeShapeEnterpriseSmall BlockchainPlatformComputeShapeEnum = "ENTERPRISE_SMALL" - BlockchainPlatformComputeShapeEnterpriseMedium BlockchainPlatformComputeShapeEnum = "ENTERPRISE_MEDIUM" - BlockchainPlatformComputeShapeEnterpriseLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_LARGE" - BlockchainPlatformComputeShapeEnterpriseExtraLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_EXTRA_LARGE" - BlockchainPlatformComputeShapeEnterpriseCustom BlockchainPlatformComputeShapeEnum = "ENTERPRISE_CUSTOM" + BlockchainPlatformComputeShapeStandard BlockchainPlatformComputeShapeEnum = "STANDARD" + BlockchainPlatformComputeShapeEnterpriseSmall BlockchainPlatformComputeShapeEnum = "ENTERPRISE_SMALL" + BlockchainPlatformComputeShapeEnterpriseMedium BlockchainPlatformComputeShapeEnum = "ENTERPRISE_MEDIUM" + BlockchainPlatformComputeShapeEnterpriseLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_LARGE" + BlockchainPlatformComputeShapeEnterpriseExtraLarge BlockchainPlatformComputeShapeEnum = "ENTERPRISE_EXTRA_LARGE" + BlockchainPlatformComputeShapeEnterpriseCustom BlockchainPlatformComputeShapeEnum = "ENTERPRISE_CUSTOM" + BlockchainPlatformComputeShapeDigitalAssetsMedium BlockchainPlatformComputeShapeEnum = "DIGITAL_ASSETS_MEDIUM" + BlockchainPlatformComputeShapeDigitalAssetsLarge BlockchainPlatformComputeShapeEnum = "DIGITAL_ASSETS_LARGE" + BlockchainPlatformComputeShapeDigitalAssetsExtraLarge BlockchainPlatformComputeShapeEnum = "DIGITAL_ASSETS_EXTRA_LARGE" ) var mappingBlockchainPlatformComputeShapeEnum = map[string]BlockchainPlatformComputeShapeEnum{ - "STANDARD": BlockchainPlatformComputeShapeStandard, - "ENTERPRISE_SMALL": BlockchainPlatformComputeShapeEnterpriseSmall, - "ENTERPRISE_MEDIUM": BlockchainPlatformComputeShapeEnterpriseMedium, - "ENTERPRISE_LARGE": BlockchainPlatformComputeShapeEnterpriseLarge, - "ENTERPRISE_EXTRA_LARGE": BlockchainPlatformComputeShapeEnterpriseExtraLarge, - "ENTERPRISE_CUSTOM": BlockchainPlatformComputeShapeEnterpriseCustom, + "STANDARD": BlockchainPlatformComputeShapeStandard, + "ENTERPRISE_SMALL": BlockchainPlatformComputeShapeEnterpriseSmall, + "ENTERPRISE_MEDIUM": BlockchainPlatformComputeShapeEnterpriseMedium, + "ENTERPRISE_LARGE": BlockchainPlatformComputeShapeEnterpriseLarge, + "ENTERPRISE_EXTRA_LARGE": BlockchainPlatformComputeShapeEnterpriseExtraLarge, + "ENTERPRISE_CUSTOM": BlockchainPlatformComputeShapeEnterpriseCustom, + "DIGITAL_ASSETS_MEDIUM": BlockchainPlatformComputeShapeDigitalAssetsMedium, + "DIGITAL_ASSETS_LARGE": BlockchainPlatformComputeShapeDigitalAssetsLarge, + "DIGITAL_ASSETS_EXTRA_LARGE": BlockchainPlatformComputeShapeDigitalAssetsExtraLarge, } var mappingBlockchainPlatformComputeShapeEnumLowerCase = map[string]BlockchainPlatformComputeShapeEnum{ - "standard": BlockchainPlatformComputeShapeStandard, - "enterprise_small": BlockchainPlatformComputeShapeEnterpriseSmall, - "enterprise_medium": BlockchainPlatformComputeShapeEnterpriseMedium, - "enterprise_large": BlockchainPlatformComputeShapeEnterpriseLarge, - "enterprise_extra_large": BlockchainPlatformComputeShapeEnterpriseExtraLarge, - "enterprise_custom": BlockchainPlatformComputeShapeEnterpriseCustom, + "standard": BlockchainPlatformComputeShapeStandard, + "enterprise_small": BlockchainPlatformComputeShapeEnterpriseSmall, + "enterprise_medium": BlockchainPlatformComputeShapeEnterpriseMedium, + "enterprise_large": BlockchainPlatformComputeShapeEnterpriseLarge, + "enterprise_extra_large": BlockchainPlatformComputeShapeEnterpriseExtraLarge, + "enterprise_custom": BlockchainPlatformComputeShapeEnterpriseCustom, + "digital_assets_medium": BlockchainPlatformComputeShapeDigitalAssetsMedium, + "digital_assets_large": BlockchainPlatformComputeShapeDigitalAssetsLarge, + "digital_assets_extra_large": BlockchainPlatformComputeShapeDigitalAssetsExtraLarge, } // GetBlockchainPlatformComputeShapeEnumValues Enumerates the set of values for BlockchainPlatformComputeShapeEnum @@ -216,6 +225,9 @@ func GetBlockchainPlatformComputeShapeEnumStringValues() []string { "ENTERPRISE_LARGE", "ENTERPRISE_EXTRA_LARGE", "ENTERPRISE_CUSTOM", + "DIGITAL_ASSETS_MEDIUM", + "DIGITAL_ASSETS_LARGE", + "DIGITAL_ASSETS_EXTRA_LARGE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request.go index a813cfbb689..61acba41487 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request.go @@ -78,39 +78,42 @@ type WorkRequestOperationTypeEnum string // Set of constants representing the allowable values for WorkRequestOperationTypeEnum const ( - WorkRequestOperationTypeCreatePlatform WorkRequestOperationTypeEnum = "CREATE_PLATFORM" - WorkRequestOperationTypeUpdatePlatform WorkRequestOperationTypeEnum = "UPDATE_PLATFORM" - WorkRequestOperationTypeUpgradePlatform WorkRequestOperationTypeEnum = "UPGRADE_PLATFORM" - WorkRequestOperationTypeDeletePlatform WorkRequestOperationTypeEnum = "DELETE_PLATFORM" - WorkRequestOperationTypeScalePlatform WorkRequestOperationTypeEnum = "SCALE_PLATFORM" - WorkRequestOperationTypeStartPlatform WorkRequestOperationTypeEnum = "START_PLATFORM" - WorkRequestOperationTypeStopPlatform WorkRequestOperationTypeEnum = "STOP_PLATFORM" - WorkRequestOperationTypeCustomizePlatform WorkRequestOperationTypeEnum = "CUSTOMIZE_PLATFORM" - WorkRequestOperationTypeScaleStorage WorkRequestOperationTypeEnum = "SCALE_STORAGE" + WorkRequestOperationTypeCreatePlatform WorkRequestOperationTypeEnum = "CREATE_PLATFORM" + WorkRequestOperationTypeUpdatePlatform WorkRequestOperationTypeEnum = "UPDATE_PLATFORM" + WorkRequestOperationTypeUpgradePlatform WorkRequestOperationTypeEnum = "UPGRADE_PLATFORM" + WorkRequestOperationTypeDeletePlatform WorkRequestOperationTypeEnum = "DELETE_PLATFORM" + WorkRequestOperationTypeScalePlatform WorkRequestOperationTypeEnum = "SCALE_PLATFORM" + WorkRequestOperationTypeStartPlatform WorkRequestOperationTypeEnum = "START_PLATFORM" + WorkRequestOperationTypeStopPlatform WorkRequestOperationTypeEnum = "STOP_PLATFORM" + WorkRequestOperationTypeCustomizePlatform WorkRequestOperationTypeEnum = "CUSTOMIZE_PLATFORM" + WorkRequestOperationTypeScaleStorage WorkRequestOperationTypeEnum = "SCALE_STORAGE" + WorkRequestOperationTypeWorkrequestCleanup WorkRequestOperationTypeEnum = "WORKREQUEST_CLEANUP" ) var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ - "CREATE_PLATFORM": WorkRequestOperationTypeCreatePlatform, - "UPDATE_PLATFORM": WorkRequestOperationTypeUpdatePlatform, - "UPGRADE_PLATFORM": WorkRequestOperationTypeUpgradePlatform, - "DELETE_PLATFORM": WorkRequestOperationTypeDeletePlatform, - "SCALE_PLATFORM": WorkRequestOperationTypeScalePlatform, - "START_PLATFORM": WorkRequestOperationTypeStartPlatform, - "STOP_PLATFORM": WorkRequestOperationTypeStopPlatform, - "CUSTOMIZE_PLATFORM": WorkRequestOperationTypeCustomizePlatform, - "SCALE_STORAGE": WorkRequestOperationTypeScaleStorage, + "CREATE_PLATFORM": WorkRequestOperationTypeCreatePlatform, + "UPDATE_PLATFORM": WorkRequestOperationTypeUpdatePlatform, + "UPGRADE_PLATFORM": WorkRequestOperationTypeUpgradePlatform, + "DELETE_PLATFORM": WorkRequestOperationTypeDeletePlatform, + "SCALE_PLATFORM": WorkRequestOperationTypeScalePlatform, + "START_PLATFORM": WorkRequestOperationTypeStartPlatform, + "STOP_PLATFORM": WorkRequestOperationTypeStopPlatform, + "CUSTOMIZE_PLATFORM": WorkRequestOperationTypeCustomizePlatform, + "SCALE_STORAGE": WorkRequestOperationTypeScaleStorage, + "WORKREQUEST_CLEANUP": WorkRequestOperationTypeWorkrequestCleanup, } var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ - "create_platform": WorkRequestOperationTypeCreatePlatform, - "update_platform": WorkRequestOperationTypeUpdatePlatform, - "upgrade_platform": WorkRequestOperationTypeUpgradePlatform, - "delete_platform": WorkRequestOperationTypeDeletePlatform, - "scale_platform": WorkRequestOperationTypeScalePlatform, - "start_platform": WorkRequestOperationTypeStartPlatform, - "stop_platform": WorkRequestOperationTypeStopPlatform, - "customize_platform": WorkRequestOperationTypeCustomizePlatform, - "scale_storage": WorkRequestOperationTypeScaleStorage, + "create_platform": WorkRequestOperationTypeCreatePlatform, + "update_platform": WorkRequestOperationTypeUpdatePlatform, + "upgrade_platform": WorkRequestOperationTypeUpgradePlatform, + "delete_platform": WorkRequestOperationTypeDeletePlatform, + "scale_platform": WorkRequestOperationTypeScalePlatform, + "start_platform": WorkRequestOperationTypeStartPlatform, + "stop_platform": WorkRequestOperationTypeStopPlatform, + "customize_platform": WorkRequestOperationTypeCustomizePlatform, + "scale_storage": WorkRequestOperationTypeScaleStorage, + "workrequest_cleanup": WorkRequestOperationTypeWorkrequestCleanup, } // GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum @@ -134,6 +137,7 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "STOP_PLATFORM", "CUSTOMIZE_PLATFORM", "SCALE_STORAGE", + "WORKREQUEST_CLEANUP", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request_summary.go index 55c96fab235..11c726136f2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/blockchain/work_request_summary.go @@ -78,39 +78,42 @@ type WorkRequestSummaryOperationTypeEnum string // Set of constants representing the allowable values for WorkRequestSummaryOperationTypeEnum const ( - WorkRequestSummaryOperationTypeCreatePlatform WorkRequestSummaryOperationTypeEnum = "CREATE_PLATFORM" - WorkRequestSummaryOperationTypeUpdatePlatform WorkRequestSummaryOperationTypeEnum = "UPDATE_PLATFORM" - WorkRequestSummaryOperationTypeUpgradePlatform WorkRequestSummaryOperationTypeEnum = "UPGRADE_PLATFORM" - WorkRequestSummaryOperationTypeDeletePlatform WorkRequestSummaryOperationTypeEnum = "DELETE_PLATFORM" - WorkRequestSummaryOperationTypeScalePlatform WorkRequestSummaryOperationTypeEnum = "SCALE_PLATFORM" - WorkRequestSummaryOperationTypeStartPlatform WorkRequestSummaryOperationTypeEnum = "START_PLATFORM" - WorkRequestSummaryOperationTypeStopPlatform WorkRequestSummaryOperationTypeEnum = "STOP_PLATFORM" - WorkRequestSummaryOperationTypeCustomizePlatform WorkRequestSummaryOperationTypeEnum = "CUSTOMIZE_PLATFORM" - WorkRequestSummaryOperationTypeScaleStorage WorkRequestSummaryOperationTypeEnum = "SCALE_STORAGE" + WorkRequestSummaryOperationTypeCreatePlatform WorkRequestSummaryOperationTypeEnum = "CREATE_PLATFORM" + WorkRequestSummaryOperationTypeUpdatePlatform WorkRequestSummaryOperationTypeEnum = "UPDATE_PLATFORM" + WorkRequestSummaryOperationTypeUpgradePlatform WorkRequestSummaryOperationTypeEnum = "UPGRADE_PLATFORM" + WorkRequestSummaryOperationTypeDeletePlatform WorkRequestSummaryOperationTypeEnum = "DELETE_PLATFORM" + WorkRequestSummaryOperationTypeScalePlatform WorkRequestSummaryOperationTypeEnum = "SCALE_PLATFORM" + WorkRequestSummaryOperationTypeStartPlatform WorkRequestSummaryOperationTypeEnum = "START_PLATFORM" + WorkRequestSummaryOperationTypeStopPlatform WorkRequestSummaryOperationTypeEnum = "STOP_PLATFORM" + WorkRequestSummaryOperationTypeCustomizePlatform WorkRequestSummaryOperationTypeEnum = "CUSTOMIZE_PLATFORM" + WorkRequestSummaryOperationTypeScaleStorage WorkRequestSummaryOperationTypeEnum = "SCALE_STORAGE" + WorkRequestSummaryOperationTypeWorkrequestCleanup WorkRequestSummaryOperationTypeEnum = "WORKREQUEST_CLEANUP" ) var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOperationTypeEnum{ - "CREATE_PLATFORM": WorkRequestSummaryOperationTypeCreatePlatform, - "UPDATE_PLATFORM": WorkRequestSummaryOperationTypeUpdatePlatform, - "UPGRADE_PLATFORM": WorkRequestSummaryOperationTypeUpgradePlatform, - "DELETE_PLATFORM": WorkRequestSummaryOperationTypeDeletePlatform, - "SCALE_PLATFORM": WorkRequestSummaryOperationTypeScalePlatform, - "START_PLATFORM": WorkRequestSummaryOperationTypeStartPlatform, - "STOP_PLATFORM": WorkRequestSummaryOperationTypeStopPlatform, - "CUSTOMIZE_PLATFORM": WorkRequestSummaryOperationTypeCustomizePlatform, - "SCALE_STORAGE": WorkRequestSummaryOperationTypeScaleStorage, + "CREATE_PLATFORM": WorkRequestSummaryOperationTypeCreatePlatform, + "UPDATE_PLATFORM": WorkRequestSummaryOperationTypeUpdatePlatform, + "UPGRADE_PLATFORM": WorkRequestSummaryOperationTypeUpgradePlatform, + "DELETE_PLATFORM": WorkRequestSummaryOperationTypeDeletePlatform, + "SCALE_PLATFORM": WorkRequestSummaryOperationTypeScalePlatform, + "START_PLATFORM": WorkRequestSummaryOperationTypeStartPlatform, + "STOP_PLATFORM": WorkRequestSummaryOperationTypeStopPlatform, + "CUSTOMIZE_PLATFORM": WorkRequestSummaryOperationTypeCustomizePlatform, + "SCALE_STORAGE": WorkRequestSummaryOperationTypeScaleStorage, + "WORKREQUEST_CLEANUP": WorkRequestSummaryOperationTypeWorkrequestCleanup, } var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequestSummaryOperationTypeEnum{ - "create_platform": WorkRequestSummaryOperationTypeCreatePlatform, - "update_platform": WorkRequestSummaryOperationTypeUpdatePlatform, - "upgrade_platform": WorkRequestSummaryOperationTypeUpgradePlatform, - "delete_platform": WorkRequestSummaryOperationTypeDeletePlatform, - "scale_platform": WorkRequestSummaryOperationTypeScalePlatform, - "start_platform": WorkRequestSummaryOperationTypeStartPlatform, - "stop_platform": WorkRequestSummaryOperationTypeStopPlatform, - "customize_platform": WorkRequestSummaryOperationTypeCustomizePlatform, - "scale_storage": WorkRequestSummaryOperationTypeScaleStorage, + "create_platform": WorkRequestSummaryOperationTypeCreatePlatform, + "update_platform": WorkRequestSummaryOperationTypeUpdatePlatform, + "upgrade_platform": WorkRequestSummaryOperationTypeUpgradePlatform, + "delete_platform": WorkRequestSummaryOperationTypeDeletePlatform, + "scale_platform": WorkRequestSummaryOperationTypeScalePlatform, + "start_platform": WorkRequestSummaryOperationTypeStartPlatform, + "stop_platform": WorkRequestSummaryOperationTypeStopPlatform, + "customize_platform": WorkRequestSummaryOperationTypeCustomizePlatform, + "scale_storage": WorkRequestSummaryOperationTypeScaleStorage, + "workrequest_cleanup": WorkRequestSummaryOperationTypeWorkrequestCleanup, } // GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestSummaryOperationTypeEnum @@ -134,6 +137,7 @@ func GetWorkRequestSummaryOperationTypeEnumStringValues() []string { "STOP_PLATFORM", "CUSTOMIZE_PLATFORM", "SCALE_STORAGE", + "WORKREQUEST_CLEANUP", } } 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/version.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go index af27c280860..fc13b59bc44 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 = "79" - patch = "0" + minor = "81" + patch = "1" tag = "" ) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go index d92a13bea33..3054e1cfff2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go @@ -149,6 +149,9 @@ type AutonomousDatabase struct { // The Autonomous Container Database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). Used only by Autonomous Database on Dedicated Exadata Infrastructure. AutonomousContainerDatabaseId *string `mandatory:"false" json:"autonomousContainerDatabaseId"` + // Indicates if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The date and time the Autonomous Database was most recently undeleted. TimeUndeleted *common.SDKTime `mandatory:"false" json:"timeUndeleted"` @@ -577,6 +580,7 @@ func (m *AutonomousDatabase) UnmarshalJSON(data []byte) (e error) { InfrastructureType AutonomousDatabaseInfrastructureTypeEnum `json:"infrastructureType"` IsDedicated *bool `json:"isDedicated"` AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` TimeUndeleted *common.SDKTime `json:"timeUndeleted"` TimeCreated *common.SDKTime `json:"timeCreated"` DisplayName *string `json:"displayName"` @@ -749,6 +753,8 @@ func (m *AutonomousDatabase) UnmarshalJSON(data []byte) (e error) { m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.TimeUndeleted = model.TimeUndeleted m.TimeCreated = model.TimeCreated diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go index ee2c0787c36..90f7039dd03 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go @@ -151,6 +151,9 @@ type AutonomousDatabaseSummary struct { // The Autonomous Container Database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). Used only by Autonomous Database on Dedicated Exadata Infrastructure. AutonomousContainerDatabaseId *string `mandatory:"false" json:"autonomousContainerDatabaseId"` + // Indicates if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The date and time the Autonomous Database was most recently undeleted. TimeUndeleted *common.SDKTime `mandatory:"false" json:"timeUndeleted"` @@ -579,6 +582,7 @@ func (m *AutonomousDatabaseSummary) UnmarshalJSON(data []byte) (e error) { InfrastructureType AutonomousDatabaseSummaryInfrastructureTypeEnum `json:"infrastructureType"` IsDedicated *bool `json:"isDedicated"` AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` TimeUndeleted *common.SDKTime `json:"timeUndeleted"` TimeCreated *common.SDKTime `json:"timeCreated"` DisplayName *string `json:"displayName"` @@ -751,6 +755,8 @@ func (m *AutonomousDatabaseSummary) UnmarshalJSON(data []byte) (e error) { m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.TimeUndeleted = model.TimeUndeleted m.TimeCreated = model.TimeCreated diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go index 763beecef49..c635edcc3d6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go @@ -256,6 +256,9 @@ type CreateAutonomousDatabaseBase interface { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. GetDbToolsDetails() []DatabaseTool + // True if the Autonomous Database is backup retention locked. + GetIsBackupRetentionLocked() *bool + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. GetSecretId() *string @@ -315,6 +318,7 @@ type createautonomousdatabasebase struct { IsAutoScalingForStorageEnabled *bool `mandatory:"false" json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `mandatory:"false" json:"databaseEdition,omitempty"` DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` SecretId *string `mandatory:"false" json:"secretId"` SecretVersionNumber *int `mandatory:"false" json:"secretVersionNumber"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -382,6 +386,7 @@ func (m *createautonomousdatabasebase) UnmarshalJSON(data []byte) error { m.IsAutoScalingForStorageEnabled = s.Model.IsAutoScalingForStorageEnabled m.DatabaseEdition = s.Model.DatabaseEdition m.DbToolsDetails = s.Model.DbToolsDetails + m.IsBackupRetentionLocked = s.Model.IsBackupRetentionLocked m.SecretId = s.Model.SecretId m.SecretVersionNumber = s.Model.SecretVersionNumber m.Source = s.Model.Source @@ -685,6 +690,11 @@ func (m createautonomousdatabasebase) GetDbToolsDetails() []DatabaseTool { return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m createautonomousdatabasebase) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m createautonomousdatabasebase) GetSecretId() *string { return m.SecretId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go index d99284791fa..1a39cbda25d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go @@ -227,6 +227,9 @@ type CreateAutonomousDatabaseCloneDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -513,6 +516,11 @@ func (m CreateAutonomousDatabaseCloneDetails) GetDbToolsDetails() []DatabaseTool return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseCloneDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseCloneDetails) GetSecretId() *string { return m.SecretId @@ -623,6 +631,7 @@ func (m *CreateAutonomousDatabaseCloneDetails) UnmarshalJSON(data []byte) (e err IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -741,6 +750,8 @@ func (m *CreateAutonomousDatabaseCloneDetails) UnmarshalJSON(data []byte) (e err m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go index a5a4568484d..55dda4e0dd6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go @@ -224,6 +224,9 @@ type CreateAutonomousDatabaseDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -507,6 +510,11 @@ func (m CreateAutonomousDatabaseDetails) GetDbToolsDetails() []DatabaseTool { return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseDetails) GetSecretId() *string { return m.SecretId @@ -614,6 +622,7 @@ func (m *CreateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -730,6 +739,8 @@ func (m *CreateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go index 77d8b49f073..6fb5867212b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go @@ -227,6 +227,9 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -513,6 +516,11 @@ func (m CreateAutonomousDatabaseFromBackupDetails) GetDbToolsDetails() []Databas return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseFromBackupDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseFromBackupDetails) GetSecretId() *string { return m.SecretId @@ -623,6 +631,7 @@ func (m *CreateAutonomousDatabaseFromBackupDetails) UnmarshalJSON(data []byte) ( IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -741,6 +750,8 @@ func (m *CreateAutonomousDatabaseFromBackupDetails) UnmarshalJSON(data []byte) ( m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go index 88605268863..8374ed57d3d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go @@ -227,6 +227,9 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -519,6 +522,11 @@ func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetDbToolsDetails() return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetSecretId() *string { return m.SecretId @@ -629,6 +637,7 @@ func (m *CreateAutonomousDatabaseFromBackupTimestampDetails) UnmarshalJSON(data IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` Timestamp *common.SDKTime `json:"timestamp"` @@ -749,6 +758,8 @@ func (m *CreateAutonomousDatabaseFromBackupTimestampDetails) UnmarshalJSON(data m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go index 3a2a0f802f8..2ed619b14cc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go @@ -246,6 +246,9 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -529,6 +532,11 @@ func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetDbToolsDetails() return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetSecretId() *string { return m.SecretId @@ -636,6 +644,7 @@ func (m *CreateCrossRegionAutonomousDatabaseDataGuardDetails) UnmarshalJSON(data IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -753,6 +762,8 @@ func (m *CreateCrossRegionAutonomousDatabaseDataGuardDetails) UnmarshalJSON(data m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go index 9c5f1974636..fb29e6dc880 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go @@ -248,6 +248,9 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -539,6 +542,11 @@ func (m CreateCrossRegionDisasterRecoveryDetails) GetDbToolsDetails() []Database return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateCrossRegionDisasterRecoveryDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateCrossRegionDisasterRecoveryDetails) GetSecretId() *string { return m.SecretId @@ -649,6 +657,7 @@ func (m *CreateCrossRegionDisasterRecoveryDetails) UnmarshalJSON(data []byte) (e IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` IsReplicateAutomaticBackups *bool `json:"isReplicateAutomaticBackups"` @@ -768,6 +777,8 @@ func (m *CreateCrossRegionDisasterRecoveryDetails) UnmarshalJSON(data []byte) (e m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go index cd2b8b5493f..de574b03a80 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go @@ -249,6 +249,9 @@ type CreateCrossTenancyDisasterRecoveryDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -540,6 +543,11 @@ func (m CreateCrossTenancyDisasterRecoveryDetails) GetDbToolsDetails() []Databas return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateCrossTenancyDisasterRecoveryDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateCrossTenancyDisasterRecoveryDetails) GetSecretId() *string { return m.SecretId @@ -650,6 +658,7 @@ func (m *CreateCrossTenancyDisasterRecoveryDetails) UnmarshalJSON(data []byte) ( IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` IsReplicateAutomaticBackups *bool `json:"isReplicateAutomaticBackups"` @@ -769,6 +778,8 @@ func (m *CreateCrossTenancyDisasterRecoveryDetails) UnmarshalJSON(data []byte) ( m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go index bba3afa6886..baa9f9c7b07 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go @@ -227,6 +227,9 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -526,6 +529,11 @@ func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetDbToolsDetails() []D return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetSecretId() *string { return m.SecretId @@ -639,6 +647,7 @@ func (m *CreateRefreshableAutonomousDatabaseCloneDetails) UnmarshalJSON(data []b IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` RefreshableMode CreateRefreshableAutonomousDatabaseCloneDetailsRefreshableModeEnum `json:"refreshableMode"` @@ -761,6 +770,8 @@ func (m *CreateRefreshableAutonomousDatabaseCloneDetails) UnmarshalJSON(data []b m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go index dde044f2114..01fe35a162e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go @@ -227,6 +227,9 @@ type UndeleteAutonomousDatabaseDetails struct { // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, isLocalDataGuardEnabled, or isFreeTier. DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. // This cannot be used in conjunction with adminPassword. SecretId *string `mandatory:"false" json:"secretId"` @@ -510,6 +513,11 @@ func (m UndeleteAutonomousDatabaseDetails) GetDbToolsDetails() []DatabaseTool { return m.DbToolsDetails } +// GetIsBackupRetentionLocked returns IsBackupRetentionLocked +func (m UndeleteAutonomousDatabaseDetails) GetIsBackupRetentionLocked() *bool { + return m.IsBackupRetentionLocked +} + // GetSecretId returns SecretId func (m UndeleteAutonomousDatabaseDetails) GetSecretId() *string { return m.SecretId @@ -617,6 +625,7 @@ func (m *UndeleteAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` SecretId *string `json:"secretId"` SecretVersionNumber *int `json:"secretVersionNumber"` CompartmentId *string `json:"compartmentId"` @@ -734,6 +743,8 @@ func (m *UndeleteAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) copy(m.DbToolsDetails, model.DbToolsDetails) + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.SecretId = model.SecretId m.SecretVersionNumber = model.SecretVersionNumber diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go index 289090dd7e6..fe47fc54dda 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go @@ -252,6 +252,9 @@ type UpdateAutonomousDatabaseDetails struct { ResourcePoolSummary *ResourcePoolSummary `mandatory:"false" json:"resourcePoolSummary"` + // True if the Autonomous Database is backup retention locked. + IsBackupRetentionLocked *bool `mandatory:"false" json:"isBackupRetentionLocked"` + // The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. ScheduledOperations []ScheduledOperationDetails `mandatory:"false" json:"scheduledOperations"` @@ -361,6 +364,7 @@ func (m *UpdateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + IsBackupRetentionLocked *bool `json:"isBackupRetentionLocked"` ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` @@ -465,6 +469,8 @@ func (m *UpdateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { m.ResourcePoolSummary = model.ResourcePoolSummary + m.IsBackupRetentionLocked = model.IsBackupRetentionLocked + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) copy(m.ScheduledOperations, model.ScheduledOperations) m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_job_run_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_job_run_details.go index 8a5b5650225..766dbf4de7e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_job_run_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_job_run_details.go @@ -19,10 +19,10 @@ import ( // CreateJobRunDetails Parameters needed to create a new job run. type CreateJobRunDetails struct { - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. ProjectId *string `mandatory:"true" json:"projectId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. CompartmentId *string `mandatory:"true" json:"compartmentId"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job to create a run for. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/data_science_resource_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/data_science_resource_type.go index 89be7889a08..3c55cd75cf6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/data_science_resource_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/data_science_resource_type.go @@ -19,14 +19,17 @@ type DataScienceResourceTypeEnum string // Set of constants representing the allowable values for DataScienceResourceTypeEnum const ( DataScienceResourceTypeNotebookSession DataScienceResourceTypeEnum = "NOTEBOOK_SESSION" + DataScienceResourceTypeModelDeployment DataScienceResourceTypeEnum = "MODEL_DEPLOYMENT" ) var mappingDataScienceResourceTypeEnum = map[string]DataScienceResourceTypeEnum{ "NOTEBOOK_SESSION": DataScienceResourceTypeNotebookSession, + "MODEL_DEPLOYMENT": DataScienceResourceTypeModelDeployment, } var mappingDataScienceResourceTypeEnumLowerCase = map[string]DataScienceResourceTypeEnum{ "notebook_session": DataScienceResourceTypeNotebookSession, + "model_deployment": DataScienceResourceTypeModelDeployment, } // GetDataScienceResourceTypeEnumValues Enumerates the set of values for DataScienceResourceTypeEnum @@ -42,6 +45,7 @@ func GetDataScienceResourceTypeEnumValues() []DataScienceResourceTypeEnum { func GetDataScienceResourceTypeEnumStringValues() []string { return []string{ "NOTEBOOK_SESSION", + "MODEL_DEPLOYMENT", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/instance_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/instance_configuration.go index 1517c280682..cfe401bb962 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/instance_configuration.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/instance_configuration.go @@ -25,6 +25,9 @@ type InstanceConfiguration struct { // A model deployment instance is provided with a VNIC for network access. This specifies the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT/SGW gateway for egress. SubnetId *string `mandatory:"false" json:"subnetId"` + + // The OCID of a Data Science private endpoint. + PrivateEndpointId *string `mandatory:"false" json:"privateEndpointId"` } func (m InstanceConfiguration) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run.go index cc6b2248aae..5e1bb36a5db 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run.go @@ -28,13 +28,13 @@ type JobRun struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the job run. CreatedBy *string `mandatory:"true" json:"createdBy"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. ProjectId *string `mandatory:"true" json:"projectId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. JobId *string `mandatory:"true" json:"jobId"` JobConfigurationOverrideDetails JobConfigurationDetails `mandatory:"true" json:"jobConfigurationOverrideDetails"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run_summary.go index 1779c565087..b97f9b2b70d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_run_summary.go @@ -15,7 +15,7 @@ import ( "strings" ) -// JobRunSummary Summary information for a Job. +// JobRunSummary Summary information for a job run. type JobRunSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. @@ -27,16 +27,16 @@ type JobRunSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the job run. CreatedBy *string `mandatory:"true" json:"createdBy"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. ProjectId *string `mandatory:"true" json:"projectId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. JobId *string `mandatory:"true" json:"jobId"` - // The state of the job. + // The state of the job run. LifecycleState JobRunLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` // The date and time the job run request was started in the timestamp format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_summary.go index 82dc6676fe5..e51eabab2fe 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/job_summary.go @@ -15,7 +15,7 @@ import ( "strings" ) -// JobSummary Summary information for a Job. +// JobSummary Summary information for a job. type JobSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_data_science_private_endpoints_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_data_science_private_endpoints_request_response.go index f668ec3a8ed..66cd21e677c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_data_science_private_endpoints_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_data_science_private_endpoints_request_response.go @@ -285,14 +285,17 @@ type ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum string // Set of constants representing the allowable values for ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum const ( ListDataSciencePrivateEndpointsDataScienceResourceTypeNotebookSession ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum = "NOTEBOOK_SESSION" + ListDataSciencePrivateEndpointsDataScienceResourceTypeModelDeployment ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum = "MODEL_DEPLOYMENT" ) var mappingListDataSciencePrivateEndpointsDataScienceResourceTypeEnum = map[string]ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum{ "NOTEBOOK_SESSION": ListDataSciencePrivateEndpointsDataScienceResourceTypeNotebookSession, + "MODEL_DEPLOYMENT": ListDataSciencePrivateEndpointsDataScienceResourceTypeModelDeployment, } var mappingListDataSciencePrivateEndpointsDataScienceResourceTypeEnumLowerCase = map[string]ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum{ "notebook_session": ListDataSciencePrivateEndpointsDataScienceResourceTypeNotebookSession, + "model_deployment": ListDataSciencePrivateEndpointsDataScienceResourceTypeModelDeployment, } // GetListDataSciencePrivateEndpointsDataScienceResourceTypeEnumValues Enumerates the set of values for ListDataSciencePrivateEndpointsDataScienceResourceTypeEnum @@ -308,6 +311,7 @@ func GetListDataSciencePrivateEndpointsDataScienceResourceTypeEnumValues() []Lis func GetListDataSciencePrivateEndpointsDataScienceResourceTypeEnumStringValues() []string { return []string{ "NOTEBOOK_SESSION", + "MODEL_DEPLOYMENT", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/metadata.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/metadata.go index f44f36d2d8b..7470be3a3d0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/metadata.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/metadata.go @@ -25,7 +25,7 @@ type Metadata struct { // * libraryVersion // * estimatorClass // * hyperParameters - // * testartifactresults + // * testArtifactresults Key *string `mandatory:"false" json:"key"` // Allowed values for useCaseType: @@ -41,7 +41,7 @@ type Metadata struct { // Description of model metadata Description *string `mandatory:"false" json:"description"` - // Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + // Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". Category *string `mandatory:"false" json:"category"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/action_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/action_type.go index 2328fd981a8..4f9d2849068 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/action_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/action_type.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent.go index cd8beef8627..cdc6010da6d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// Agent **Agent** -// An agent is an LLM-based autonomous system that understands and generates human-like text, enabling natural-language processing interactions. OCI Generative AI Agents supports retrieval-augmented generation (RAG) agents. A RAG agent connects to a data source, retrieves data, and augments model responses with the information from the data sources to generate more relevant responses. +// Agent An agent is an LLM-based autonomous system that understands and generates human-like text, enabling natural-language processing interactions. OCI Generative AI Agents supports retrieval-augmented generation (RAG) agents. A RAG agent connects to a data source, retrieves data, and augments model responses with the information from the data sources to generate more relevant responses. // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type Agent struct { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_collection.go index 641f84b160d..4eae5dce0e8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentCollection **AgentCollection** -// Results of an agent search. Contains both AgentSummary items and other information, such as metadata. +// AgentCollection Results of an agent search. Contains both AgentSummary items and other information, such as metadata. type AgentCollection struct { // List of agents. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint.go index b72742963f7..4c07e1c1a97 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentEndpoint **AgentEndpoint** -// The endpoint to access a deployed agent. +// AgentEndpoint The endpoint to access a deployed agent. // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type AgentEndpoint struct { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_collection.go index 7bd1effb3e2..d627b1f3272 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentEndpointCollection **AgentEndpointCollection** -// Results of an agentEndpoint search. Contains both AgentEndpointSummary items and other information, such as metadata. +// AgentEndpointCollection Results of an agentEndpoint search. Contains both AgentEndpointSummary items and other information, such as metadata. type AgentEndpointCollection struct { // List of endpoints. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_summary.go index 78a78795de7..682189df509 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_endpoint_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentEndpointSummary **AgentEndpointSummary** -// Summary information about an endpoint. +// AgentEndpointSummary Summary information about an endpoint. type AgentEndpointSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the AgentEndpoint. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_summary.go index 8f82430a7ae..504a2c86f52 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/agent_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// AgentSummary **AgentSummary** -// Summary information about an agent. +// AgentSummary Summary information about an agent. type AgentSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Agent. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/basic_auth_secret.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/basic_auth_secret.go index 46e987b184f..d393c12c1eb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/basic_auth_secret.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/basic_auth_secret.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// BasicAuthSecret **BasicAuthSecret** -// The details of Basic authentication configured as in OpenSearch. +// BasicAuthSecret The details of Basic authentication configured as in OpenSearch. type BasicAuthSecret struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the secret for basic authentication. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_compartment_details.go index 61a16c70826..6690b7029c2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_compartment_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ChangeAgentCompartmentDetails **ChangeAgentCompartmentDetails** -// The configuration details for the move operation. +// ChangeAgentCompartmentDetails The configuration details for the move operation. type ChangeAgentCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the agent to. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_endpoint_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_endpoint_compartment_details.go index a52fd237d38..2a25627680e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_endpoint_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_agent_endpoint_compartment_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ChangeAgentEndpointCompartmentDetails **ChangeAgentEndpointCompartmentDetails** -// The configuration details for the move operation. +// ChangeAgentEndpointCompartmentDetails The configuration details for the move operation. type ChangeAgentEndpointCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the endpoint to. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_knowledge_base_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_knowledge_base_compartment_details.go index 6d1839cde9c..9d175475fe4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_knowledge_base_compartment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/change_knowledge_base_compartment_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ChangeKnowledgeBaseCompartmentDetails **ChangeKnowledgeBaseCompartmentDetails** -// The configuration details for the move operation. +// ChangeKnowledgeBaseCompartmentDetails The configuration details for the move operation. type ChangeKnowledgeBaseCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the KnowledgeBase to. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/content_moderation_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/content_moderation_config.go index 8e12542e206..7ae95c0284c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/content_moderation_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/content_moderation_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_details.go index 2e0d12ab89a..19c02bfdcfe 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// CreateAgentDetails **CreateAgentDetails** -// The data to create an agent. +// CreateAgentDetails The data to create an agent. type CreateAgentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the agent in. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_endpoint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_endpoint_details.go index 9a38de8e3db..72b3d6a45f1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_endpoint_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_agent_endpoint_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// CreateAgentEndpointDetails **CreateAgentEndpointDetails** -// The data to create an endpoint. +// CreateAgentEndpointDetails The data to create an endpoint. type CreateAgentEndpointDetails struct { // The OCID of the agent that this endpoint is associated with. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_ingestion_job_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_ingestion_job_details.go index 31e23d924a9..d20590568a0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_ingestion_job_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_ingestion_job_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// CreateDataIngestionJobDetails **CreateDataIngestionJobDetails** -// The data to create a data ingestion job. +// CreateDataIngestionJobDetails The data to create a data ingestion job. type CreateDataIngestionJobDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent DataSource. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_source_details.go index 55156af8d24..9a69bffcd1d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_source_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_data_source_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// CreateDataSourceDetails **CreateDataSourceDetails** -// The data to create a data source. +// CreateDataSourceDetails The data to create a data source. type CreateDataSourceDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_knowledge_base_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_knowledge_base_details.go index dda845cfb05..98900f60f74 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_knowledge_base_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/create_knowledge_base_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// CreateKnowledgeBaseDetails **CreateKnowledgeBaseDetails** -// The data to create a knowledge base. +// CreateKnowledgeBaseDetails The data to create a knowledge base. type CreateKnowledgeBaseDetails struct { IndexConfig IndexConfig `mandatory:"true" json:"indexConfig"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job.go index 8ef0ea9b41a..55ca7b7d23b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJob **DataIngestionJob** -// When you create a data source, you specify the location of the data files. To make those files usable by an agent, you must download them into the agent's associated knowledge base, a process known as data ingestion. Data ingestion is a process that extracts data from data source documents, converts it into a structured format suitable for analysis, and then stores it in a knowledge base. +// DataIngestionJob When you create a data source, you specify the location of the data files. To make those files usable by an agent, you must download them into the agent's associated knowledge base, a process known as data ingestion. Data ingestion is a process that extracts data from data source documents, converts it into a structured format suitable for analysis, and then stores it in a knowledge base. // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type DataIngestionJob struct { @@ -60,6 +57,9 @@ type DataIngestionJob struct { // A user-friendly name. Does not have to be unique, and it's changeable. Description *string `mandatory:"false" json:"description"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the parent KnowledgeBase. + KnowledgeBaseId *string `mandatory:"false" json:"knowledgeBaseId"` + // The date and time the data ingestion job was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_collection.go index 99945f1d689..4eadd69ea49 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJobCollection **DataIngestionJobCollection** -// Results of a data ingestion job search. Contains both DataIngestionJobSummary items and other information, such as metadata. +// DataIngestionJobCollection Results of a data ingestion job search. Contains both DataIngestionJobSummary items and other information, such as metadata. type DataIngestionJobCollection struct { // List of data ingestion jobs. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_statistics.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_statistics.go index 96aaf025979..69e183a8596 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_statistics.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_statistics.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJobStatistics **DataIngestionJobStatistics** -// The statistics of data ingestion job. +// DataIngestionJobStatistics The statistics of data ingestion job. type DataIngestionJobStatistics struct { // The number of files that have failed during the ingestion. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_summary.go index 82122f253d5..77b2a5ae572 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_ingestion_job_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataIngestionJobSummary **DataIngestionJobSummary** -// Summary information about a data ingestion job. +// DataIngestionJobSummary Summary information about a data ingestion job. type DataIngestionJobSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data ingestion job. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source.go index f8bdb022e47..61a0061e316 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DataSource **DataSource** -// A data source points to the source of your data. After you add a data source to a knowledge base, you must ingest the data source's data, so that agents using the knowledge base can refer to the data. +// DataSource A data source points to the source of your data. After you add a data source to a knowledge base, you must ingest the data source's data, so that agents using the knowledge base can refer to the data. // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type DataSource struct { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_collection.go index 65f3e799a0d..580d8ea5ccb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataSourceCollection **DataSourceCollection** -// Results of a dataSource search. Contains both DataSourceSummary items and other information, such as metadata. +// DataSourceCollection Results of a dataSource search. Contains both DataSourceSummary items and other information, such as metadata. type DataSourceCollection struct { // List of data sources. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_config.go index 889ffc8b503..05b46340479 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,14 +20,17 @@ import ( "strings" ) -// DataSourceConfig **DataSourceConfig** -// The details of data source. +// DataSourceConfig The details of data source. type DataSourceConfig interface { + + // Flag to enable or disable multi modality such as image processing while ingestion of data. True enable the processing and false exclude the multi modality contents during ingestion. + GetShouldEnableMultiModality() *bool } type datasourceconfig struct { - JsonData []byte - DataSourceConfigType string `json:"dataSourceConfigType"` + JsonData []byte + ShouldEnableMultiModality *bool `mandatory:"false" json:"shouldEnableMultiModality"` + DataSourceConfigType string `json:"dataSourceConfigType"` } // UnmarshalJSON unmarshals json @@ -43,6 +44,7 @@ func (m *datasourceconfig) UnmarshalJSON(data []byte) error { if err != nil { return err } + m.ShouldEnableMultiModality = s.Model.ShouldEnableMultiModality m.DataSourceConfigType = s.Model.DataSourceConfigType return err @@ -67,6 +69,11 @@ func (m *datasourceconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } +// GetShouldEnableMultiModality returns ShouldEnableMultiModality +func (m datasourceconfig) GetShouldEnableMultiModality() *bool { + return m.ShouldEnableMultiModality +} + func (m datasourceconfig) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_summary.go index f978d0604c8..a93146bc4e9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/data_source_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DataSourceSummary **DataSourceSummary** -// Summary information about a data source. +// DataSourceSummary Summary information about a data source. type DataSourceSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data source. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_connection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_connection.go index eebf33fc140..09f39247767 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_connection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_connection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DatabaseConnection **DatabaseConnection** -// The connection type for Databases. +// DatabaseConnection The connection type for Databases. type DatabaseConnection interface { } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_function.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_function.go index 25cb86b767b..fcd2630c63d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_function.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_function.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// DatabaseFunction **DatabaseFunction** -// The details of Database function. +// DatabaseFunction The details of Database function. type DatabaseFunction struct { // The name of the Database function. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_tool_connection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_tool_connection.go index cf7c91b8070..38b0ba52d01 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_tool_connection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/database_tool_connection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DatabaseToolConnection **DatabaseToolConnection** -// The details of the customer Database Tools Connection. +// DatabaseToolConnection The details of the customer Database Tools Connection. type DatabaseToolConnection struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database Tools Connection. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/default_index_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/default_index_config.go index c29cf653ed5..f829508f979 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/default_index_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/default_index_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// DefaultIndexConfig **DefaultIndexConfig** -// The default index is service managed vector store on behalf of the customer. +// DefaultIndexConfig The default index is service managed vector store on behalf of the customer. type DefaultIndexConfig struct { // Whether to enable Hybrid search in service managed OpenSearch. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/generativeaiagent_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/generativeaiagent_client.go index ecb49257e64..f8c250d9b16 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/generativeaiagent_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/generativeaiagent_client.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -97,8 +95,7 @@ func (client *GenerativeAiAgentClient) ConfigurationProvider() *common.Configura return client.config } -// CancelWorkRequest **CancelWorkRequest** -// Cancels a work request. +// CancelWorkRequest Cancels a work request. // // # See also // @@ -156,8 +153,7 @@ func (client GenerativeAiAgentClient) cancelWorkRequest(ctx context.Context, req return response, err } -// ChangeAgentCompartment **ChangeAgentCompartment** -// Moves an agent into a different compartment within the same tenancy. For information about moving resources between +// ChangeAgentCompartment Moves an agent into a different compartment within the same tenancy. For information about moving resources between // compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // // # See also @@ -221,8 +217,7 @@ func (client GenerativeAiAgentClient) changeAgentCompartment(ctx context.Context return response, err } -// ChangeAgentEndpointCompartment **ChangeAgentEndpointCompartment** -// Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between +// ChangeAgentEndpointCompartment Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between // compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // // # See also @@ -286,8 +281,7 @@ func (client GenerativeAiAgentClient) changeAgentEndpointCompartment(ctx context return response, err } -// ChangeKnowledgeBaseCompartment **ChangeKnowledgeBaseCompartment** -// Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between +// ChangeKnowledgeBaseCompartment Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between // compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // // # See also @@ -351,8 +345,7 @@ func (client GenerativeAiAgentClient) changeKnowledgeBaseCompartment(ctx context return response, err } -// CreateAgent **CreateAgent** -// Creates an agent. +// CreateAgent Creates an agent. // // # See also // @@ -415,8 +408,7 @@ func (client GenerativeAiAgentClient) createAgent(ctx context.Context, request c return response, err } -// CreateAgentEndpoint **CreateAgentEndpoint** -// Creates an endpoint. +// CreateAgentEndpoint Creates an endpoint. // // # See also // @@ -479,8 +471,7 @@ func (client GenerativeAiAgentClient) createAgentEndpoint(ctx context.Context, r return response, err } -// CreateDataIngestionJob **CreateDataIngestionJob** -// Creates a data ingestion job. +// CreateDataIngestionJob Creates a data ingestion job. // // # See also // @@ -543,8 +534,7 @@ func (client GenerativeAiAgentClient) createDataIngestionJob(ctx context.Context return response, err } -// CreateDataSource **CreateDataSource** -// Creates a data source. +// CreateDataSource Creates a data source. // // # See also // @@ -607,8 +597,7 @@ func (client GenerativeAiAgentClient) createDataSource(ctx context.Context, requ return response, err } -// CreateKnowledgeBase **CreateKnowledgeBase** -// Creates a knowledge base. +// CreateKnowledgeBase Creates a knowledge base. // // # See also // @@ -671,8 +660,7 @@ func (client GenerativeAiAgentClient) createKnowledgeBase(ctx context.Context, r return response, err } -// DeleteAgent **DeleteAgent** -// Deletes an agent. +// DeleteAgent Deletes an agent. // // # See also // @@ -730,8 +718,7 @@ func (client GenerativeAiAgentClient) deleteAgent(ctx context.Context, request c return response, err } -// DeleteAgentEndpoint **DeleteAgentEndpoint** -// Deletes an endpoint. +// DeleteAgentEndpoint Deletes an endpoint. // // # See also // @@ -789,8 +776,7 @@ func (client GenerativeAiAgentClient) deleteAgentEndpoint(ctx context.Context, r return response, err } -// DeleteDataIngestionJob **DeleteDataIngestionJob** -// Deletes a data ingestion job. +// DeleteDataIngestionJob Deletes a data ingestion job. // // # See also // @@ -848,8 +834,7 @@ func (client GenerativeAiAgentClient) deleteDataIngestionJob(ctx context.Context return response, err } -// DeleteDataSource **DeleteDataSource** -// Deletes a data source. +// DeleteDataSource Deletes a data source. // // # See also // @@ -907,8 +892,7 @@ func (client GenerativeAiAgentClient) deleteDataSource(ctx context.Context, requ return response, err } -// DeleteKnowledgeBase **DeleteKnowledgeBase** -// Deletes a knowledge base. +// DeleteKnowledgeBase Deletes a knowledge base. // // # See also // @@ -966,8 +950,7 @@ func (client GenerativeAiAgentClient) deleteKnowledgeBase(ctx context.Context, r return response, err } -// GetAgent **GetAgent** -// Gets information about an agent. +// GetAgent Gets information about an agent. // // # See also // @@ -1025,8 +1008,7 @@ func (client GenerativeAiAgentClient) getAgent(ctx context.Context, request comm return response, err } -// GetAgentEndpoint **GetAgentEndpoint** -// Gets information about an endpoint. +// GetAgentEndpoint Gets information about an endpoint. // // # See also // @@ -1084,8 +1066,7 @@ func (client GenerativeAiAgentClient) getAgentEndpoint(ctx context.Context, requ return response, err } -// GetDataIngestionJob **GetDataIngestionJob** -// Gets information about a data ingestion job. +// GetDataIngestionJob Gets information about a data ingestion job. // // # See also // @@ -1143,8 +1124,7 @@ func (client GenerativeAiAgentClient) getDataIngestionJob(ctx context.Context, r return response, err } -// GetDataIngestionJobLogContent **GetDataIngestionJobLogContent** -// Returns the raw log file for the specified data ingestion job in text format. +// GetDataIngestionJobLogContent Returns the raw log file for the specified data ingestion job in text format. // // # See also // @@ -1201,8 +1181,7 @@ func (client GenerativeAiAgentClient) getDataIngestionJobLogContent(ctx context. return response, err } -// GetDataSource **GetDataSource** -// Gets information about a data source. +// GetDataSource Gets information about a data source. // // # See also // @@ -1260,8 +1239,7 @@ func (client GenerativeAiAgentClient) getDataSource(ctx context.Context, request return response, err } -// GetKnowledgeBase **GetKnowledgeBase** -// Gets information about a knowledge base. +// GetKnowledgeBase Gets information about a knowledge base. // // # See also // @@ -1319,8 +1297,7 @@ func (client GenerativeAiAgentClient) getKnowledgeBase(ctx context.Context, requ return response, err } -// GetWorkRequest **GetWorkRequest** -// Gets the details of a work request. +// GetWorkRequest Gets the details of a work request. // // # See also // @@ -1378,8 +1355,7 @@ func (client GenerativeAiAgentClient) getWorkRequest(ctx context.Context, reques return response, err } -// ListAgentEndpoints **ListAgentEndpoints** -// Gets a list of endpoints. +// ListAgentEndpoints Gets a list of endpoints. // // # See also // @@ -1437,8 +1413,7 @@ func (client GenerativeAiAgentClient) listAgentEndpoints(ctx context.Context, re return response, err } -// ListAgents **ListAgents** -// Gets a list of agents. +// ListAgents Gets a list of agents. // // # See also // @@ -1496,8 +1471,7 @@ func (client GenerativeAiAgentClient) listAgents(ctx context.Context, request co return response, err } -// ListDataIngestionJobs **ListDataIngestionJobs** -// Gets a list of data ingestion jobs. +// ListDataIngestionJobs Gets a list of data ingestion jobs. // // # See also // @@ -1555,8 +1529,7 @@ func (client GenerativeAiAgentClient) listDataIngestionJobs(ctx context.Context, return response, err } -// ListDataSources **ListDataSources** -// Gets a list of data sources. +// ListDataSources Gets a list of data sources. // // # See also // @@ -1614,8 +1587,7 @@ func (client GenerativeAiAgentClient) listDataSources(ctx context.Context, reque return response, err } -// ListKnowledgeBases **ListKnowledgeBases** -// Gets a list of knowledge bases. +// ListKnowledgeBases Gets a list of knowledge bases. // // # See also // @@ -1673,8 +1645,7 @@ func (client GenerativeAiAgentClient) listKnowledgeBases(ctx context.Context, re return response, err } -// ListWorkRequestErrors **ListWorkRequestErrors** -// Lists the errors for a work request. +// ListWorkRequestErrors Lists the errors for a work request. // // # See also // @@ -1732,8 +1703,7 @@ func (client GenerativeAiAgentClient) listWorkRequestErrors(ctx context.Context, return response, err } -// ListWorkRequestLogs **ListWorkRequestLogs** -// Lists the logs for a work request. +// ListWorkRequestLogs Lists the logs for a work request. // // # See also // @@ -1791,8 +1761,7 @@ func (client GenerativeAiAgentClient) listWorkRequestLogs(ctx context.Context, r return response, err } -// ListWorkRequests **ListWorkRequests** -// Lists the work requests in a compartment. +// ListWorkRequests Lists the work requests in a compartment. // // # See also // @@ -1850,8 +1819,7 @@ func (client GenerativeAiAgentClient) listWorkRequests(ctx context.Context, requ return response, err } -// UpdateAgent **UpdateAgent** -// Updates an agent. +// UpdateAgent Updates an agent. // // # See also // @@ -1909,8 +1877,7 @@ func (client GenerativeAiAgentClient) updateAgent(ctx context.Context, request c return response, err } -// UpdateAgentEndpoint **UpdateAgentEndpoint** -// Updates an endpoint. +// UpdateAgentEndpoint Updates an endpoint. // // # See also // @@ -1968,8 +1935,7 @@ func (client GenerativeAiAgentClient) updateAgentEndpoint(ctx context.Context, r return response, err } -// UpdateDataSource **UpdateDataSource** -// Updates a data source. +// UpdateDataSource Updates a data source. // // # See also // @@ -2027,8 +1993,7 @@ func (client GenerativeAiAgentClient) updateDataSource(ctx context.Context, requ return response, err } -// UpdateKnowledgeBase **UpdateKnowledgeBase** -// Updates a knowledge base. +// UpdateKnowledgeBase Updates a knowledge base. // // # See also // diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/idcs_secret.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/idcs_secret.go index 17990946db2..de690dd6413 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/idcs_secret.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/idcs_secret.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// IdcsSecret **IdcsSecret** -// The details of IDCS configured as OpenID setting in OpenSearch. +// IdcsSecret The details of IDCS configured as OpenID setting in OpenSearch. type IdcsSecret struct { // The URL represent authentication url of the IDCS. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index.go index 8d3f3646fa0..9c9900c3c4f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// Index **Index** -// OCI OpenSearch index details. +// Index OCI OpenSearch index details. type Index struct { // The index name in opensearch. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_config.go index f093cd15ffb..3a2eef2795f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// IndexConfig **IndexConfig** -// The index configuration of Knowledge bases. +// IndexConfig The index configuration of Knowledge bases. type IndexConfig interface { } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_schema.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_schema.go index 00672596db0..510a6714919 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_schema.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/index_schema.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// IndexSchema **IndexSchema** -// The index schema details. +// IndexSchema The index schema details. type IndexSchema struct { // Body key name. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base.go index 2faa8d70853..0c803c3fa40 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// KnowledgeBase **KnowledgeBase** -// A knowledge base is the base for all the data sources that an agent can use to retrieve information for its responses. +// KnowledgeBase A knowledge base is the base for all the data sources that an agent can use to retrieve information for its responses. // To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies (https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). type KnowledgeBase struct { @@ -58,6 +55,8 @@ type KnowledgeBase struct { // A description of the knowledge base. Description *string `mandatory:"false" json:"description"` + KnowledgeBaseStatistics *KnowledgeBaseStatistics `mandatory:"false" json:"knowledgeBaseStatistics"` + // The date and time the knowledge base was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` @@ -93,18 +92,19 @@ func (m KnowledgeBase) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *KnowledgeBase) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - LifecycleDetails *string `json:"lifecycleDetails"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - Id *string `json:"id"` - DisplayName *string `json:"displayName"` - CompartmentId *string `json:"compartmentId"` - IndexConfig indexconfig `json:"indexConfig"` - TimeCreated *common.SDKTime `json:"timeCreated"` - LifecycleState KnowledgeBaseLifecycleStateEnum `json:"lifecycleState"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Description *string `json:"description"` + KnowledgeBaseStatistics *KnowledgeBaseStatistics `json:"knowledgeBaseStatistics"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + IndexConfig indexconfig `json:"indexConfig"` + TimeCreated *common.SDKTime `json:"timeCreated"` + LifecycleState KnowledgeBaseLifecycleStateEnum `json:"lifecycleState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` }{} e = json.Unmarshal(data, &model) @@ -114,6 +114,8 @@ func (m *KnowledgeBase) UnmarshalJSON(data []byte) (e error) { var nn interface{} m.Description = model.Description + m.KnowledgeBaseStatistics = model.KnowledgeBaseStatistics + m.TimeUpdated = model.TimeUpdated m.LifecycleDetails = model.LifecycleDetails diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_collection.go index 9b89b2c538a..7e7fab28d16 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// KnowledgeBaseCollection **KnowledgeBaseCollection** -// Results of a knowledge base search. Contains both KnowledgeBaseSummary items and other information, such as metadata. +// KnowledgeBaseCollection Results of a knowledge base search. Contains both KnowledgeBaseSummary items and other information, such as metadata. type KnowledgeBaseCollection struct { // List of knowledge bases. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_statistics.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_statistics.go new file mode 100644 index 00000000000..0b021789c8f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_statistics.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Generative AI Agents Management API +// +// OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. +// OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. +// Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. +// For creating and managing client chat sessions see the /EN/generative-ai-agents-client/latest/. +// To learn more about the service, see the Generative AI Agents documentation (https://docs.cloud.oracle.com/iaas/Content/generative-ai-agents/home.htm). +// + +package generativeaiagent + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KnowledgeBaseStatistics Statistics for Default Knowledge Base. +type KnowledgeBaseStatistics struct { + + // Knowledge Base size in bytes. + SizeInBytes *int `mandatory:"false" json:"sizeInBytes"` +} + +func (m KnowledgeBaseStatistics) 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 KnowledgeBaseStatistics) 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/generativeaiagent/knowledge_base_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_summary.go index 74ef0957f05..acf1e7dc903 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/knowledge_base_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// KnowledgeBaseSummary **KnowledgeBaseSummary** -// Summary information about a knowledge base. +// KnowledgeBaseSummary Summary information about a knowledge base. type KnowledgeBaseSummary struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the knowledge base. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/object_storage_prefix.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/object_storage_prefix.go index e2efd2ff88d..f67351277ac 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/object_storage_prefix.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/object_storage_prefix.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// ObjectStoragePrefix **ObjectStoragePrefix** -// The details of OCI Object Storage object. +// ObjectStoragePrefix The details of OCI Object Storage object. type ObjectStoragePrefix struct { // The namespace name of an object. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_database_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_database_config.go index 78b545262c7..19c79bbc3c9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_database_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_database_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// OciDatabaseConfig **OciDatabaseConfig** -// The details of the customer Database Connection. +// OciDatabaseConfig The details of the customer Database Connection. type OciDatabaseConfig struct { DatabaseConnection DatabaseConnection `mandatory:"true" json:"databaseConnection"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_object_storage_data_source_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_object_storage_data_source_config.go index b2d2f2f0698..b6b210447e8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_object_storage_data_source_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_object_storage_data_source_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,12 +20,19 @@ import ( "strings" ) -// OciObjectStorageDataSourceConfig **OciObjectStorageDataSourceConfig** -// The details of OCI Search with OpenSearch data source information. +// OciObjectStorageDataSourceConfig The details of OCI Search with OpenSearch data source information. type OciObjectStorageDataSourceConfig struct { + // Flag to enable or disable multi modality such as image processing while ingestion of data. True enable the processing and false exclude the multi modality contents during ingestion. + ShouldEnableMultiModality *bool `mandatory:"false" json:"shouldEnableMultiModality"` + // The locations of data items in Object Storage, can either be an object (File) or a prefix (folder). - ObjectStoragePrefixes []ObjectStoragePrefix `mandatory:"true" json:"objectStoragePrefixes"` + ObjectStoragePrefixes []ObjectStoragePrefix `mandatory:"false" json:"objectStoragePrefixes"` +} + +// GetShouldEnableMultiModality returns ShouldEnableMultiModality +func (m OciObjectStorageDataSourceConfig) GetShouldEnableMultiModality() *bool { + return m.ShouldEnableMultiModality } func (m OciObjectStorageDataSourceConfig) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_open_search_index_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_open_search_index_config.go index a5a01a4f5a7..4ba9a6ccdcf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_open_search_index_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/oci_open_search_index_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// OciOpenSearchIndexConfig **OciOpenSearchIndexConfig** -// The details of customer managed OCI OpenSearch. +// OciOpenSearchIndexConfig The details of customer managed OCI OpenSearch. type OciOpenSearchIndexConfig struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the OpenSearch Cluster. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_status.go index 3a8fc0e8c0f..511b4efbbef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_status.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_status.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_type.go index ee7c264b25f..063190bdd09 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/operation_type.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -41,6 +39,9 @@ const ( OperationTypeMoveKnowledgeBase OperationTypeEnum = "MOVE_KNOWLEDGE_BASE" OperationTypeCreateDataIngestionJob OperationTypeEnum = "CREATE_DATA_INGESTION_JOB" OperationTypeDeleteDataIngestionJob OperationTypeEnum = "DELETE_DATA_INGESTION_JOB" + OperationTypeCreateTool OperationTypeEnum = "CREATE_TOOL" + OperationTypeUpdateTool OperationTypeEnum = "UPDATE_TOOL" + OperationTypeDeleteTool OperationTypeEnum = "DELETE_TOOL" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -61,6 +62,9 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "MOVE_KNOWLEDGE_BASE": OperationTypeMoveKnowledgeBase, "CREATE_DATA_INGESTION_JOB": OperationTypeCreateDataIngestionJob, "DELETE_DATA_INGESTION_JOB": OperationTypeDeleteDataIngestionJob, + "CREATE_TOOL": OperationTypeCreateTool, + "UPDATE_TOOL": OperationTypeUpdateTool, + "DELETE_TOOL": OperationTypeDeleteTool, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -81,6 +85,9 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "move_knowledge_base": OperationTypeMoveKnowledgeBase, "create_data_ingestion_job": OperationTypeCreateDataIngestionJob, "delete_data_ingestion_job": OperationTypeDeleteDataIngestionJob, + "create_tool": OperationTypeCreateTool, + "update_tool": OperationTypeUpdateTool, + "delete_tool": OperationTypeDeleteTool, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -112,6 +119,9 @@ func GetOperationTypeEnumStringValues() []string { "MOVE_KNOWLEDGE_BASE", "CREATE_DATA_INGESTION_JOB", "DELETE_DATA_INGESTION_JOB", + "CREATE_TOOL", + "UPDATE_TOOL", + "DELETE_TOOL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/secret_detail.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/secret_detail.go index c413e7868c2..f98e90fb1ac 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/secret_detail.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/secret_detail.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// SecretDetail **SecretDetail** -// The details of configured security configuration on OpenSearch. +// SecretDetail The details of configured security configuration on OpenSearch. type SecretDetail interface { } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/session_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/session_config.go index 554e302292f..e5f9e4ef804 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/session_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/session_config.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// SessionConfig **SessionConfig** -// Session Configuration on AgentEndpoint. +// SessionConfig Session Configuration on AgentEndpoint. type SessionConfig struct { // The session will become inactive after this timeout. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/sort_order.go index a64222411dd..2c77773c9c1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/sort_order.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/sort_order.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_details.go index 4136e2d1f67..5117bfbbb2b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// UpdateAgentDetails **UpdateAgentDetails** -// The data to update an agent. +// UpdateAgentDetails The data to update an agent. type UpdateAgentDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_endpoint_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_endpoint_details.go index 77da636d60f..667a9387eca 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_endpoint_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_agent_endpoint_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// UpdateAgentEndpointDetails **UpdateAgentEndpointDetails** -// The data to update an endpoint. +// UpdateAgentEndpointDetails The data to update an endpoint. type UpdateAgentEndpointDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_data_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_data_source_details.go index 1378556d8ad..bbedc26f0d4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_data_source_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_data_source_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// UpdateDataSourceDetails **UpdateDataSourceDetails** -// The data to update a data source. +// UpdateDataSourceDetails The data to update a data source. type UpdateDataSourceDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_knowledge_base_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_knowledge_base_details.go index 3fdf432527e..adc3b944c0c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_knowledge_base_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/update_knowledge_base_details.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -22,8 +20,7 @@ import ( "strings" ) -// UpdateKnowledgeBaseDetails **UpdateKnowledgeBaseDetails** -// The data to update a knowledge base. +// UpdateKnowledgeBaseDetails The data to update a knowledge base. type UpdateKnowledgeBaseDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request.go index d0f3ed91f9c..6ab40d8ec6f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequest **WorkRequest** -// An asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, +// WorkRequest An asynchronous work request. Work requests help you monitor long-running operations. When you start a long-running operation, // the service creates a work request. A work request is an activity log that lets you track each step in the operation's // progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. type WorkRequest struct { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error.go index 65bd929f303..9ed9bece241 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestError **WorkRequestError** -// An error encountered while performing an operation that is tracked by a work request. +// WorkRequestError An error encountered while performing an operation that is tracked by a work request. type WorkRequestError struct { // A machine-usable code for the error that occurred. For a list of error codes, see diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error_collection.go index c1cf0f8ea8f..c9ce24c5881 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_error_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestErrorCollection **WorkRequestErrorCollection** -// A list of work request errors. Can contain both errors and other information, such as metadata. +// WorkRequestErrorCollection A list of work request errors. Can contain both errors and other information, such as metadata. type WorkRequestErrorCollection struct { // A list of work request errors. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry.go index 06cc29763c0..81b1e90927e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestLogEntry **WorkRequestLogEntry** -// A log message from performing an operation that is tracked by a work request. +// WorkRequestLogEntry A log message from performing an operation that is tracked by a work request. type WorkRequestLogEntry struct { // A human-readable log message. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry_collection.go index a67c49dc10d..9dec3fc782b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_log_entry_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestLogEntryCollection **WorkRequestLogEntryCollection** -// A list of work request logs. Can contain both logs and other information, such as metadata. +// WorkRequestLogEntryCollection A list of work request logs. Can contain both logs and other information, such as metadata. type WorkRequestLogEntryCollection struct { // A list of work request log entries. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource.go index 9bca2f0f3c9..0575c19e5b0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestResource **WorkRequestResource** -// A resource created or operated on by a work request. +// WorkRequestResource A resource created or operated on by a work request. type WorkRequestResource struct { // The resource type that the work request affects. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource_metadata_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource_metadata_key.go index f83421e9646..b4033fabc74 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource_metadata_key.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_resource_metadata_key.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary.go index 737d37d493e..bfdfe9e7f23 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestSummary **WorkRequestSummary** -// Summary information about an asynchronous work request. +// WorkRequestSummary Summary information about an asynchronous work request. type WorkRequestSummary struct { // The asynchronous operation tracked by this work request. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary_collection.go index 2a5049c55ef..657748adee2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeaiagent/work_request_summary_collection.go @@ -4,8 +4,6 @@ // Generative AI Agents Management API // -// **Generative AI Agents API** -// // OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient. // OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API. // Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests. @@ -21,8 +19,7 @@ import ( "strings" ) -// WorkRequestSummaryCollection **WorkRequestSummaryCollection** -// A list of work requests. Can contain both work requests and other information, such as metadata. +// WorkRequestSummaryCollection A list of work requests. Can contain both work requests and other information, such as metadata. type WorkRequestSummaryCollection struct { // A list of work requests. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/change_pipeline_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/change_pipeline_compartment_details.go new file mode 100644 index 00000000000..96785e188e3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/change_pipeline_compartment_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangePipelineCompartmentDetails The new compartment for a Pipeline. +type ChangePipelineCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangePipelineCompartmentDetails) 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 ChangePipelineCompartmentDetails) 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/goldengate/change_pipeline_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/change_pipeline_compartment_request_response.go new file mode 100644 index 00000000000..811b1fa32c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/change_pipeline_compartment_request_response.go @@ -0,0 +1,109 @@ +// 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 goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangePipelineCompartmentRequest wrapper for the ChangePipelineCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ChangePipelineCompartment.go.html to see an example of how to use ChangePipelineCompartmentRequest. +type ChangePipelineCompartmentRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Properties to change the compartment of a Pipeline. + ChangePipelineCompartmentDetails `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 is 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"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is 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 ChangePipelineCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangePipelineCompartmentRequest) 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 ChangePipelineCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangePipelineCompartmentRequest) 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 ChangePipelineCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangePipelineCompartmentResponse wrapper for the ChangePipelineCompartment operation +type ChangePipelineCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangePipelineCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangePipelineCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_mysql_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_mysql_connection_details.go index 2a98a4a4f5e..f2ec7751b3c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_mysql_connection_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_mysql_connection_details.go @@ -95,7 +95,7 @@ type CreateMysqlConnectionDetails struct { // containing the client public key (for 2-way SSL). SslCert *string `mandatory:"false" json:"sslCert"` - // Client Key – The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). + // Client Key - The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). SslKey *string `mandatory:"false" json:"sslKey"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_pipeline_details.go new file mode 100644 index 00000000000..b45fcf14e8a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_pipeline_details.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePipelineDetails Details with which to create a pipeline. +type CreatePipelineDetails interface { + + // An object's Display Name. + GetDisplayName() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + GetCompartmentId() *string + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + GetSourceConnectionDetails() *SourcePipelineConnectionDetails + + GetTargetConnectionDetails() *TargetPipelineConnectionDetails + + // Metadata about this specific object. + GetDescription() *string + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // Locks associated with this resource. + GetLocks() []ResourceLock +} + +type createpipelinedetails struct { + JsonData []byte + Description *string `mandatory:"false" json:"description"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + Locks []ResourceLock `mandatory:"false" json:"locks"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *createpipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreatepipelinedetails createpipelinedetails + s := struct { + Model Unmarshalercreatepipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.DisplayName = s.Model.DisplayName + m.CompartmentId = s.Model.CompartmentId + m.LicenseModel = s.Model.LicenseModel + m.SourceConnectionDetails = s.Model.SourceConnectionDetails + m.TargetConnectionDetails = s.Model.TargetConnectionDetails + m.Description = s.Model.Description + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.Locks = s.Model.Locks + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createpipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := CreateZeroEtlPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CreatePipelineDetails: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDescription returns Description +func (m createpipelinedetails) GetDescription() *string { + return m.Description +} + +// GetFreeformTags returns FreeformTags +func (m createpipelinedetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m createpipelinedetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetLocks returns Locks +func (m createpipelinedetails) GetLocks() []ResourceLock { + return m.Locks +} + +// GetDisplayName returns DisplayName +func (m createpipelinedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m createpipelinedetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m createpipelinedetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m createpipelinedetails) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m createpipelinedetails) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +func (m createpipelinedetails) 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 createpipelinedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + + 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/goldengate/create_pipeline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_pipeline_request_response.go new file mode 100644 index 00000000000..1e89662a035 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_pipeline_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePipelineRequest wrapper for the CreatePipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/CreatePipeline.go.html to see an example of how to use CreatePipelineRequest. +type CreatePipelineRequest struct { + + // Specification of the pipeline to create. + CreatePipelineDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePipelineRequest) 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 CreatePipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePipelineRequest) 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 CreatePipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePipelineResponse wrapper for the CreatePipeline operation +type CreatePipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Pipeline instance + Pipeline `presentIn:"body"` + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include 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 CreatePipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_zero_etl_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_zero_etl_pipeline_details.go new file mode 100644 index 00000000000..3751a16d87a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/create_zero_etl_pipeline_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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateZeroEtlPipelineDetails Creation details for a new ZeroETL pipeline. +type CreateZeroEtlPipelineDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined 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"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + + ProcessOptions *ProcessOptions `mandatory:"false" json:"processOptions"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` +} + +// GetDisplayName returns DisplayName +func (m CreateZeroEtlPipelineDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m CreateZeroEtlPipelineDetails) GetDescription() *string { + return m.Description +} + +// GetCompartmentId returns CompartmentId +func (m CreateZeroEtlPipelineDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m CreateZeroEtlPipelineDetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetFreeformTags returns FreeformTags +func (m CreateZeroEtlPipelineDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateZeroEtlPipelineDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetLocks returns Locks +func (m CreateZeroEtlPipelineDetails) GetLocks() []ResourceLock { + return m.Locks +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m CreateZeroEtlPipelineDetails) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m CreateZeroEtlPipelineDetails) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +func (m CreateZeroEtlPipelineDetails) 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 CreateZeroEtlPipelineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateZeroEtlPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateZeroEtlPipelineDetails CreateZeroEtlPipelineDetails + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeCreateZeroEtlPipelineDetails + }{ + "ZERO_ETL", + (MarshalTypeCreateZeroEtlPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_start_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_start_pipeline_details.go new file mode 100644 index 00000000000..cbb6eed218a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_start_pipeline_details.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultStartPipelineDetails Attribute details for a default pipeline start. +type DefaultStartPipelineDetails struct { +} + +func (m DefaultStartPipelineDetails) 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 DefaultStartPipelineDetails) 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 DefaultStartPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDefaultStartPipelineDetails DefaultStartPipelineDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDefaultStartPipelineDetails + }{ + "DEFAULT", + (MarshalTypeDefaultStartPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_stop_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_stop_pipeline_details.go new file mode 100644 index 00000000000..a5b11b65cbe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_stop_pipeline_details.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultStopPipelineDetails Attribute details for a default pipeline stop. +type DefaultStopPipelineDetails struct { +} + +func (m DefaultStopPipelineDetails) 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 DefaultStopPipelineDetails) 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 DefaultStopPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDefaultStopPipelineDetails DefaultStopPipelineDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDefaultStopPipelineDetails + }{ + "DEFAULT", + (MarshalTypeDefaultStopPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_test_pipeline_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_test_pipeline_connection_details.go new file mode 100644 index 00000000000..f245a28ad44 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/default_test_pipeline_connection_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultTestPipelineConnectionDetails Additional attribute with which to test the pipeline's connection. The connectionId must be one of the pipeline's assigned connections. +type DefaultTestPipelineConnectionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + ConnectionId *string `mandatory:"true" json:"connectionId"` +} + +func (m DefaultTestPipelineConnectionDetails) 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 DefaultTestPipelineConnectionDetails) 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 DefaultTestPipelineConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDefaultTestPipelineConnectionDetails DefaultTestPipelineConnectionDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDefaultTestPipelineConnectionDetails + }{ + "DEFAULT", + (MarshalTypeDefaultTestPipelineConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/delete_pipeline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/delete_pipeline_request_response.go new file mode 100644 index 00000000000..64fd432b81e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/delete_pipeline_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePipelineRequest wrapper for the DeletePipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/DeletePipeline.go.html to see an example of how to use DeletePipelineRequest. +type DeletePipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // 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 is 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"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // 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 DeletePipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePipelineRequest) 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 DeletePipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePipelineRequest) 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 DeletePipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePipelineResponse wrapper for the DeletePipeline operation +type DeletePipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/get_pipeline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/get_pipeline_request_response.go new file mode 100644 index 00000000000..2c7e7699154 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/get_pipeline_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPipelineRequest wrapper for the GetPipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/GetPipeline.go.html to see an example of how to use GetPipelineRequest. +type GetPipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // 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 GetPipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPipelineRequest) 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 GetPipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPipelineRequest) 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 GetPipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPipelineResponse wrapper for the GetPipeline operation +type GetPipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Pipeline instance + Pipeline `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/goldengate_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/goldengate_client.go index 726f0a835aa..ce966fe2b78 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/goldengate_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/goldengate_client.go @@ -714,6 +714,72 @@ func (client GoldenGateClient) changeDeploymentCompartment(ctx context.Context, return response, err } +// ChangePipelineCompartment Moves the Pipeline into a different compartment within the same tenancy. When +// provided, If-Match is checked against ETag values of the resource. For information about +// moving resources between compartments, see Moving Resources Between +// Compartments (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ChangePipelineCompartment.go.html to see an example of how to use ChangePipelineCompartment API. +// A default retry strategy applies to this operation ChangePipelineCompartment() +func (client GoldenGateClient) ChangePipelineCompartment(ctx context.Context, request ChangePipelineCompartmentRequest) (response ChangePipelineCompartmentResponse, 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.changePipelineCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangePipelineCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangePipelineCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangePipelineCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangePipelineCompartmentResponse") + } + return +} + +// changePipelineCompartment implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) changePipelineCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangePipelineCompartmentResponse + 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/goldengate/20200407/Pipeline/ChangePipelineCompartment" + err = common.PostProcessServiceError(err, "GoldenGate", "ChangePipelineCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CollectDeploymentDiagnostic Collects the diagnostic of a Deployment. When provided, If-Match is checked against ETag values of the resource. // // # See also @@ -1219,6 +1285,69 @@ func (client GoldenGateClient) createDeploymentBackup(ctx context.Context, reque return response, err } +// CreatePipeline Creates a new Pipeline. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/CreatePipeline.go.html to see an example of how to use CreatePipeline API. +// A default retry strategy applies to this operation CreatePipeline() +func (client GoldenGateClient) CreatePipeline(ctx context.Context, request CreatePipelineRequest) (response CreatePipelineResponse, 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.createPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePipelineResponse") + } + return +} + +// createPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) createPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePipelineResponse + 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/goldengate/20200407/Pipeline/CreatePipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "CreatePipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &pipeline{}) + return response, err +} + // DeleteCertificate Deletes the certificate from truststore. // // # See also @@ -1568,6 +1697,64 @@ func (client GoldenGateClient) deleteDeploymentBackup(ctx context.Context, reque return response, err } +// DeletePipeline Deletes a Pipeline. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/DeletePipeline.go.html to see an example of how to use DeletePipeline API. +// A default retry strategy applies to this operation DeletePipeline() +func (client GoldenGateClient) DeletePipeline(ctx context.Context, request DeletePipelineRequest) (response DeletePipelineResponse, 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.deletePipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePipelineResponse") + } + return +} + +// deletePipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) deletePipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/pipelines/{pipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePipelineResponse + 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/goldengate/20200407/Pipeline/DeletePipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "DeletePipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeploymentWalletExists Checks if a wallet is already present in the deployment. When provided, If-Match is checked against ETag values of the resource. // // # See also @@ -2164,6 +2351,64 @@ func (client GoldenGateClient) getDeploymentUpgrade(ctx context.Context, request return response, err } +// GetPipeline Retrieves a Pipeline details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/GetPipeline.go.html to see an example of how to use GetPipeline API. +// A default retry strategy applies to this operation GetPipeline() +func (client GoldenGateClient) GetPipeline(ctx context.Context, request GetPipelineRequest) (response GetPipelineResponse, 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.getPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPipelineResponse") + } + return +} + +// getPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) getPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPipelineResponse + 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/goldengate/20200407/Pipeline/GetPipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "GetPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &pipeline{}) + return response, err +} + // GetWorkRequest Retrieve the WorkRequest identified by the given OCID. // // # See also @@ -2982,13 +3227,13 @@ func (client GoldenGateClient) listMessages(ctx context.Context, request common. return response, err } -// ListTrailFiles Lists the TrailFiles for a deployment. Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// ListPipelineInitializationSteps Retrieves a Pipeline recipe steps and its progress details. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailFiles.go.html to see an example of how to use ListTrailFiles API. -// A default retry strategy applies to this operation ListTrailFiles() -func (client GoldenGateClient) ListTrailFiles(ctx context.Context, request ListTrailFilesRequest) (response ListTrailFilesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineInitializationSteps.go.html to see an example of how to use ListPipelineInitializationSteps API. +// A default retry strategy applies to this operation ListPipelineInitializationSteps() +func (client GoldenGateClient) ListPipelineInitializationSteps(ctx context.Context, request ListPipelineInitializationStepsRequest) (response ListPipelineInitializationStepsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -2997,42 +3242,42 @@ func (client GoldenGateClient) ListTrailFiles(ctx context.Context, request ListT if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listTrailFiles, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineInitializationSteps, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListTrailFilesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineInitializationStepsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListTrailFilesResponse{} + response = ListPipelineInitializationStepsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListTrailFilesResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineInitializationStepsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListTrailFilesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineInitializationStepsResponse") } return } -// listTrailFiles implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listTrailFiles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineInitializationSteps implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineInitializationSteps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailFiles", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/initializationSteps", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListTrailFilesResponse + var response ListPipelineInitializationStepsResponse 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/goldengate/20200407/TrailFileSummary/ListTrailFiles" - err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailFiles", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineInitializationSteps" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineInitializationSteps", apiReferenceLink) return response, err } @@ -3040,13 +3285,13 @@ func (client GoldenGateClient) listTrailFiles(ctx context.Context, request commo return response, err } -// ListTrailSequences Lists the Trail Sequences for a TrailFile in a given deployment. Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// ListPipelineRunningProcesses Retrieves a Pipeline's running replication process's status like extracts/replicats. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailSequences.go.html to see an example of how to use ListTrailSequences API. -// A default retry strategy applies to this operation ListTrailSequences() -func (client GoldenGateClient) ListTrailSequences(ctx context.Context, request ListTrailSequencesRequest) (response ListTrailSequencesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineRunningProcesses.go.html to see an example of how to use ListPipelineRunningProcesses API. +// A default retry strategy applies to this operation ListPipelineRunningProcesses() +func (client GoldenGateClient) ListPipelineRunningProcesses(ctx context.Context, request ListPipelineRunningProcessesRequest) (response ListPipelineRunningProcessesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3055,42 +3300,42 @@ func (client GoldenGateClient) ListTrailSequences(ctx context.Context, request L if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listTrailSequences, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineRunningProcesses, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListTrailSequencesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineRunningProcessesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListTrailSequencesResponse{} + response = ListPipelineRunningProcessesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListTrailSequencesResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineRunningProcessesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListTrailSequencesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineRunningProcessesResponse") } return } -// listTrailSequences implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listTrailSequences(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineRunningProcesses implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineRunningProcesses(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailSequences", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/runningProcesses", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListTrailSequencesResponse + var response ListPipelineRunningProcessesResponse 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/goldengate/20200407/TrailSequenceSummary/ListTrailSequences" - err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailSequences", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineRunningProcesses" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineRunningProcesses", apiReferenceLink) return response, err } @@ -3098,13 +3343,13 @@ func (client GoldenGateClient) listTrailSequences(ctx context.Context, request c return response, err } -// ListWorkRequestErrors Lists work request errors. +// ListPipelineSchemaTables Returns an array of tables under the given schemas of the pipeline for given source and target schemas passed as query params. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. -// A default retry strategy applies to this operation ListWorkRequestErrors() -func (client GoldenGateClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemaTables.go.html to see an example of how to use ListPipelineSchemaTables API. +// A default retry strategy applies to this operation ListPipelineSchemaTables() +func (client GoldenGateClient) ListPipelineSchemaTables(ctx context.Context, request ListPipelineSchemaTablesRequest) (response ListPipelineSchemaTablesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3113,42 +3358,42 @@ func (client GoldenGateClient) ListWorkRequestErrors(ctx context.Context, reques if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineSchemaTables, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineSchemaTablesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestErrorsResponse{} + response = ListPipelineSchemaTablesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineSchemaTablesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineSchemaTablesResponse") } return } -// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineSchemaTables implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineSchemaTables(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/schemaTables", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestErrorsResponse + var response ListPipelineSchemaTablesResponse 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/goldengate/20200407/WorkRequestError/ListWorkRequestErrors" - err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestErrors", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineSchemaTables" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineSchemaTables", apiReferenceLink) return response, err } @@ -3156,13 +3401,13 @@ func (client GoldenGateClient) listWorkRequestErrors(ctx context.Context, reques return response, err } -// ListWorkRequestLogs Lists work request logs. +// ListPipelineSchemas Returns an array of schemas based on mapping rules for a pipeline. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. -// A default retry strategy applies to this operation ListWorkRequestLogs() -func (client GoldenGateClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemas.go.html to see an example of how to use ListPipelineSchemas API. +// A default retry strategy applies to this operation ListPipelineSchemas() +func (client GoldenGateClient) ListPipelineSchemas(ctx context.Context, request ListPipelineSchemasRequest) (response ListPipelineSchemasResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3171,42 +3416,42 @@ func (client GoldenGateClient) ListWorkRequestLogs(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelineSchemas, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelineSchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestLogsResponse{} + response = ListPipelineSchemasResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelineSchemasResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelineSchemasResponse") } return } -// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelineSchemas implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelineSchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines/{pipelineId}/schemas", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestLogsResponse + var response ListPipelineSchemasResponse 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/goldengate/20200407/WorkRequestLogEntry/ListWorkRequestLogs" - err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestLogs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelineSchemas" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelineSchemas", apiReferenceLink) return response, err } @@ -3214,13 +3459,13 @@ func (client GoldenGateClient) listWorkRequestLogs(ctx context.Context, request return response, err } -// ListWorkRequests Lists the work requests in the compartment. +// ListPipelines Lists the Pipelines in the compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. -// A default retry strategy applies to this operation ListWorkRequests() -func (client GoldenGateClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelines.go.html to see an example of how to use ListPipelines API. +// A default retry strategy applies to this operation ListPipelines() +func (client GoldenGateClient) ListPipelines(ctx context.Context, request ListPipelinesRequest) (response ListPipelinesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3229,42 +3474,392 @@ func (client GoldenGateClient) ListWorkRequests(ctx context.Context, request Lis if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + ociResponse, err = common.Retry(ctx, request, client.listPipelines, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPipelinesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestsResponse{} + response = ListPipelinesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + if convertedResponse, ok := ociResponse.(ListPipelinesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPipelinesResponse") } return } -// listWorkRequests implements the OCIOperation interface (enables retrying operations) -func (client GoldenGateClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPipelines implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listPipelines(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/pipelines", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestsResponse + var response ListPipelinesResponse 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/goldengate/20200407/WorkRequest/ListWorkRequests" - err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequests", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/Pipeline/ListPipelines" + err = common.PostProcessServiceError(err, "GoldenGate", "ListPipelines", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListRecipes Returns an array of Recipe Summary. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListRecipes.go.html to see an example of how to use ListRecipes API. +// A default retry strategy applies to this operation ListRecipes() +func (client GoldenGateClient) ListRecipes(ctx context.Context, request ListRecipesRequest) (response ListRecipesResponse, 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.listRecipes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListRecipesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListRecipesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListRecipesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListRecipesResponse") + } + return +} + +// listRecipes implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listRecipes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/recipes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListRecipesResponse + 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/goldengate/20200407/RecipeSummaryCollection/ListRecipes" + err = common.PostProcessServiceError(err, "GoldenGate", "ListRecipes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTrailFiles Lists the TrailFiles for a deployment. +// Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailFiles.go.html to see an example of how to use ListTrailFiles API. +// A default retry strategy applies to this operation ListTrailFiles() +func (client GoldenGateClient) ListTrailFiles(ctx context.Context, request ListTrailFilesRequest) (response ListTrailFilesResponse, 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.listTrailFiles, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListTrailFilesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListTrailFilesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListTrailFilesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTrailFilesResponse") + } + return +} + +// listTrailFiles implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listTrailFiles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailFiles", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListTrailFilesResponse + 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/goldengate/20200407/TrailFileSummary/ListTrailFiles" + err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailFiles", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListTrailSequences Lists the Trail Sequences for a TrailFile in a given deployment. +// Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListTrailSequences.go.html to see an example of how to use ListTrailSequences API. +// A default retry strategy applies to this operation ListTrailSequences() +func (client GoldenGateClient) ListTrailSequences(ctx context.Context, request ListTrailSequencesRequest) (response ListTrailSequencesResponse, 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.listTrailSequences, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListTrailSequencesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListTrailSequencesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListTrailSequencesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListTrailSequencesResponse") + } + return +} + +// listTrailSequences implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listTrailSequences(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/trailSequences", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListTrailSequencesResponse + 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/goldengate/20200407/TrailSequenceSummary/ListTrailSequences" + err = common.PostProcessServiceError(err, "GoldenGate", "ListTrailSequences", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Lists work request errors. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client GoldenGateClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequestError/ListWorkRequestErrors" + err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Lists work request logs. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client GoldenGateClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequestLogEntry/ListWorkRequestLogs" + err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in the compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client GoldenGateClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/goldengate/20200407/WorkRequest/ListWorkRequests" + err = common.PostProcessServiceError(err, "GoldenGate", "ListWorkRequests", apiReferenceLink) return response, err } @@ -3819,6 +4414,69 @@ func (client GoldenGateClient) startDeployment(ctx context.Context, request comm return response, err } +// StartPipeline Starts the pipeline for data replication. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StartPipeline.go.html to see an example of how to use StartPipeline API. +// A default retry strategy applies to this operation StartPipeline() +func (client GoldenGateClient) StartPipeline(ctx context.Context, request StartPipelineRequest) (response StartPipelineResponse, 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.startPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StartPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StartPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StartPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StartPipelineResponse") + } + return +} + +// startPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) startPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/start", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response StartPipelineResponse + 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/goldengate/20200407/Pipeline/StartPipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "StartPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // StopDeployment Stops a Deployment. When provided, If-Match is checked against ETag values of the resource. // // # See also @@ -3882,6 +4540,69 @@ func (client GoldenGateClient) stopDeployment(ctx context.Context, request commo return response, err } +// StopPipeline Stops the pipeline for data replication. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StopPipeline.go.html to see an example of how to use StopPipeline API. +// A default retry strategy applies to this operation StopPipeline() +func (client GoldenGateClient) StopPipeline(ctx context.Context, request StopPipelineRequest) (response StopPipelineResponse, 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.stopPipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StopPipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StopPipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StopPipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StopPipelineResponse") + } + return +} + +// stopPipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) stopPipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/stop", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response StopPipelineResponse + 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/goldengate/20200407/Pipeline/StopPipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "StopPipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // TestConnectionAssignment Tests the connectivity between given GoldenGate deployment and one of the associated database / service. // When provided, If-Match is checked against ETag values of the resource. // @@ -3946,6 +4667,70 @@ func (client GoldenGateClient) testConnectionAssignment(ctx context.Context, req return response, err } +// TestPipelineConnection Tests pipeline connections against pipeline to verify the connectivity. +// 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/goldengate/TestPipelineConnection.go.html to see an example of how to use TestPipelineConnection API. +// A default retry strategy applies to this operation TestPipelineConnection() +func (client GoldenGateClient) TestPipelineConnection(ctx context.Context, request TestPipelineConnectionRequest) (response TestPipelineConnectionResponse, 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.testPipelineConnection, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = TestPipelineConnectionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = TestPipelineConnectionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(TestPipelineConnectionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into TestPipelineConnectionResponse") + } + return +} + +// testPipelineConnection implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) testPipelineConnection(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pipelines/{pipelineId}/actions/testConnection", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response TestPipelineConnectionResponse + 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/goldengate/20200407/Pipeline/TestPipelineConnection" + err = common.PostProcessServiceError(err, "GoldenGate", "TestPipelineConnection", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateConnection Updates the Connection. // // # See also @@ -4179,6 +4964,64 @@ func (client GoldenGateClient) updateDeploymentBackup(ctx context.Context, reque return response, err } +// UpdatePipeline Updates the Pipeline. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/UpdatePipeline.go.html to see an example of how to use UpdatePipeline API. +// A default retry strategy applies to this operation UpdatePipeline() +func (client GoldenGateClient) UpdatePipeline(ctx context.Context, request UpdatePipelineRequest) (response UpdatePipelineResponse, 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.updatePipeline, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePipelineResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePipelineResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePipelineResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePipelineResponse") + } + return +} + +// updatePipeline implements the OCIOperation interface (enables retrying operations) +func (client GoldenGateClient) updatePipeline(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/pipelines/{pipelineId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdatePipelineResponse + 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/goldengate/20200407/Pipeline/UpdatePipeline" + err = common.PostProcessServiceError(err, "GoldenGate", "UpdatePipeline", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpgradeDeployment Upgrade a Deployment. 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/goldengate/initial_data_load.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/initial_data_load.go new file mode 100644 index 00000000000..01b0a71431d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/initial_data_load.go @@ -0,0 +1,90 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InitialDataLoad Options required for the pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. +type InitialDataLoad struct { + + // If ENABLED, then existing source data is also synchronized to the target when creating or updating the pipeline. + IsInitialLoad InitialDataLoadIsInitialLoadEnum `mandatory:"true" json:"isInitialLoad"` + + // Action upon existing tables in target when initial Data Load is set i.e., isInitialLoad=true. + ActionOnExistingTable InitialLoadActionEnum `mandatory:"false" json:"actionOnExistingTable,omitempty"` +} + +func (m InitialDataLoad) 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 InitialDataLoad) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInitialDataLoadIsInitialLoadEnum(string(m.IsInitialLoad)); !ok && m.IsInitialLoad != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IsInitialLoad: %s. Supported values are: %s.", m.IsInitialLoad, strings.Join(GetInitialDataLoadIsInitialLoadEnumStringValues(), ","))) + } + + if _, ok := GetMappingInitialLoadActionEnum(string(m.ActionOnExistingTable)); !ok && m.ActionOnExistingTable != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionOnExistingTable: %s. Supported values are: %s.", m.ActionOnExistingTable, strings.Join(GetInitialLoadActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InitialDataLoadIsInitialLoadEnum Enum with underlying type: string +type InitialDataLoadIsInitialLoadEnum string + +// Set of constants representing the allowable values for InitialDataLoadIsInitialLoadEnum +const ( + InitialDataLoadIsInitialLoadEnabled InitialDataLoadIsInitialLoadEnum = "ENABLED" + InitialDataLoadIsInitialLoadDisabled InitialDataLoadIsInitialLoadEnum = "DISABLED" +) + +var mappingInitialDataLoadIsInitialLoadEnum = map[string]InitialDataLoadIsInitialLoadEnum{ + "ENABLED": InitialDataLoadIsInitialLoadEnabled, + "DISABLED": InitialDataLoadIsInitialLoadDisabled, +} + +var mappingInitialDataLoadIsInitialLoadEnumLowerCase = map[string]InitialDataLoadIsInitialLoadEnum{ + "enabled": InitialDataLoadIsInitialLoadEnabled, + "disabled": InitialDataLoadIsInitialLoadDisabled, +} + +// GetInitialDataLoadIsInitialLoadEnumValues Enumerates the set of values for InitialDataLoadIsInitialLoadEnum +func GetInitialDataLoadIsInitialLoadEnumValues() []InitialDataLoadIsInitialLoadEnum { + values := make([]InitialDataLoadIsInitialLoadEnum, 0) + for _, v := range mappingInitialDataLoadIsInitialLoadEnum { + values = append(values, v) + } + return values +} + +// GetInitialDataLoadIsInitialLoadEnumStringValues Enumerates the set of values in String for InitialDataLoadIsInitialLoadEnum +func GetInitialDataLoadIsInitialLoadEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingInitialDataLoadIsInitialLoadEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInitialDataLoadIsInitialLoadEnum(val string) (InitialDataLoadIsInitialLoadEnum, bool) { + enum, ok := mappingInitialDataLoadIsInitialLoadEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/initial_load_action.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/initial_load_action.go new file mode 100644 index 00000000000..d9f5320f01d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/initial_load_action.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// InitialLoadActionEnum Enum with underlying type: string +type InitialLoadActionEnum string + +// Set of constants representing the allowable values for InitialLoadActionEnum +const ( + InitialLoadActionTruncate InitialLoadActionEnum = "TRUNCATE" + InitialLoadActionReplace InitialLoadActionEnum = "REPLACE" + InitialLoadActionAppend InitialLoadActionEnum = "APPEND" + InitialLoadActionSkip InitialLoadActionEnum = "SKIP" +) + +var mappingInitialLoadActionEnum = map[string]InitialLoadActionEnum{ + "TRUNCATE": InitialLoadActionTruncate, + "REPLACE": InitialLoadActionReplace, + "APPEND": InitialLoadActionAppend, + "SKIP": InitialLoadActionSkip, +} + +var mappingInitialLoadActionEnumLowerCase = map[string]InitialLoadActionEnum{ + "truncate": InitialLoadActionTruncate, + "replace": InitialLoadActionReplace, + "append": InitialLoadActionAppend, + "skip": InitialLoadActionSkip, +} + +// GetInitialLoadActionEnumValues Enumerates the set of values for InitialLoadActionEnum +func GetInitialLoadActionEnumValues() []InitialLoadActionEnum { + values := make([]InitialLoadActionEnum, 0) + for _, v := range mappingInitialLoadActionEnum { + values = append(values, v) + } + return values +} + +// GetInitialLoadActionEnumStringValues Enumerates the set of values in String for InitialLoadActionEnum +func GetInitialLoadActionEnumStringValues() []string { + return []string{ + "TRUNCATE", + "REPLACE", + "APPEND", + "SKIP", + } +} + +// GetMappingInitialLoadActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInitialLoadActionEnum(val string) (InitialLoadActionEnum, bool) { + enum, ok := mappingInitialLoadActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_initialization_steps_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_initialization_steps_request_response.go new file mode 100644 index 00000000000..d8ce1ee3f40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_initialization_steps_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineInitializationStepsRequest wrapper for the ListPipelineInitializationSteps operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineInitializationSteps.go.html to see an example of how to use ListPipelineInitializationStepsRequest. +type ListPipelineInitializationStepsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // 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 ListPipelineInitializationStepsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineInitializationStepsRequest) 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 ListPipelineInitializationStepsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineInitializationStepsRequest) 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 ListPipelineInitializationStepsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineInitializationStepsResponse wrapper for the ListPipelineInitializationSteps operation +type ListPipelineInitializationStepsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PipelineInitializationSteps instance + PipelineInitializationSteps `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPipelineInitializationStepsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineInitializationStepsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_running_processes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_running_processes_request_response.go new file mode 100644 index 00000000000..0845b590c7e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_running_processes_request_response.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineRunningProcessesRequest wrapper for the ListPipelineRunningProcesses operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineRunningProcesses.go.html to see an example of how to use ListPipelineRunningProcessesRequest. +type ListPipelineRunningProcessesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelineRunningProcessesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelineRunningProcessesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // 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 ListPipelineRunningProcessesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineRunningProcessesRequest) 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 ListPipelineRunningProcessesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineRunningProcessesRequest) 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 ListPipelineRunningProcessesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPipelineRunningProcessesSortOrderEnum(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(GetListPipelineRunningProcessesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelineRunningProcessesSortByEnum(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(GetListPipelineRunningProcessesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineRunningProcessesResponse wrapper for the ListPipelineRunningProcesses operation +type ListPipelineRunningProcessesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineRunningProcessCollection instances + PipelineRunningProcessCollection `presentIn:"body"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPipelineRunningProcessesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineRunningProcessesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelineRunningProcessesSortOrderEnum Enum with underlying type: string +type ListPipelineRunningProcessesSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelineRunningProcessesSortOrderEnum +const ( + ListPipelineRunningProcessesSortOrderAsc ListPipelineRunningProcessesSortOrderEnum = "ASC" + ListPipelineRunningProcessesSortOrderDesc ListPipelineRunningProcessesSortOrderEnum = "DESC" +) + +var mappingListPipelineRunningProcessesSortOrderEnum = map[string]ListPipelineRunningProcessesSortOrderEnum{ + "ASC": ListPipelineRunningProcessesSortOrderAsc, + "DESC": ListPipelineRunningProcessesSortOrderDesc, +} + +var mappingListPipelineRunningProcessesSortOrderEnumLowerCase = map[string]ListPipelineRunningProcessesSortOrderEnum{ + "asc": ListPipelineRunningProcessesSortOrderAsc, + "desc": ListPipelineRunningProcessesSortOrderDesc, +} + +// GetListPipelineRunningProcessesSortOrderEnumValues Enumerates the set of values for ListPipelineRunningProcessesSortOrderEnum +func GetListPipelineRunningProcessesSortOrderEnumValues() []ListPipelineRunningProcessesSortOrderEnum { + values := make([]ListPipelineRunningProcessesSortOrderEnum, 0) + for _, v := range mappingListPipelineRunningProcessesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineRunningProcessesSortOrderEnumStringValues Enumerates the set of values in String for ListPipelineRunningProcessesSortOrderEnum +func GetListPipelineRunningProcessesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelineRunningProcessesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineRunningProcessesSortOrderEnum(val string) (ListPipelineRunningProcessesSortOrderEnum, bool) { + enum, ok := mappingListPipelineRunningProcessesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelineRunningProcessesSortByEnum Enum with underlying type: string +type ListPipelineRunningProcessesSortByEnum string + +// Set of constants representing the allowable values for ListPipelineRunningProcessesSortByEnum +const ( + ListPipelineRunningProcessesSortByTimecreated ListPipelineRunningProcessesSortByEnum = "timeCreated" + ListPipelineRunningProcessesSortByDisplayname ListPipelineRunningProcessesSortByEnum = "displayName" +) + +var mappingListPipelineRunningProcessesSortByEnum = map[string]ListPipelineRunningProcessesSortByEnum{ + "timeCreated": ListPipelineRunningProcessesSortByTimecreated, + "displayName": ListPipelineRunningProcessesSortByDisplayname, +} + +var mappingListPipelineRunningProcessesSortByEnumLowerCase = map[string]ListPipelineRunningProcessesSortByEnum{ + "timecreated": ListPipelineRunningProcessesSortByTimecreated, + "displayname": ListPipelineRunningProcessesSortByDisplayname, +} + +// GetListPipelineRunningProcessesSortByEnumValues Enumerates the set of values for ListPipelineRunningProcessesSortByEnum +func GetListPipelineRunningProcessesSortByEnumValues() []ListPipelineRunningProcessesSortByEnum { + values := make([]ListPipelineRunningProcessesSortByEnum, 0) + for _, v := range mappingListPipelineRunningProcessesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineRunningProcessesSortByEnumStringValues Enumerates the set of values in String for ListPipelineRunningProcessesSortByEnum +func GetListPipelineRunningProcessesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelineRunningProcessesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineRunningProcessesSortByEnum(val string) (ListPipelineRunningProcessesSortByEnum, bool) { + enum, ok := mappingListPipelineRunningProcessesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_schema_tables_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_schema_tables_request_response.go new file mode 100644 index 00000000000..f6dc4506530 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_schema_tables_request_response.go @@ -0,0 +1,208 @@ +// 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 goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineSchemaTablesRequest wrapper for the ListPipelineSchemaTables operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemaTables.go.html to see an example of how to use ListPipelineSchemaTablesRequest. +type ListPipelineSchemaTablesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Name of the source schema obtained from get schema endpoint of the created pipeline. + SourceSchemaName *string `mandatory:"true" contributesTo:"query" name:"sourceSchemaName"` + + // Name of the target schema obtained from get schema endpoint of the created pipeline. + TargetSchemaName *string `mandatory:"true" contributesTo:"query" name:"targetSchemaName"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelineSchemaTablesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelineSchemaTablesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPipelineSchemaTablesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineSchemaTablesRequest) 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 ListPipelineSchemaTablesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineSchemaTablesRequest) 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 ListPipelineSchemaTablesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPipelineSchemaTablesSortOrderEnum(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(GetListPipelineSchemaTablesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelineSchemaTablesSortByEnum(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(GetListPipelineSchemaTablesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineSchemaTablesResponse wrapper for the ListPipelineSchemaTables operation +type ListPipelineSchemaTablesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineSchemaTableCollection instances + PipelineSchemaTableCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPipelineSchemaTablesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineSchemaTablesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelineSchemaTablesSortOrderEnum Enum with underlying type: string +type ListPipelineSchemaTablesSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelineSchemaTablesSortOrderEnum +const ( + ListPipelineSchemaTablesSortOrderAsc ListPipelineSchemaTablesSortOrderEnum = "ASC" + ListPipelineSchemaTablesSortOrderDesc ListPipelineSchemaTablesSortOrderEnum = "DESC" +) + +var mappingListPipelineSchemaTablesSortOrderEnum = map[string]ListPipelineSchemaTablesSortOrderEnum{ + "ASC": ListPipelineSchemaTablesSortOrderAsc, + "DESC": ListPipelineSchemaTablesSortOrderDesc, +} + +var mappingListPipelineSchemaTablesSortOrderEnumLowerCase = map[string]ListPipelineSchemaTablesSortOrderEnum{ + "asc": ListPipelineSchemaTablesSortOrderAsc, + "desc": ListPipelineSchemaTablesSortOrderDesc, +} + +// GetListPipelineSchemaTablesSortOrderEnumValues Enumerates the set of values for ListPipelineSchemaTablesSortOrderEnum +func GetListPipelineSchemaTablesSortOrderEnumValues() []ListPipelineSchemaTablesSortOrderEnum { + values := make([]ListPipelineSchemaTablesSortOrderEnum, 0) + for _, v := range mappingListPipelineSchemaTablesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemaTablesSortOrderEnumStringValues Enumerates the set of values in String for ListPipelineSchemaTablesSortOrderEnum +func GetListPipelineSchemaTablesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelineSchemaTablesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemaTablesSortOrderEnum(val string) (ListPipelineSchemaTablesSortOrderEnum, bool) { + enum, ok := mappingListPipelineSchemaTablesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelineSchemaTablesSortByEnum Enum with underlying type: string +type ListPipelineSchemaTablesSortByEnum string + +// Set of constants representing the allowable values for ListPipelineSchemaTablesSortByEnum +const ( + ListPipelineSchemaTablesSortByTimecreated ListPipelineSchemaTablesSortByEnum = "timeCreated" + ListPipelineSchemaTablesSortByDisplayname ListPipelineSchemaTablesSortByEnum = "displayName" +) + +var mappingListPipelineSchemaTablesSortByEnum = map[string]ListPipelineSchemaTablesSortByEnum{ + "timeCreated": ListPipelineSchemaTablesSortByTimecreated, + "displayName": ListPipelineSchemaTablesSortByDisplayname, +} + +var mappingListPipelineSchemaTablesSortByEnumLowerCase = map[string]ListPipelineSchemaTablesSortByEnum{ + "timecreated": ListPipelineSchemaTablesSortByTimecreated, + "displayname": ListPipelineSchemaTablesSortByDisplayname, +} + +// GetListPipelineSchemaTablesSortByEnumValues Enumerates the set of values for ListPipelineSchemaTablesSortByEnum +func GetListPipelineSchemaTablesSortByEnumValues() []ListPipelineSchemaTablesSortByEnum { + values := make([]ListPipelineSchemaTablesSortByEnum, 0) + for _, v := range mappingListPipelineSchemaTablesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemaTablesSortByEnumStringValues Enumerates the set of values in String for ListPipelineSchemaTablesSortByEnum +func GetListPipelineSchemaTablesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelineSchemaTablesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemaTablesSortByEnum(val string) (ListPipelineSchemaTablesSortByEnum, bool) { + enum, ok := mappingListPipelineSchemaTablesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_schemas_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_schemas_request_response.go new file mode 100644 index 00000000000..35519ca45c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipeline_schemas_request_response.go @@ -0,0 +1,202 @@ +// 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 goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelineSchemasRequest wrapper for the ListPipelineSchemas operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelineSchemas.go.html to see an example of how to use ListPipelineSchemasRequest. +type ListPipelineSchemasRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelineSchemasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelineSchemasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPipelineSchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelineSchemasRequest) 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 ListPipelineSchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelineSchemasRequest) 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 ListPipelineSchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPipelineSchemasSortOrderEnum(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(GetListPipelineSchemasSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelineSchemasSortByEnum(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(GetListPipelineSchemasSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelineSchemasResponse wrapper for the ListPipelineSchemas operation +type ListPipelineSchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineSchemaCollection instances + PipelineSchemaCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPipelineSchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelineSchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelineSchemasSortOrderEnum Enum with underlying type: string +type ListPipelineSchemasSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelineSchemasSortOrderEnum +const ( + ListPipelineSchemasSortOrderAsc ListPipelineSchemasSortOrderEnum = "ASC" + ListPipelineSchemasSortOrderDesc ListPipelineSchemasSortOrderEnum = "DESC" +) + +var mappingListPipelineSchemasSortOrderEnum = map[string]ListPipelineSchemasSortOrderEnum{ + "ASC": ListPipelineSchemasSortOrderAsc, + "DESC": ListPipelineSchemasSortOrderDesc, +} + +var mappingListPipelineSchemasSortOrderEnumLowerCase = map[string]ListPipelineSchemasSortOrderEnum{ + "asc": ListPipelineSchemasSortOrderAsc, + "desc": ListPipelineSchemasSortOrderDesc, +} + +// GetListPipelineSchemasSortOrderEnumValues Enumerates the set of values for ListPipelineSchemasSortOrderEnum +func GetListPipelineSchemasSortOrderEnumValues() []ListPipelineSchemasSortOrderEnum { + values := make([]ListPipelineSchemasSortOrderEnum, 0) + for _, v := range mappingListPipelineSchemasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemasSortOrderEnumStringValues Enumerates the set of values in String for ListPipelineSchemasSortOrderEnum +func GetListPipelineSchemasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelineSchemasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemasSortOrderEnum(val string) (ListPipelineSchemasSortOrderEnum, bool) { + enum, ok := mappingListPipelineSchemasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelineSchemasSortByEnum Enum with underlying type: string +type ListPipelineSchemasSortByEnum string + +// Set of constants representing the allowable values for ListPipelineSchemasSortByEnum +const ( + ListPipelineSchemasSortByTimecreated ListPipelineSchemasSortByEnum = "timeCreated" + ListPipelineSchemasSortByDisplayname ListPipelineSchemasSortByEnum = "displayName" +) + +var mappingListPipelineSchemasSortByEnum = map[string]ListPipelineSchemasSortByEnum{ + "timeCreated": ListPipelineSchemasSortByTimecreated, + "displayName": ListPipelineSchemasSortByDisplayname, +} + +var mappingListPipelineSchemasSortByEnumLowerCase = map[string]ListPipelineSchemasSortByEnum{ + "timecreated": ListPipelineSchemasSortByTimecreated, + "displayname": ListPipelineSchemasSortByDisplayname, +} + +// GetListPipelineSchemasSortByEnumValues Enumerates the set of values for ListPipelineSchemasSortByEnum +func GetListPipelineSchemasSortByEnumValues() []ListPipelineSchemasSortByEnum { + values := make([]ListPipelineSchemasSortByEnum, 0) + for _, v := range mappingListPipelineSchemasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelineSchemasSortByEnumStringValues Enumerates the set of values in String for ListPipelineSchemasSortByEnum +func GetListPipelineSchemasSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelineSchemasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelineSchemasSortByEnum(val string) (ListPipelineSchemasSortByEnum, bool) { + enum, ok := mappingListPipelineSchemasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipelines_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipelines_request_response.go new file mode 100644 index 00000000000..d694329f770 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_pipelines_request_response.go @@ -0,0 +1,271 @@ +// 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 goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPipelinesRequest wrapper for the ListPipelines operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListPipelines.go.html to see an example of how to use ListPipelinesRequest. +type ListPipelinesRequest struct { + + // The OCID of the compartment that contains the work request. Work requests should be scoped + // to the same compartment as the resource the work request affects. If the work request concerns + // multiple resources, and those resources are not in the same compartment, it is up to the service team + // to pick the primary resource whose compartment should be used. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A filtered list of pipelines to return for a given lifecycleState. + LifecycleState PipelineLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filtered list of pipelines to return for a given lifecycleSubState. + LifecycleSubState ListPipelinesLifecycleSubStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleSubState" omitEmpty:"true"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListPipelinesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListPipelinesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // 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 ListPipelinesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPipelinesRequest) 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 ListPipelinesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPipelinesRequest) 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 ListPipelinesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPipelineLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelinesLifecycleSubStateEnum(string(request.LifecycleSubState)); !ok && request.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", request.LifecycleSubState, strings.Join(GetListPipelinesLifecycleSubStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelinesSortOrderEnum(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(GetListPipelinesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPipelinesSortByEnum(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(GetListPipelinesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPipelinesResponse wrapper for the ListPipelines operation +type ListPipelinesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PipelineCollection instances + PipelineCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPipelinesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPipelinesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPipelinesLifecycleSubStateEnum Enum with underlying type: string +type ListPipelinesLifecycleSubStateEnum string + +// Set of constants representing the allowable values for ListPipelinesLifecycleSubStateEnum +const ( + ListPipelinesLifecycleSubStateStarting ListPipelinesLifecycleSubStateEnum = "STARTING" + ListPipelinesLifecycleSubStateStopping ListPipelinesLifecycleSubStateEnum = "STOPPING" + ListPipelinesLifecycleSubStateStopped ListPipelinesLifecycleSubStateEnum = "STOPPED" + ListPipelinesLifecycleSubStateMoving ListPipelinesLifecycleSubStateEnum = "MOVING" + ListPipelinesLifecycleSubStateRunning ListPipelinesLifecycleSubStateEnum = "RUNNING" +) + +var mappingListPipelinesLifecycleSubStateEnum = map[string]ListPipelinesLifecycleSubStateEnum{ + "STARTING": ListPipelinesLifecycleSubStateStarting, + "STOPPING": ListPipelinesLifecycleSubStateStopping, + "STOPPED": ListPipelinesLifecycleSubStateStopped, + "MOVING": ListPipelinesLifecycleSubStateMoving, + "RUNNING": ListPipelinesLifecycleSubStateRunning, +} + +var mappingListPipelinesLifecycleSubStateEnumLowerCase = map[string]ListPipelinesLifecycleSubStateEnum{ + "starting": ListPipelinesLifecycleSubStateStarting, + "stopping": ListPipelinesLifecycleSubStateStopping, + "stopped": ListPipelinesLifecycleSubStateStopped, + "moving": ListPipelinesLifecycleSubStateMoving, + "running": ListPipelinesLifecycleSubStateRunning, +} + +// GetListPipelinesLifecycleSubStateEnumValues Enumerates the set of values for ListPipelinesLifecycleSubStateEnum +func GetListPipelinesLifecycleSubStateEnumValues() []ListPipelinesLifecycleSubStateEnum { + values := make([]ListPipelinesLifecycleSubStateEnum, 0) + for _, v := range mappingListPipelinesLifecycleSubStateEnum { + values = append(values, v) + } + return values +} + +// GetListPipelinesLifecycleSubStateEnumStringValues Enumerates the set of values in String for ListPipelinesLifecycleSubStateEnum +func GetListPipelinesLifecycleSubStateEnumStringValues() []string { + return []string{ + "STARTING", + "STOPPING", + "STOPPED", + "MOVING", + "RUNNING", + } +} + +// GetMappingListPipelinesLifecycleSubStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelinesLifecycleSubStateEnum(val string) (ListPipelinesLifecycleSubStateEnum, bool) { + enum, ok := mappingListPipelinesLifecycleSubStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelinesSortOrderEnum Enum with underlying type: string +type ListPipelinesSortOrderEnum string + +// Set of constants representing the allowable values for ListPipelinesSortOrderEnum +const ( + ListPipelinesSortOrderAsc ListPipelinesSortOrderEnum = "ASC" + ListPipelinesSortOrderDesc ListPipelinesSortOrderEnum = "DESC" +) + +var mappingListPipelinesSortOrderEnum = map[string]ListPipelinesSortOrderEnum{ + "ASC": ListPipelinesSortOrderAsc, + "DESC": ListPipelinesSortOrderDesc, +} + +var mappingListPipelinesSortOrderEnumLowerCase = map[string]ListPipelinesSortOrderEnum{ + "asc": ListPipelinesSortOrderAsc, + "desc": ListPipelinesSortOrderDesc, +} + +// GetListPipelinesSortOrderEnumValues Enumerates the set of values for ListPipelinesSortOrderEnum +func GetListPipelinesSortOrderEnumValues() []ListPipelinesSortOrderEnum { + values := make([]ListPipelinesSortOrderEnum, 0) + for _, v := range mappingListPipelinesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPipelinesSortOrderEnumStringValues Enumerates the set of values in String for ListPipelinesSortOrderEnum +func GetListPipelinesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPipelinesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelinesSortOrderEnum(val string) (ListPipelinesSortOrderEnum, bool) { + enum, ok := mappingListPipelinesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPipelinesSortByEnum Enum with underlying type: string +type ListPipelinesSortByEnum string + +// Set of constants representing the allowable values for ListPipelinesSortByEnum +const ( + ListPipelinesSortByTimecreated ListPipelinesSortByEnum = "timeCreated" + ListPipelinesSortByDisplayname ListPipelinesSortByEnum = "displayName" +) + +var mappingListPipelinesSortByEnum = map[string]ListPipelinesSortByEnum{ + "timeCreated": ListPipelinesSortByTimecreated, + "displayName": ListPipelinesSortByDisplayname, +} + +var mappingListPipelinesSortByEnumLowerCase = map[string]ListPipelinesSortByEnum{ + "timecreated": ListPipelinesSortByTimecreated, + "displayname": ListPipelinesSortByDisplayname, +} + +// GetListPipelinesSortByEnumValues Enumerates the set of values for ListPipelinesSortByEnum +func GetListPipelinesSortByEnumValues() []ListPipelinesSortByEnum { + values := make([]ListPipelinesSortByEnum, 0) + for _, v := range mappingListPipelinesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPipelinesSortByEnumStringValues Enumerates the set of values in String for ListPipelinesSortByEnum +func GetListPipelinesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPipelinesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPipelinesSortByEnum(val string) (ListPipelinesSortByEnum, bool) { + enum, ok := mappingListPipelinesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_recipes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_recipes_request_response.go new file mode 100644 index 00000000000..b609a58a352 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/list_recipes_request_response.go @@ -0,0 +1,249 @@ +// 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 goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRecipesRequest wrapper for the ListRecipes operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/ListRecipes.go.html to see an example of how to use ListRecipesRequest. +type ListRecipesRequest struct { + + // The OCID of the compartment that contains the work request. Work requests should be scoped + // to the same compartment as the resource the work request affects. If the work request concerns + // multiple resources, and those resources are not in the same compartment, it is up to the service team + // to pick the primary resource whose compartment should be used. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The pipeline's recipe type. The default value is ZERO_ETL. + RecipeType ListRecipesRecipeTypeEnum `mandatory:"false" contributesTo:"query" name:"recipeType" omitEmpty:"true"` + + // A filter to return only the resources that match the entire 'displayName' given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually + // retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListRecipesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order can be provided. Default order for 'timeCreated' is + // descending. Default order for 'displayName' is ascending. If no value is specified + // timeCreated is the default. + SortBy ListRecipesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListRecipesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRecipesRequest) 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 ListRecipesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRecipesRequest) 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 ListRecipesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListRecipesRecipeTypeEnum(string(request.RecipeType)); !ok && request.RecipeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecipeType: %s. Supported values are: %s.", request.RecipeType, strings.Join(GetListRecipesRecipeTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListRecipesSortOrderEnum(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(GetListRecipesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListRecipesSortByEnum(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(GetListRecipesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRecipesResponse wrapper for the ListRecipes operation +type ListRecipesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of RecipeSummaryCollection instances + RecipeSummaryCollection `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The page token represents the page to start retrieving results. This is usually retrieved + // from a previous list call. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListRecipesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRecipesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListRecipesRecipeTypeEnum Enum with underlying type: string +type ListRecipesRecipeTypeEnum string + +// Set of constants representing the allowable values for ListRecipesRecipeTypeEnum +const ( + ListRecipesRecipeTypeZeroEtl ListRecipesRecipeTypeEnum = "ZERO_ETL" +) + +var mappingListRecipesRecipeTypeEnum = map[string]ListRecipesRecipeTypeEnum{ + "ZERO_ETL": ListRecipesRecipeTypeZeroEtl, +} + +var mappingListRecipesRecipeTypeEnumLowerCase = map[string]ListRecipesRecipeTypeEnum{ + "zero_etl": ListRecipesRecipeTypeZeroEtl, +} + +// GetListRecipesRecipeTypeEnumValues Enumerates the set of values for ListRecipesRecipeTypeEnum +func GetListRecipesRecipeTypeEnumValues() []ListRecipesRecipeTypeEnum { + values := make([]ListRecipesRecipeTypeEnum, 0) + for _, v := range mappingListRecipesRecipeTypeEnum { + values = append(values, v) + } + return values +} + +// GetListRecipesRecipeTypeEnumStringValues Enumerates the set of values in String for ListRecipesRecipeTypeEnum +func GetListRecipesRecipeTypeEnumStringValues() []string { + return []string{ + "ZERO_ETL", + } +} + +// GetMappingListRecipesRecipeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRecipesRecipeTypeEnum(val string) (ListRecipesRecipeTypeEnum, bool) { + enum, ok := mappingListRecipesRecipeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRecipesSortOrderEnum Enum with underlying type: string +type ListRecipesSortOrderEnum string + +// Set of constants representing the allowable values for ListRecipesSortOrderEnum +const ( + ListRecipesSortOrderAsc ListRecipesSortOrderEnum = "ASC" + ListRecipesSortOrderDesc ListRecipesSortOrderEnum = "DESC" +) + +var mappingListRecipesSortOrderEnum = map[string]ListRecipesSortOrderEnum{ + "ASC": ListRecipesSortOrderAsc, + "DESC": ListRecipesSortOrderDesc, +} + +var mappingListRecipesSortOrderEnumLowerCase = map[string]ListRecipesSortOrderEnum{ + "asc": ListRecipesSortOrderAsc, + "desc": ListRecipesSortOrderDesc, +} + +// GetListRecipesSortOrderEnumValues Enumerates the set of values for ListRecipesSortOrderEnum +func GetListRecipesSortOrderEnumValues() []ListRecipesSortOrderEnum { + values := make([]ListRecipesSortOrderEnum, 0) + for _, v := range mappingListRecipesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListRecipesSortOrderEnumStringValues Enumerates the set of values in String for ListRecipesSortOrderEnum +func GetListRecipesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListRecipesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRecipesSortOrderEnum(val string) (ListRecipesSortOrderEnum, bool) { + enum, ok := mappingListRecipesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListRecipesSortByEnum Enum with underlying type: string +type ListRecipesSortByEnum string + +// Set of constants representing the allowable values for ListRecipesSortByEnum +const ( + ListRecipesSortByTimecreated ListRecipesSortByEnum = "timeCreated" + ListRecipesSortByDisplayname ListRecipesSortByEnum = "displayName" +) + +var mappingListRecipesSortByEnum = map[string]ListRecipesSortByEnum{ + "timeCreated": ListRecipesSortByTimecreated, + "displayName": ListRecipesSortByDisplayname, +} + +var mappingListRecipesSortByEnumLowerCase = map[string]ListRecipesSortByEnum{ + "timecreated": ListRecipesSortByTimecreated, + "displayname": ListRecipesSortByDisplayname, +} + +// GetListRecipesSortByEnumValues Enumerates the set of values for ListRecipesSortByEnum +func GetListRecipesSortByEnumValues() []ListRecipesSortByEnum { + values := make([]ListRecipesSortByEnum, 0) + for _, v := range mappingListRecipesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListRecipesSortByEnumStringValues Enumerates the set of values in String for ListRecipesSortByEnum +func GetListRecipesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListRecipesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRecipesSortByEnum(val string) (ListRecipesSortByEnum, bool) { + enum, ok := mappingListRecipesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/mapping_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/mapping_rule.go new file mode 100644 index 00000000000..4d6003ed412 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/mapping_rule.go @@ -0,0 +1,50 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MappingRule Mapping rule for source and target schemas for the pipeline data replication. +// For example: +// "{mappingType: INCLUDE, source: HR.*, target: HR.*}" for rule "Include HR.*" which will include all the tables under HR schema. +type MappingRule struct { + + // Defines the exclude/include rules of source and target schemas and tables when replicating from source to target. This option applies when creating and updating a pipeline. + MappingType MappingTypeEnum `mandatory:"true" json:"mappingType"` + + // The source schema/table combination for replication to target. + Source *string `mandatory:"true" json:"source"` + + // The target schema/table combination for replication from the source. + Target *string `mandatory:"false" json:"target"` +} + +func (m MappingRule) 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 MappingRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingMappingTypeEnum(string(m.MappingType)); !ok && m.MappingType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for MappingType: %s. Supported values are: %s.", m.MappingType, strings.Join(GetMappingTypeEnumStringValues(), ","))) + } + + 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/goldengate/mapping_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/mapping_type.go new file mode 100644 index 00000000000..0149cd7bbf2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/mapping_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// MappingTypeEnum Enum with underlying type: string +type MappingTypeEnum string + +// Set of constants representing the allowable values for MappingTypeEnum +const ( + MappingTypeInclude MappingTypeEnum = "INCLUDE" + MappingTypeExclude MappingTypeEnum = "EXCLUDE" +) + +var mappingMappingTypeEnum = map[string]MappingTypeEnum{ + "INCLUDE": MappingTypeInclude, + "EXCLUDE": MappingTypeExclude, +} + +var mappingMappingTypeEnumLowerCase = map[string]MappingTypeEnum{ + "include": MappingTypeInclude, + "exclude": MappingTypeExclude, +} + +// GetMappingTypeEnumValues Enumerates the set of values for MappingTypeEnum +func GetMappingTypeEnumValues() []MappingTypeEnum { + values := make([]MappingTypeEnum, 0) + for _, v := range mappingMappingTypeEnum { + values = append(values, v) + } + return values +} + +// GetMappingTypeEnumStringValues Enumerates the set of values in String for MappingTypeEnum +func GetMappingTypeEnumStringValues() []string { + return []string{ + "INCLUDE", + "EXCLUDE", + } +} + +// GetMappingMappingTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMappingTypeEnum(val string) (MappingTypeEnum, bool) { + enum, ok := mappingMappingTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/operation_type.go index 66baa21b7cb..3ab3342a906 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/operation_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/operation_type.go @@ -50,6 +50,12 @@ const ( OperationTypeGoldengateDeploymentUpgradeSnooze OperationTypeEnum = "GOLDENGATE_DEPLOYMENT_UPGRADE_SNOOZE" OperationTypeGoldengateDeploymentCertificateCreate OperationTypeEnum = "GOLDENGATE_DEPLOYMENT_CERTIFICATE_CREATE" OperationTypeGoldengateDeploymentCertificateDelete OperationTypeEnum = "GOLDENGATE_DEPLOYMENT_CERTIFICATE_DELETE" + OperationTypeGoldengatePipelineCreate OperationTypeEnum = "GOLDENGATE_PIPELINE_CREATE" + OperationTypeGoldengatePipelineStart OperationTypeEnum = "GOLDENGATE_PIPELINE_START" + OperationTypeGoldengatePipelineStop OperationTypeEnum = "GOLDENGATE_PIPELINE_STOP" + OperationTypeGoldengatePipelineUpdate OperationTypeEnum = "GOLDENGATE_PIPELINE_UPDATE" + OperationTypeGoldengatePipelineDelete OperationTypeEnum = "GOLDENGATE_PIPELINE_DELETE" + OperationTypeGoldengatePipelineMove OperationTypeEnum = "GOLDENGATE_PIPELINE_MOVE" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ @@ -85,6 +91,12 @@ var mappingOperationTypeEnum = map[string]OperationTypeEnum{ "GOLDENGATE_DEPLOYMENT_UPGRADE_SNOOZE": OperationTypeGoldengateDeploymentUpgradeSnooze, "GOLDENGATE_DEPLOYMENT_CERTIFICATE_CREATE": OperationTypeGoldengateDeploymentCertificateCreate, "GOLDENGATE_DEPLOYMENT_CERTIFICATE_DELETE": OperationTypeGoldengateDeploymentCertificateDelete, + "GOLDENGATE_PIPELINE_CREATE": OperationTypeGoldengatePipelineCreate, + "GOLDENGATE_PIPELINE_START": OperationTypeGoldengatePipelineStart, + "GOLDENGATE_PIPELINE_STOP": OperationTypeGoldengatePipelineStop, + "GOLDENGATE_PIPELINE_UPDATE": OperationTypeGoldengatePipelineUpdate, + "GOLDENGATE_PIPELINE_DELETE": OperationTypeGoldengatePipelineDelete, + "GOLDENGATE_PIPELINE_MOVE": OperationTypeGoldengatePipelineMove, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ @@ -120,6 +132,12 @@ var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ "goldengate_deployment_upgrade_snooze": OperationTypeGoldengateDeploymentUpgradeSnooze, "goldengate_deployment_certificate_create": OperationTypeGoldengateDeploymentCertificateCreate, "goldengate_deployment_certificate_delete": OperationTypeGoldengateDeploymentCertificateDelete, + "goldengate_pipeline_create": OperationTypeGoldengatePipelineCreate, + "goldengate_pipeline_start": OperationTypeGoldengatePipelineStart, + "goldengate_pipeline_stop": OperationTypeGoldengatePipelineStop, + "goldengate_pipeline_update": OperationTypeGoldengatePipelineUpdate, + "goldengate_pipeline_delete": OperationTypeGoldengatePipelineDelete, + "goldengate_pipeline_move": OperationTypeGoldengatePipelineMove, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -166,6 +184,12 @@ func GetOperationTypeEnumStringValues() []string { "GOLDENGATE_DEPLOYMENT_UPGRADE_SNOOZE", "GOLDENGATE_DEPLOYMENT_CERTIFICATE_CREATE", "GOLDENGATE_DEPLOYMENT_CERTIFICATE_DELETE", + "GOLDENGATE_PIPELINE_CREATE", + "GOLDENGATE_PIPELINE_START", + "GOLDENGATE_PIPELINE_STOP", + "GOLDENGATE_PIPELINE_UPDATE", + "GOLDENGATE_PIPELINE_DELETE", + "GOLDENGATE_PIPELINE_MOVE", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline.go new file mode 100644 index 00000000000..ea5dd122002 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline.go @@ -0,0 +1,335 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Pipeline Represents the metadata details of a pipeline in the same compartment. +type Pipeline interface { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + GetId() *string + + // An object's Display Name. + GetDisplayName() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + GetCompartmentId() *string + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + // The Minimum number of OCPUs to be made available for this Deployment. + GetCpuCoreCount() *int + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + GetIsAutoScalingEnabled() *bool + + GetSourceConnectionDetails() *SourcePipelineConnectionDetails + + GetTargetConnectionDetails() *TargetPipelineConnectionDetails + + // Lifecycle state of the pipeline. + GetLifecycleState() PipelineLifecycleStateEnum + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeCreated() *common.SDKTime + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeUpdated() *common.SDKTime + + // Metadata about this specific object. + GetDescription() *string + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // 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}}` + GetSystemTags() map[string]map[string]interface{} + + // Locks associated with this resource. + GetLocks() []ResourceLock + + // Possible lifecycle substates when retrieving a pipeline. + GetLifecycleSubState() PipelineLifecycleSubStateEnum + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + GetLifecycleDetails() *string +} + +type pipeline struct { + JsonData []byte + Description *string `mandatory:"false" json:"description"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + Locks []ResourceLock `mandatory:"false" json:"locks"` + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *pipeline) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpipeline pipeline + s := struct { + Model Unmarshalerpipeline + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.DisplayName = s.Model.DisplayName + m.CompartmentId = s.Model.CompartmentId + m.LicenseModel = s.Model.LicenseModel + m.CpuCoreCount = s.Model.CpuCoreCount + m.IsAutoScalingEnabled = s.Model.IsAutoScalingEnabled + m.SourceConnectionDetails = s.Model.SourceConnectionDetails + m.TargetConnectionDetails = s.Model.TargetConnectionDetails + m.LifecycleState = s.Model.LifecycleState + m.TimeCreated = s.Model.TimeCreated + m.TimeUpdated = s.Model.TimeUpdated + m.Description = s.Model.Description + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.SystemTags = s.Model.SystemTags + m.Locks = s.Model.Locks + m.LifecycleSubState = s.Model.LifecycleSubState + m.LifecycleDetails = s.Model.LifecycleDetails + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *pipeline) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := ZeroEtlPipeline{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for Pipeline: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDescription returns Description +func (m pipeline) GetDescription() *string { + return m.Description +} + +// GetFreeformTags returns FreeformTags +func (m pipeline) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m pipeline) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m pipeline) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m pipeline) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleSubState returns LifecycleSubState +func (m pipeline) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m pipeline) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id +func (m pipeline) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m pipeline) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m pipeline) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m pipeline) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m pipeline) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m pipeline) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m pipeline) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m pipeline) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetLifecycleState returns LifecycleState +func (m pipeline) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m pipeline) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m pipeline) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m pipeline) 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 pipeline) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleStateEnum(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(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PipelineLifecycleStateEnum Enum with underlying type: string +type PipelineLifecycleStateEnum string + +// Set of constants representing the allowable values for PipelineLifecycleStateEnum +const ( + PipelineLifecycleStateCreating PipelineLifecycleStateEnum = "CREATING" + PipelineLifecycleStateUpdating PipelineLifecycleStateEnum = "UPDATING" + PipelineLifecycleStateActive PipelineLifecycleStateEnum = "ACTIVE" + PipelineLifecycleStateNeedsAttention PipelineLifecycleStateEnum = "NEEDS_ATTENTION" + PipelineLifecycleStateDeleting PipelineLifecycleStateEnum = "DELETING" + PipelineLifecycleStateDeleted PipelineLifecycleStateEnum = "DELETED" + PipelineLifecycleStateFailed PipelineLifecycleStateEnum = "FAILED" +) + +var mappingPipelineLifecycleStateEnum = map[string]PipelineLifecycleStateEnum{ + "CREATING": PipelineLifecycleStateCreating, + "UPDATING": PipelineLifecycleStateUpdating, + "ACTIVE": PipelineLifecycleStateActive, + "NEEDS_ATTENTION": PipelineLifecycleStateNeedsAttention, + "DELETING": PipelineLifecycleStateDeleting, + "DELETED": PipelineLifecycleStateDeleted, + "FAILED": PipelineLifecycleStateFailed, +} + +var mappingPipelineLifecycleStateEnumLowerCase = map[string]PipelineLifecycleStateEnum{ + "creating": PipelineLifecycleStateCreating, + "updating": PipelineLifecycleStateUpdating, + "active": PipelineLifecycleStateActive, + "needs_attention": PipelineLifecycleStateNeedsAttention, + "deleting": PipelineLifecycleStateDeleting, + "deleted": PipelineLifecycleStateDeleted, + "failed": PipelineLifecycleStateFailed, +} + +// GetPipelineLifecycleStateEnumValues Enumerates the set of values for PipelineLifecycleStateEnum +func GetPipelineLifecycleStateEnumValues() []PipelineLifecycleStateEnum { + values := make([]PipelineLifecycleStateEnum, 0) + for _, v := range mappingPipelineLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPipelineLifecycleStateEnumStringValues Enumerates the set of values in String for PipelineLifecycleStateEnum +func GetPipelineLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "NEEDS_ATTENTION", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingPipelineLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPipelineLifecycleStateEnum(val string) (PipelineLifecycleStateEnum, bool) { + enum, ok := mappingPipelineLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_collection.go new file mode 100644 index 00000000000..2ab568b7faf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_collection.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineCollection List of pipeline summary objects. +type PipelineCollection struct { + + // An array of Pipeline summaries. + Items []PipelineSummary `mandatory:"true" json:"items"` +} + +func (m PipelineCollection) 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 PipelineCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PipelineCollection) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []pipelinesummary `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]PipelineSummary, len(model.Items)) + for i, n := range model.Items { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Items[i] = nn.(PipelineSummary) + } else { + m.Items[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_initialization_step.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_initialization_step.go new file mode 100644 index 00000000000..a58e10dfbde --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_initialization_step.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineInitializationStep The step and its progress based on the recipe type. +type PipelineInitializationStep struct { + + // An object's Display Name. + Name *string `mandatory:"true" json:"name"` + + // Status of the steps in a recipe. This option applies during pipeline initialization. + Status StepStatusTypeEnum `mandatory:"true" json:"status"` + + // Shows the percentage complete of each recipe step during pipeline initialization. + PercentComplete *int `mandatory:"true" json:"percentComplete"` + + // The date and time the request was started. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` + + // The date and time the request was finished. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeFinished *common.SDKTime `mandatory:"true" json:"timeFinished"` + + // The list of messages for each step while running. + Messages []StepMessage `mandatory:"false" json:"messages"` +} + +func (m PipelineInitializationStep) 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 PipelineInitializationStep) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingStepStatusTypeEnum(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(GetStepStatusTypeEnumStringValues(), ","))) + } + + 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/goldengate/pipeline_initialization_steps.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_initialization_steps.go new file mode 100644 index 00000000000..236722dcd08 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_initialization_steps.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineInitializationSteps The steps and their progress, based on the recipe type. +type PipelineInitializationSteps struct { + + // The sequence of pipeline steps based on the recipe type. + Items []PipelineInitializationStep `mandatory:"true" json:"items"` +} + +func (m PipelineInitializationSteps) 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 PipelineInitializationSteps) 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/goldengate/pipeline_lifecycle_sub_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_lifecycle_sub_state.go new file mode 100644 index 00000000000..05bb6e02ccf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_lifecycle_sub_state.go @@ -0,0 +1,68 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// PipelineLifecycleSubStateEnum Enum with underlying type: string +type PipelineLifecycleSubStateEnum string + +// Set of constants representing the allowable values for PipelineLifecycleSubStateEnum +const ( + PipelineLifecycleSubStateStarting PipelineLifecycleSubStateEnum = "STARTING" + PipelineLifecycleSubStateStopping PipelineLifecycleSubStateEnum = "STOPPING" + PipelineLifecycleSubStateStopped PipelineLifecycleSubStateEnum = "STOPPED" + PipelineLifecycleSubStateMoving PipelineLifecycleSubStateEnum = "MOVING" + PipelineLifecycleSubStateRunning PipelineLifecycleSubStateEnum = "RUNNING" +) + +var mappingPipelineLifecycleSubStateEnum = map[string]PipelineLifecycleSubStateEnum{ + "STARTING": PipelineLifecycleSubStateStarting, + "STOPPING": PipelineLifecycleSubStateStopping, + "STOPPED": PipelineLifecycleSubStateStopped, + "MOVING": PipelineLifecycleSubStateMoving, + "RUNNING": PipelineLifecycleSubStateRunning, +} + +var mappingPipelineLifecycleSubStateEnumLowerCase = map[string]PipelineLifecycleSubStateEnum{ + "starting": PipelineLifecycleSubStateStarting, + "stopping": PipelineLifecycleSubStateStopping, + "stopped": PipelineLifecycleSubStateStopped, + "moving": PipelineLifecycleSubStateMoving, + "running": PipelineLifecycleSubStateRunning, +} + +// GetPipelineLifecycleSubStateEnumValues Enumerates the set of values for PipelineLifecycleSubStateEnum +func GetPipelineLifecycleSubStateEnumValues() []PipelineLifecycleSubStateEnum { + values := make([]PipelineLifecycleSubStateEnum, 0) + for _, v := range mappingPipelineLifecycleSubStateEnum { + values = append(values, v) + } + return values +} + +// GetPipelineLifecycleSubStateEnumStringValues Enumerates the set of values in String for PipelineLifecycleSubStateEnum +func GetPipelineLifecycleSubStateEnumStringValues() []string { + return []string{ + "STARTING", + "STOPPING", + "STOPPED", + "MOVING", + "RUNNING", + } +} + +// GetMappingPipelineLifecycleSubStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPipelineLifecycleSubStateEnum(val string) (PipelineLifecycleSubStateEnum, bool) { + enum, ok := mappingPipelineLifecycleSubStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_running_process_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_running_process_collection.go new file mode 100644 index 00000000000..5821f88f63e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_running_process_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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineRunningProcessCollection The complete replication process and its details. +type PipelineRunningProcessCollection struct { + + // The list of replication processes and their details. + Items []PipelineRunningProcessSummary `mandatory:"true" json:"items"` +} + +func (m PipelineRunningProcessCollection) 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 PipelineRunningProcessCollection) 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/goldengate/pipeline_running_process_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_running_process_summary.go new file mode 100644 index 00000000000..c4c7ff1ea74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_running_process_summary.go @@ -0,0 +1,58 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineRunningProcessSummary Each replication process and their summary details. +type PipelineRunningProcessSummary struct { + + // An object's Display Name. + Name *string `mandatory:"true" json:"name"` + + // The type of process running in a replication. For example, Extract or Replicat. This option applies when retrieving running processes. + ProcessType ProcessTypeEnum `mandatory:"true" json:"processType"` + + // The status of the Extract or Replicat process. This option applies when retrieving running processes. + Status ProcessStatusTypeEnum `mandatory:"true" json:"status"` + + // The latency, in seconds, of a process running in a replication. This option applies when retrieving running processes. + LastRecordLagInSeconds *float32 `mandatory:"true" json:"lastRecordLagInSeconds"` + + // The date and time the last record was processed by an Extract or Replicat. This option applies when retrieving running processes. + // The format is defined by RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + TimeLastProcessed *common.SDKTime `mandatory:"true" json:"timeLastProcessed"` +} + +func (m PipelineRunningProcessSummary) 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 PipelineRunningProcessSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingProcessTypeEnum(string(m.ProcessType)); !ok && m.ProcessType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProcessType: %s. Supported values are: %s.", m.ProcessType, strings.Join(GetProcessTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingProcessStatusTypeEnum(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(GetProcessStatusTypeEnumStringValues(), ","))) + } + + 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/goldengate/pipeline_schema_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_collection.go new file mode 100644 index 00000000000..df84c0eefbb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaCollection The list of schemas present in the source/target connection database of a pipeline. +type PipelineSchemaCollection struct { + + // Array of pipeline schemas + Items []PipelineSchemaSummary `mandatory:"true" json:"items"` +} + +func (m PipelineSchemaCollection) 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 PipelineSchemaCollection) 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/goldengate/pipeline_schema_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_summary.go new file mode 100644 index 00000000000..de5539441f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_summary.go @@ -0,0 +1,44 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaSummary List of source and target schemas of a pipeline's assigned connection. +// 1. If there is no explicit mapping defined for the pipeline then only matched source and target schema names will be returned. +// 2. If there are explicit mappings defined for the pipeline then along with the mapped source and target schema names, the matched source and target schema names also will be returned. +type PipelineSchemaSummary struct { + + // The schema name from the database connection. + SourceSchemaName *string `mandatory:"true" json:"sourceSchemaName"` + + // The schema name from the database connection. + TargetSchemaName *string `mandatory:"true" json:"targetSchemaName"` +} + +func (m PipelineSchemaSummary) 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 PipelineSchemaSummary) 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/goldengate/pipeline_schema_table_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_table_collection.go new file mode 100644 index 00000000000..544f67a884e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_table_collection.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaTableCollection List of source or target schema tables of a pipeline's assigned connection. +type PipelineSchemaTableCollection struct { + + // Array of source or target schema tables of a pipeline's assigned connection. + Items []PipelineSchemaTableSummary `mandatory:"true" json:"items"` + + // The schema name from the database connection. + SourceSchemaName *string `mandatory:"false" json:"sourceSchemaName"` + + // The schema name from the database connection. + TargetSchemaName *string `mandatory:"false" json:"targetSchemaName"` +} + +func (m PipelineSchemaTableCollection) 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 PipelineSchemaTableCollection) 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/goldengate/pipeline_schema_table_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_table_summary.go new file mode 100644 index 00000000000..0911a0cddf4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_schema_table_summary.go @@ -0,0 +1,44 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSchemaTableSummary Summary of source or target schema tables of a pipeline's assigned connection. +// 1. If there is no explicit mapping defined for the pipeline then only matched source and target schema's table names will be returned +// 2. If there are explicit mappings defined for the pipeline then along with the mapped source and target schema's table names, the matched source and target schema's table names also will be returned. +type PipelineSchemaTableSummary struct { + + // The table name from the schema of database connection. + SourceTableName *string `mandatory:"true" json:"sourceTableName"` + + // The table name from the schema of database connection. + TargetTableName *string `mandatory:"true" json:"targetTableName"` +} + +func (m PipelineSchemaTableSummary) 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 PipelineSchemaTableSummary) 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/goldengate/pipeline_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_summary.go new file mode 100644 index 00000000000..cfef09a03b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/pipeline_summary.go @@ -0,0 +1,273 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PipelineSummary Summary details of the pipeline. +type PipelineSummary interface { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + GetId() *string + + // An object's Display Name. + GetDisplayName() *string + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + GetCompartmentId() *string + + GetSourceConnectionDetails() *SourcePipelineConnectionDetails + + GetTargetConnectionDetails() *TargetPipelineConnectionDetails + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + // The Minimum number of OCPUs to be made available for this Deployment. + GetCpuCoreCount() *int + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + GetIsAutoScalingEnabled() *bool + + // Lifecycle state for the pipeline summary. + GetLifecycleState() PipelineLifecycleStateEnum + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeCreated() *common.SDKTime + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + GetTimeUpdated() *common.SDKTime + + // Metadata about this specific object. + GetDescription() *string + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} + + // 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}}` + GetSystemTags() map[string]map[string]interface{} + + // Locks associated with this resource. + GetLocks() []ResourceLock + + // Possible lifecycle substates when retrieving a pipeline. + GetLifecycleSubState() PipelineLifecycleSubStateEnum + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + GetLifecycleDetails() *string +} + +type pipelinesummary struct { + JsonData []byte + Description *string `mandatory:"false" json:"description"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + Locks []ResourceLock `mandatory:"false" json:"locks"` + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *pipelinesummary) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpipelinesummary pipelinesummary + s := struct { + Model Unmarshalerpipelinesummary + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.DisplayName = s.Model.DisplayName + m.CompartmentId = s.Model.CompartmentId + m.SourceConnectionDetails = s.Model.SourceConnectionDetails + m.TargetConnectionDetails = s.Model.TargetConnectionDetails + m.LicenseModel = s.Model.LicenseModel + m.CpuCoreCount = s.Model.CpuCoreCount + m.IsAutoScalingEnabled = s.Model.IsAutoScalingEnabled + m.LifecycleState = s.Model.LifecycleState + m.TimeCreated = s.Model.TimeCreated + m.TimeUpdated = s.Model.TimeUpdated + m.Description = s.Model.Description + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.SystemTags = s.Model.SystemTags + m.Locks = s.Model.Locks + m.LifecycleSubState = s.Model.LifecycleSubState + m.LifecycleDetails = s.Model.LifecycleDetails + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *pipelinesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := ZeroEtlPipelineSummary{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PipelineSummary: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDescription returns Description +func (m pipelinesummary) GetDescription() *string { + return m.Description +} + +// GetFreeformTags returns FreeformTags +func (m pipelinesummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m pipelinesummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m pipelinesummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m pipelinesummary) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleSubState returns LifecycleSubState +func (m pipelinesummary) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m pipelinesummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id +func (m pipelinesummary) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m pipelinesummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m pipelinesummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m pipelinesummary) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m pipelinesummary) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetLicenseModel returns LicenseModel +func (m pipelinesummary) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m pipelinesummary) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m pipelinesummary) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetLifecycleState returns LifecycleState +func (m pipelinesummary) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m pipelinesummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m pipelinesummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m pipelinesummary) 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 pipelinesummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleStateEnum(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(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + 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/goldengate/process_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_options.go new file mode 100644 index 00000000000..2a9fbc642cc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_options.go @@ -0,0 +1,87 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProcessOptions Required pipeline options to configure the replication process (Extract or Replicat). +type ProcessOptions struct { + InitialDataLoad *InitialDataLoad `mandatory:"true" json:"initialDataLoad"` + + ReplicateSchemaChange *ReplicateSchemaChange `mandatory:"true" json:"replicateSchemaChange"` + + // If ENABLED, then the replication process restarts itself upon failure. This option applies when creating or updating a pipeline. + ShouldRestartOnFailure ProcessOptionsShouldRestartOnFailureEnum `mandatory:"true" json:"shouldRestartOnFailure"` +} + +func (m ProcessOptions) 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 ProcessOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingProcessOptionsShouldRestartOnFailureEnum(string(m.ShouldRestartOnFailure)); !ok && m.ShouldRestartOnFailure != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ShouldRestartOnFailure: %s. Supported values are: %s.", m.ShouldRestartOnFailure, strings.Join(GetProcessOptionsShouldRestartOnFailureEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ProcessOptionsShouldRestartOnFailureEnum Enum with underlying type: string +type ProcessOptionsShouldRestartOnFailureEnum string + +// Set of constants representing the allowable values for ProcessOptionsShouldRestartOnFailureEnum +const ( + ProcessOptionsShouldRestartOnFailureEnabled ProcessOptionsShouldRestartOnFailureEnum = "ENABLED" + ProcessOptionsShouldRestartOnFailureDisabled ProcessOptionsShouldRestartOnFailureEnum = "DISABLED" +) + +var mappingProcessOptionsShouldRestartOnFailureEnum = map[string]ProcessOptionsShouldRestartOnFailureEnum{ + "ENABLED": ProcessOptionsShouldRestartOnFailureEnabled, + "DISABLED": ProcessOptionsShouldRestartOnFailureDisabled, +} + +var mappingProcessOptionsShouldRestartOnFailureEnumLowerCase = map[string]ProcessOptionsShouldRestartOnFailureEnum{ + "enabled": ProcessOptionsShouldRestartOnFailureEnabled, + "disabled": ProcessOptionsShouldRestartOnFailureDisabled, +} + +// GetProcessOptionsShouldRestartOnFailureEnumValues Enumerates the set of values for ProcessOptionsShouldRestartOnFailureEnum +func GetProcessOptionsShouldRestartOnFailureEnumValues() []ProcessOptionsShouldRestartOnFailureEnum { + values := make([]ProcessOptionsShouldRestartOnFailureEnum, 0) + for _, v := range mappingProcessOptionsShouldRestartOnFailureEnum { + values = append(values, v) + } + return values +} + +// GetProcessOptionsShouldRestartOnFailureEnumStringValues Enumerates the set of values in String for ProcessOptionsShouldRestartOnFailureEnum +func GetProcessOptionsShouldRestartOnFailureEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingProcessOptionsShouldRestartOnFailureEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProcessOptionsShouldRestartOnFailureEnum(val string) (ProcessOptionsShouldRestartOnFailureEnum, bool) { + enum, ok := mappingProcessOptionsShouldRestartOnFailureEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_status_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_status_type.go new file mode 100644 index 00000000000..06bc001983e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_status_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ProcessStatusTypeEnum Enum with underlying type: string +type ProcessStatusTypeEnum string + +// Set of constants representing the allowable values for ProcessStatusTypeEnum +const ( + ProcessStatusTypeStopped ProcessStatusTypeEnum = "STOPPED" + ProcessStatusTypeRunning ProcessStatusTypeEnum = "RUNNING" + ProcessStatusTypeError ProcessStatusTypeEnum = "ERROR" +) + +var mappingProcessStatusTypeEnum = map[string]ProcessStatusTypeEnum{ + "STOPPED": ProcessStatusTypeStopped, + "RUNNING": ProcessStatusTypeRunning, + "ERROR": ProcessStatusTypeError, +} + +var mappingProcessStatusTypeEnumLowerCase = map[string]ProcessStatusTypeEnum{ + "stopped": ProcessStatusTypeStopped, + "running": ProcessStatusTypeRunning, + "error": ProcessStatusTypeError, +} + +// GetProcessStatusTypeEnumValues Enumerates the set of values for ProcessStatusTypeEnum +func GetProcessStatusTypeEnumValues() []ProcessStatusTypeEnum { + values := make([]ProcessStatusTypeEnum, 0) + for _, v := range mappingProcessStatusTypeEnum { + values = append(values, v) + } + return values +} + +// GetProcessStatusTypeEnumStringValues Enumerates the set of values in String for ProcessStatusTypeEnum +func GetProcessStatusTypeEnumStringValues() []string { + return []string{ + "STOPPED", + "RUNNING", + "ERROR", + } +} + +// GetMappingProcessStatusTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProcessStatusTypeEnum(val string) (ProcessStatusTypeEnum, bool) { + enum, ok := mappingProcessStatusTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_type.go new file mode 100644 index 00000000000..a65bc202db1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/process_type.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ProcessTypeEnum Enum with underlying type: string +type ProcessTypeEnum string + +// Set of constants representing the allowable values for ProcessTypeEnum +const ( + ProcessTypeExtract ProcessTypeEnum = "EXTRACT" + ProcessTypeReplicat ProcessTypeEnum = "REPLICAT" +) + +var mappingProcessTypeEnum = map[string]ProcessTypeEnum{ + "EXTRACT": ProcessTypeExtract, + "REPLICAT": ProcessTypeReplicat, +} + +var mappingProcessTypeEnumLowerCase = map[string]ProcessTypeEnum{ + "extract": ProcessTypeExtract, + "replicat": ProcessTypeReplicat, +} + +// GetProcessTypeEnumValues Enumerates the set of values for ProcessTypeEnum +func GetProcessTypeEnumValues() []ProcessTypeEnum { + values := make([]ProcessTypeEnum, 0) + for _, v := range mappingProcessTypeEnum { + values = append(values, v) + } + return values +} + +// GetProcessTypeEnumStringValues Enumerates the set of values in String for ProcessTypeEnum +func GetProcessTypeEnumStringValues() []string { + return []string{ + "EXTRACT", + "REPLICAT", + } +} + +// GetMappingProcessTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProcessTypeEnum(val string) (ProcessTypeEnum, bool) { + enum, ok := mappingProcessTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/recipe_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/recipe_summary.go new file mode 100644 index 00000000000..1b36e2b3333 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/recipe_summary.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RecipeSummary The list of recipe details to create pipelines. +type RecipeSummary struct { + + // The type of the recipe + RecipeType RecipeTypeEnum `mandatory:"true" json:"recipeType"` + + // An object's Display Name. + Name *string `mandatory:"true" json:"name"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Array of supported technology types for this recipe. + SupportedSourceTechnologyTypes []TechnologyTypeEnum `mandatory:"true" json:"supportedSourceTechnologyTypes"` + + // Array of supported technology types for this recipe. + SupportedTargetTechnologyTypes []TechnologyTypeEnum `mandatory:"true" json:"supportedTargetTechnologyTypes"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` +} + +func (m RecipeSummary) 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 RecipeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRecipeTypeEnum(string(m.RecipeType)); !ok && m.RecipeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecipeType: %s. Supported values are: %s.", m.RecipeType, strings.Join(GetRecipeTypeEnumStringValues(), ","))) + } + + 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/goldengate/recipe_summary_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/recipe_summary_collection.go new file mode 100644 index 00000000000..943cfaf34c1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/recipe_summary_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RecipeSummaryCollection The list of Recipe objects. +type RecipeSummaryCollection struct { + + // Array of Recipe Summary + Items []RecipeSummary `mandatory:"true" json:"items"` +} + +func (m RecipeSummaryCollection) 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 RecipeSummaryCollection) 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/goldengate/recipe_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/recipe_type.go new file mode 100644 index 00000000000..49c9e0faa5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/recipe_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// RecipeTypeEnum Enum with underlying type: string +type RecipeTypeEnum string + +// Set of constants representing the allowable values for RecipeTypeEnum +const ( + RecipeTypeZeroEtl RecipeTypeEnum = "ZERO_ETL" +) + +var mappingRecipeTypeEnum = map[string]RecipeTypeEnum{ + "ZERO_ETL": RecipeTypeZeroEtl, +} + +var mappingRecipeTypeEnumLowerCase = map[string]RecipeTypeEnum{ + "zero_etl": RecipeTypeZeroEtl, +} + +// GetRecipeTypeEnumValues Enumerates the set of values for RecipeTypeEnum +func GetRecipeTypeEnumValues() []RecipeTypeEnum { + values := make([]RecipeTypeEnum, 0) + for _, v := range mappingRecipeTypeEnum { + values = append(values, v) + } + return values +} + +// GetRecipeTypeEnumStringValues Enumerates the set of values in String for RecipeTypeEnum +func GetRecipeTypeEnumStringValues() []string { + return []string{ + "ZERO_ETL", + } +} + +// GetMappingRecipeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRecipeTypeEnum(val string) (RecipeTypeEnum, bool) { + enum, ok := mappingRecipeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_ddl_error_action.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_ddl_error_action.go new file mode 100644 index 00000000000..0a3b824a8d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_ddl_error_action.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ReplicateDdlErrorActionEnum Enum with underlying type: string +type ReplicateDdlErrorActionEnum string + +// Set of constants representing the allowable values for ReplicateDdlErrorActionEnum +const ( + ReplicateDdlErrorActionTerminate ReplicateDdlErrorActionEnum = "TERMINATE" + ReplicateDdlErrorActionDiscard ReplicateDdlErrorActionEnum = "DISCARD" + ReplicateDdlErrorActionIgnore ReplicateDdlErrorActionEnum = "IGNORE" +) + +var mappingReplicateDdlErrorActionEnum = map[string]ReplicateDdlErrorActionEnum{ + "TERMINATE": ReplicateDdlErrorActionTerminate, + "DISCARD": ReplicateDdlErrorActionDiscard, + "IGNORE": ReplicateDdlErrorActionIgnore, +} + +var mappingReplicateDdlErrorActionEnumLowerCase = map[string]ReplicateDdlErrorActionEnum{ + "terminate": ReplicateDdlErrorActionTerminate, + "discard": ReplicateDdlErrorActionDiscard, + "ignore": ReplicateDdlErrorActionIgnore, +} + +// GetReplicateDdlErrorActionEnumValues Enumerates the set of values for ReplicateDdlErrorActionEnum +func GetReplicateDdlErrorActionEnumValues() []ReplicateDdlErrorActionEnum { + values := make([]ReplicateDdlErrorActionEnum, 0) + for _, v := range mappingReplicateDdlErrorActionEnum { + values = append(values, v) + } + return values +} + +// GetReplicateDdlErrorActionEnumStringValues Enumerates the set of values in String for ReplicateDdlErrorActionEnum +func GetReplicateDdlErrorActionEnumStringValues() []string { + return []string{ + "TERMINATE", + "DISCARD", + "IGNORE", + } +} + +// GetMappingReplicateDdlErrorActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicateDdlErrorActionEnum(val string) (ReplicateDdlErrorActionEnum, bool) { + enum, ok := mappingReplicateDdlErrorActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_dml_error_action.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_dml_error_action.go new file mode 100644 index 00000000000..bc9ca4f7250 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_dml_error_action.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// ReplicateDmlErrorActionEnum Enum with underlying type: string +type ReplicateDmlErrorActionEnum string + +// Set of constants representing the allowable values for ReplicateDmlErrorActionEnum +const ( + ReplicateDmlErrorActionTerminate ReplicateDmlErrorActionEnum = "TERMINATE" + ReplicateDmlErrorActionDiscard ReplicateDmlErrorActionEnum = "DISCARD" + ReplicateDmlErrorActionIgnore ReplicateDmlErrorActionEnum = "IGNORE" +) + +var mappingReplicateDmlErrorActionEnum = map[string]ReplicateDmlErrorActionEnum{ + "TERMINATE": ReplicateDmlErrorActionTerminate, + "DISCARD": ReplicateDmlErrorActionDiscard, + "IGNORE": ReplicateDmlErrorActionIgnore, +} + +var mappingReplicateDmlErrorActionEnumLowerCase = map[string]ReplicateDmlErrorActionEnum{ + "terminate": ReplicateDmlErrorActionTerminate, + "discard": ReplicateDmlErrorActionDiscard, + "ignore": ReplicateDmlErrorActionIgnore, +} + +// GetReplicateDmlErrorActionEnumValues Enumerates the set of values for ReplicateDmlErrorActionEnum +func GetReplicateDmlErrorActionEnumValues() []ReplicateDmlErrorActionEnum { + values := make([]ReplicateDmlErrorActionEnum, 0) + for _, v := range mappingReplicateDmlErrorActionEnum { + values = append(values, v) + } + return values +} + +// GetReplicateDmlErrorActionEnumStringValues Enumerates the set of values in String for ReplicateDmlErrorActionEnum +func GetReplicateDmlErrorActionEnumStringValues() []string { + return []string{ + "TERMINATE", + "DISCARD", + "IGNORE", + } +} + +// GetMappingReplicateDmlErrorActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicateDmlErrorActionEnum(val string) (ReplicateDmlErrorActionEnum, bool) { + enum, ok := mappingReplicateDmlErrorActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_schema_change.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_schema_change.go new file mode 100644 index 00000000000..71723acb724 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/replicate_schema_change.go @@ -0,0 +1,96 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ReplicateSchemaChange Options required for pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. +type ReplicateSchemaChange struct { + + // If ENABLED, then addition or removal of schema is also replicated, apart from individual tables and records when creating or updating the pipeline. + CanReplicateSchemaChange ReplicateSchemaChangeCanReplicateSchemaChangeEnum `mandatory:"true" json:"canReplicateSchemaChange"` + + // Action upon DDL Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + ActionOnDdlError ReplicateDdlErrorActionEnum `mandatory:"false" json:"actionOnDdlError,omitempty"` + + // Action upon DML Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + ActionOnDmlError ReplicateDmlErrorActionEnum `mandatory:"false" json:"actionOnDmlError,omitempty"` +} + +func (m ReplicateSchemaChange) 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 ReplicateSchemaChange) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingReplicateSchemaChangeCanReplicateSchemaChangeEnum(string(m.CanReplicateSchemaChange)); !ok && m.CanReplicateSchemaChange != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CanReplicateSchemaChange: %s. Supported values are: %s.", m.CanReplicateSchemaChange, strings.Join(GetReplicateSchemaChangeCanReplicateSchemaChangeEnumStringValues(), ","))) + } + + if _, ok := GetMappingReplicateDdlErrorActionEnum(string(m.ActionOnDdlError)); !ok && m.ActionOnDdlError != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionOnDdlError: %s. Supported values are: %s.", m.ActionOnDdlError, strings.Join(GetReplicateDdlErrorActionEnumStringValues(), ","))) + } + if _, ok := GetMappingReplicateDmlErrorActionEnum(string(m.ActionOnDmlError)); !ok && m.ActionOnDmlError != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionOnDmlError: %s. Supported values are: %s.", m.ActionOnDmlError, strings.Join(GetReplicateDmlErrorActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ReplicateSchemaChangeCanReplicateSchemaChangeEnum Enum with underlying type: string +type ReplicateSchemaChangeCanReplicateSchemaChangeEnum string + +// Set of constants representing the allowable values for ReplicateSchemaChangeCanReplicateSchemaChangeEnum +const ( + ReplicateSchemaChangeCanReplicateSchemaChangeEnabled ReplicateSchemaChangeCanReplicateSchemaChangeEnum = "ENABLED" + ReplicateSchemaChangeCanReplicateSchemaChangeDisabled ReplicateSchemaChangeCanReplicateSchemaChangeEnum = "DISABLED" +) + +var mappingReplicateSchemaChangeCanReplicateSchemaChangeEnum = map[string]ReplicateSchemaChangeCanReplicateSchemaChangeEnum{ + "ENABLED": ReplicateSchemaChangeCanReplicateSchemaChangeEnabled, + "DISABLED": ReplicateSchemaChangeCanReplicateSchemaChangeDisabled, +} + +var mappingReplicateSchemaChangeCanReplicateSchemaChangeEnumLowerCase = map[string]ReplicateSchemaChangeCanReplicateSchemaChangeEnum{ + "enabled": ReplicateSchemaChangeCanReplicateSchemaChangeEnabled, + "disabled": ReplicateSchemaChangeCanReplicateSchemaChangeDisabled, +} + +// GetReplicateSchemaChangeCanReplicateSchemaChangeEnumValues Enumerates the set of values for ReplicateSchemaChangeCanReplicateSchemaChangeEnum +func GetReplicateSchemaChangeCanReplicateSchemaChangeEnumValues() []ReplicateSchemaChangeCanReplicateSchemaChangeEnum { + values := make([]ReplicateSchemaChangeCanReplicateSchemaChangeEnum, 0) + for _, v := range mappingReplicateSchemaChangeCanReplicateSchemaChangeEnum { + values = append(values, v) + } + return values +} + +// GetReplicateSchemaChangeCanReplicateSchemaChangeEnumStringValues Enumerates the set of values in String for ReplicateSchemaChangeCanReplicateSchemaChangeEnum +func GetReplicateSchemaChangeCanReplicateSchemaChangeEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingReplicateSchemaChangeCanReplicateSchemaChangeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingReplicateSchemaChangeCanReplicateSchemaChangeEnum(val string) (ReplicateSchemaChangeCanReplicateSchemaChangeEnum, bool) { + enum, ok := mappingReplicateSchemaChangeCanReplicateSchemaChangeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/severity_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/severity_type.go new file mode 100644 index 00000000000..a925ff13cdb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/severity_type.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// SeverityTypeEnum Enum with underlying type: string +type SeverityTypeEnum string + +// Set of constants representing the allowable values for SeverityTypeEnum +const ( + SeverityTypeInfo SeverityTypeEnum = "INFO" + SeverityTypeError SeverityTypeEnum = "ERROR" + SeverityTypeWarning SeverityTypeEnum = "WARNING" +) + +var mappingSeverityTypeEnum = map[string]SeverityTypeEnum{ + "INFO": SeverityTypeInfo, + "ERROR": SeverityTypeError, + "WARNING": SeverityTypeWarning, +} + +var mappingSeverityTypeEnumLowerCase = map[string]SeverityTypeEnum{ + "info": SeverityTypeInfo, + "error": SeverityTypeError, + "warning": SeverityTypeWarning, +} + +// GetSeverityTypeEnumValues Enumerates the set of values for SeverityTypeEnum +func GetSeverityTypeEnumValues() []SeverityTypeEnum { + values := make([]SeverityTypeEnum, 0) + for _, v := range mappingSeverityTypeEnum { + values = append(values, v) + } + return values +} + +// GetSeverityTypeEnumStringValues Enumerates the set of values in String for SeverityTypeEnum +func GetSeverityTypeEnumStringValues() []string { + return []string{ + "INFO", + "ERROR", + "WARNING", + } +} + +// GetMappingSeverityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSeverityTypeEnum(val string) (SeverityTypeEnum, bool) { + enum, ok := mappingSeverityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/source_pipeline_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/source_pipeline_connection_details.go new file mode 100644 index 00000000000..772644f883b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/source_pipeline_connection_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SourcePipelineConnectionDetails The source connection details for creating a pipeline. +type SourcePipelineConnectionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + ConnectionId *string `mandatory:"true" json:"connectionId"` +} + +func (m SourcePipelineConnectionDetails) 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 SourcePipelineConnectionDetails) 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/goldengate/start_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/start_pipeline_details.go new file mode 100644 index 00000000000..c712edcdca9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/start_pipeline_details.go @@ -0,0 +1,77 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StartPipelineDetails Details with which to start a pipeline. +type StartPipelineDetails interface { +} + +type startpipelinedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *startpipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerstartpipelinedetails startpipelinedetails + s := struct { + Model Unmarshalerstartpipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *startpipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "DEFAULT": + mm := DefaultStartPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for StartPipelineDetails: %s.", m.Type) + return *m, nil + } +} + +func (m startpipelinedetails) 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 startpipelinedetails) 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/goldengate/start_pipeline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/start_pipeline_request_response.go new file mode 100644 index 00000000000..8c1cac9c0cf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/start_pipeline_request_response.go @@ -0,0 +1,109 @@ +// 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 goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StartPipelineRequest wrapper for the StartPipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StartPipeline.go.html to see an example of how to use StartPipelineRequest. +type StartPipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Details to start Pipeline. + StartPipelineDetails `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 is 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"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // 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 StartPipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StartPipelineRequest) 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 StartPipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StartPipelineRequest) 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 StartPipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StartPipelineResponse wrapper for the StartPipeline operation +type StartPipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StartPipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StartPipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/start_pipeline_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/start_pipeline_type.go new file mode 100644 index 00000000000..5077c966328 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/start_pipeline_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// StartPipelineTypeEnum Enum with underlying type: string +type StartPipelineTypeEnum string + +// Set of constants representing the allowable values for StartPipelineTypeEnum +const ( + StartPipelineTypeDefault StartPipelineTypeEnum = "DEFAULT" +) + +var mappingStartPipelineTypeEnum = map[string]StartPipelineTypeEnum{ + "DEFAULT": StartPipelineTypeDefault, +} + +var mappingStartPipelineTypeEnumLowerCase = map[string]StartPipelineTypeEnum{ + "default": StartPipelineTypeDefault, +} + +// GetStartPipelineTypeEnumValues Enumerates the set of values for StartPipelineTypeEnum +func GetStartPipelineTypeEnumValues() []StartPipelineTypeEnum { + values := make([]StartPipelineTypeEnum, 0) + for _, v := range mappingStartPipelineTypeEnum { + values = append(values, v) + } + return values +} + +// GetStartPipelineTypeEnumStringValues Enumerates the set of values in String for StartPipelineTypeEnum +func GetStartPipelineTypeEnumStringValues() []string { + return []string{ + "DEFAULT", + } +} + +// GetMappingStartPipelineTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStartPipelineTypeEnum(val string) (StartPipelineTypeEnum, bool) { + enum, ok := mappingStartPipelineTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/step_message.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/step_message.go new file mode 100644 index 00000000000..ee667751084 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/step_message.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StepMessage Contents of a step message. +type StepMessage struct { + + // The status message of the steps in a recipe during pipeline initialization. + // https://docs.oracle.com/en/middleware/goldengate/core/23/oggra/rest-endpoints.html + Message *string `mandatory:"true" json:"message"` + + // The code returned when GoldenGate reports an error while running a step during pipeline initialization. + // https://docs.oracle.com/en/middleware/goldengate/core/23/error-messages/ogg-00001-ogg-40000.html#GUID-97FF7AA7-7A5C-4AA7-B29F-3CC8D26761F2 + Code *string `mandatory:"true" json:"code"` + + // Date and time of a message issued by steps in a recipe during pipeline initialization. + // The format is defined by RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` + + // The severity returned when calling GoldenGate API messages for a step in a recipe during pipeline initialization. + // https://docs.oracle.com/en/middleware/goldengate/core/23/oggra/rest-endpoints.html + Severity SeverityTypeEnum `mandatory:"true" json:"severity"` +} + +func (m StepMessage) 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 StepMessage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSeverityTypeEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetSeverityTypeEnumStringValues(), ","))) + } + + 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/goldengate/step_status_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/step_status_type.go new file mode 100644 index 00000000000..2a30b9b7450 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/step_status_type.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// StepStatusTypeEnum Enum with underlying type: string +type StepStatusTypeEnum string + +// Set of constants representing the allowable values for StepStatusTypeEnum +const ( + StepStatusTypePending StepStatusTypeEnum = "PENDING" + StepStatusTypeInProgress StepStatusTypeEnum = "IN_PROGRESS" + StepStatusTypeCompleted StepStatusTypeEnum = "COMPLETED" + StepStatusTypeFailed StepStatusTypeEnum = "FAILED" +) + +var mappingStepStatusTypeEnum = map[string]StepStatusTypeEnum{ + "PENDING": StepStatusTypePending, + "IN_PROGRESS": StepStatusTypeInProgress, + "COMPLETED": StepStatusTypeCompleted, + "FAILED": StepStatusTypeFailed, +} + +var mappingStepStatusTypeEnumLowerCase = map[string]StepStatusTypeEnum{ + "pending": StepStatusTypePending, + "in_progress": StepStatusTypeInProgress, + "completed": StepStatusTypeCompleted, + "failed": StepStatusTypeFailed, +} + +// GetStepStatusTypeEnumValues Enumerates the set of values for StepStatusTypeEnum +func GetStepStatusTypeEnumValues() []StepStatusTypeEnum { + values := make([]StepStatusTypeEnum, 0) + for _, v := range mappingStepStatusTypeEnum { + values = append(values, v) + } + return values +} + +// GetStepStatusTypeEnumStringValues Enumerates the set of values in String for StepStatusTypeEnum +func GetStepStatusTypeEnumStringValues() []string { + return []string{ + "PENDING", + "IN_PROGRESS", + "COMPLETED", + "FAILED", + } +} + +// GetMappingStepStatusTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStepStatusTypeEnum(val string) (StepStatusTypeEnum, bool) { + enum, ok := mappingStepStatusTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_details.go new file mode 100644 index 00000000000..6ca5e6a4527 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_details.go @@ -0,0 +1,77 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StopPipelineDetails Details for a pipeline stop. +type StopPipelineDetails interface { +} + +type stoppipelinedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *stoppipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerstoppipelinedetails stoppipelinedetails + s := struct { + Model Unmarshalerstoppipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *stoppipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "DEFAULT": + mm := DefaultStopPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for StopPipelineDetails: %s.", m.Type) + return *m, nil + } +} + +func (m stoppipelinedetails) 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 stoppipelinedetails) 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/goldengate/stop_pipeline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_request_response.go new file mode 100644 index 00000000000..34620058004 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_request_response.go @@ -0,0 +1,109 @@ +// 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 goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StopPipelineRequest wrapper for the StopPipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/StopPipeline.go.html to see an example of how to use StopPipelineRequest. +type StopPipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Details to stop the pipeline. + StopPipelineDetails `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 is 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"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // 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 StopPipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StopPipelineRequest) 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 StopPipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StopPipelineRequest) 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 StopPipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StopPipelineResponse wrapper for the StopPipeline operation +type StopPipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StopPipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StopPipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_type.go new file mode 100644 index 00000000000..9242a0a5acc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/stop_pipeline_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// StopPipelineTypeEnum Enum with underlying type: string +type StopPipelineTypeEnum string + +// Set of constants representing the allowable values for StopPipelineTypeEnum +const ( + StopPipelineTypeDefault StopPipelineTypeEnum = "DEFAULT" +) + +var mappingStopPipelineTypeEnum = map[string]StopPipelineTypeEnum{ + "DEFAULT": StopPipelineTypeDefault, +} + +var mappingStopPipelineTypeEnumLowerCase = map[string]StopPipelineTypeEnum{ + "default": StopPipelineTypeDefault, +} + +// GetStopPipelineTypeEnumValues Enumerates the set of values for StopPipelineTypeEnum +func GetStopPipelineTypeEnumValues() []StopPipelineTypeEnum { + values := make([]StopPipelineTypeEnum, 0) + for _, v := range mappingStopPipelineTypeEnum { + values = append(values, v) + } + return values +} + +// GetStopPipelineTypeEnumStringValues Enumerates the set of values in String for StopPipelineTypeEnum +func GetStopPipelineTypeEnumStringValues() []string { + return []string{ + "DEFAULT", + } +} + +// GetMappingStopPipelineTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingStopPipelineTypeEnum(val string) (StopPipelineTypeEnum, bool) { + enum, ok := mappingStopPipelineTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/target_pipeline_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/target_pipeline_connection_details.go new file mode 100644 index 00000000000..8af1675e30c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/target_pipeline_connection_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TargetPipelineConnectionDetails The target connection details for creating a pipeline. +type TargetPipelineConnectionDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + ConnectionId *string `mandatory:"true" json:"connectionId"` +} + +func (m TargetPipelineConnectionDetails) 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 TargetPipelineConnectionDetails) 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/goldengate/test_pipeline_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_details.go new file mode 100644 index 00000000000..f8a2b0d1412 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_details.go @@ -0,0 +1,77 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TestPipelineConnectionDetails Details about testing the pipeline's assigned connection. +type TestPipelineConnectionDetails interface { +} + +type testpipelineconnectiondetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *testpipelineconnectiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalertestpipelineconnectiondetails testpipelineconnectiondetails + s := struct { + Model Unmarshalertestpipelineconnectiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *testpipelineconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "DEFAULT": + mm := DefaultTestPipelineConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for TestPipelineConnectionDetails: %s.", m.Type) + return *m, nil + } +} + +func (m testpipelineconnectiondetails) 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 testpipelineconnectiondetails) 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/goldengate/test_pipeline_connection_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_error.go new file mode 100644 index 00000000000..0da46770131 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_error.go @@ -0,0 +1,48 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TestPipelineConnectionError The error returned when a pipeline connection fails to connect. +type TestPipelineConnectionError struct { + + // A short error code that defines the error, meant for programmatic parsing. + Code *string `mandatory:"true" json:"code"` + + // A human-readable error string. + Message *string `mandatory:"true" json:"message"` + + // The text describing the root cause of the reported issue. + Issue *string `mandatory:"false" json:"issue"` + + // The text describing the action required to fix the issue. + Action *string `mandatory:"false" json:"action"` +} + +func (m TestPipelineConnectionError) 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 TestPipelineConnectionError) 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/goldengate/test_pipeline_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_request_response.go new file mode 100644 index 00000000000..82027178017 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// TestPipelineConnectionRequest wrapper for the TestPipelineConnection operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/TestPipelineConnection.go.html to see an example of how to use TestPipelineConnectionRequest. +type TestPipelineConnectionRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // Additional metadata required to test the connection assigned to the pipeline. + TestPipelineConnectionDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + // `if-match` parameter to the value of the etag from a previous GET or POST response for that + // resource. The resource is updated or deleted only if the etag you provide matches the + // resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried, in case of a timeout or server error, + // without the 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 was deleted and purged + // from the system, then a retry of the original creation request is 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 TestPipelineConnectionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request TestPipelineConnectionRequest) 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 TestPipelineConnectionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request TestPipelineConnectionRequest) 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 TestPipelineConnectionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TestPipelineConnectionResponse wrapper for the TestPipelineConnection operation +type TestPipelineConnectionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TestPipelineConnectionResult instance + TestPipelineConnectionResult `presentIn:"body"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include 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 TestPipelineConnectionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response TestPipelineConnectionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_result.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_result.go new file mode 100644 index 00000000000..ba48b087830 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_result.go @@ -0,0 +1,90 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TestPipelineConnectionResult Result of the connectivity test performed on a pipeline's assigned connection. +type TestPipelineConnectionResult struct { + + // Type of result, either Succeeded, Failed, or Timed out. + ResultType TestPipelineConnectionResultResultTypeEnum `mandatory:"true" json:"resultType"` + + Error *TestPipelineConnectionError `mandatory:"false" json:"error"` +} + +func (m TestPipelineConnectionResult) 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 TestPipelineConnectionResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingTestPipelineConnectionResultResultTypeEnum(string(m.ResultType)); !ok && m.ResultType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResultType: %s. Supported values are: %s.", m.ResultType, strings.Join(GetTestPipelineConnectionResultResultTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TestPipelineConnectionResultResultTypeEnum Enum with underlying type: string +type TestPipelineConnectionResultResultTypeEnum string + +// Set of constants representing the allowable values for TestPipelineConnectionResultResultTypeEnum +const ( + TestPipelineConnectionResultResultTypeSucceeded TestPipelineConnectionResultResultTypeEnum = "SUCCEEDED" + TestPipelineConnectionResultResultTypeFailed TestPipelineConnectionResultResultTypeEnum = "FAILED" + TestPipelineConnectionResultResultTypeTimedOut TestPipelineConnectionResultResultTypeEnum = "TIMED_OUT" +) + +var mappingTestPipelineConnectionResultResultTypeEnum = map[string]TestPipelineConnectionResultResultTypeEnum{ + "SUCCEEDED": TestPipelineConnectionResultResultTypeSucceeded, + "FAILED": TestPipelineConnectionResultResultTypeFailed, + "TIMED_OUT": TestPipelineConnectionResultResultTypeTimedOut, +} + +var mappingTestPipelineConnectionResultResultTypeEnumLowerCase = map[string]TestPipelineConnectionResultResultTypeEnum{ + "succeeded": TestPipelineConnectionResultResultTypeSucceeded, + "failed": TestPipelineConnectionResultResultTypeFailed, + "timed_out": TestPipelineConnectionResultResultTypeTimedOut, +} + +// GetTestPipelineConnectionResultResultTypeEnumValues Enumerates the set of values for TestPipelineConnectionResultResultTypeEnum +func GetTestPipelineConnectionResultResultTypeEnumValues() []TestPipelineConnectionResultResultTypeEnum { + values := make([]TestPipelineConnectionResultResultTypeEnum, 0) + for _, v := range mappingTestPipelineConnectionResultResultTypeEnum { + values = append(values, v) + } + return values +} + +// GetTestPipelineConnectionResultResultTypeEnumStringValues Enumerates the set of values in String for TestPipelineConnectionResultResultTypeEnum +func GetTestPipelineConnectionResultResultTypeEnumStringValues() []string { + return []string{ + "SUCCEEDED", + "FAILED", + "TIMED_OUT", + } +} + +// GetMappingTestPipelineConnectionResultResultTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTestPipelineConnectionResultResultTypeEnum(val string) (TestPipelineConnectionResultResultTypeEnum, bool) { + enum, ok := mappingTestPipelineConnectionResultResultTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_type.go new file mode 100644 index 00000000000..503aa1ecdd6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/test_pipeline_connection_type.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "strings" +) + +// TestPipelineConnectionTypeEnum Enum with underlying type: string +type TestPipelineConnectionTypeEnum string + +// Set of constants representing the allowable values for TestPipelineConnectionTypeEnum +const ( + TestPipelineConnectionTypeDefault TestPipelineConnectionTypeEnum = "DEFAULT" +) + +var mappingTestPipelineConnectionTypeEnum = map[string]TestPipelineConnectionTypeEnum{ + "DEFAULT": TestPipelineConnectionTypeDefault, +} + +var mappingTestPipelineConnectionTypeEnumLowerCase = map[string]TestPipelineConnectionTypeEnum{ + "default": TestPipelineConnectionTypeDefault, +} + +// GetTestPipelineConnectionTypeEnumValues Enumerates the set of values for TestPipelineConnectionTypeEnum +func GetTestPipelineConnectionTypeEnumValues() []TestPipelineConnectionTypeEnum { + values := make([]TestPipelineConnectionTypeEnum, 0) + for _, v := range mappingTestPipelineConnectionTypeEnum { + values = append(values, v) + } + return values +} + +// GetTestPipelineConnectionTypeEnumStringValues Enumerates the set of values in String for TestPipelineConnectionTypeEnum +func GetTestPipelineConnectionTypeEnumStringValues() []string { + return []string{ + "DEFAULT", + } +} + +// GetMappingTestPipelineConnectionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTestPipelineConnectionTypeEnum(val string) (TestPipelineConnectionTypeEnum, bool) { + enum, ok := mappingTestPipelineConnectionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_mysql_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_mysql_connection_details.go index 3d6e74aa829..4c66115c683 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_mysql_connection_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_mysql_connection_details.go @@ -89,7 +89,7 @@ type UpdateMysqlConnectionDetails struct { // containing the client public key (for 2-way SSL). SslCert *string `mandatory:"false" json:"sslCert"` - // Client Key – The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). + // Client Key - The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). SslKey *string `mandatory:"false" json:"sslKey"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_pipeline_details.go new file mode 100644 index 00000000000..3d7f51769dd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_pipeline_details.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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePipelineDetails Information with which to update a pipeline. +type UpdatePipelineDetails interface { + + // An object's Display Name. + GetDisplayName() *string + + // Metadata about this specific object. + GetDescription() *string + + // The Oracle license model that applies to a Deployment. + GetLicenseModel() LicenseModelEnum + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + GetFreeformTags() map[string]string + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + GetDefinedTags() map[string]map[string]interface{} +} + +type updatepipelinedetails struct { + JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` + Description *string `mandatory:"false" json:"description"` + LicenseModel LicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + RecipeType string `json:"recipeType"` +} + +// UnmarshalJSON unmarshals json +func (m *updatepipelinedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdatepipelinedetails updatepipelinedetails + s := struct { + Model Unmarshalerupdatepipelinedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.DisplayName = s.Model.DisplayName + m.Description = s.Model.Description + m.LicenseModel = s.Model.LicenseModel + m.FreeformTags = s.Model.FreeformTags + m.DefinedTags = s.Model.DefinedTags + m.RecipeType = s.Model.RecipeType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updatepipelinedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.RecipeType { + case "ZERO_ETL": + mm := UpdateZeroEtlPipelineDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for UpdatePipelineDetails: %s.", m.RecipeType) + return *m, nil + } +} + +// GetDisplayName returns DisplayName +func (m updatepipelinedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m updatepipelinedetails) GetDescription() *string { + return m.Description +} + +// GetLicenseModel returns LicenseModel +func (m updatepipelinedetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetFreeformTags returns FreeformTags +func (m updatepipelinedetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m updatepipelinedetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m updatepipelinedetails) 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 updatepipelinedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + 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/goldengate/update_pipeline_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_pipeline_request_response.go new file mode 100644 index 00000000000..2b1eda8793d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_pipeline_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package goldengate + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePipelineRequest wrapper for the UpdatePipeline operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/goldengate/UpdatePipeline.go.html to see an example of how to use UpdatePipelineRequest. +type UpdatePipelineRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline created. + PipelineId *string `mandatory:"true" contributesTo:"path" name:"pipelineId"` + + // The existing pipeline specifications to apply. + UpdatePipelineDetails `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 is 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"` + + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + + // 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 UpdatePipelineRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePipelineRequest) 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 UpdatePipelineRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePipelineRequest) 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 UpdatePipelineRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePipelineResponse wrapper for the UpdatePipeline operation +type UpdatePipelineResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A unique Oracle-assigned identifier for an asynchronous request. You can use this to query + // status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // A unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please include the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePipelineResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePipelineResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_zero_etl_pipeline_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_zero_etl_pipeline_details.go new file mode 100644 index 00000000000..2a0f66114d0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/update_zero_etl_pipeline_details.go @@ -0,0 +1,102 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateZeroEtlPipelineDetails Information to update for an existing ZeroETL pipeline. +type UpdateZeroEtlPipelineDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined 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"` + + ProcessOptions *ProcessOptions `mandatory:"false" json:"processOptions"` + + // Mapping for source/target schema/tables for the pipeline data replication. + MappingRules []MappingRule `mandatory:"false" json:"mappingRules"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` +} + +// GetDisplayName returns DisplayName +func (m UpdateZeroEtlPipelineDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m UpdateZeroEtlPipelineDetails) GetDescription() *string { + return m.Description +} + +// GetLicenseModel returns LicenseModel +func (m UpdateZeroEtlPipelineDetails) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetFreeformTags returns FreeformTags +func (m UpdateZeroEtlPipelineDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateZeroEtlPipelineDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateZeroEtlPipelineDetails) 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 UpdateZeroEtlPipelineDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateZeroEtlPipelineDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateZeroEtlPipelineDetails UpdateZeroEtlPipelineDetails + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeUpdateZeroEtlPipelineDetails + }{ + "ZERO_ETL", + (MarshalTypeUpdateZeroEtlPipelineDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/zero_etl_pipeline.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/zero_etl_pipeline.go new file mode 100644 index 00000000000..d4a4349640b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/zero_etl_pipeline.go @@ -0,0 +1,220 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ZeroEtlPipeline The details of a ZeroETL pipeline. +type ZeroEtlPipeline struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The Minimum number of OCPUs to be made available for this Deployment. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The 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"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Mapping for source/target schema/tables for the pipeline data replication. + MappingRules []MappingRule `mandatory:"false" json:"mappingRules"` + + ProcessOptions *ProcessOptions `mandatory:"false" json:"processOptions"` + + // When the resource was last updated. This option applies when retrieving a pipeline. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + TimeLastRecorded *common.SDKTime `mandatory:"false" json:"timeLastRecorded"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + + // Lifecycle state of the pipeline. + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Possible lifecycle substates when retrieving a pipeline. + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` +} + +// GetId returns Id +func (m ZeroEtlPipeline) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m ZeroEtlPipeline) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m ZeroEtlPipeline) GetDescription() *string { + return m.Description +} + +// GetCompartmentId returns CompartmentId +func (m ZeroEtlPipeline) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLicenseModel returns LicenseModel +func (m ZeroEtlPipeline) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m ZeroEtlPipeline) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m ZeroEtlPipeline) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m ZeroEtlPipeline) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m ZeroEtlPipeline) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetFreeformTags returns FreeformTags +func (m ZeroEtlPipeline) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m ZeroEtlPipeline) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m ZeroEtlPipeline) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m ZeroEtlPipeline) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleState returns LifecycleState +func (m ZeroEtlPipeline) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleSubState returns LifecycleSubState +func (m ZeroEtlPipeline) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m ZeroEtlPipeline) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeCreated returns TimeCreated +func (m ZeroEtlPipeline) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m ZeroEtlPipeline) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m ZeroEtlPipeline) 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 ZeroEtlPipeline) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleStateEnum(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(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ZeroEtlPipeline) MarshalJSON() (buff []byte, e error) { + type MarshalTypeZeroEtlPipeline ZeroEtlPipeline + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeZeroEtlPipeline + }{ + "ZERO_ETL", + (MarshalTypeZeroEtlPipeline)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/zero_etl_pipeline_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/zero_etl_pipeline_summary.go new file mode 100644 index 00000000000..ac83c19789a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/goldengate/zero_etl_pipeline_summary.go @@ -0,0 +1,217 @@ +// 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. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ZeroEtlPipelineSummary Summary of the ZeroETL pipeline. +type ZeroEtlPipelineSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + SourceConnectionDetails *SourcePipelineConnectionDetails `mandatory:"true" json:"sourceConnectionDetails"` + + TargetConnectionDetails *TargetPipelineConnectionDetails `mandatory:"true" json:"targetConnectionDetails"` + + // The Minimum number of OCPUs to be made available for this Deployment. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // Indicates if auto scaling is enabled for the Deployment's CPU core count. + IsAutoScalingEnabled *bool `mandatory:"true" json:"isAutoScalingEnabled"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + ProcessOptions *ProcessOptions `mandatory:"true" json:"processOptions"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A 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"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The 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"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // When the resource was last updated. This option applies when retrieving a pipeline. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + TimeLastRecorded *common.SDKTime `mandatory:"false" json:"timeLastRecorded"` + + // Lifecycle state for the pipeline summary. + LifecycleState PipelineLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The Oracle license model that applies to a Deployment. + LicenseModel LicenseModelEnum `mandatory:"true" json:"licenseModel"` + + // Possible lifecycle substates when retrieving a pipeline. + LifecycleSubState PipelineLifecycleSubStateEnum `mandatory:"false" json:"lifecycleSubState,omitempty"` +} + +// GetId returns Id +func (m ZeroEtlPipelineSummary) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m ZeroEtlPipelineSummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetDescription returns Description +func (m ZeroEtlPipelineSummary) GetDescription() *string { + return m.Description +} + +// GetCompartmentId returns CompartmentId +func (m ZeroEtlPipelineSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceConnectionDetails returns SourceConnectionDetails +func (m ZeroEtlPipelineSummary) GetSourceConnectionDetails() *SourcePipelineConnectionDetails { + return m.SourceConnectionDetails +} + +// GetTargetConnectionDetails returns TargetConnectionDetails +func (m ZeroEtlPipelineSummary) GetTargetConnectionDetails() *TargetPipelineConnectionDetails { + return m.TargetConnectionDetails +} + +// GetFreeformTags returns FreeformTags +func (m ZeroEtlPipelineSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetLicenseModel returns LicenseModel +func (m ZeroEtlPipelineSummary) GetLicenseModel() LicenseModelEnum { + return m.LicenseModel +} + +// GetCpuCoreCount returns CpuCoreCount +func (m ZeroEtlPipelineSummary) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled +func (m ZeroEtlPipelineSummary) GetIsAutoScalingEnabled() *bool { + return m.IsAutoScalingEnabled +} + +// GetDefinedTags returns DefinedTags +func (m ZeroEtlPipelineSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m ZeroEtlPipelineSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetLocks returns Locks +func (m ZeroEtlPipelineSummary) GetLocks() []ResourceLock { + return m.Locks +} + +// GetLifecycleState returns LifecycleState +func (m ZeroEtlPipelineSummary) GetLifecycleState() PipelineLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleSubState returns LifecycleSubState +func (m ZeroEtlPipelineSummary) GetLifecycleSubState() PipelineLifecycleSubStateEnum { + return m.LifecycleSubState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m ZeroEtlPipelineSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeCreated returns TimeCreated +func (m ZeroEtlPipelineSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m ZeroEtlPipelineSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +func (m ZeroEtlPipelineSummary) 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 ZeroEtlPipelineSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPipelineLifecycleStateEnum(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(GetPipelineLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingLicenseModelEnum(string(m.LicenseModel)); !ok && m.LicenseModel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseModel: %s. Supported values are: %s.", m.LicenseModel, strings.Join(GetLicenseModelEnumStringValues(), ","))) + } + if _, ok := GetMappingPipelineLifecycleSubStateEnum(string(m.LifecycleSubState)); !ok && m.LifecycleSubState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleSubState: %s. Supported values are: %s.", m.LifecycleSubState, strings.Join(GetPipelineLifecycleSubStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ZeroEtlPipelineSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeZeroEtlPipelineSummary ZeroEtlPipelineSummary + s := struct { + DiscriminatorParam string `json:"recipeType"` + MarshalTypeZeroEtlPipelineSummary + }{ + "ZERO_ETL", + (MarshalTypeZeroEtlPipelineSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_protocol_types.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_protocol_types.go new file mode 100644 index 00000000000..a010bea8a3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_protocol_types.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. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "strings" +) + +// HttpProtocolTypesEnum Enum with underlying type: string +type HttpProtocolTypesEnum string + +// Set of constants representing the allowable values for HttpProtocolTypesEnum +const ( + HttpProtocolTypesHttp HttpProtocolTypesEnum = "HTTP" + HttpProtocolTypesHttps HttpProtocolTypesEnum = "HTTPS" +) + +var mappingHttpProtocolTypesEnum = map[string]HttpProtocolTypesEnum{ + "HTTP": HttpProtocolTypesHttp, + "HTTPS": HttpProtocolTypesHttps, +} + +var mappingHttpProtocolTypesEnumLowerCase = map[string]HttpProtocolTypesEnum{ + "http": HttpProtocolTypesHttp, + "https": HttpProtocolTypesHttps, +} + +// GetHttpProtocolTypesEnumValues Enumerates the set of values for HttpProtocolTypesEnum +func GetHttpProtocolTypesEnumValues() []HttpProtocolTypesEnum { + values := make([]HttpProtocolTypesEnum, 0) + for _, v := range mappingHttpProtocolTypesEnum { + values = append(values, v) + } + return values +} + +// GetHttpProtocolTypesEnumStringValues Enumerates the set of values in String for HttpProtocolTypesEnum +func GetHttpProtocolTypesEnumStringValues() []string { + return []string{ + "HTTP", + "HTTPS", + } +} + +// GetMappingHttpProtocolTypesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHttpProtocolTypesEnum(val string) (HttpProtocolTypesEnum, bool) { + enum, ok := mappingHttpProtocolTypesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_query_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_query_properties.go new file mode 100644 index 00000000000..6a1bf3daf9a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_query_properties.go @@ -0,0 +1,68 @@ +// 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. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpQueryProperties Query properties applicable to HTTP type of collection method +type HttpQueryProperties struct { + + // Http(s) end point URL + Url *string `mandatory:"true" json:"url"` + + ScriptDetails *HttpScriptFileDetails `mandatory:"true" json:"scriptDetails"` + + // Type of content response given by the http(s) URL + ResponseContentType HttpResponseContentTypesEnum `mandatory:"true" json:"responseContentType"` + + // Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + ProtocolType HttpProtocolTypesEnum `mandatory:"false" json:"protocolType,omitempty"` +} + +func (m HttpQueryProperties) 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 HttpQueryProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingHttpResponseContentTypesEnum(string(m.ResponseContentType)); !ok && m.ResponseContentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResponseContentType: %s. Supported values are: %s.", m.ResponseContentType, strings.Join(GetHttpResponseContentTypesEnumStringValues(), ","))) + } + if _, ok := GetMappingHttpProtocolTypesEnum(string(m.ProtocolType)); !ok && m.ProtocolType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtocolType: %s. Supported values are: %s.", m.ProtocolType, strings.Join(GetHttpProtocolTypesEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HttpQueryProperties) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHttpQueryProperties HttpQueryProperties + s := struct { + DiscriminatorParam string `json:"collectionMethod"` + MarshalTypeHttpQueryProperties + }{ + "HTTP", + (MarshalTypeHttpQueryProperties)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_response_content_types.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_response_content_types.go new file mode 100644 index 00000000000..5dc0d4fe988 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_response_content_types.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "strings" +) + +// HttpResponseContentTypesEnum Enum with underlying type: string +type HttpResponseContentTypesEnum string + +// Set of constants representing the allowable values for HttpResponseContentTypesEnum +const ( + HttpResponseContentTypesTextPlain HttpResponseContentTypesEnum = "TEXT_PLAIN" + HttpResponseContentTypesTextHtml HttpResponseContentTypesEnum = "TEXT_HTML" + HttpResponseContentTypesApplicationJson HttpResponseContentTypesEnum = "APPLICATION_JSON" + HttpResponseContentTypesApplicationXml HttpResponseContentTypesEnum = "APPLICATION_XML" +) + +var mappingHttpResponseContentTypesEnum = map[string]HttpResponseContentTypesEnum{ + "TEXT_PLAIN": HttpResponseContentTypesTextPlain, + "TEXT_HTML": HttpResponseContentTypesTextHtml, + "APPLICATION_JSON": HttpResponseContentTypesApplicationJson, + "APPLICATION_XML": HttpResponseContentTypesApplicationXml, +} + +var mappingHttpResponseContentTypesEnumLowerCase = map[string]HttpResponseContentTypesEnum{ + "text_plain": HttpResponseContentTypesTextPlain, + "text_html": HttpResponseContentTypesTextHtml, + "application_json": HttpResponseContentTypesApplicationJson, + "application_xml": HttpResponseContentTypesApplicationXml, +} + +// GetHttpResponseContentTypesEnumValues Enumerates the set of values for HttpResponseContentTypesEnum +func GetHttpResponseContentTypesEnumValues() []HttpResponseContentTypesEnum { + values := make([]HttpResponseContentTypesEnum, 0) + for _, v := range mappingHttpResponseContentTypesEnum { + values = append(values, v) + } + return values +} + +// GetHttpResponseContentTypesEnumStringValues Enumerates the set of values in String for HttpResponseContentTypesEnum +func GetHttpResponseContentTypesEnumStringValues() []string { + return []string{ + "TEXT_PLAIN", + "TEXT_HTML", + "APPLICATION_JSON", + "APPLICATION_XML", + } +} + +// GetMappingHttpResponseContentTypesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHttpResponseContentTypesEnum(val string) (HttpResponseContentTypesEnum, bool) { + enum, ok := mappingHttpResponseContentTypesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_script_file_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_script_file_details.go new file mode 100644 index 00000000000..ff82d6940bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_script_file_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpScriptFileDetails JavaScript file details which is used to convert http(s) response into metric data +type HttpScriptFileDetails struct { + + // Name of the script file + Name *string `mandatory:"true" json:"name"` + + // Content of the JavaScript file as base64 encoded string + Content *string `mandatory:"true" json:"content"` +} + +func (m HttpScriptFileDetails) 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 HttpScriptFileDetails) 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/stackmonitoring/http_update_query_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_update_query_properties.go new file mode 100644 index 00000000000..35bd25ae9fa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/http_update_query_properties.go @@ -0,0 +1,68 @@ +// 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. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpUpdateQueryProperties Query properties applicable to HTTP type of collection method +type HttpUpdateQueryProperties struct { + + // Http(s) end point URL + Url *string `mandatory:"false" json:"url"` + + ScriptDetails *UpdateHttpScriptFileDetails `mandatory:"false" json:"scriptDetails"` + + // Type of content response given by the http(s) URL + ResponseContentType HttpResponseContentTypesEnum `mandatory:"false" json:"responseContentType,omitempty"` + + // Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + ProtocolType HttpProtocolTypesEnum `mandatory:"false" json:"protocolType,omitempty"` +} + +func (m HttpUpdateQueryProperties) 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 HttpUpdateQueryProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingHttpResponseContentTypesEnum(string(m.ResponseContentType)); !ok && m.ResponseContentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResponseContentType: %s. Supported values are: %s.", m.ResponseContentType, strings.Join(GetHttpResponseContentTypesEnumStringValues(), ","))) + } + if _, ok := GetMappingHttpProtocolTypesEnum(string(m.ProtocolType)); !ok && m.ProtocolType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProtocolType: %s. Supported values are: %s.", m.ProtocolType, strings.Join(GetHttpProtocolTypesEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HttpUpdateQueryProperties) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHttpUpdateQueryProperties HttpUpdateQueryProperties + s := struct { + DiscriminatorParam string `json:"collectionMethod"` + MarshalTypeHttpUpdateQueryProperties + }{ + "HTTP", + (MarshalTypeHttpUpdateQueryProperties)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/list_metric_extensions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/list_metric_extensions_request_response.go index 68c0b9bbb12..92672b71736 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/list_metric_extensions_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/list_metric_extensions_request_response.go @@ -18,9 +18,6 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/stackmonitoring/ListMetricExtensions.go.html to see an example of how to use ListMetricExtensionsRequest. type ListMetricExtensionsRequest struct { - // The ID of the compartment in which data is listed. - CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - // For list pagination. The maximum number of results per page, or items to return in a // paginated "List" call. For important details about how pagination works, see // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). @@ -38,6 +35,9 @@ type ListMetricExtensionsRequest struct { // The sort order to use, either ascending (`ASC`) or descending (`DESC`). SortOrder ListMetricExtensionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + // The ID of the compartment in which data is listed. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + // A filter to return resources based on resource type. ResourceType *string `mandatory:"false" contributesTo:"query" name:"resourceType"` @@ -53,6 +53,9 @@ type ListMetricExtensionsRequest struct { // A filter to return metric extensions based on input resource Id on which metric extension is enabled EnabledOnResourceId *string `mandatory:"false" contributesTo:"query" name:"enabledOnResourceId"` + // Identifier for the metric extension + MetricExtensionId *string `mandatory:"false" contributesTo:"query" name:"metricExtensionId"` + // 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"` @@ -144,18 +147,21 @@ type ListMetricExtensionsSortByEnum string // Set of constants representing the allowable values for ListMetricExtensionsSortByEnum const ( - ListMetricExtensionsSortByName ListMetricExtensionsSortByEnum = "NAME" - ListMetricExtensionsSortByTimeCreated ListMetricExtensionsSortByEnum = "TIME_CREATED" + ListMetricExtensionsSortByName ListMetricExtensionsSortByEnum = "NAME" + ListMetricExtensionsSortByTimeCreated ListMetricExtensionsSortByEnum = "TIME_CREATED" + ListMetricExtensionsSortByEnabledOnResourceCount ListMetricExtensionsSortByEnum = "ENABLED_ON_RESOURCE_COUNT" ) var mappingListMetricExtensionsSortByEnum = map[string]ListMetricExtensionsSortByEnum{ - "NAME": ListMetricExtensionsSortByName, - "TIME_CREATED": ListMetricExtensionsSortByTimeCreated, + "NAME": ListMetricExtensionsSortByName, + "TIME_CREATED": ListMetricExtensionsSortByTimeCreated, + "ENABLED_ON_RESOURCE_COUNT": ListMetricExtensionsSortByEnabledOnResourceCount, } var mappingListMetricExtensionsSortByEnumLowerCase = map[string]ListMetricExtensionsSortByEnum{ - "name": ListMetricExtensionsSortByName, - "time_created": ListMetricExtensionsSortByTimeCreated, + "name": ListMetricExtensionsSortByName, + "time_created": ListMetricExtensionsSortByTimeCreated, + "enabled_on_resource_count": ListMetricExtensionsSortByEnabledOnResourceCount, } // GetListMetricExtensionsSortByEnumValues Enumerates the set of values for ListMetricExtensionsSortByEnum @@ -172,6 +178,7 @@ func GetListMetricExtensionsSortByEnumStringValues() []string { return []string{ "NAME", "TIME_CREATED", + "ENABLED_ON_RESOURCE_COUNT", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_collection_methods.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_collection_methods.go index 319ac9c9b28..f80b101db82 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_collection_methods.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_collection_methods.go @@ -21,18 +21,21 @@ const ( MetricExtensionCollectionMethodsOsCommand MetricExtensionCollectionMethodsEnum = "OS_COMMAND" MetricExtensionCollectionMethodsSql MetricExtensionCollectionMethodsEnum = "SQL" MetricExtensionCollectionMethodsJmx MetricExtensionCollectionMethodsEnum = "JMX" + MetricExtensionCollectionMethodsHttp MetricExtensionCollectionMethodsEnum = "HTTP" ) var mappingMetricExtensionCollectionMethodsEnum = map[string]MetricExtensionCollectionMethodsEnum{ "OS_COMMAND": MetricExtensionCollectionMethodsOsCommand, "SQL": MetricExtensionCollectionMethodsSql, "JMX": MetricExtensionCollectionMethodsJmx, + "HTTP": MetricExtensionCollectionMethodsHttp, } var mappingMetricExtensionCollectionMethodsEnumLowerCase = map[string]MetricExtensionCollectionMethodsEnum{ "os_command": MetricExtensionCollectionMethodsOsCommand, "sql": MetricExtensionCollectionMethodsSql, "jmx": MetricExtensionCollectionMethodsJmx, + "http": MetricExtensionCollectionMethodsHttp, } // GetMetricExtensionCollectionMethodsEnumValues Enumerates the set of values for MetricExtensionCollectionMethodsEnum @@ -50,6 +53,7 @@ func GetMetricExtensionCollectionMethodsEnumStringValues() []string { "OS_COMMAND", "SQL", "JMX", + "HTTP", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_query_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_query_properties.go index 97afa6eaf01..a24eb98bacb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_query_properties.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_query_properties.go @@ -62,6 +62,10 @@ func (m *metricextensionqueryproperties) UnmarshalPolymorphicJSON(data []byte) ( mm := JmxQueryProperties{} err = json.Unmarshal(data, &mm) return mm, err + case "HTTP": + mm := HttpQueryProperties{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for MetricExtensionQueryProperties: %s.", m.CollectionMethod) return *m, nil diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_sort_by.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_sort_by.go index 7eb15bd8354..fc8003bcaa7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_sort_by.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_sort_by.go @@ -18,18 +18,21 @@ type MetricExtensionSortByEnum string // Set of constants representing the allowable values for MetricExtensionSortByEnum const ( - MetricExtensionSortByName MetricExtensionSortByEnum = "NAME" - MetricExtensionSortByTimeCreated MetricExtensionSortByEnum = "TIME_CREATED" + MetricExtensionSortByName MetricExtensionSortByEnum = "NAME" + MetricExtensionSortByTimeCreated MetricExtensionSortByEnum = "TIME_CREATED" + MetricExtensionSortByEnabledOnResourceCount MetricExtensionSortByEnum = "ENABLED_ON_RESOURCE_COUNT" ) var mappingMetricExtensionSortByEnum = map[string]MetricExtensionSortByEnum{ - "NAME": MetricExtensionSortByName, - "TIME_CREATED": MetricExtensionSortByTimeCreated, + "NAME": MetricExtensionSortByName, + "TIME_CREATED": MetricExtensionSortByTimeCreated, + "ENABLED_ON_RESOURCE_COUNT": MetricExtensionSortByEnabledOnResourceCount, } var mappingMetricExtensionSortByEnumLowerCase = map[string]MetricExtensionSortByEnum{ - "name": MetricExtensionSortByName, - "time_created": MetricExtensionSortByTimeCreated, + "name": MetricExtensionSortByName, + "time_created": MetricExtensionSortByTimeCreated, + "enabled_on_resource_count": MetricExtensionSortByEnabledOnResourceCount, } // GetMetricExtensionSortByEnumValues Enumerates the set of values for MetricExtensionSortByEnum @@ -46,6 +49,7 @@ func GetMetricExtensionSortByEnumStringValues() []string { return []string{ "NAME", "TIME_CREATED", + "ENABLED_ON_RESOURCE_COUNT", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_update_query_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_update_query_properties.go index 7577f1d5b33..84b71ac4b13 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_update_query_properties.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/metric_extension_update_query_properties.go @@ -62,6 +62,10 @@ func (m *metricextensionupdatequeryproperties) UnmarshalPolymorphicJSON(data []b mm := OsCommandUpdateQueryProperties{} err = json.Unmarshal(data, &mm) return mm, err + case "HTTP": + mm := HttpUpdateQueryProperties{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for MetricExtensionUpdateQueryProperties: %s.", m.CollectionMethod) return *m, nil diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/script_file_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/script_file_details.go index 855fb2b186f..d31e0630c85 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/script_file_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/script_file_details.go @@ -15,7 +15,7 @@ import ( "strings" ) -// ScriptFileDetails Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data +// ScriptFileDetails Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data. For removing it during update, set its "content" property to an empty string. In that case, "name" property value is ignored. type ScriptFileDetails struct { // Name of the script file diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_details.go index 3b75c1c9fae..3330d39200a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_details.go @@ -18,11 +18,14 @@ import ( // SqlOutParamDetails Position and SQL Type of PL/SQL OUT parameter type SqlOutParamDetails struct { - // Position of PL/SQL procedure OUT parameter + // Position of PL/SQL procedure OUT parameter. The value of this property is ignored during update, if "outParamType" is set to NO_OUT_PARAM value. OutParamPosition *int `mandatory:"true" json:"outParamPosition"` - // SQL Type of PL/SQL procedure OUT parameter + // SQL Type of PL/SQL procedure OUT parameter. During the update, to completely remove the out parameter, use the value NO_OUT_PARAM. In that case, the value of "outParamPosition" will be ignored. OutParamType SqlOutParamTypesEnum `mandatory:"true" json:"outParamType"` + + // Name of the Out Parameter + OutParamName *string `mandatory:"false" json:"outParamName"` } func (m SqlOutParamDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_types.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_types.go index cf5f19d7547..679f38ee65a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_types.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/sql_out_param_types.go @@ -18,18 +18,21 @@ type SqlOutParamTypesEnum string // Set of constants representing the allowable values for SqlOutParamTypesEnum const ( - SqlOutParamTypesSqlCursor SqlOutParamTypesEnum = "SQL_CURSOR" - SqlOutParamTypesArray SqlOutParamTypesEnum = "ARRAY" + SqlOutParamTypesSqlCursor SqlOutParamTypesEnum = "SQL_CURSOR" + SqlOutParamTypesArray SqlOutParamTypesEnum = "ARRAY" + SqlOutParamTypesNoOutParam SqlOutParamTypesEnum = "NO_OUT_PARAM" ) var mappingSqlOutParamTypesEnum = map[string]SqlOutParamTypesEnum{ - "SQL_CURSOR": SqlOutParamTypesSqlCursor, - "ARRAY": SqlOutParamTypesArray, + "SQL_CURSOR": SqlOutParamTypesSqlCursor, + "ARRAY": SqlOutParamTypesArray, + "NO_OUT_PARAM": SqlOutParamTypesNoOutParam, } var mappingSqlOutParamTypesEnumLowerCase = map[string]SqlOutParamTypesEnum{ - "sql_cursor": SqlOutParamTypesSqlCursor, - "array": SqlOutParamTypesArray, + "sql_cursor": SqlOutParamTypesSqlCursor, + "array": SqlOutParamTypesArray, + "no_out_param": SqlOutParamTypesNoOutParam, } // GetSqlOutParamTypesEnumValues Enumerates the set of values for SqlOutParamTypesEnum @@ -46,6 +49,7 @@ func GetSqlOutParamTypesEnumStringValues() []string { return []string{ "SQL_CURSOR", "ARRAY", + "NO_OUT_PARAM", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/update_http_script_file_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/update_http_script_file_details.go new file mode 100644 index 00000000000..09a37de5196 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/stackmonitoring/update_http_script_file_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Stack Monitoring API +// +// Stack Monitoring API. +// + +package stackmonitoring + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateHttpScriptFileDetails JavaScript file details which is used to convert http(s) response into metric data +type UpdateHttpScriptFileDetails struct { + + // Name of the script file + Name *string `mandatory:"false" json:"name"` + + // Content of the JavaScript file as base64 encoded string + Content *string `mandatory:"false" json:"content"` +} + +func (m UpdateHttpScriptFileDetails) 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 UpdateHttpScriptFileDetails) 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/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 8dc650dd2c1..6d0050851b1 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.76.0 => ./vendor/github.com/oracle/oci-go-sdk +# github.com/oracle/oci-go-sdk/v65 v65.81.1 ## 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/bds_bds_cluster_versions.html.markdown b/website/docs/d/bds_bds_cluster_versions.html.markdown new file mode 100644 index 00000000000..e56a2bf1493 --- /dev/null +++ b/website/docs/d/bds_bds_cluster_versions.html.markdown @@ -0,0 +1,41 @@ +--- +subcategory: "Big Data Service" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_bds_bds_cluster_versions" +sidebar_current: "docs-oci-datasource-bds-bds_cluster_versions" +description: |- + Provides the list of Bds Cluster Versions in Oracle Cloud Infrastructure Big Data Service service +--- + +# Data Source: oci_bds_bds_cluster_versions +This data source provides the list of Bds Cluster Versions in Oracle Cloud Infrastructure Big Data Service service. + +Returns a list of cluster versions with associated odh and bds versions. + + +## Example Usage + +```hcl +data "oci_bds_bds_cluster_versions" "test_bds_cluster_versions" { +} +``` + +## Argument Reference + +The following arguments are supported: + + + +## Attributes Reference + +The following attributes are exported: + +* `bds_cluster_versions` - The list of bds_cluster_versions. + +### BdsClusterVersion Reference + +The following attributes are exported: + +* `bds_version` - BDS version to be used for cluster creation +* `odh_version` - ODH version to be used for cluster creation + diff --git a/website/docs/d/bds_bds_instance.html.markdown b/website/docs/d/bds_bds_instance.html.markdown index 294b9d553bd..213a2adca95 100644 --- a/website/docs/d/bds_bds_instance.html.markdown +++ b/website/docs/d/bds_bds_instance.html.markdown @@ -32,6 +32,9 @@ The following arguments are supported: The following attributes are exported: +* `bds_cluster_version_summary` - Cluster version details including bds and odh version information. + * `bds_version` - BDS version to be used for cluster creation + * `odh_version` - ODH version to be used for cluster creation * `bootstrap_script_url` - pre-authenticated URL of the bootstrap script in Object Store that can be downloaded and executed. * `cloud_sql_details` - The information about added Cloud SQL capability * `block_volume_size_in_gbs` - The size of block volume in GB that needs to be attached to a given node. All the necessary details needed for attachment are managed by service itself. diff --git a/website/docs/d/bds_bds_instance_api_key.html.markdown b/website/docs/d/bds_bds_instance_api_key.html.markdown index 953196f0828..1da50bf4d35 100644 --- a/website/docs/d/bds_bds_instance_api_key.html.markdown +++ b/website/docs/d/bds_bds_instance_api_key.html.markdown @@ -34,7 +34,12 @@ The following arguments are supported: The following attributes are exported: +<<<<<<< ours +* `default_region` - The name of the region to establish the Object Storage endpoint which was set as part of key creation operation. If no region was provided this will be set to be the same region where the cluster lives. Example us-phoenix-1 . +* `domain_ocid` - Identity domain OCID ,where user is present. For default domain ,this field will be optional. +======= * `default_region` - The name of the region to establish the Object Storage endpoint which was set as part of key creation operation. If no region was provided this will be set to be the same region where the cluster lives. Example us-phoenix-1 . +>>>>>>> theirs * `fingerprint` - The fingerprint that corresponds to the public API key requested. * `id` - Identifier of the user's API key. * `key_alias` - User friendly identifier used to uniquely differentiate between different API keys. Only ASCII alphanumeric characters with no spaces allowed. diff --git a/website/docs/d/bds_bds_instance_api_keys.html.markdown b/website/docs/d/bds_bds_instance_api_keys.html.markdown index 953196f0828..853f0972e58 100644 --- a/website/docs/d/bds_bds_instance_api_keys.html.markdown +++ b/website/docs/d/bds_bds_instance_api_keys.html.markdown @@ -34,7 +34,18 @@ The following arguments are supported: The following attributes are exported: +<<<<<<< ours +* `bds_api_keys` - The list of bds_api_keys. + +### BdsInstanceApiKey Reference + +The following attributes are exported: + +* `default_region` - The name of the region to establish the Object Storage endpoint which was set as part of key creation operation. If no region was provided this will be set to be the same region where the cluster lives. Example us-phoenix-1 . +* `domain_ocid` - Identity domain OCID ,where user is present. For default domain ,this field will be optional. +======= * `default_region` - The name of the region to establish the Object Storage endpoint which was set as part of key creation operation. If no region was provided this will be set to be the same region where the cluster lives. Example us-phoenix-1 . +>>>>>>> theirs * `fingerprint` - The fingerprint that corresponds to the public API key requested. * `id` - Identifier of the user's API key. * `key_alias` - User friendly identifier used to uniquely differentiate between different API keys. Only ASCII alphanumeric characters with no spaces allowed. diff --git a/website/docs/d/bds_bds_instance_identity_configuration.html.markdown b/website/docs/d/bds_bds_instance_identity_configuration.html.markdown new file mode 100644 index 00000000000..8bade0c8173 --- /dev/null +++ b/website/docs/d/bds_bds_instance_identity_configuration.html.markdown @@ -0,0 +1,59 @@ +--- +subcategory: "Big Data Service" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_bds_bds_instance_identity_configuration" +sidebar_current: "docs-oci-datasource-bds-bds_instance_identity_configuration" +description: |- + Provides details about a specific Bds Instance Identity Configuration in Oracle Cloud Infrastructure Big Data Service service +--- + +# Data Source: oci_bds_bds_instance_identity_configuration +This data source provides details about a specific Bds Instance Identity Configuration resource in Oracle Cloud Infrastructure Big Data Service service. + +Get details of one identity config on the cluster + +## Example Usage + +```hcl +data "oci_bds_bds_instance_identity_configuration" "test_bds_instance_identity_configuration" { + #Required + bds_instance_id = oci_bds_bds_instance.test_bds_instance.id + identity_configuration_id = oci_audit_configuration.test_configuration.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `bds_instance_id` - (Required) The OCID of the cluster. +* `identity_configuration_id` - (Required) The OCID of the identity configuration + + +## Attributes Reference + +The following attributes are exported: + +* `confidential_application_id` - identity domain confidential application ID for the identity config +* `display_name` - the display name of the identity configuration +* `iam_user_sync_configuration` - Information about the IAM user sync configuration. + * `is_posix_attributes_addition_required` - whether to append POSIX attributes to IAM users + * `state` - Lifecycle state of the IAM user sync config + * `time_created` - Time when this IAM user sync config was created, shown as an RFC 3339 formatted datetime string. + * `time_updated` - Time when this IAM user sync config was updated, shown as an RFC 3339 formatted datetime string. +* `id` - The id of the identity config +* `identity_domain_id` - Identity domain to use for identity config +* `state` - Lifecycle state of the identity configuration +* `time_created` - Time when this identity configuration was created, shown as an RFC 3339 formatted datetime string. +* `time_updated` - Time when this identity configuration config was updated, shown as an RFC 3339 formatted datetime string. +* `upst_configuration` - Information about the UPST configuration. + * `keytab_content` - The kerberos keytab content used for creating identity propagation trust config, in base64 format + * `master_encryption_key_id` - Master Encryption key used for encrypting token exchange keytab. + * `secret_id` - Secret ID for token exchange keytab + * `state` - Lifecycle state of the UPST config + * `time_created` - Time when this UPST config was created, shown as an RFC 3339 formatted datetime string. + * `time_token_exchange_keytab_last_refreshed` - Time when the keytab for token exchange principal is last refreshed, shown as an RFC 3339 formatted datetime string. + * `time_updated` - Time when this UPST config was updated, shown as an RFC 3339 formatted datetime string. + * `token_exchange_principal_name` - Token exchange kerberos Principal name in cluster + * `vault_id` - The instance OCID of the node, which is the resource from which the node backup was acquired. + diff --git a/website/docs/d/bds_bds_instance_identity_configurations.html.markdown b/website/docs/d/bds_bds_instance_identity_configurations.html.markdown new file mode 100644 index 00000000000..df5b69e8522 --- /dev/null +++ b/website/docs/d/bds_bds_instance_identity_configurations.html.markdown @@ -0,0 +1,72 @@ +--- +subcategory: "Big Data Service" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_bds_bds_instance_identity_configurations" +sidebar_current: "docs-oci-datasource-bds-bds_instance_identity_configurations" +description: |- + Provides the list of Bds Instance Identity Configurations in Oracle Cloud Infrastructure Big Data Service service +--- + +# Data Source: oci_bds_bds_instance_identity_configurations +This data source provides the list of Bds Instance Identity Configurations in Oracle Cloud Infrastructure Big Data Service service. + +Returns a list of all identity configurations associated with this Big Data Service cluster. + + +## Example Usage + +```hcl +data "oci_bds_bds_instance_identity_configurations" "test_bds_instance_identity_configurations" { + #Required + bds_instance_id = oci_bds_bds_instance.test_bds_instance.id + compartment_id = var.compartment_id + + #Optional + display_name = var.bds_instance_identity_configuration_display_name + state = var.bds_instance_identity_configuration_state +} +``` + +## Argument Reference + +The following arguments are supported: + +* `bds_instance_id` - (Required) The OCID of the cluster. +* `compartment_id` - (Required) The OCID of the compartment. +* `display_name` - (Optional) A filter to return only resources that match the entire display name given. +* `state` - (Optional) The state of the identity config + + +## Attributes Reference + +The following attributes are exported: + +* `identity_configurations` - The list of identity_configurations. + +### BdsInstanceIdentityConfiguration Reference + +The following attributes are exported: + +* `confidential_application_id` - identity domain confidential application ID for the identity config +* `display_name` - the display name of the identity configuration +* `iam_user_sync_configuration` - Information about the IAM user sync configuration. + * `is_posix_attributes_addition_required` - whether to append POSIX attributes to IAM users + * `state` - Lifecycle state of the IAM user sync config + * `time_created` - Time when this IAM user sync config was created, shown as an RFC 3339 formatted datetime string. + * `time_updated` - Time when this IAM user sync config was updated, shown as an RFC 3339 formatted datetime string. +* `id` - The id of the identity config +* `identity_domain_id` - Identity domain to use for identity config +* `state` - Lifecycle state of the identity configuration +* `time_created` - Time when this identity configuration was created, shown as an RFC 3339 formatted datetime string. +* `time_updated` - Time when this identity configuration config was updated, shown as an RFC 3339 formatted datetime string. +* `upst_configuration` - Information about the UPST configuration. + * `keytab_content` - The kerberos keytab content used for creating identity propagation trust config, in base64 format + * `master_encryption_key_id` - Master Encryption key used for encrypting token exchange keytab. + * `secret_id` - Secret ID for token exchange keytab + * `state` - Lifecycle state of the UPST config + * `time_created` - Time when this UPST config was created, shown as an RFC 3339 formatted datetime string. + * `time_token_exchange_keytab_last_refreshed` - Time when the keytab for token exchange principal is last refreshed, shown as an RFC 3339 formatted datetime string. + * `time_updated` - Time when this UPST config was updated, shown as an RFC 3339 formatted datetime string. + * `token_exchange_principal_name` - Token exchange kerberos Principal name in cluster + * `vault_id` - The instance OCID of the node, which is the resource from which the node backup was acquired. + diff --git a/website/docs/d/bds_bds_instances.html.markdown b/website/docs/d/bds_bds_instances.html.markdown index 498cc4f87f8..5fed88d914e 100644 --- a/website/docs/d/bds_bds_instances.html.markdown +++ b/website/docs/d/bds_bds_instances.html.markdown @@ -45,6 +45,9 @@ The following attributes are exported: The following attributes are exported: +* `bds_cluster_version_summary` - Cluster version details including bds and odh version information. + * `bds_version` - BDS version to be used for cluster creation + * `odh_version` - ODH version to be used for cluster creation * `bootstrap_script_url` - pre-authenticated URL of the bootstrap script in Object Store that can be downloaded and executed. * `cloud_sql_details` - The information about added Cloud SQL capability * `block_volume_size_in_gbs` - The size of block volume in GB that needs to be attached to a given node. All the necessary details needed for attachment are managed by service itself. diff --git a/website/docs/d/blockchain_blockchain_platform.html.markdown b/website/docs/d/blockchain_blockchain_platform.html.markdown index 5252b4636bb..897c8beaadf 100644 --- a/website/docs/d/blockchain_blockchain_platform.html.markdown +++ b/website/docs/d/blockchain_blockchain_platform.html.markdown @@ -49,7 +49,7 @@ The following attributes are exported: * `peer_key` - peer identifier * `role` - Peer role * `state` - The current state of the peer. -* `compute_shape` - Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM +* `compute_shape` - Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM or DIGITAL_ASSETS_MEDIUM or DIGITAL_ASSETS_LARGE or DIGITAL_ASSETS_EXTRA_LARGE * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `description` - Platform Instance Description * `display_name` - Platform Instance Display name, can be renamed diff --git a/website/docs/d/blockchain_blockchain_platforms.html.markdown b/website/docs/d/blockchain_blockchain_platforms.html.markdown index 33d5312ddc8..720ff074bd2 100644 --- a/website/docs/d/blockchain_blockchain_platforms.html.markdown +++ b/website/docs/d/blockchain_blockchain_platforms.html.markdown @@ -61,7 +61,7 @@ The following attributes are exported: * `peer_key` - peer identifier * `role` - Peer role * `state` - The current state of the peer. -* `compute_shape` - Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM +* `compute_shape` - Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM or DIGITAL_ASSETS_MEDIUM or DIGITAL_ASSETS_LARGE or DIGITAL_ASSETS_EXTRA_LARGE * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `description` - Platform Instance Description * `display_name` - Platform Instance Display name, can be renamed diff --git a/website/docs/d/core_volume_attachments.html.markdown b/website/docs/d/core_volume_attachments.html.markdown index 8f8bec4a010..566469bef25 100644 --- a/website/docs/d/core_volume_attachments.html.markdown +++ b/website/docs/d/core_volume_attachments.html.markdown @@ -67,6 +67,7 @@ The following attributes are exported: * `is_multipath` - Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment. * `is_pv_encryption_in_transit_enabled` - Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not. * `is_read_only` - Whether the attachment was created in read-only mode. +* `is_shareable` - Whether the attachment should be created in shareable mode. If an attachment is created in shareable mode, then other instances can attach the same volume, provided that they also create their attachments in shareable mode. Only certain volume types can be attached in shareable mode. Defaults to false if not specified. * `is_volume_created_during_launch` - Flag indicating if this volume was created for the customer as part of a simplified launch. Used to determine whether the volume requires deletion on instance termination. * `iscsi_login_state` - The iscsi login state of the volume attachment. For a Iscsi volume attachment, all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state. * `multipath_devices` - A list of secondary multipath devices diff --git a/website/docs/d/database_autonomous_database.html.markdown b/website/docs/d/database_autonomous_database.html.markdown index 328e596fe83..a688a40b5e4 100644 --- a/website/docs/d/database_autonomous_database.html.markdown +++ b/website/docs/d/database_autonomous_database.html.markdown @@ -155,6 +155,7 @@ The following attributes are exported: This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform. For Autonomous Database Serverless instances, `whitelistedIps` is used. * `is_auto_scaling_enabled` - Indicates if auto scaling is enabled for the Autonomous Database CPU core count. The default value is `TRUE`. * `is_auto_scaling_for_storage_enabled` - Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. +* `is_backup_retention_locked` - Indicates if the Autonomous Database is backup retention locked. * `is_data_guard_enabled` - **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. * `is_dedicated` - True if the database uses [dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html). * `is_dev_tier` - Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. diff --git a/website/docs/d/database_autonomous_databases.html.markdown b/website/docs/d/database_autonomous_databases.html.markdown index e520b4481fe..d8dd18d1ebd 100644 --- a/website/docs/d/database_autonomous_databases.html.markdown +++ b/website/docs/d/database_autonomous_databases.html.markdown @@ -182,6 +182,7 @@ The following attributes are exported: This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform. For Autonomous Database Serverless instances, `whitelistedIps` is used. * `is_auto_scaling_enabled` - Indicates if auto scaling is enabled for the Autonomous Database CPU core count. The default value is `TRUE`. * `is_auto_scaling_for_storage_enabled` - Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. +* `is_backup_retention_locked` - Indicates if the Autonomous Database is backup retention locked. * `is_data_guard_enabled` - **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. * `is_dedicated` - True if the database uses [dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html). * `is_free_tier` - Indicates if this is an Always Free resource. The default value is false. Note that Always Free Autonomous Databases have 1 CPU and 20GB of memory. For Always Free databases, memory and CPU cannot be scaled. diff --git a/website/docs/d/database_autonomous_databases_clones.html.markdown b/website/docs/d/database_autonomous_databases_clones.html.markdown index c9ff8a6e641..c75efd0f04b 100644 --- a/website/docs/d/database_autonomous_databases_clones.html.markdown +++ b/website/docs/d/database_autonomous_databases_clones.html.markdown @@ -171,6 +171,7 @@ The following attributes are exported: This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform. For Autonomous Database Serverless instances, `whitelistedIps` is used. * `is_auto_scaling_enabled` - Indicates if auto scaling is enabled for the Autonomous Database CPU core count. The default value is `TRUE`. * `is_auto_scaling_for_storage_enabled` - Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. +* `is_backup_retention_locked` - Indicates if the Autonomous Database is backup retention locked. * `is_data_guard_enabled` - **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. * `is_dedicated` - True if the database uses [dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html). * `is_dev_tier` - Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. diff --git a/website/docs/d/datascience_job_run.html.markdown b/website/docs/d/datascience_job_run.html.markdown index 260631a7fbd..8bee1e9673f 100644 --- a/website/docs/d/datascience_job_run.html.markdown +++ b/website/docs/d/datascience_job_run.html.markdown @@ -32,7 +32,7 @@ The following arguments are supported: The following attributes are exported: -* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. +* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the job run. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` * `display_name` - A user-friendly display name for the resource. @@ -50,7 +50,7 @@ The following attributes are exported: * `image_digest` - The digest of the container image. For example, `sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030` * `image_signature_id` - OCID of the container image signature * `job_environment_type` - The environment configuration type used for job runtime. -* `job_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. +* `job_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. * `job_infrastructure_configuration_details` - The job infrastructure configuration details (shape, block storage, etc.) * `block_storage_size_in_gbs` - The size of the block storage volume to attach to the instance running the job * `job_infrastructure_type` - The infrastructure type used for job run. @@ -77,7 +77,7 @@ The following attributes are exported: * `log_details` - Customer logging details for job run. * `log_group_id` - The log group id for where log objects will be for job runs. * `log_id` - The log id of the log object the job run logs will be shipped to. -* `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. +* `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. * `state` - The state of the job run. * `time_accepted` - The date and time the job run was accepted in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * `time_finished` - The date and time the job run request was finished in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/d/datascience_job_runs.html.markdown b/website/docs/d/datascience_job_runs.html.markdown index 3540fcc5212..a95d747a920 100644 --- a/website/docs/d/datascience_job_runs.html.markdown +++ b/website/docs/d/datascience_job_runs.html.markdown @@ -50,7 +50,7 @@ The following attributes are exported: The following attributes are exported: -* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. +* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the job run. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` * `display_name` - A user-friendly display name for the resource. @@ -68,7 +68,7 @@ The following attributes are exported: * `image_digest` - The digest of the container image. For example, `sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030` * `image_signature_id` - OCID of the container image signature * `job_environment_type` - The environment configuration type used for job runtime. -* `job_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. +* `job_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. * `job_infrastructure_configuration_details` - The job infrastructure configuration details (shape, block storage, etc.) * `block_storage_size_in_gbs` - The size of the block storage volume to attach to the instance running the job * `job_infrastructure_type` - The infrastructure type used for job run. @@ -95,7 +95,7 @@ The following attributes are exported: * `log_details` - Customer logging details for job run. * `log_group_id` - The log group id for where log objects will be for job runs. * `log_id` - The log id of the log object the job run logs will be shipped to. -* `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. +* `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. * `state` - The state of the job run. * `time_accepted` - The date and time the job run was accepted in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * `time_finished` - The date and time the job run request was finished in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/d/datascience_model.html.markdown b/website/docs/d/datascience_model.html.markdown index 6ce29f30bd0..c07ce1735ea 100644 --- a/website/docs/d/datascience_model.html.markdown +++ b/website/docs/d/datascience_model.html.markdown @@ -43,7 +43,7 @@ The following attributes are exported: * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model's compartment. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the model. * `custom_metadata_list` - An array of custom metadata details for the model. - * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - Description of model metadata * `key` - Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -51,12 +51,12 @@ The following attributes are exported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other * `defined_metadata_list` - An array of defined metadata details for the model. - * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - Description of model metadata * `key` - Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -64,7 +64,7 @@ The following attributes are exported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other diff --git a/website/docs/d/datascience_model_deployment.html.markdown b/website/docs/d/datascience_model_deployment.html.markdown index ee65bba64b1..49c50aff07f 100644 --- a/website/docs/d/datascience_model_deployment.html.markdown +++ b/website/docs/d/datascience_model_deployment.html.markdown @@ -59,65 +59,66 @@ The following attributes are exported: * `image_digest` - The digest of the container image. For example, `sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030` * `server_port` - The port on which the web server serving the inference is running. The port can be anything between `1024` and `65535`. The following ports cannot be used `24224`, `8446`, `8447`. * `model_configuration_details` - The model configuration details. - * `bandwidth_mbps` - The minimum network bandwidth for the model deployment. - * `instance_configuration` - The model deployment instance configuration - * `instance_shape_name` - The shape used to launch the model deployment instances. - * `model_deployment_instance_shape_config_details` - Details for the model-deployment instance shape configuration. - * `cpu_baseline` - The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. The following values are supported: BASELINE_1_8 - baseline usage is 1/8 of an OCPU. BASELINE_1_2 - baseline usage is 1/2 of an OCPU. BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. - * `memory_in_gbs` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the memory to be specified with in the range of 6 to 1024 GB. VM.Standard3.Flex memory range is between 6 to 512 GB and VM.Optimized3.Flex memory range is between 6 to 256 GB. - * `ocpus` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the ocpu count to be specified with in the range of 1 to 64 ocpu. VM.Standard3.Flex OCPU range is between 1 to 32 ocpu and for VM.Optimized3.Flex OCPU range is 1 to 18 ocpu. - * `subnet_id` - A model deployment instance is provided with a VNIC for network access. This specifies the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT/SGW gateway for egress. - * `maximum_bandwidth_mbps` - The maximum network bandwidth for the model deployment. - * `model_id` - The OCID of the model you want to deploy. - * `scaling_policy` - The scaling policy to apply to each model of the deployment. - * `auto_scaling_policies` - The list of autoscaling policy details. - * `auto_scaling_policy_type` - The type of autoscaling policy. - * `initial_instance_count` - For a threshold-based autoscaling policy, this value is the initial number of instances to launch in the model deployment immediately after autoscaling is enabled. Note that anytime this value is updated, the number of instances will be reset to this value. After autoscaling retrieves performance metrics, the number of instances is automatically adjusted from this initial number to a number that is based on the limits that you set. - * `maximum_instance_count` - For a threshold-based autoscaling policy, this value is the maximum number of instances the model deployment is allowed to increase to (scale out). - * `minimum_instance_count` - For a threshold-based autoscaling policy, this value is the minimum number of instances the model deployment is allowed to decrease to (scale in). - * `rules` - The list of autoscaling policy rules. - * `metric_expression_rule_type` - The metric expression for creating the alarm used to trigger autoscaling actions on the model deployment. - - The following values are supported: - * `PREDEFINED_EXPRESSION`: An expression built using CPU or Memory metrics emitted by the Model Deployment Monitoring. - * `CUSTOM_EXPRESSION`: A custom Monitoring Query Language (MQL) expression. - * `metric_type` - Metric type - * `scale_in_configuration` - The scaling configuration for the predefined metric expression rule. - * `instance_count_adjustment` - The value is used for adjusting the count of instances by. - * `pending_duration` - The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five minutes before the alarm updates its state to "OK." - - The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. - * `query` - The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval: `1m`-`60m` (also `1h`). You can optionally specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. - - Example of threshold alarm: - - ----- - - CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() < 25 CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() > 75 - - ----- - * `scaling_configuration_type` - The type of scaling configuration. - * `threshold` - A metric value at which the scaling operation will be triggered. - * `scale_out_configuration` - The scaling configuration for the predefined metric expression rule. - * `instance_count_adjustment` - The value is used for adjusting the count of instances by. - * `pending_duration` - The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five minutes before the alarm updates its state to "OK." - - The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. - * `query` - The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval: `1m`-`60m` (also `1h`). You can optionally specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. - - Example of threshold alarm: - - ----- - - CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() < 25 CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() > 75 - - ----- - * `scaling_configuration_type` - The type of scaling configuration. - * `threshold` - A metric value at which the scaling operation will be triggered. - * `cool_down_in_seconds` - For threshold-based autoscaling policies, this value is the minimum period of time to wait between scaling actions. The cooldown period gives the system time to stabilize before rescaling. The minimum value is 600 seconds, which is also the default. The cooldown period starts when the model deployment becomes ACTIVE after the scaling operation. - * `instance_count` - The number of instances for the model deployment. - * `is_enabled` - Whether the autoscaling policy is enabled. - * `policy_type` - The type of scaling policy. + * `bandwidth_mbps` - The minimum network bandwidth for the model deployment. + * `instance_configuration` - The model deployment instance configuration + * `instance_shape_name` - The shape used to launch the model deployment instances. + * `model_deployment_instance_shape_config_details` - Details for the model-deployment instance shape configuration. + * `cpu_baseline` - The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. The following values are supported: BASELINE_1_8 - baseline usage is 1/8 of an OCPU. BASELINE_1_2 - baseline usage is 1/2 of an OCPU. BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + * `memory_in_gbs` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the memory to be specified with in the range of 6 to 1024 GB. VM.Standard3.Flex memory range is between 6 to 512 GB and VM.Optimized3.Flex memory range is between 6 to 256 GB. + * `ocpus` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the ocpu count to be specified with in the range of 1 to 64 ocpu. VM.Standard3.Flex OCPU range is between 1 to 32 ocpu and for VM.Optimized3.Flex OCPU range is 1 to 18 ocpu. + * `private_endpoint_id` - The OCID of a Data Science private endpoint. + * `subnet_id` - A model deployment instance is provided with a VNIC for network access. This specifies the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT/SGW gateway for egress. + * `maximum_bandwidth_mbps` - The maximum network bandwidth for the model deployment. + * `model_id` - The OCID of the model you want to deploy. + * `scaling_policy` - The scaling policy to apply to each model of the deployment. + * `auto_scaling_policies` - The list of autoscaling policy details. + * `auto_scaling_policy_type` - The type of autoscaling policy. + * `initial_instance_count` - For a threshold-based autoscaling policy, this value is the initial number of instances to launch in the model deployment immediately after autoscaling is enabled. Note that anytime this value is updated, the number of instances will be reset to this value. After autoscaling retrieves performance metrics, the number of instances is automatically adjusted from this initial number to a number that is based on the limits that you set. + * `maximum_instance_count` - For a threshold-based autoscaling policy, this value is the maximum number of instances the model deployment is allowed to increase to (scale out). + * `minimum_instance_count` - For a threshold-based autoscaling policy, this value is the minimum number of instances the model deployment is allowed to decrease to (scale in). + * `rules` - The list of autoscaling policy rules. + * `metric_expression_rule_type` - The metric expression for creating the alarm used to trigger autoscaling actions on the model deployment. + + The following values are supported: + * `PREDEFINED_EXPRESSION`: An expression built using CPU or Memory metrics emitted by the Model Deployment Monitoring. + * `CUSTOM_EXPRESSION`: A custom Monitoring Query Language (MQL) expression. + * `metric_type` - Metric type + * `scale_in_configuration` - The scaling configuration for the predefined metric expression rule. + * `instance_count_adjustment` - The value is used for adjusting the count of instances by. + * `pending_duration` - The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five minutes before the alarm updates its state to "OK." + + The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. + * `query` - The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval: `1m`-`60m` (also `1h`). You can optionally specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. + + Example of threshold alarm: + + ----- + + CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() < 25 CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() > 75 + + ----- + * `scaling_configuration_type` - The type of scaling configuration. + * `threshold` - A metric value at which the scaling operation will be triggered. + * `scale_out_configuration` - The scaling configuration for the predefined metric expression rule. + * `instance_count_adjustment` - The value is used for adjusting the count of instances by. + * `pending_duration` - The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING" or vice versa. For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING"; likewise, the alarm must persist in not breaching the condition for five minutes before the alarm updates its state to "OK." + + The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M. + * `query` - The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval: `1m`-`60m` (also `1h`). You can optionally specify dimensions and grouping functions. Supported grouping functions: `grouping()`, `groupBy()`. + + Example of threshold alarm: + + ----- + + CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() < 25 CPUUtilization[1m]{resourceId = "MODEL_DEPLOYMENT_OCID"}.grouping().mean() > 75 + + ----- + * `scaling_configuration_type` - The type of scaling configuration. + * `threshold` - A metric value at which the scaling operation will be triggered. + * `cool_down_in_seconds` - For threshold-based autoscaling policies, this value is the minimum period of time to wait between scaling actions. The cooldown period gives the system time to stabilize before rescaling. The minimum value is 600 seconds, which is also the default. The cooldown period starts when the model deployment becomes ACTIVE after the scaling operation. + * `instance_count` - The number of instances for the model deployment. + * `is_enabled` - Whether the autoscaling policy is enabled. + * `policy_type` - The type of scaling policy. * `model_deployment_system_data` - Model deployment system data. * `current_instance_count` - This value is the current count of the model deployment instances. * `system_infra_type` - The infrastructure type of the model deployment. diff --git a/website/docs/d/datascience_model_deployments.html.markdown b/website/docs/d/datascience_model_deployments.html.markdown index 8d809231db1..c2555d99301 100644 --- a/website/docs/d/datascience_model_deployments.html.markdown +++ b/website/docs/d/datascience_model_deployments.html.markdown @@ -82,9 +82,10 @@ The following attributes are exported: * `instance_configuration` - The model deployment instance configuration * `instance_shape_name` - The shape used to launch the model deployment instances. * `model_deployment_instance_shape_config_details` - Details for the model-deployment instance shape configuration. - * `cpu_baseline` - The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. The following values are supported: BASELINE_1_8 - baseline usage is 1/8 of an OCPU. BASELINE_1_2 - baseline usage is 1/2 of an OCPU. BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. - * `memory_in_gbs` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the memory to be specified with in the range of 6 to 1024 GB. VM.Standard3.Flex memory range is between 6 to 512 GB and VM.Optimized3.Flex memory range is between 6 to 256 GB. - * `ocpus` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the ocpu count to be specified with in the range of 1 to 64 ocpu. VM.Standard3.Flex OCPU range is between 1 to 32 ocpu and for VM.Optimized3.Flex OCPU range is 1 to 18 ocpu. + * `cpu_baseline` - The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. The following values are supported: BASELINE_1_8 - baseline usage is 1/8 of an OCPU. BASELINE_1_2 - baseline usage is 1/2 of an OCPU. BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. + * `memory_in_gbs` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the memory to be specified with in the range of 6 to 1024 GB. VM.Standard3.Flex memory range is between 6 to 512 GB and VM.Optimized3.Flex memory range is between 6 to 256 GB. + * `ocpus` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the ocpu count to be specified with in the range of 1 to 64 ocpu. VM.Standard3.Flex OCPU range is between 1 to 32 ocpu and for VM.Optimized3.Flex OCPU range is 1 to 18 ocpu. + * `private_endpoint_id` - The OCID of a Data Science private endpoint. * `subnet_id` - A model deployment instance is provided with a VNIC for network access. This specifies the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT/SGW gateway for egress. * `maximum_bandwidth_mbps` - The maximum network bandwidth for the model deployment. * `model_id` - The OCID of the model you want to deploy. diff --git a/website/docs/d/datascience_models.html.markdown b/website/docs/d/datascience_models.html.markdown index 0e3e9dffb14..201b524ae06 100644 --- a/website/docs/d/datascience_models.html.markdown +++ b/website/docs/d/datascience_models.html.markdown @@ -62,7 +62,7 @@ The following attributes are exported: * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model's compartment. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the model. * `custom_metadata_list` - An array of custom metadata details for the model. - * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - Description of model metadata * `key` - Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -70,12 +70,12 @@ The following attributes are exported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other * `defined_metadata_list` - An array of defined metadata details for the model. - * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - Description of model metadata * `key` - Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -83,7 +83,7 @@ The following attributes are exported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other diff --git a/website/docs/d/golden_gate_pipeline.html.markdown b/website/docs/d/golden_gate_pipeline.html.markdown new file mode 100644 index 00000000000..7ff08e92210 --- /dev/null +++ b/website/docs/d/golden_gate_pipeline.html.markdown @@ -0,0 +1,75 @@ +--- +subcategory: "Golden Gate" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_golden_gate_pipeline" +sidebar_current: "docs-oci-datasource-golden_gate-pipeline" +description: |- + Provides details about a specific Pipeline in Oracle Cloud Infrastructure Golden Gate service +--- + +# Data Source: oci_golden_gate_pipeline +This data source provides details about a specific Pipeline resource in Oracle Cloud Infrastructure Golden Gate service. + +Retrieves a Pipeline details. + + +## Example Usage + +```hcl +data "oci_golden_gate_pipeline" "test_pipeline" { + #Required + pipeline_id = oci_golden_gate_pipeline.test_pipeline.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `pipeline_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pipeline created. + + +## Attributes Reference + +The following attributes are exported: + +* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. +* `cpu_core_count` - The Minimum number of OCPUs to be made available for this Deployment. +* `defined_tags` - Tags defined for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - Metadata about this specific object. +* `display_name` - An object's Display Name. +* `freeform_tags` - A simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. +* `is_auto_scaling_enabled` - Indicates if auto scaling is enabled for the Deployment's CPU core count. +* `license_model` - The Oracle license model that applies to a Deployment. +* `lifecycle_details` - Describes the object's current state in detail. For example, it can be used to provide actionable information for a resource in a Failed state. +* `lifecycle_sub_state` - Possible lifecycle substates when retrieving a pipeline. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. +* `mapping_rules` - Mapping for source/target schema/tables for the pipeline data replication. + * `mapping_type` - Defines the exclude/include rules of source and target schemas and tables when replicating from source to target. This option applies when creating and updating a pipeline. + * `source` - The source schema/table combination for replication to target. + * `target` - The target schema/table combination for replication from the source. +* `process_options` - Required pipeline options to configure the replication process (Extract or Replicat). + * `initial_data_load` - Options required for the pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_existing_table` - Action upon existing tables in target when initial Data Load is set i.e., isInitialLoad=true. + * `is_initial_load` - If ENABLED, then existing source data is also synchronized to the target when creating or updating the pipeline. + * `replicate_schema_change` - Options required for pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_ddl_error` - Action upon DDL Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `action_on_dml_error` - Action upon DML Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `can_replicate_schema_change` - If ENABLED, then addition or removal of schema is also replicated, apart from individual tables and records when creating or updating the pipeline. + * `should_restart_on_failure` - If ENABLED, then the replication process restarts itself upon failure. This option applies when creating or updating a pipeline. +* `recipe_type` - The type of the recipe +* `source_connection_details` - The source connection details for creating a pipeline. + * `connection_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. +* `state` - Lifecycle state of the pipeline. +* `system_tags` - 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}}` +* `target_connection_details` - The target connection details for creating a pipeline. + * `connection_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. +* `time_created` - The time the resource was created. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. +* `time_last_recorded` - When the resource was last updated. This option applies when retrieving a pipeline. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. +* `time_updated` - The time the resource was last updated. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + diff --git a/website/docs/d/golden_gate_pipeline_running_processes.html.markdown b/website/docs/d/golden_gate_pipeline_running_processes.html.markdown new file mode 100644 index 00000000000..37f6e340cf6 --- /dev/null +++ b/website/docs/d/golden_gate_pipeline_running_processes.html.markdown @@ -0,0 +1,48 @@ +--- +subcategory: "Golden Gate" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_golden_gate_pipeline_running_processes" +sidebar_current: "docs-oci-datasource-golden_gate-pipeline_running_processes" +description: |- + Provides the list of Pipeline Running Processes in Oracle Cloud Infrastructure Golden Gate service +--- + +# Data Source: oci_golden_gate_pipeline_running_processes +This data source provides the list of Pipeline Running Processes in Oracle Cloud Infrastructure Golden Gate service. + +Retrieves a Pipeline's running replication process's status like extracts/replicats. + + +## Example Usage + +```hcl +data "oci_golden_gate_pipeline_running_processes" "test_pipeline_running_processes" { + #Required + pipeline_id = oci_golden_gate_pipeline.test_pipeline.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `pipeline_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pipeline created. + + +## Attributes Reference + +The following attributes are exported: + +* `pipeline_running_process_collection` - The list of pipeline_running_process_collection. + +### PipelineRunningProcess Reference + +The following attributes are exported: + +* `items` - The list of replication processes and their details. + * `last_record_lag_in_seconds` - The latency, in seconds, of a process running in a replication. This option applies when retrieving running processes. + * `name` - An object's Display Name. + * `process_type` - The type of process running in a replication. For example, Extract or Replicat. This option applies when retrieving running processes. + * `status` - The status of the Extract or Replicat process. This option applies when retrieving running processes. + * `time_last_processed` - The date and time the last record was processed by an Extract or Replicat. This option applies when retrieving running processes. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. + diff --git a/website/docs/d/golden_gate_pipeline_schema_tables.html.markdown b/website/docs/d/golden_gate_pipeline_schema_tables.html.markdown new file mode 100644 index 00000000000..ed513eabcfc --- /dev/null +++ b/website/docs/d/golden_gate_pipeline_schema_tables.html.markdown @@ -0,0 +1,55 @@ +--- +subcategory: "Golden Gate" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_golden_gate_pipeline_schema_tables" +sidebar_current: "docs-oci-datasource-golden_gate-pipeline_schema_tables" +description: |- + Provides the list of Pipeline Schema Tables in Oracle Cloud Infrastructure Golden Gate service +--- + +# Data Source: oci_golden_gate_pipeline_schema_tables +This data source provides the list of Pipeline Schema Tables in Oracle Cloud Infrastructure Golden Gate service. + +Returns an array of tables under the given schemas of the pipeline for given source and target schemas passed as query params. + + +## Example Usage + +```hcl +data "oci_golden_gate_pipeline_schema_tables" "test_pipeline_schema_tables" { + #Required + pipeline_id = oci_golden_gate_pipeline.test_pipeline.id + source_schema_name = var.pipeline_schema_table_source_schema_name + target_schema_name = var.pipeline_schema_table_target_schema_name + + #Optional + display_name = var.pipeline_schema_table_display_name +} +``` + +## Argument Reference + +The following arguments are supported: + +* `display_name` - (Optional) A filter to return only the resources that match the entire 'displayName' given. +* `pipeline_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pipeline created. +* `source_schema_name` - (Required) Name of the source schema obtained from get schema endpoint of the created pipeline. +* `target_schema_name` - (Required) Name of the target schema obtained from get schema endpoint of the created pipeline. + + +## Attributes Reference + +The following attributes are exported: + +* `pipeline_schema_table_collection` - The list of pipeline_schema_table_collection. + +### PipelineSchemaTable Reference + +The following attributes are exported: + +* `items` - Array of source or target schema tables of a pipeline's assigned connection. + * `source_table_name` - The table name from the schema of database connection. + * `target_table_name` - The table name from the schema of database connection. +* `source_schema_name` - The schema name from the database connection. +* `target_schema_name` - The schema name from the database connection. + diff --git a/website/docs/d/golden_gate_pipeline_schemas.html.markdown b/website/docs/d/golden_gate_pipeline_schemas.html.markdown new file mode 100644 index 00000000000..f59e56844ba --- /dev/null +++ b/website/docs/d/golden_gate_pipeline_schemas.html.markdown @@ -0,0 +1,49 @@ +--- +subcategory: "Golden Gate" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_golden_gate_pipeline_schemas" +sidebar_current: "docs-oci-datasource-golden_gate-pipeline_schemas" +description: |- + Provides the list of Pipeline Schemas in Oracle Cloud Infrastructure Golden Gate service +--- + +# Data Source: oci_golden_gate_pipeline_schemas +This data source provides the list of Pipeline Schemas in Oracle Cloud Infrastructure Golden Gate service. + +Returns an array of schemas based on mapping rules for a pipeline. + + +## Example Usage + +```hcl +data "oci_golden_gate_pipeline_schemas" "test_pipeline_schemas" { + #Required + pipeline_id = oci_golden_gate_pipeline.test_pipeline.id + + #Optional + display_name = var.pipeline_schema_display_name +} +``` + +## Argument Reference + +The following arguments are supported: + +* `display_name` - (Optional) A filter to return only the resources that match the entire 'displayName' given. +* `pipeline_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pipeline created. + + +## Attributes Reference + +The following attributes are exported: + +* `pipeline_schema_collection` - The list of pipeline_schema_collection. + +### PipelineSchema Reference + +The following attributes are exported: + +* `items` - Array of pipeline schemas + * `source_schema_name` - The schema name from the database connection. + * `target_schema_name` - The schema name from the database connection. + diff --git a/website/docs/d/golden_gate_pipelines.html.markdown b/website/docs/d/golden_gate_pipelines.html.markdown new file mode 100644 index 00000000000..c51151be940 --- /dev/null +++ b/website/docs/d/golden_gate_pipelines.html.markdown @@ -0,0 +1,89 @@ +--- +subcategory: "Golden Gate" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_golden_gate_pipelines" +sidebar_current: "docs-oci-datasource-golden_gate-pipelines" +description: |- + Provides the list of Pipelines in Oracle Cloud Infrastructure Golden Gate service +--- + +# Data Source: oci_golden_gate_pipelines +This data source provides the list of Pipelines in Oracle Cloud Infrastructure Golden Gate service. + +Lists the Pipelines in the compartment. + + +## Example Usage + +```hcl +data "oci_golden_gate_pipelines" "test_pipelines" { + #Required + compartment_id = var.compartment_id + + #Optional + display_name = var.pipeline_display_name + lifecycle_sub_state = var.pipeline_lifecycle_sub_state + state = var.pipeline_state +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) The OCID of the compartment that contains the work request. Work requests should be scoped to the same compartment as the resource the work request affects. If the work request concerns multiple resources, and those resources are not in the same compartment, it is up to the service team to pick the primary resource whose compartment should be used. +* `display_name` - (Optional) A filter to return only the resources that match the entire 'displayName' given. +* `lifecycle_sub_state` - (Optional) A filtered list of pipelines to return for a given lifecycleSubState. +* `state` - (Optional) A filtered list of pipelines to return for a given lifecycleState. + + +## Attributes Reference + +The following attributes are exported: + +* `pipeline_collection` - The list of pipeline_collection. + +### Pipeline Reference + +The following attributes are exported: + +* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. +* `cpu_core_count` - The Minimum number of OCPUs to be made available for this Deployment. +* `defined_tags` - Tags defined for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - Metadata about this specific object. +* `display_name` - An object's Display Name. +* `freeform_tags` - A simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. +* `is_auto_scaling_enabled` - Indicates if auto scaling is enabled for the Deployment's CPU core count. +* `license_model` - The Oracle license model that applies to a Deployment. +* `lifecycle_details` - Describes the object's current state in detail. For example, it can be used to provide actionable information for a resource in a Failed state. +* `lifecycle_sub_state` - Possible lifecycle substates when retrieving a pipeline. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. +* `mapping_rules` - Mapping for source/target schema/tables for the pipeline data replication. + * `mapping_type` - Defines the exclude/include rules of source and target schemas and tables when replicating from source to target. This option applies when creating and updating a pipeline. + * `source` - The source schema/table combination for replication to target. + * `target` - The target schema/table combination for replication from the source. +* `process_options` - Required pipeline options to configure the replication process (Extract or Replicat). + * `initial_data_load` - Options required for the pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_existing_table` - Action upon existing tables in target when initial Data Load is set i.e., isInitialLoad=true. + * `is_initial_load` - If ENABLED, then existing source data is also synchronized to the target when creating or updating the pipeline. + * `replicate_schema_change` - Options required for pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_ddl_error` - Action upon DDL Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `action_on_dml_error` - Action upon DML Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `can_replicate_schema_change` - If ENABLED, then addition or removal of schema is also replicated, apart from individual tables and records when creating or updating the pipeline. + * `should_restart_on_failure` - If ENABLED, then the replication process restarts itself upon failure. This option applies when creating or updating a pipeline. +* `recipe_type` - The type of the recipe +* `source_connection_details` - The source connection details for creating a pipeline. + * `connection_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. +* `state` - Lifecycle state of the pipeline. +* `system_tags` - 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}}` +* `target_connection_details` - The target connection details for creating a pipeline. + * `connection_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. +* `time_created` - The time the resource was created. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. +* `time_last_recorded` - When the resource was last updated. This option applies when retrieving a pipeline. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. +* `time_updated` - The time the resource was last updated. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + diff --git a/website/docs/d/golden_gate_recipes.html.markdown b/website/docs/d/golden_gate_recipes.html.markdown new file mode 100644 index 00000000000..d3591481d72 --- /dev/null +++ b/website/docs/d/golden_gate_recipes.html.markdown @@ -0,0 +1,55 @@ +--- +subcategory: "Golden Gate" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_golden_gate_recipes" +sidebar_current: "docs-oci-datasource-golden_gate-recipes" +description: |- + Provides the list of Recipes in Oracle Cloud Infrastructure Golden Gate service +--- + +# Data Source: oci_golden_gate_recipes +This data source provides the list of Recipes in Oracle Cloud Infrastructure Golden Gate service. + +Returns an array of Recipe Summary. + + +## Example Usage + +```hcl +data "oci_golden_gate_recipes" "test_recipes" { + #Required + compartment_id = var.compartment_id + + #Optional + display_name = var.recipe_display_name + recipe_type = var.recipe_recipe_type +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) The OCID of the compartment that contains the work request. Work requests should be scoped to the same compartment as the resource the work request affects. If the work request concerns multiple resources, and those resources are not in the same compartment, it is up to the service team to pick the primary resource whose compartment should be used. +* `display_name` - (Optional) A filter to return only the resources that match the entire 'displayName' given. +* `recipe_type` - (Optional) The pipeline's recipe type. The default value is ZERO_ETL. + + +## Attributes Reference + +The following attributes are exported: + +* `recipe_summary_collection` - The list of recipe_summary_collection. + +### Recipe Reference + +The following attributes are exported: + +* `items` - Array of Recipe Summary + * `description` - Metadata about this specific object. + * `display_name` - An object's Display Name. + * `name` - An object's Display Name. + * `recipe_type` - The type of the recipe + * `supported_source_technology_types` - Array of supported technology types for this recipe. + * `supported_target_technology_types` - Array of supported technology types for this recipe. + diff --git a/website/docs/d/golden_gate_trail_files.html.markdown b/website/docs/d/golden_gate_trail_files.html.markdown index 3bce8dca8c3..92cce37d9b8 100644 --- a/website/docs/d/golden_gate_trail_files.html.markdown +++ b/website/docs/d/golden_gate_trail_files.html.markdown @@ -10,7 +10,8 @@ description: |- # Data Source: oci_golden_gate_trail_files This data source provides the list of Trail Files in Oracle Cloud Infrastructure Golden Gate service. -Lists the TrailFiles for a deployment. Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +Lists the TrailFiles for a deployment. +Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. ## Example Usage diff --git a/website/docs/d/golden_gate_trail_sequences.html.markdown b/website/docs/d/golden_gate_trail_sequences.html.markdown index 45b6572a9df..447392fbeb1 100644 --- a/website/docs/d/golden_gate_trail_sequences.html.markdown +++ b/website/docs/d/golden_gate_trail_sequences.html.markdown @@ -10,7 +10,8 @@ description: |- # Data Source: oci_golden_gate_trail_sequences This data source provides the list of Trail Sequences in Oracle Cloud Infrastructure Golden Gate service. -Lists the Trail Sequences for a TrailFile in a given deployment. Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. +Lists the Trail Sequences for a TrailFile in a given deployment. +Deprecated: Please access trail file management functions directly on OGG console which are available since version Oracle GoldenGate 23c. ## Example Usage diff --git a/website/docs/d/stack_monitoring_metric_extension.html.markdown b/website/docs/d/stack_monitoring_metric_extension.html.markdown index c0ec5558763..e624a33eae3 100644 --- a/website/docs/d/stack_monitoring_metric_extension.html.markdown +++ b/website/docs/d/stack_monitoring_metric_extension.html.markdown @@ -67,16 +67,20 @@ The following attributes are exported: * `jmx_attributes` - List of JMX attributes or Metric Service Table columns separated by semi-colon * `managed_bean_query` - JMX Managed Bean Query or Metric Service Table name * `out_param_details` - Position and SQL Type of PL/SQL OUT parameter - * `out_param_position` - Position of PL/SQL procedure OUT parameter - * `out_param_type` - SQL Type of PL/SQL procedure OUT parameter - * `script_details` - Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data - * `content` - Content of the script file as base64 encoded string + * `out_param_name` - Name of the Out Parameter + * `out_param_position` - Position of PL/SQL procedure OUT parameter. The value of this property is ignored during update, if "outParamType" is set to NO_OUT_PARAM value. + * `out_param_type` - SQL Type of PL/SQL procedure OUT parameter. During the update, to completely remove the out parameter, use the value NO_OUT_PARAM. In that case, the value of "outParamPosition" will be ignored. + * `protocol_type` - Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + * `response_content_type` - Type of content response given by the http(s) URL + * `script_details` - Script details applicable to any OS Command/HTTP based Metric Extension which needs to run a script to collect data. For removing it during OS Command based Metric Extension update, set its "content" property to an empty string. In that case, "name" property value is ignored. + * `content` - Content of the script/JavaScript file as base64 encoded string * `name` - Name of the script file * `sql_details` - Details of Sql content which needs to execute to collect Metric Extension data * `content` - Sql statement or script file content as base64 encoded string * `script_file_name` - If a script needs to be executed, then provide file name of the script * `sql_type` - Type of SQL data collection method i.e. either a Statement or SQL Script File * `starts_with` - String prefix used to identify metric output of the OS Command + * `url` - Http(s) end point URL * `resource_type` - Resource type to which Metric Extension applies * `resource_uri` - The URI path that the user can do a GET on to access the metric extension metadata * `state` - The current lifecycle state of the metric extension diff --git a/website/docs/d/stack_monitoring_metric_extensions.html.markdown b/website/docs/d/stack_monitoring_metric_extensions.html.markdown index a2f87c15544..a2b39c42e7c 100644 --- a/website/docs/d/stack_monitoring_metric_extensions.html.markdown +++ b/website/docs/d/stack_monitoring_metric_extensions.html.markdown @@ -16,11 +16,11 @@ Returns a list of metric extensions ```hcl data "oci_stack_monitoring_metric_extensions" "test_metric_extensions" { - #Required - compartment_id = var.compartment_id #Optional + compartment_id = var.compartment_id enabled_on_resource_id = oci_usage_proxy_resource.test_resource.id + metric_extension_id = oci_stack_monitoring_metric_extension.test_metric_extension.id name = var.metric_extension_name resource_type = var.metric_extension_resource_type state = var.metric_extension_state @@ -32,8 +32,9 @@ data "oci_stack_monitoring_metric_extensions" "test_metric_extensions" { The following arguments are supported: -* `compartment_id` - (Required) The ID of the compartment in which data is listed. +* `compartment_id` - (Optional) The ID of the compartment in which data is listed. * `enabled_on_resource_id` - (Optional) A filter to return metric extensions based on input resource Id on which metric extension is enabled +* `metric_extension_id` - (Optional) Identifier for the metric extension * `name` - (Optional) A filter to return resources based on name. * `resource_type` - (Optional) A filter to return resources based on resource type. * `state` - (Optional) A filter to return metric extensions based on Lifecycle State @@ -85,16 +86,20 @@ The following attributes are exported: * `jmx_attributes` - List of JMX attributes or Metric Service Table columns separated by semi-colon * `managed_bean_query` - JMX Managed Bean Query or Metric Service Table name * `out_param_details` - Position and SQL Type of PL/SQL OUT parameter - * `out_param_position` - Position of PL/SQL procedure OUT parameter - * `out_param_type` - SQL Type of PL/SQL procedure OUT parameter - * `script_details` - Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data - * `content` - Content of the script file as base64 encoded string + * `out_param_name` - Name of the Out Parameter + * `out_param_position` - Position of PL/SQL procedure OUT parameter. The value of this property is ignored during update, if "outParamType" is set to NO_OUT_PARAM value. + * `out_param_type` - SQL Type of PL/SQL procedure OUT parameter. During the update, to completely remove the out parameter, use the value NO_OUT_PARAM. In that case, the value of "outParamPosition" will be ignored. + * `protocol_type` - Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + * `response_content_type` - Type of content response given by the http(s) URL + * `script_details` - Script details applicable to any OS Command/HTTP based Metric Extension which needs to run a script to collect data. For removing it during OS Command based Metric Extension update, set its "content" property to an empty string. In that case, "name" property value is ignored. + * `content` - Content of the script/JavaScript file as base64 encoded string * `name` - Name of the script file * `sql_details` - Details of Sql content which needs to execute to collect Metric Extension data * `content` - Sql statement or script file content as base64 encoded string * `script_file_name` - If a script needs to be executed, then provide file name of the script * `sql_type` - Type of SQL data collection method i.e. either a Statement or SQL Script File * `starts_with` - String prefix used to identify metric output of the OS Command + * `url` - Http(s) end point URL * `resource_type` - Resource type to which Metric Extension applies * `resource_uri` - The URI path that the user can do a GET on to access the metric extension metadata * `state` - The current lifecycle state of the metric extension diff --git a/website/docs/guides/resource_discovery.html.markdown b/website/docs/guides/resource_discovery.html.markdown index 14e85d7f1a9..82cff99a573 100644 --- a/website/docs/guides/resource_discovery.html.markdown +++ b/website/docs/guides/resource_discovery.html.markdown @@ -157,7 +157,6 @@ Make sure the `output_path` is empty before running resource discovery * `dataflow` - Discovers dataflow resources within the specified compartment * `dataintegration` - Discovers dataintegration resources within the specified compartment * `datascience` - Discovers datascience resources within the specified compartment - * `delegate_access_control` - Discovers delegate_access_control resources within the specified compartment * `demand_signal` - Discovers demand_signal resources within the specified compartment * `desktops` - Discovers desktop pool resources within the specified compartment * `devops` - Discovers devops resources within the specified compartment @@ -166,11 +165,10 @@ Make sure the `output_path` is empty before running resource discovery * `email` - Discovers email_sender resources within the specified compartment * `events` - Discovers events resources within the specified compartment * `file_storage` - Discovers file_storage resources within the specified compartment - * `fleet_apps_management` - Discovers fleet_apps_management resources within the specified compartment + * `fleet_software_update` - Discovers fleet_software_update resources within the specified compartment * `functions` - Discovers functions resources within the specified compartment * `fusion_apps` - Discovers fusion_apps resources within the specified compartment * `generative_ai` - Discovers generative_ai resources within the specified compartment - * `generative_ai_agent` - Discovers generative_ai_agent resources within the specified compartment * `globally_distributed_database` - Discovers globally_distributed_database resources within the specified compartment * `golden_gate` - Discovers golden_gate resources within the specified compartment * `health_checks` - Discovers health_checks resources within the specified compartment @@ -214,7 +212,6 @@ Make sure the `output_path` is empty before running resource discovery * `resource_scheduler` - Discovers resource_scheduler resources within the specified compartment * `resourcemanager` - Discovers resourcemanager resources within the specified compartment * `sch` - Discovers sch resources within the specified compartment - * `security_attribute` - Discovers security attribute resources in the tenancy * `service_mesh` - Discovers service_mesh resources within the specified compartment * `stack_monitoring` - Discovers stack_monitoring resources within the specified compartment * `streaming` - Discovers streaming resources within the specified compartment @@ -227,7 +224,6 @@ Make sure the `output_path` is empty before running resource discovery * `waa` - Discovers waa resources within the specified compartment * `waas` - Discovers waas resources within the specified compartment * `waf` - Discovers waf resources within the specified compartment - * `zpr` - Discovers Zero Trust Packet Routing resources across the entire tenancy * `tf_version` - The version of terraform syntax to generate for configurations. Default is v0.12. The state file will be written in v0.12 only. The allowed values are: * 0.11 * 0.12 @@ -415,7 +411,7 @@ bds * oci\_bds\_auto\_scaling\_configuration * oci\_bds\_bds\_instance\_api\_key * oci\_bds\_bds\_instance\_metastore\_config -* oci\_bds\_bds\_instance\_resource\_principal\_configuration +* oci\_bds\_bds\_instance\_identity\_configuration blockchain @@ -430,10 +426,8 @@ budget capacity_management -* oci\_capacity\_management\_occ\_customer\_group * oci\_capacity\_management\_occ\_availability\_catalog * oci\_capacity\_management\_occ\_capacity\_request -* oci\_capacity\_management\_occ\_customer\_group\_occ\_customer certificates_management @@ -549,6 +543,7 @@ core * oci\_core\_vtap * oci\_core\_compute\_cluster * oci\_core\_compute\_capacity\_report +* oci\_core\_instance\_maintenance\_event * oci\_core\_compute\_capacity\_topology data_labeling_service @@ -586,15 +581,14 @@ data_safe * oci\_data\_safe\_sensitive\_data\_models\_sensitive\_column * oci\_data\_safe\_discovery\_job * oci\_data\_safe\_sdm\_masking\_policy\_difference -* oci\_data\_safe\_calculate\_audit\_volume\_available -* oci\_data\_safe\_calculate\_audit\_volume\_collected -* oci\_data\_safe\_generate\_on\_prem\_connector\_configuration * oci\_data\_safe\_security\_policy\_deployment * oci\_data\_safe\_security\_policy * oci\_data\_safe\_database\_security\_config * oci\_data\_safe\_sql\_firewall\_policy * oci\_data\_safe\_sql\_collection * oci\_data\_safe\_target\_database\_peer\_target\_database +* oci\_data\_safe\_calculate\_audit\_volume\_available +* oci\_data\_safe\_calculate\_audit\_volume\_collected database @@ -628,7 +622,6 @@ database * oci\_database\_application\_vip * oci\_database\_oneoff\_patch * oci\_database\_db\_node\_console\_history -* oci\_database\_autonomous\_database\_software\_image * oci\_database\_exascale\_db\_storage\_vault * oci\_database\_exadb\_vm\_cluster @@ -685,11 +678,6 @@ datascience * oci\_datascience\_pipeline * oci\_datascience\_data\_science\_private\_endpoint -delegate_access_control - -* oci\_delegate\_access\_control\_delegation\_subscription -* oci\_delegate\_access\_control\_delegation\_control - demand_signal * oci\_demand\_signal\_occ\_demand\_signal @@ -730,6 +718,9 @@ dns * oci\_dns\_steering\_policy\_attachment * oci\_dns\_tsig\_key * oci\_dns\_rrset +* oci\_dns\_resolver +* oci\_dns\_resolver\_endpoint +* oci\_dns\_view email @@ -752,17 +743,10 @@ file_storage * oci\_file\_storage\_filesystem\_snapshot\_policy * oci\_file\_storage\_outbound\_connector -fleet_apps_management +fleet_software_update -* oci\_fleet\_apps\_management\_task\_record -* oci\_fleet\_apps\_management\_maintenance\_window -* oci\_fleet\_apps\_management\_fleet -* oci\_fleet\_apps\_management\_scheduler\_definition -* oci\_fleet\_apps\_management\_property -* oci\_fleet\_apps\_management\_runbook -* oci\_fleet\_apps\_management\_platform\_configuration -* oci\_fleet\_apps\_management\_compliance\_policy\_rule -* oci\_fleet\_apps\_management\_patch +* oci\_fleet\_software\_update\_fsu\_cycle +* oci\_fleet\_software\_update\_fsu\_collection functions @@ -785,14 +769,6 @@ generative_ai * oci\_generative\_ai\_endpoint * oci\_generative\_ai\_model -generative_ai_agent - -* oci\_generative\_ai\_agent\_data\_source -* oci\_generative\_ai\_agent\_agent -* oci\_generative\_ai\_agent\_data\_ingestion\_job -* oci\_generative\_ai\_agent\_knowledge\_base -* oci\_generative\_ai\_agent\_agent\_endpoint - globally_distributed_database * oci\_globally\_distributed\_database\_private\_endpoint @@ -806,6 +782,7 @@ golden_gate * oci\_golden\_gate\_connection\_assignment * oci\_golden\_gate\_connection * oci\_golden\_gate\_deployment\_certificate +* oci\_golden\_gate\_pipeline health_checks @@ -1156,11 +1133,6 @@ sch * oci\_sch\_service\_connector -security_attribute - -* oci\_security\_attribute\_security\_attribute\_namespace -* oci\_security\_attribute\_security\_attribute - service_mesh * oci\_service\_mesh\_virtual\_service @@ -1185,9 +1157,6 @@ stack_monitoring * oci\_stack\_monitoring\_metric\_extension * oci\_stack\_monitoring\_baselineable\_metric * oci\_stack\_monitoring\_process\_set -* oci\_stack\_monitoring\_maintenance\_window -* oci\_stack\_monitoring\_maintenance\_windows\_retry\_failed\_operation -* oci\_stack\_monitoring\_maintenance\_windows\_stop streaming @@ -1240,8 +1209,3 @@ waf * oci\_waf\_web\_app\_firewall\_policy * oci\_waf\_web\_app\_firewall * oci\_waf\_network\_address\_list - -zpr - -* oci\_zpr\_configuration -* oci\_zpr\_zpr\_policy diff --git a/website/docs/r/bds_bds_instance.html.markdown b/website/docs/r/bds_bds_instance.html.markdown index f4ec81c7ef0..a9ec0a7976d 100644 --- a/website/docs/r/bds_bds_instance.html.markdown +++ b/website/docs/r/bds_bds_instance.html.markdown @@ -117,6 +117,13 @@ resource "oci_bds_bds_instance" "test_bds_instance" { } #Optional + bds_cluster_version_summary { + #Required + bds_version = var.bds_instance_bds_cluster_version_summary_bds_version + + #Optional + odh_version = var.bds_instance_bds_cluster_version_summary_odh_version + } bootstrap_script_url = var.bds_instance_bootstrap_script_url cluster_profile = var.bds_instance_cluster_profile defined_tags = var.bds_instance_defined_tags @@ -137,6 +144,9 @@ resource "oci_bds_bds_instance" "test_bds_instance" { The following arguments are supported: +* `bds_cluster_version_summary` - (Optional) Cluster version details including bds and odh version information. + * `bds_version` - (Required) BDS version to be used for cluster creation + * `odh_version` - (Optional) ODH version to be used for cluster creation * `bootstrap_script_url` - (Optional) (Updatable) Pre-authenticated URL of the script in Object Store that is downloaded and executed. * `cluster_admin_password` - (Required) Base-64 encoded password for the cluster (and Cloudera Manager) admin user. * `cluster_profile` - (Optional) Profile of the Big Data Service cluster. @@ -154,10 +164,9 @@ The following arguments are supported: * `is_secure` - (Required) Boolean flag specifying whether or not the cluster should be setup as secure. * `kerberos_realm_name` - (Optional) The user-defined kerberos realm name. * `kms_key_id` - (Optional) (Updatable) The OCID of the Key Management master encryption key. -* `network_config` - (Optional) Additional configuration of the user's network. - * `cidr_block` - (Optional) The CIDR IP address block of the VCN. - * `is_nat_gateway_required` - (Optional) A boolean flag whether to configure a NAT gateway. -* `state` - (Optional) (Updatable) The target state for the Bds Instance. Could be set to `ACTIVE` or `INACTIVE`. +* `network_config` - (Optional) (Updatable) Additional configuration of the user's network. + * `cidr_block` - (Optional) (Updatable) The CIDR IP address block of the VCN. + * `is_nat_gateway_required` - (Optional) (Updatable) A boolean flag whether to configure a NAT gateway. * `nodes` - (Required) The list of nodes in the Big Data Service cluster. * `block_volume_size_in_gbs` - (Required) The size of block volume in GB to be attached to a given node. All the details needed for attaching the block volume are managed by service itself. * `node_type` - (Required) The Big Data Service cluster node type. @@ -169,7 +178,9 @@ The following arguments are supported: * `subnet_id` - (Required) The OCID of the subnet in which the node will be created. * `state` - (Optional) (Updatable) The target state for the Bds Instance. Could be set to `ACTIVE` or `INACTIVE`. * `execute_bootstrap_script_trigger` - (Optional) (Updatable) An optional property when incremented triggers Execute Bootstrap Script. Could be set to any integer value. +* `install_os_patch_trigger` - (Optional) (Updatable) An optional property when incremented triggers Install Os Patch. Could be set to any integer value. * `remove_kafka_trigger` - (Optional) (Updatable) An optional property when incremented triggers Remove Kafka. Could be set to any integer value. +* `remove_node` - (Optional) (Updatable) An optional property when used triggers Remove Node. Takes the node ocid as input. * `install_os_patch_trigger` - (Optional) (Updatable) An optional property when incremented triggers Install Os Patch. Could be set to any integer value. * `is_force_stop_jobs` - (Optional) (Updatable) When setting state as `INACTIVE` for stopping a cluster, setting this flag to true forcefully stops the bds instance. * `is_kafka_configured` - (Optional) Boolean flag specifying whether or not Kafka should be configured. @@ -232,6 +243,9 @@ Any change to a property that does not support update will force the destruction The following attributes are exported: +* `bds_cluster_version_summary` - Cluster version details including bds and odh version information. + * `bds_version` - BDS version to be used for cluster creation + * `odh_version` - ODH version to be used for cluster creation * `bootstrap_script_url` - pre-authenticated URL of the bootstrap script in Object Store that can be downloaded and executed. * `cloud_sql_details` - The information about added Cloud SQL capability * `block_volume_size_in_gbs` - The size of block volume in GB that needs to be attached to a given node. All the necessary details needed for attachment are managed by service itself. diff --git a/website/docs/r/bds_bds_instance_api_key.html.markdown b/website/docs/r/bds_bds_instance_api_key.html.markdown index 9d75b6d8546..e3ae285ce76 100644 --- a/website/docs/r/bds_bds_instance_api_key.html.markdown +++ b/website/docs/r/bds_bds_instance_api_key.html.markdown @@ -25,6 +25,7 @@ resource "oci_bds_bds_instance_api_key" "test_bds_instance_api_key" { #Optional default_region = var.bds_instance_api_key_default_region + domain_ocid = var.bds_instance_api_key_domain_ocid } ``` @@ -33,8 +34,14 @@ resource "oci_bds_bds_instance_api_key" "test_bds_instance_api_key" { The following arguments are supported: * `bds_instance_id` - (Required) The OCID of the cluster. +<<<<<<< ours +* `default_region` - (Optional) The name of the region to establish the Object Storage endpoint. See https://docs.oracle.com/en-us/iaas/api/#/en/identity/20160918/Region/ for additional information. +* `domain_ocid` - (Optional) Identity domain OCID , where user is present. For default domain , this field will be optional. +* `key_alias` - (Required) User friendly identifier used to uniquely differentiate between different API keys associated with this Big Data Service cluster. Only ASCII alphanumeric characters with no spaces allowed. +======= * `default_region` - (Optional) The name of the region to establish the Object Storage endpoint. See https://docs.oracle.com/en-us/iaas/api/#/en/identity/20160918/Region/ for additional information. * `key_alias` - (Required) User friendly identifier used to uniquely differentiate between different API keys associated with this Big Data Service cluster. Only ASCII alphanumeric characters with no spaces allowed. +>>>>>>> theirs * `passphrase` - (Required) Base64 passphrase used to secure the private key which will be created on user behalf. * `user_id` - (Required) The OCID of the user for whom this new generated API key pair will be created. @@ -46,7 +53,12 @@ Any change to a property that does not support update will force the destruction The following attributes are exported: +<<<<<<< ours +* `default_region` - The name of the region to establish the Object Storage endpoint which was set as part of key creation operation. If no region was provided this will be set to be the same region where the cluster lives. Example us-phoenix-1 . +* `domain_ocid` - Identity domain OCID ,where user is present. For default domain ,this field will be optional. +======= * `default_region` - The name of the region to establish the Object Storage endpoint which was set as part of key creation operation. If no region was provided this will be set to be the same region where the cluster lives. Example us-phoenix-1 . +>>>>>>> theirs * `fingerprint` - The fingerprint that corresponds to the public API key requested. * `id` - Identifier of the user's API key. * `key_alias` - User friendly identifier used to uniquely differentiate between different API keys. Only ASCII alphanumeric characters with no spaces allowed. diff --git a/website/docs/r/bds_bds_instance_identity_configuration.html.markdown b/website/docs/r/bds_bds_instance_identity_configuration.html.markdown new file mode 100644 index 00000000000..ed814743b04 --- /dev/null +++ b/website/docs/r/bds_bds_instance_identity_configuration.html.markdown @@ -0,0 +1,106 @@ +--- +subcategory: "Big Data Service" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_bds_bds_instance_identity_configuration" +sidebar_current: "docs-oci-resource-bds-bds_instance_identity_configuration" +description: |- + Provides the Bds Instance Identity Configuration resource in Oracle Cloud Infrastructure Big Data Service service +--- + +# oci_bds_bds_instance_identity_configuration +This resource provides the Bds Instance Identity Configuration resource in Oracle Cloud Infrastructure Big Data Service service. + +Create an identity configuration for the cluster + +## Example Usage + +```hcl +resource "oci_bds_bds_instance_identity_configuration" "test_bds_instance_identity_configuration" { + #Required + bds_instance_id = oci_bds_bds_instance.test_bds_instance.id + cluster_admin_password = var.bds_instance_identity_configuration_cluster_admin_password + confidential_application_id = oci_dataflow_application.test_application.id + display_name = var.bds_instance_identity_configuration_display_name + identity_domain_id = oci_identity_domain.test_domain.id + + #Optional + iam_user_sync_configuration_details { + + #Optional + is_posix_attributes_addition_required = var.bds_instance_identity_configuration_iam_user_sync_configuration_details_is_posix_attributes_addition_required + } + upst_configuration_details { + + #Optional + master_encryption_key_id = oci_kms_key.test_key.id + vault_id = oci_kms_vault.test_vault.id + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `bds_instance_id` - (Required) The OCID of the cluster. +* `cluster_admin_password` - (Required) (Updatable) Base-64 encoded password for the cluster admin user. +* `confidential_application_id` - (Required) Identity domain confidential application ID for the identity config, required for creating identity configuration +* `display_name` - (Required) Display name of the identity configuration, required for creating identity configuration. +* `iam_user_sync_configuration_details` - (Optional) (Updatable) Details for activating/updating an IAM user sync configuration + * `is_posix_attributes_addition_required` - (Optional) (Updatable) whether posix attribute needs to be appended to users, required for updating IAM user sync configuration +* `identity_domain_id` - (Required) Identity domain OCID to use for identity config, required for creating identity configuration +* `upst_configuration_details` - (Optional) (Updatable) Details for activating/updating UPST config on the cluster + * `master_encryption_key_id` - (Optional) (Updatable) OCID of the master encryption key in vault for encrypting token exchange service principal keytab, required for activating UPST config + * `vault_id` - (Optional) (Updatable) OCID of the vault to store token exchange service principal keyta, required for activating UPST config +* `activate_iam_user_sync_configuration_trigger` - (Optional) (Updatable) An optional property when set to "true" triggers Activate Iam User Sync Configuration and when set to "false" triggers Deactivate Iam User Sync Configuration. +* `activate_upst_configuration_trigger` - (Optional) (Updatable) An optional property when set to "true" triggers Activate Upst Configuration and when set to "false" triggers Deactivate Upst Configuration. +* `refresh_confidential_application_trigger` - (Optional) (Updatable) An optional property when set to "true" triggers Refresh Confidential Application. +* `refresh_upst_token_exchange_keytab_trigger` - (Optional) (Updatable) An optional property when set to "true" triggers Refresh Upst Token Exchange Keytab. + + +** 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: + +* `confidential_application_id` - identity domain confidential application ID for the identity config +* `display_name` - the display name of the identity configuration +* `iam_user_sync_configuration` - Information about the IAM user sync configuration. + * `is_posix_attributes_addition_required` - whether to append POSIX attributes to IAM users + * `state` - Lifecycle state of the IAM user sync config + * `time_created` - Time when this IAM user sync config was created, shown as an RFC 3339 formatted datetime string. + * `time_updated` - Time when this IAM user sync config was updated, shown as an RFC 3339 formatted datetime string. +* `id` - The id of the identity config +* `identity_domain_id` - Identity domain to use for identity config +* `state` - Lifecycle state of the identity configuration +* `time_created` - Time when this identity configuration was created, shown as an RFC 3339 formatted datetime string. +* `time_updated` - Time when this identity configuration config was updated, shown as an RFC 3339 formatted datetime string. +* `upst_configuration` - Information about the UPST configuration. + * `keytab_content` - The kerberos keytab content used for creating identity propagation trust config, in base64 format + * `master_encryption_key_id` - Master Encryption key used for encrypting token exchange keytab. + * `secret_id` - Secret ID for token exchange keytab + * `state` - Lifecycle state of the UPST config + * `time_created` - Time when this UPST config was created, shown as an RFC 3339 formatted datetime string. + * `time_token_exchange_keytab_last_refreshed` - Time when the keytab for token exchange principal is last refreshed, shown as an RFC 3339 formatted datetime string. + * `time_updated` - Time when this UPST config was updated, shown as an RFC 3339 formatted datetime string. + * `token_exchange_principal_name` - Token exchange kerberos Principal name in cluster + * `vault_id` - The instance OCID of the node, which is the resource from which the node backup was acquired. + +## 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 Bds Instance Identity Configuration + * `update` - (Defaults to 20 minutes), when updating the Bds Instance Identity Configuration + * `delete` - (Defaults to 20 minutes), when destroying the Bds Instance Identity Configuration + + +## Import + +BdsInstanceIdentityConfigurations can be imported using the `id`, e.g. + +``` +$ terraform import oci_bds_bds_instance_identity_configuration.test_bds_instance_identity_configuration "bdsInstances/{bdsInstanceId}/identityConfigurations/{identityConfigurationId}" +``` + diff --git a/website/docs/r/bds_bds_instance_patch_action.html.markdown b/website/docs/r/bds_bds_instance_patch_action.html.markdown index 30a04996516..4a130f63443 100644 --- a/website/docs/r/bds_bds_instance_patch_action.html.markdown +++ b/website/docs/r/bds_bds_instance_patch_action.html.markdown @@ -29,6 +29,8 @@ resource "oci_bds_bds_instance_patch_action" "test_bds_instance_patch_action" { #Optional batch_size = var.bds_instance_patch_action_patching_config_batch_size + tolerance_threshold_per_batch = var.bds_instance_patch_action_patching_config_tolerance_threshold_per_batch + tolerance_threshold_per_domain = var.bds_instance_patch_action_patching_config_tolerance_threshold_per_domain wait_time_between_batch_in_seconds = var.bds_instance_patch_action_patching_config_wait_time_between_batch_in_seconds wait_time_between_domain_in_seconds = var.bds_instance_patch_action_patching_config_wait_time_between_domain_in_seconds } @@ -44,6 +46,8 @@ The following arguments are supported: * `patching_config` - (Optional) Detailed configurations for defining the behavior when installing ODH patches. If not provided, nodes will be patched with down time. * `batch_size` - (Required when patching_config_strategy=BATCHING_BASED) How many nodes to be patched in each iteration. * `patching_config_strategy` - (Required) Type of strategy used for detailed patching configuration + * `tolerance_threshold_per_batch` - (Applicable when patching_config_strategy=BATCHING_BASED) Acceptable number of failed-to-be-patched nodes in each batch. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of non-utility and non-master nodes. + * `tolerance_threshold_per_domain` - (Applicable when patching_config_strategy=DOMAIN_BASED) Acceptable number of failed-to-be-patched nodes in each domain. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of non-utility and non-master nodes. * `wait_time_between_batch_in_seconds` - (Required when patching_config_strategy=BATCHING_BASED) The wait time between batches in seconds. * `wait_time_between_domain_in_seconds` - (Required when patching_config_strategy=DOMAIN_BASED) The wait time between AD/FD in seconds. * `version` - (Required) The version of the patch to be installed. diff --git a/website/docs/r/blockchain_blockchain_platform.html.markdown b/website/docs/r/blockchain_blockchain_platform.html.markdown index 918de8bdc26..d1d0f617035 100644 --- a/website/docs/r/blockchain_blockchain_platform.html.markdown +++ b/website/docs/r/blockchain_blockchain_platform.html.markdown @@ -78,7 +78,7 @@ The following attributes are exported: * `peer_key` - peer identifier * `role` - Peer role * `state` - The current state of the peer. -* `compute_shape` - Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM +* `compute_shape` - Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM or DIGITAL_ASSETS_MEDIUM or DIGITAL_ASSETS_LARGE or DIGITAL_ASSETS_EXTRA_LARGE * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` * `description` - Platform Instance Description * `display_name` - Platform Instance Display name, can be renamed diff --git a/website/docs/r/database_autonomous_database.html.markdown b/website/docs/r/database_autonomous_database.html.markdown index cbd5ebe740e..7f2e36b59d5 100644 --- a/website/docs/r/database_autonomous_database.html.markdown +++ b/website/docs/r/database_autonomous_database.html.markdown @@ -84,6 +84,7 @@ resource "oci_database_autonomous_database" "test_autonomous_database" { is_access_control_enabled = var.autonomous_database_is_access_control_enabled is_auto_scaling_enabled = var.autonomous_database_is_auto_scaling_enabled is_auto_scaling_for_storage_enabled = var.autonomous_database_is_auto_scaling_for_storage_enabled + is_backup_retention_locked = var.autonomous_database_is_backup_retention_locked is_data_guard_enabled = var.autonomous_database_is_data_guard_enabled is_dedicated = var.autonomous_database_is_dedicated is_dev_tier = var.autonomous_database_is_dev_tier @@ -218,6 +219,7 @@ The following arguments are supported: This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform. For Autonomous Database Serverless instances, `whitelistedIps` is used. * `is_auto_scaling_enabled` - (Optional) (Updatable) Indicates if auto scaling is enabled for the Autonomous Database CPU core count. The default value is `TRUE`. * `is_auto_scaling_for_storage_enabled` - (Optional) (Updatable) Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. +* `is_backup_retention_locked` - (Optional) (Updatable) True if the Autonomous Database is backup retention locked. * `is_data_guard_enabled` - (Optional) (Updatable) **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. * `is_dedicated` - (Optional) True if the database is on [dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html). * `is_dev_tier` - (Optional) (Updatable) Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. @@ -467,6 +469,7 @@ The following attributes are exported: This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform. For Autonomous Database Serverless instances, `whitelistedIps` is used. * `is_auto_scaling_enabled` - Indicates if auto scaling is enabled for the Autonomous Database CPU core count. The default value is `TRUE`. * `is_auto_scaling_for_storage_enabled` - Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. +* `is_backup_retention_locked` - Indicates if the Autonomous Database is backup retention locked. * `is_data_guard_enabled` - **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. * `is_dedicated` - True if the database uses [dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html). * `is_dev_tier` - Autonomous Database for Developers are free Autonomous Databases that developers can use to build and test new applications.With Autonomous these database instancess instances, you can try new Autonomous Database features for free and apply them to ongoing or new development projects. Developer database comes with limited resources and is, therefore, not suitable for large-scale testing and production deployments. When you need more compute or storage resources, you can transition to a paid database licensing by cloning your developer database into a regular Autonomous Database. See [Autonomous Database documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/eddjo/index.html) for more details. diff --git a/website/docs/r/database_exadb_vm_cluster.html.markdown b/website/docs/r/database_exadb_vm_cluster.html.markdown index 2fa33f3bf1f..3caaad1033f 100644 --- a/website/docs/r/database_exadb_vm_cluster.html.markdown +++ b/website/docs/r/database_exadb_vm_cluster.html.markdown @@ -28,8 +28,8 @@ resource "oci_database_exadb_vm_cluster" "test_exadb_vm_cluster" { shape = var.exadb_vm_cluster_shape node_config { - enabled_ecpu_per_node = var.exadb_vm_cluster_enabled_ecpu_per_node - total_ecpu_per_node = var.exadb_vm_cluster_total_ecpu_per_node + enabled_ecpu_count_per_node = var.exadb_vm_cluster_enabled_ecpu_count_per_node + total_ecpu_count_per_node = var.exadb_vm_cluster_total_ecpu_count_per_node vm_file_system_storage_size_gbs_per_node = var.exadb_vm_cluster_vm_file_system_storage_size_in_gbs_per_node } @@ -194,9 +194,9 @@ 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 Exadb Vm Cluster - * `update` - (Defaults to 20 minutes), when updating the Exadb Vm Cluster - * `delete` - (Defaults to 20 minutes), when destroying the Exadb Vm Cluster + * `create` - (Defaults to 12 hours), when creating the Exadb Vm Cluster + * `update` - (Defaults to 12 hours), when updating the Exadb Vm Cluster + * `delete` - (Defaults to 12 hours), when destroying the Exadb Vm Cluster ## Import diff --git a/website/docs/r/datascience_job_run.html.markdown b/website/docs/r/datascience_job_run.html.markdown index 55e4d04bb87..0704f18ce65 100644 --- a/website/docs/r/datascience_job_run.html.markdown +++ b/website/docs/r/datascience_job_run.html.markdown @@ -86,7 +86,7 @@ The following arguments are supported: * `log_group_id` - (Optional) The log group id for where log objects are for job runs. * `log_id` - (Optional) The log id the job run will push logs too. * `opc_parent_rpt_url` - (Optional) URL to fetch the Resource Principal Token from the parent resource. -* `project_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. +* `project_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. ** IMPORTANT ** @@ -96,7 +96,7 @@ Any change to a property that does not support update will force the destruction The following attributes are exported: -* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. +* `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job run. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the job run. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` * `display_name` - A user-friendly display name for the resource. @@ -114,7 +114,7 @@ The following attributes are exported: * `image_digest` - The digest of the container image. For example, `sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030` * `image_signature_id` - OCID of the container image signature * `job_environment_type` - The environment configuration type used for job runtime. -* `job_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job run. +* `job_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job. * `job_infrastructure_configuration_details` - The job infrastructure configuration details (shape, block storage, etc.) * `block_storage_size_in_gbs` - The size of the block storage volume to attach to the instance running the job * `job_infrastructure_type` - The infrastructure type used for job run. @@ -141,7 +141,7 @@ The following attributes are exported: * `log_details` - Customer logging details for job run. * `log_group_id` - The log group id for where log objects will be for job runs. * `log_id` - The log id of the log object the job run logs will be shipped to. -* `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. +* `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job run with. * `state` - The state of the job run. * `time_accepted` - The date and time the job run was accepted in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). * `time_finished` - The date and time the job run request was finished in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). diff --git a/website/docs/r/datascience_model.html.markdown b/website/docs/r/datascience_model.html.markdown index 2dfba0ae7d0..826ddaec053 100644 --- a/website/docs/r/datascience_model.html.markdown +++ b/website/docs/r/datascience_model.html.markdown @@ -73,7 +73,7 @@ The following arguments are supported: * `is_backup_enabled` - (Required) (Updatable) Boolean flag representing whether backup needs to be enabled/disabled for the model. * `compartment_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the model in. * `custom_metadata_list` - (Optional) (Updatable) An array of custom metadata details for the model. - * `category` - (Optional) (Updatable) Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - (Optional) (Updatable) Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - (Optional) (Updatable) Description of model metadata * `key` - (Optional) (Updatable) Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -81,12 +81,12 @@ The following arguments are supported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - (Optional) (Updatable) Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other * `defined_metadata_list` - (Optional) (Updatable) An array of defined metadata details for the model. - * `category` - (Optional) (Updatable) Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - (Optional) (Updatable) Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - (Optional) (Updatable) Description of model metadata * `key` - (Optional) (Updatable) Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -94,7 +94,7 @@ The following arguments are supported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - (Optional) (Updatable) Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other @@ -132,7 +132,7 @@ The following attributes are exported: * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model's compartment. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the model. * `custom_metadata_list` - An array of custom metadata details for the model. - * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - Description of model metadata * `key` - Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -140,12 +140,12 @@ The following attributes are exported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other * `defined_metadata_list` - An array of defined metadata details for the model. - * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". + * `category` - Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,Reports,Readme,other". * `description` - Description of model metadata * `key` - Key of the model Metadata. The key can either be user defined or Oracle Cloud Infrastructure defined. List of Oracle Cloud Infrastructure defined keys: * useCaseType @@ -153,7 +153,7 @@ The following attributes are exported: * libraryVersion * estimatorClass * hyperParameters - * testartifactresults + * testArtifactresults * `value` - Allowed values for useCaseType: binary_classification, regression, multinomial_classification, clustering, recommender, dimensionality_reduction/representation, time_series_forecasting, anomaly_detection, topic_modeling, ner, sentiment_analysis, image_classification, object_localization, other Allowed values for libraryName: scikit-learn, xgboost, tensorflow, pytorch, mxnet, keras, lightGBM, pymc3, pyOD, spacy, prophet, sktime, statsmodels, cuml, oracle_automl, h2o, transformers, nltk, emcee, pystan, bert, gensim, flair, word2vec, ensemble, other diff --git a/website/docs/r/datascience_model_deployment.html.markdown b/website/docs/r/datascience_model_deployment.html.markdown index bdbbc984824..75b271e6e0c 100644 --- a/website/docs/r/datascience_model_deployment.html.markdown +++ b/website/docs/r/datascience_model_deployment.html.markdown @@ -35,6 +35,7 @@ resource "oci_datascience_model_deployment" "test_model_deployment" { memory_in_gbs = var.model_deployment_model_deployment_configuration_details_model_configuration_details_instance_configuration_model_deployment_instance_shape_config_details_memory_in_gbs ocpus = var.model_deployment_model_deployment_configuration_details_model_configuration_details_instance_configuration_model_deployment_instance_shape_config_details_ocpus } + private_endpoint_id = oci_datascience_private_endpoint.test_private_endpoint.id subnet_id = oci_core_subnet.test_subnet.id } model_id = oci_datascience_model.test_model.id @@ -159,7 +160,8 @@ The following arguments are supported: * `model_deployment_instance_shape_config_details` - (Optional) (Updatable) Details for the model-deployment instance shape configuration. * `cpu_baseline` - (Optional) (Updatable) The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. The following values are supported: BASELINE_1_8 - baseline usage is 1/8 of an OCPU. BASELINE_1_2 - baseline usage is 1/2 of an OCPU. BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. * `memory_in_gbs` - (Optional) (Updatable) A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the memory to be specified with in the range of 6 to 1024 GB. VM.Standard3.Flex memory range is between 6 to 512 GB and VM.Optimized3.Flex memory range is between 6 to 256 GB. - * `ocpus` - (Optional) (Updatable) A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the ocpu count to be specified with in the range of 1 to 64 ocpu. VM.Standard3.Flex OCPU range is between 1 to 32 ocpu and for VM.Optimized3.Flex OCPU range is 1 to 18 ocpu. + * `ocpus` - (Optional) (Updatable) A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the ocpu count to be specified with in the range of 1 to 64 ocpu. VM.Standard3.Flex OCPU range is between 1 to 32 ocpu and for VM.Optimized3.Flex OCPU range is 1 to 18 ocpu. + * `private_endpoint_id` - (Optional) (Updatable) The OCID of a Data Science private endpoint. * `subnet_id` - (Optional) (Updatable) A model deployment instance is provided with a VNIC for network access. This specifies the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT/SGW gateway for egress. * `maximum_bandwidth_mbps` - (Optional) (Updatable) The maximum network bandwidth for the model deployment. * `model_id` - (Required) (Updatable) The OCID of the model you want to deploy. @@ -258,6 +260,7 @@ The following attributes are exported: * `cpu_baseline` - The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default to `BASELINE_1_1`. The following values are supported: BASELINE_1_8 - baseline usage is 1/8 of an OCPU. BASELINE_1_2 - baseline usage is 1/2 of an OCPU. BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance. * `memory_in_gbs` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the memory to be specified with in the range of 6 to 1024 GB. VM.Standard3.Flex memory range is between 6 to 512 GB and VM.Optimized3.Flex memory range is between 6 to 256 GB. * `ocpus` - A model-deployment instance of type VM.Standard.E3.Flex or VM.Standard.E4.Flex allows the ocpu count to be specified with in the range of 1 to 64 ocpu. VM.Standard3.Flex OCPU range is between 1 to 32 ocpu and for VM.Optimized3.Flex OCPU range is 1 to 18 ocpu. + * `private_endpoint_id` - The OCID of a Data Science private endpoint. * `subnet_id` - A model deployment instance is provided with a VNIC for network access. This specifies the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet to create a VNIC in. The subnet should be in a VCN with a NAT/SGW gateway for egress. * `maximum_bandwidth_mbps` - The maximum network bandwidth for the model deployment. * `model_id` - The OCID of the model you want to deploy. diff --git a/website/docs/r/generative_ai_dedicated_ai_cluster.html.markdown b/website/docs/r/generative_ai_dedicated_ai_cluster.html.markdown index 4b79f0cc111..7222f86cdf2 100644 --- a/website/docs/r/generative_ai_dedicated_ai_cluster.html.markdown +++ b/website/docs/r/generative_ai_dedicated_ai_cluster.html.markdown @@ -52,11 +52,14 @@ The following arguments are supported: * LARGE_COHERE_V2 * SMALL_COHERE * SMALL_COHERE_V2 + * SMALL_COHERE_4 * EMBED_COHERE * LLAMA2_70 * LARGE_GENERIC * LARGE_COHERE_V2_2 - * LARGE_GENERIC_4 + * LARGE_GENERIC_4 + * SMALL_GENERIC_V2 + * LARGE_GENERIC_2 ** IMPORTANT ** @@ -79,7 +82,7 @@ The following attributes are exported: * `lifecycle_details` - A message describing the current state with detail that can provide actionable information. * `previous_state` - Dedicated AI clusters are compute resources that you can use for fine-tuning custom models or for hosting endpoints for custom models. The clusters are dedicated to your models and not shared with users in other tenancies. - To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives Oracle Cloud Infrastructure resource access to users. See [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). +To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives Oracle Cloud Infrastructure resource access to users. See [Getting Started with Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm) and [Getting Access to Generative AI Resouces](https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm). * `state` - The current state of the dedicated AI cluster. * `system_tags` - System tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - The date and time the dedicated AI cluster was created, in the format defined by RFC 3339 diff --git a/website/docs/r/golden_gate_connection.html.markdown b/website/docs/r/golden_gate_connection.html.markdown index 51dddbdc6b3..f7f5e2c495d 100644 --- a/website/docs/r/golden_gate_connection.html.markdown +++ b/website/docs/r/golden_gate_connection.html.markdown @@ -227,7 +227,7 @@ The following arguments are supported: * `ssl_client_keystoredb` - (Applicable when connection_type=DB2) (Updatable) The base64 encoded keystore file created at the client containing the server certificate / CA root certificate. * `ssl_client_keystoredb_secret_id` - (Applicable when connection_type=DB2) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the keystore file stored, which created at the client containing the server certificate / CA root certificate. Note: When provided, 'sslClientKeystoredb' field must not be provided. * `ssl_crl` - (Applicable when connection_type=MYSQL | POSTGRESQL) (Updatable) The base64 encoded list of certificates revoked by the trusted certificate authorities (Trusted CA). Note: This is an optional property and only applicable if TLS/MTLS option is selected. -* `ssl_key` - (Applicable when connection_type=MYSQL | POSTGRESQL) (Updatable) Client Key – The base64 encoded content of a .pem or .crt filecontaining the client private key (for 2-way SSL). +* `ssl_key` - (Applicable when connection_type=MYSQL | POSTGRESQL) (Updatable) Client Key - The base64 encoded content of a .pem or .crt file containing the client private key (for 2-way SSL). * `ssl_key_password` - (Applicable when connection_type=JAVA_MESSAGE_SERVICE | KAFKA | KAFKA_SCHEMA_REGISTRY) (Updatable) The password for the cert inside of the KeyStore. In case it differs from the KeyStore password, it should be provided. * `ssl_key_password_secret_id` - (Applicable when connection_type=JAVA_MESSAGE_SERVICE | KAFKA | KAFKA_SCHEMA_REGISTRY) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret where the password is stored for the cert inside of the Keystore. In case it differs from the KeyStore password, it should be provided. Note: When provided, 'sslKeyPassword' field must not be provided. * `ssl_key_secret_id` - (Applicable when connection_type=MYSQL | POSTGRESQL) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Secret that stores the Client Key diff --git a/website/docs/r/golden_gate_pipeline.html.markdown b/website/docs/r/golden_gate_pipeline.html.markdown new file mode 100644 index 00000000000..486957fd696 --- /dev/null +++ b/website/docs/r/golden_gate_pipeline.html.markdown @@ -0,0 +1,162 @@ +--- +subcategory: "Golden Gate" +layout: "oci" +page_title: "Oracle Cloud Infrastructure: oci_golden_gate_pipeline" +sidebar_current: "docs-oci-resource-golden_gate-pipeline" +description: |- + Provides the Pipeline resource in Oracle Cloud Infrastructure Golden Gate service +--- + +# oci_golden_gate_pipeline +This resource provides the Pipeline resource in Oracle Cloud Infrastructure Golden Gate service. + +Creates a new Pipeline. + + +## Example Usage + +```hcl +resource "oci_golden_gate_pipeline" "test_pipeline" { + #Required + compartment_id = var.compartment_id + display_name = var.pipeline_display_name + license_model = var.pipeline_license_model + recipe_type = var.pipeline_recipe_type + source_connection_details { + #Required + connection_id = oci_golden_gate_connection.test_connection.id + } + target_connection_details { + #Required + connection_id = oci_golden_gate_connection.test_connection.id + } + + #Optional + defined_tags = {"foo-namespace.bar-key"= "value"} + description = var.pipeline_description + freeform_tags = {"bar-key"= "value"} + locks { + #Required + type = var.pipeline_locks_type + + #Optional + message = var.pipeline_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.pipeline_locks_time_created + } + process_options { + #Required + initial_data_load { + #Required + is_initial_load = var.pipeline_process_options_initial_data_load_is_initial_load + + #Optional + action_on_existing_table = var.pipeline_process_options_initial_data_load_action_on_existing_table + } + replicate_schema_change { + #Required + can_replicate_schema_change = var.pipeline_process_options_replicate_schema_change_can_replicate_schema_change + + #Optional + action_on_ddl_error = var.pipeline_process_options_replicate_schema_change_action_on_ddl_error + action_on_dml_error = var.pipeline_process_options_replicate_schema_change_action_on_dml_error + } + should_restart_on_failure = var.pipeline_process_options_should_restart_on_failure + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compartment_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. +* `defined_tags` - (Optional) (Updatable) Tags defined for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - (Optional) (Updatable) Metadata about this specific object. +* `display_name` - (Required) (Updatable) An object's Display Name. +* `freeform_tags` - (Optional) (Updatable) A simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `license_model` - (Required) (Updatable) The Oracle license model that applies to a Deployment. +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. +* `process_options` - (Optional) (Updatable) Required pipeline options to configure the replication process (Extract or Replicat). + * `initial_data_load` - (Required) (Updatable) Options required for the pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_existing_table` - (Optional) (Updatable) Action upon existing tables in target when initial Data Load is set i.e., isInitialLoad=true. + * `is_initial_load` - (Required) (Updatable) If ENABLED, then existing source data is also synchronized to the target when creating or updating the pipeline. + * `replicate_schema_change` - (Required) (Updatable) Options required for pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_ddl_error` - (Optional) (Updatable) Action upon DDL Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `action_on_dml_error` - (Optional) (Updatable) Action upon DML Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `can_replicate_schema_change` - (Required) (Updatable) If ENABLED, then addition or removal of schema is also replicated, apart from individual tables and records when creating or updating the pipeline. + * `should_restart_on_failure` - (Required) (Updatable) If ENABLED, then the replication process restarts itself upon failure. This option applies when creating or updating a pipeline. +* `recipe_type` - (Required) (Updatable) The type of the recipe +* `source_connection_details` - (Required) The source connection details for creating a pipeline. + * `connection_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. +* `target_connection_details` - (Required) The target connection details for creating a pipeline. + * `connection_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. + + +** 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` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment being referenced. +* `cpu_core_count` - The Minimum number of OCPUs to be made available for this Deployment. +* `defined_tags` - Tags defined for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}` +* `description` - Metadata about this specific object. +* `display_name` - An object's Display Name. +* `freeform_tags` - A simple key-value pair that is applied without any predefined name, type, or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` +* `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pipeline. This option applies when retrieving a pipeline. +* `is_auto_scaling_enabled` - Indicates if auto scaling is enabled for the Deployment's CPU core count. +* `license_model` - The Oracle license model that applies to a Deployment. +* `lifecycle_details` - Describes the object's current state in detail. For example, it can be used to provide actionable information for a resource in a Failed state. +* `lifecycle_sub_state` - Possible lifecycle substates when retrieving a pipeline. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. +* `mapping_rules` - Mapping for source/target schema/tables for the pipeline data replication. + * `mapping_type` - Defines the exclude/include rules of source and target schemas and tables when replicating from source to target. This option applies when creating and updating a pipeline. + * `source` - The source schema/table combination for replication to target. + * `target` - The target schema/table combination for replication from the source. +* `process_options` - Required pipeline options to configure the replication process (Extract or Replicat). + * `initial_data_load` - Options required for the pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_existing_table` - Action upon existing tables in target when initial Data Load is set i.e., isInitialLoad=true. + * `is_initial_load` - If ENABLED, then existing source data is also synchronized to the target when creating or updating the pipeline. + * `replicate_schema_change` - Options required for pipeline Initial Data Load. If enabled, copies existing data from source to target before replication. + * `action_on_ddl_error` - Action upon DDL Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `action_on_dml_error` - Action upon DML Error (active only if 'Replicate schema changes (DDL)' is selected) i.e canReplicateSchemaChange=true + * `can_replicate_schema_change` - If ENABLED, then addition or removal of schema is also replicated, apart from individual tables and records when creating or updating the pipeline. + * `should_restart_on_failure` - If ENABLED, then the replication process restarts itself upon failure. This option applies when creating or updating a pipeline. +* `recipe_type` - The type of the recipe +* `source_connection_details` - The source connection details for creating a pipeline. + * `connection_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. +* `state` - Lifecycle state of the pipeline. +* `system_tags` - 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}}` +* `target_connection_details` - The target connection details for creating a pipeline. + * `connection_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the connection being referenced. +* `time_created` - The time the resource was created. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. +* `time_last_recorded` - When the resource was last updated. This option applies when retrieving a pipeline. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2024-07-25T21:10:29.600Z`. +* `time_updated` - The time the resource was last updated. The format is defined by [RFC3339](https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + +## 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 Pipeline + * `update` - (Defaults to 20 minutes), when updating the Pipeline + * `delete` - (Defaults to 20 minutes), when destroying the Pipeline + + +## Import + +Pipelines can be imported using the `id`, e.g. + +``` +$ terraform import oci_golden_gate_pipeline.test_pipeline "id" +``` + diff --git a/website/docs/r/stack_monitoring_metric_extension.html.markdown b/website/docs/r/stack_monitoring_metric_extension.html.markdown index 33fadf9e8b1..53233c6580e 100644 --- a/website/docs/r/stack_monitoring_metric_extension.html.markdown +++ b/website/docs/r/stack_monitoring_metric_extension.html.markdown @@ -57,9 +57,12 @@ resource "oci_stack_monitoring_metric_extension" "test_metric_extension" { out_param_details { #Optional + out_param_name = var.metric_extension_query_properties_out_param_details_out_param_name out_param_position = var.metric_extension_query_properties_out_param_details_out_param_position out_param_type = var.metric_extension_query_properties_out_param_details_out_param_type } + protocol_type = var.metric_extension_query_properties_protocol_type + response_content_type = var.metric_extension_query_properties_response_content_type script_details { #Optional @@ -74,6 +77,7 @@ resource "oci_stack_monitoring_metric_extension" "test_metric_extension" { } sql_type = var.metric_extension_query_properties_sql_type starts_with = var.metric_extension_query_properties_starts_with + url = var.metric_extension_query_properties_url } resource_type = var.metric_extension_resource_type @@ -114,16 +118,20 @@ The following arguments are supported: * `jmx_attributes` - (Required when collection_method=JMX) (Updatable) List of JMX attributes or Metric Service Table columns separated by semi-colon * `managed_bean_query` - (Required when collection_method=JMX) (Updatable) JMX Managed Bean Query or Metric Service Table name * `out_param_details` - (Applicable when collection_method=SQL) (Updatable) Position and SQL Type of PL/SQL OUT parameter - * `out_param_position` - (Required when collection_method=SQL) (Updatable) Position of PL/SQL procedure OUT parameter - * `out_param_type` - (Required when collection_method=SQL) (Updatable) SQL Type of PL/SQL procedure OUT parameter - * `script_details` - (Applicable when collection_method=OS_COMMAND) (Updatable) Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data - * `content` - (Required when collection_method=OS_COMMAND) (Updatable) Content of the script file as base64 encoded string - * `name` - (Required when collection_method=OS_COMMAND) (Updatable) Name of the script file + * `out_param_name` - (Applicable when collection_method=SQL) (Updatable) Name of the Out Parameter + * `out_param_position` - (Required when collection_method=SQL) (Updatable) Position of PL/SQL procedure OUT parameter. The value of this property is ignored during update, if "outParamType" is set to NO_OUT_PARAM value. + * `out_param_type` - (Required when collection_method=SQL) (Updatable) SQL Type of PL/SQL procedure OUT parameter. During the update, to completely remove the out parameter, use the value NO_OUT_PARAM. In that case, the value of "outParamPosition" will be ignored. + * `protocol_type` - (Applicable when collection_method=HTTP) (Updatable) Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + * `response_content_type` - (Required when collection_method=HTTP) (Updatable) Type of content response given by the http(s) URL + * `script_details` - (Required when collection_method=HTTP | OS_COMMAND) (Updatable) Script details applicable to any OS Command/HTTP based Metric Extension which needs to run a script to collect data. For removing it during OS Command based Metric Extension update, set its "content" property to an empty string. In that case, "name" property value is ignored. + * `content` - (Required when collection_method=HTTP | OS_COMMAND) (Updatable) Content of the script/JavaScript file as base64 encoded string + * `name` - (Required when collection_method=HTTP | OS_COMMAND) (Updatable) Name of the script file * `sql_details` - (Required when collection_method=SQL) (Updatable) Details of Sql content which needs to execute to collect Metric Extension data * `content` - (Required when collection_method=SQL) (Updatable) Sql statement or script file content as base64 encoded string * `script_file_name` - (Applicable when collection_method=SQL) (Updatable) If a script needs to be executed, then provide file name of the script * `sql_type` - (Required when collection_method=SQL) (Updatable) Type of SQL data collection method i.e. either a Statement or SQL Script File * `starts_with` - (Applicable when collection_method=OS_COMMAND) (Updatable) String prefix used to identify metric output of the OS Command + * `url` - (Required when collection_method=HTTP) (Updatable) Http(s) end point URL * `resource_type` - (Required) Resource type to which Metric Extension applies * `publish_trigger` - (Optional) (Updatable) An optional property when set to `true` triggers Publish of a metric extension. Once set to `true`, it cannot be changed back to `false`. Update of publish_trigger cannot be combined with other updates in the same request. A metric extension cannot be tested and its definition cannot be updated once it is marked published or publish_trigger is updated to `true`. @@ -170,16 +178,20 @@ The following attributes are exported: * `jmx_attributes` - List of JMX attributes or Metric Service Table columns separated by semi-colon * `managed_bean_query` - JMX Managed Bean Query or Metric Service Table name * `out_param_details` - Position and SQL Type of PL/SQL OUT parameter - * `out_param_position` - Position of PL/SQL procedure OUT parameter - * `out_param_type` - SQL Type of PL/SQL procedure OUT parameter - * `script_details` - Script details applicable to any OS Command based Metric Extension which needs to run a script to collect data - * `content` - Content of the script file as base64 encoded string + * `out_param_name` - Name of the Out Parameter + * `out_param_position` - Position of PL/SQL procedure OUT parameter. The value of this property is ignored during update, if "outParamType" is set to NO_OUT_PARAM value. + * `out_param_type` - SQL Type of PL/SQL procedure OUT parameter. During the update, to completely remove the out parameter, use the value NO_OUT_PARAM. In that case, the value of "outParamPosition" will be ignored. + * `protocol_type` - Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URL + * `response_content_type` - Type of content response given by the http(s) URL + * `script_details` - Script details applicable to any OS Command/HTTP based Metric Extension which needs to run a script to collect data. For removing it during OS Command based Metric Extension update, set its "content" property to an empty string. In that case, "name" property value is ignored. + * `content` - Content of the script/JavaScript file as base64 encoded string * `name` - Name of the script file * `sql_details` - Details of Sql content which needs to execute to collect Metric Extension data * `content` - Sql statement or script file content as base64 encoded string * `script_file_name` - If a script needs to be executed, then provide file name of the script * `sql_type` - Type of SQL data collection method i.e. either a Statement or SQL Script File * `starts_with` - String prefix used to identify metric output of the OS Command + * `url` - Http(s) end point URL * `resource_type` - Resource type to which Metric Extension applies * `resource_uri` - The URI path that the user can do a GET on to access the metric extension metadata * `state` - The current lifecycle state of the metric extension diff --git a/website/oci.erb b/website/oci.erb index 4dbfee8c1fb..613684a7f97 100644 --- a/website/oci.erb +++ b/website/oci.erb @@ -769,6 +769,9 @@
  • oci_bds_auto_scaling_configuration
  • +
  • + oci_bds_bds_cluster_versions +
  • oci_bds_bds_instance
  • @@ -5401,6 +5404,24 @@
  • oci_golden_gate_messages
  • +
  • + oci_golden_gate_pipeline +
  • +
  • + oci_golden_gate_pipeline_running_processes +
  • +
  • + oci_golden_gate_pipeline_schema_tables +
  • +
  • + oci_golden_gate_pipeline_schemas +
  • +
  • + oci_golden_gate_pipelines +
  • +
  • + oci_golden_gate_recipes +
  • oci_golden_gate_trail_file
  • @@ -5436,6 +5457,9 @@
  • oci_golden_gate_deployment_certificate
  • +
  • + oci_golden_gate_pipeline +