From 48b3e38918c0e4daf16cd397025cc843014a00cc Mon Sep 17 00:00:00 2001 From: DEXREQ Automation Date: Mon, 10 Apr 2023 18:35:16 +0000 Subject: [PATCH] Merge pull request #2347 in SDK/oci-go-sdk from merge_to_github2023-04-10 to github Releasing Version 65.35.0 Squashed commit of the following: commit 0f8247814b4c7aada3f69e55a25463b35ecff6dc Author: oci-dex-release-bot Date: Mon Apr 10 18:18:34 2023 +0000 Releasing version 65 35 0 --- CHANGELOG.md | 13 + common/version.go | 2 +- database/application_vip.go | 129 ++ database/application_vip_summary.go | 129 ++ database/autonomous_container_database.go | 17 +- .../autonomous_container_database_summary.go | 17 +- database/autonomous_data_warehouse.go | 3 - database/autonomous_data_warehouse_summary.go | 3 - database/autonomous_database.go | 41 +- database/autonomous_database_summary.go | 41 +- .../autonomous_db_preview_version_summary.go | 1 + database/autonomous_db_version_summary.go | 1 + database/autonomous_vm_cluster.go | 14 +- database/autonomous_vm_cluster_summary.go | 14 +- database/cloud_autonomous_vm_cluster.go | 11 +- .../cloud_autonomous_vm_cluster_summary.go | 11 +- database/create_application_vip_details.go | 51 + ...create_application_vip_request_response.go | 103 + database/create_autonomous_database_base.go | 30 +- ...reate_autonomous_database_clone_details.go | 30 +- .../create_autonomous_database_details.go | 30 +- ...autonomous_database_from_backup_details.go | 30 +- ..._database_from_backup_timestamp_details.go | 30 +- .../create_autonomous_vm_cluster_details.go | 4 +- ...ate_cloud_autonomous_vm_cluster_details.go | 7 +- ..._autonomous_database_data_guard_details.go | 30 +- ..._cross_region_disaster_recovery_details.go | 30 +- database/create_database_base.go | 3 +- database/create_database_details.go | 2 + database/create_database_from_backup.go | 3 +- database/create_db_home_details.go | 3 +- ...reate_db_home_with_db_system_id_details.go | 3 +- ...eate_db_home_with_vm_cluster_id_details.go | 3 +- database/create_new_database_details.go | 3 +- ...hable_autonomous_database_clone_details.go | 30 +- database/database.go | 2 + database/database_client.go | 359 +++- database/database_summary.go | 2 + database/database_upgrade_history_entry.go | 3 +- .../database_upgrade_history_entry_summary.go | 3 +- ...atabase_upgrade_with_db_version_details.go | 3 +- ...delete_application_vip_request_response.go | 95 + .../get_application_vip_request_response.go | 93 + .../list_application_vips_request_response.go | 210 +++ ...utonomous_vm_cluster_ords_certs_details.go | 93 + ..._vm_cluster_ords_certs_request_response.go | 105 ++ ...autonomous_vm_cluster_ssl_certs_details.go | 93 + ...s_vm_cluster_ssl_certs_request_response.go | 105 ++ .../update_autonomous_database_details.go | 53 +- ...ate_cloud_autonomous_vm_cluster_details.go | 1 + datasafe/alerts_update_details.go | 4 +- datasafe/alerts_update_request_response.go | 2 +- ...y_sdm_masking_policy_difference_details.go | 39 + ...king_policy_difference_request_response.go | 105 ++ .../audit_event_aggregation_dimensions.go | 6 +- datasafe/audit_event_aggregation_items.go | 2 +- datasafe/audit_event_summary.go | 30 +- datasafe/audit_policy_aggregation_items.go | 4 +- datasafe/audit_policy_dimensions.go | 5 +- datasafe/audit_trail.go | 5 +- datasafe/audit_trail_collection.go | 2 +- datasafe/change_report_compartment_details.go | 2 +- ...g_policy_difference_compartment_details.go | 39 + ...difference_compartment_request_response.go | 102 + ..._policy_association_compartment_details.go | 2 +- datasafe/column.go | 2 +- datasafe/column_filter.go | 4 +- datasafe/column_sorting.go | 2 +- datasafe/create_masking_policy_details.go | 5 +- datasafe/create_report_definition_details.go | 2 +- ...e_sdm_masking_policy_difference_details.go | 64 + ...king_policy_difference_request_response.go | 104 ++ datasafe/database_details.go | 2 - datasafe/datasafe_client.go | 1238 +++++++++++- ...king_policy_difference_request_response.go | 96 + datasafe/difference_column.go | 218 +++ datasafe/difference_column_summary.go | 85 + datasafe/generate_report_details.go | 4 +- .../get_difference_column_request_response.go | 95 + datasafe/get_profile_request_response.go | 100 + ...king_policy_difference_request_response.go | 92 + .../list_alert_analytics_request_response.go | 6 +- .../list_alert_policies_request_response.go | 2 +- datasafe/list_alerts_request_response.go | 6 +- ...audit_policy_analytics_request_response.go | 353 ++++ ...ist_difference_columns_request_response.go | 239 +++ datasafe/list_findings_request_response.go | 52 + .../list_masking_objects_request_response.go | 265 +++ .../list_masking_schemas_request_response.go | 199 ++ ...list_profile_analytics_request_response.go | 265 +++ ...list_profile_summaries_request_response.go | 331 ++++ ...ist_report_definitions_request_response.go | 2 +- ...ing_policy_differences_request_response.go | 266 +++ ...list_sensitive_columns_request_response.go | 4 + ...list_sensitive_objects_request_response.go | 265 +++ ...list_sensitive_schemas_request_response.go | 199 ++ ...rt_policy_associations_request_response.go | 2 +- datasafe/list_users_request_response.go | 15 + datasafe/mask_data_details.go | 34 + datasafe/masking_object_collection.go | 39 + datasafe/masking_object_summary.go | 48 + datasafe/masking_policy.go | 5 +- datasafe/masking_report.go | 15 + datasafe/masking_report_summary.go | 15 + datasafe/masking_schema_collection.go | 39 + datasafe/masking_schema_summary.go | 39 + datasafe/patch_alerts_details.go | 4 +- datasafe/patch_alerts_request_response.go | 2 +- ...sking_policy_difference_columns_details.go | 67 + ...icy_difference_columns_request_response.go | 99 + ...target_alert_policy_association_details.go | 2 +- ...ert_policy_association_request_response.go | 2 +- datasafe/profile.go | 125 ++ datasafe/profile_aggregation.go | 56 + datasafe/profile_summary.go | 80 + datasafe/report.go | 8 +- datasafe/report_definition.go | 21 +- datasafe/report_definition_collection.go | 2 +- datasafe/report_definition_summary.go | 8 +- datasafe/report_details.go | 2 +- datasafe/report_summary.go | 2 +- datasafe/schedule_audit_report_details.go | 2 +- datasafe/schedule_report_details.go | 8 +- datasafe/schedule_report_request_response.go | 2 +- datasafe/sdm_masking_policy_difference.go | 193 ++ ...dm_masking_policy_difference_collection.go | 39 + ...ing_policy_difference_column_collection.go | 39 + .../sdm_masking_policy_difference_summary.go | 77 + datasafe/security_assessment.go | 3 + datasafe/security_assessment_references.go | 60 + datasafe/security_assessment_summary.go | 3 + datasafe/sensitive_object_collection.go | 39 + datasafe/sensitive_object_summary.go | 48 + datasafe/sensitive_schema_collection.go | 39 + datasafe/sensitive_schema_summary.go | 39 + datasafe/target_alert_policy_association.go | 2 +- ...date_data_safe_private_endpoint_details.go | 2 +- datasafe/update_masking_policy_details.go | 5 +- datasafe/update_report_definition_details.go | 2 +- ...e_sdm_masking_policy_difference_details.go | 47 + ...king_policy_difference_request_response.go | 99 + datasafe/user_assessment.go | 4 + datasafe/user_assessment_summary.go | 3 + datasafe/work_request.go | 20 + datasafe/work_request_summary.go | 20 + opsi/addm_db_collection.go | 47 + opsi/addm_db_finding_aggregation.go | 71 + .../addm_db_finding_aggregation_collection.go | 50 + opsi/addm_db_finding_category_collection.go | 44 + opsi/addm_db_finding_category_summary.go | 47 + ...addm_db_findings_time_series_collection.go | 50 + opsi/addm_db_findings_time_series_summary.go | 86 + opsi/addm_db_parameter_aggregation.go | 73 + ...ddm_db_parameter_aggregation_collection.go | 50 + opsi/addm_db_parameter_category_collection.go | 44 + opsi/addm_db_parameter_category_summary.go | 47 + opsi/addm_db_parameter_change_aggregation.go | 59 + ...parameter_change_aggregation_collection.go | 50 + opsi/addm_db_recommendation_aggregation.go | 130 ++ ...b_recommendation_aggregation_collection.go | 50 + ...m_db_recommendation_category_collection.go | 44 + ...addm_db_recommendation_category_summary.go | 47 + ..._recommendations_time_series_collection.go | 50 + ..._db_recommendations_time_series_summary.go | 137 ++ opsi/addm_db_schema_object_collection.go | 50 + opsi/addm_db_schema_object_summary.go | 56 + opsi/addm_db_sql_statement_collection.go | 50 + opsi/addm_db_sql_statement_summary.go | 53 + opsi/addm_db_summary.go | 66 + opsi/addm_report.go | 59 + opsi/database_configuration_metric_group.go | 8 + opsi/database_parameter_type_details.go | 56 + opsi/db_parameters.go | 80 + opsi/ingest_addm_reports_details.go | 41 + opsi/ingest_addm_reports_request_response.go | 112 ++ opsi/ingest_addm_reports_response_details.go | 41 + ..._db_finding_categories_request_response.go | 234 +++ ...b_findings_time_series_request_response.go | 253 +++ ...b_parameter_categories_request_response.go | 234 +++ ...ommendation_categories_request_response.go | 234 +++ ...mendations_time_series_request_response.go | 269 +++ opsi/list_addm_dbs_request_response.go | 251 +++ opsi/opsi_operationsinsights_client.go | 1651 ++++++++++++----- opsi/related_object_type_details.go | 132 ++ opsi/schema_object_type_details.go | 68 + opsi/sql_type_details.go | 65 + ...arize_addm_db_findings_request_response.go | 265 +++ ...m_db_parameter_changes_request_response.go | 262 +++ ...ize_addm_db_parameters_request_response.go | 410 ++++ ...ddm_db_recommendations_request_response.go | 280 +++ ...addm_db_schema_objects_request_response.go | 158 ++ ...addm_db_sql_statements_request_response.go | 159 ++ 192 files changed, 14573 insertions(+), 734 deletions(-) create mode 100644 database/application_vip.go create mode 100644 database/application_vip_summary.go create mode 100644 database/create_application_vip_details.go create mode 100644 database/create_application_vip_request_response.go create mode 100644 database/delete_application_vip_request_response.go create mode 100644 database/get_application_vip_request_response.go create mode 100644 database/list_application_vips_request_response.go create mode 100644 database/rotate_autonomous_vm_cluster_ords_certs_details.go create mode 100644 database/rotate_autonomous_vm_cluster_ords_certs_request_response.go create mode 100644 database/rotate_autonomous_vm_cluster_ssl_certs_details.go create mode 100644 database/rotate_autonomous_vm_cluster_ssl_certs_request_response.go create mode 100644 datasafe/apply_sdm_masking_policy_difference_details.go create mode 100644 datasafe/apply_sdm_masking_policy_difference_request_response.go create mode 100644 datasafe/change_sdm_masking_policy_difference_compartment_details.go create mode 100644 datasafe/change_sdm_masking_policy_difference_compartment_request_response.go create mode 100644 datasafe/create_sdm_masking_policy_difference_details.go create mode 100644 datasafe/create_sdm_masking_policy_difference_request_response.go create mode 100644 datasafe/delete_sdm_masking_policy_difference_request_response.go create mode 100644 datasafe/difference_column.go create mode 100644 datasafe/difference_column_summary.go create mode 100644 datasafe/get_difference_column_request_response.go create mode 100644 datasafe/get_profile_request_response.go create mode 100644 datasafe/get_sdm_masking_policy_difference_request_response.go create mode 100644 datasafe/list_audit_policy_analytics_request_response.go create mode 100644 datasafe/list_difference_columns_request_response.go create mode 100644 datasafe/list_masking_objects_request_response.go create mode 100644 datasafe/list_masking_schemas_request_response.go create mode 100644 datasafe/list_profile_analytics_request_response.go create mode 100644 datasafe/list_profile_summaries_request_response.go create mode 100644 datasafe/list_sdm_masking_policy_differences_request_response.go create mode 100644 datasafe/list_sensitive_objects_request_response.go create mode 100644 datasafe/list_sensitive_schemas_request_response.go create mode 100644 datasafe/masking_object_collection.go create mode 100644 datasafe/masking_object_summary.go create mode 100644 datasafe/masking_schema_collection.go create mode 100644 datasafe/masking_schema_summary.go create mode 100644 datasafe/patch_sdm_masking_policy_difference_columns_details.go create mode 100644 datasafe/patch_sdm_masking_policy_difference_columns_request_response.go create mode 100644 datasafe/profile.go create mode 100644 datasafe/profile_aggregation.go create mode 100644 datasafe/profile_summary.go create mode 100644 datasafe/sdm_masking_policy_difference.go create mode 100644 datasafe/sdm_masking_policy_difference_collection.go create mode 100644 datasafe/sdm_masking_policy_difference_column_collection.go create mode 100644 datasafe/sdm_masking_policy_difference_summary.go create mode 100644 datasafe/security_assessment_references.go create mode 100644 datasafe/sensitive_object_collection.go create mode 100644 datasafe/sensitive_object_summary.go create mode 100644 datasafe/sensitive_schema_collection.go create mode 100644 datasafe/sensitive_schema_summary.go create mode 100644 datasafe/update_sdm_masking_policy_difference_details.go create mode 100644 datasafe/update_sdm_masking_policy_difference_request_response.go create mode 100644 opsi/addm_db_collection.go create mode 100644 opsi/addm_db_finding_aggregation.go create mode 100644 opsi/addm_db_finding_aggregation_collection.go create mode 100644 opsi/addm_db_finding_category_collection.go create mode 100644 opsi/addm_db_finding_category_summary.go create mode 100644 opsi/addm_db_findings_time_series_collection.go create mode 100644 opsi/addm_db_findings_time_series_summary.go create mode 100644 opsi/addm_db_parameter_aggregation.go create mode 100644 opsi/addm_db_parameter_aggregation_collection.go create mode 100644 opsi/addm_db_parameter_category_collection.go create mode 100644 opsi/addm_db_parameter_category_summary.go create mode 100644 opsi/addm_db_parameter_change_aggregation.go create mode 100644 opsi/addm_db_parameter_change_aggregation_collection.go create mode 100644 opsi/addm_db_recommendation_aggregation.go create mode 100644 opsi/addm_db_recommendation_aggregation_collection.go create mode 100644 opsi/addm_db_recommendation_category_collection.go create mode 100644 opsi/addm_db_recommendation_category_summary.go create mode 100644 opsi/addm_db_recommendations_time_series_collection.go create mode 100644 opsi/addm_db_recommendations_time_series_summary.go create mode 100644 opsi/addm_db_schema_object_collection.go create mode 100644 opsi/addm_db_schema_object_summary.go create mode 100644 opsi/addm_db_sql_statement_collection.go create mode 100644 opsi/addm_db_sql_statement_summary.go create mode 100644 opsi/addm_db_summary.go create mode 100644 opsi/addm_report.go create mode 100644 opsi/database_parameter_type_details.go create mode 100644 opsi/db_parameters.go create mode 100644 opsi/ingest_addm_reports_details.go create mode 100644 opsi/ingest_addm_reports_request_response.go create mode 100644 opsi/ingest_addm_reports_response_details.go create mode 100644 opsi/list_addm_db_finding_categories_request_response.go create mode 100644 opsi/list_addm_db_findings_time_series_request_response.go create mode 100644 opsi/list_addm_db_parameter_categories_request_response.go create mode 100644 opsi/list_addm_db_recommendation_categories_request_response.go create mode 100644 opsi/list_addm_db_recommendations_time_series_request_response.go create mode 100644 opsi/list_addm_dbs_request_response.go create mode 100644 opsi/related_object_type_details.go create mode 100644 opsi/schema_object_type_details.go create mode 100644 opsi/sql_type_details.go create mode 100644 opsi/summarize_addm_db_findings_request_response.go create mode 100644 opsi/summarize_addm_db_parameter_changes_request_response.go create mode 100644 opsi/summarize_addm_db_parameters_request_response.go create mode 100644 opsi/summarize_addm_db_recommendations_request_response.go create mode 100644 opsi/summarize_addm_db_schema_objects_request_response.go create mode 100644 opsi/summarize_addm_db_sql_statements_request_response.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 899b350f04..350c4806bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.35.0 - 2023-04-11 +### Added +- Support for rotation of certificates on autonomous VM clusters on Exadata Cloud at Customer in the Database service +- Support for ACD and OKV wallet naming for autonomous databases and dedicated autonomous databases on Exadata Cloud at Customer in the Database service +- Support for Exadata cloud service application virtual IPs (VIPs) in the Database service +- Support for additional manageability features for large sensitive data models and masking policies in the Data Safe service +- Support for getting user profile details and assignments for databases and fleets in the Data Safe service +- Support for enabling ADDM spotlight for databases in the Operations Insights service + +### Breaking Changes +- The property `AdditionalDatabaseStatus` was removed from the models `AutonomousDatabase`, `AutonomousDatabaseSummary`, `AutonomousDataWarehouse`and `AutonomousDataWarehouseSummary` in the Database service + + ## 65.34.0 - 2023-04-04 ### Added - Support for pre-emptible worker nodes in the Container Engine for Kubernetes service diff --git a/common/version.go b/common/version.go index 942b3dec5d..af70b18a00 100644 --- a/common/version.go +++ b/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "34" + minor = "35" patch = "0" tag = "" ) diff --git a/database/application_vip.go b/database/application_vip.go new file mode 100644 index 0000000000..fd3ebdaf83 --- /dev/null +++ b/database/application_vip.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApplicationVip Details of an application virtual IP (VIP) address. +type ApplicationVip struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the application virtual IP (VIP) address. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cloud VM cluster associated with the application virtual IP (VIP) address. + CloudVmClusterId *string `mandatory:"true" json:"cloudVmClusterId"` + + // The hostname of the application virtual IP (VIP) address. + HostnameLabel *string `mandatory:"true" json:"hostnameLabel"` + + // The current lifecycle state of the application virtual IP (VIP) address. + LifecycleState ApplicationVipLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time when the create operation for the application virtual IP (VIP) address completed. + TimeAssigned *common.SDKTime `mandatory:"true" json:"timeAssigned"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the application virtual IP (VIP) address. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // The application virtual IP (VIP) address. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // Additional information about the current lifecycle state of the application virtual IP (VIP) address. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m ApplicationVip) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApplicationVip) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApplicationVipLifecycleStateEnum(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(GetApplicationVipLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApplicationVipLifecycleStateEnum Enum with underlying type: string +type ApplicationVipLifecycleStateEnum string + +// Set of constants representing the allowable values for ApplicationVipLifecycleStateEnum +const ( + ApplicationVipLifecycleStateProvisioning ApplicationVipLifecycleStateEnum = "PROVISIONING" + ApplicationVipLifecycleStateAvailable ApplicationVipLifecycleStateEnum = "AVAILABLE" + ApplicationVipLifecycleStateTerminating ApplicationVipLifecycleStateEnum = "TERMINATING" + ApplicationVipLifecycleStateTerminated ApplicationVipLifecycleStateEnum = "TERMINATED" + ApplicationVipLifecycleStateFailed ApplicationVipLifecycleStateEnum = "FAILED" +) + +var mappingApplicationVipLifecycleStateEnum = map[string]ApplicationVipLifecycleStateEnum{ + "PROVISIONING": ApplicationVipLifecycleStateProvisioning, + "AVAILABLE": ApplicationVipLifecycleStateAvailable, + "TERMINATING": ApplicationVipLifecycleStateTerminating, + "TERMINATED": ApplicationVipLifecycleStateTerminated, + "FAILED": ApplicationVipLifecycleStateFailed, +} + +var mappingApplicationVipLifecycleStateEnumLowerCase = map[string]ApplicationVipLifecycleStateEnum{ + "provisioning": ApplicationVipLifecycleStateProvisioning, + "available": ApplicationVipLifecycleStateAvailable, + "terminating": ApplicationVipLifecycleStateTerminating, + "terminated": ApplicationVipLifecycleStateTerminated, + "failed": ApplicationVipLifecycleStateFailed, +} + +// GetApplicationVipLifecycleStateEnumValues Enumerates the set of values for ApplicationVipLifecycleStateEnum +func GetApplicationVipLifecycleStateEnumValues() []ApplicationVipLifecycleStateEnum { + values := make([]ApplicationVipLifecycleStateEnum, 0) + for _, v := range mappingApplicationVipLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetApplicationVipLifecycleStateEnumStringValues Enumerates the set of values in String for ApplicationVipLifecycleStateEnum +func GetApplicationVipLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAILED", + } +} + +// GetMappingApplicationVipLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApplicationVipLifecycleStateEnum(val string) (ApplicationVipLifecycleStateEnum, bool) { + enum, ok := mappingApplicationVipLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/application_vip_summary.go b/database/application_vip_summary.go new file mode 100644 index 0000000000..0814ce144f --- /dev/null +++ b/database/application_vip_summary.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApplicationVipSummary Details of an application virtual IP (VIP) address. +type ApplicationVipSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the application virtual IP (VIP) address. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cloud VM cluster associated with the application virtual IP (VIP) address. + CloudVmClusterId *string `mandatory:"true" json:"cloudVmClusterId"` + + // The hostname of the application virtual IP (VIP) address. + HostnameLabel *string `mandatory:"true" json:"hostnameLabel"` + + // The current lifecycle state of the application virtual IP (VIP) address. + LifecycleState ApplicationVipSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time when the create operation for the application virtual IP (VIP) address completed. + TimeAssigned *common.SDKTime `mandatory:"true" json:"timeAssigned"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the application virtual IP (VIP) address. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // The application virtual IP (VIP) address. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // Additional information about the current lifecycle state of the application virtual IP (VIP) address. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m ApplicationVipSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApplicationVipSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApplicationVipSummaryLifecycleStateEnum(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(GetApplicationVipSummaryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApplicationVipSummaryLifecycleStateEnum Enum with underlying type: string +type ApplicationVipSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for ApplicationVipSummaryLifecycleStateEnum +const ( + ApplicationVipSummaryLifecycleStateProvisioning ApplicationVipSummaryLifecycleStateEnum = "PROVISIONING" + ApplicationVipSummaryLifecycleStateAvailable ApplicationVipSummaryLifecycleStateEnum = "AVAILABLE" + ApplicationVipSummaryLifecycleStateTerminating ApplicationVipSummaryLifecycleStateEnum = "TERMINATING" + ApplicationVipSummaryLifecycleStateTerminated ApplicationVipSummaryLifecycleStateEnum = "TERMINATED" + ApplicationVipSummaryLifecycleStateFailed ApplicationVipSummaryLifecycleStateEnum = "FAILED" +) + +var mappingApplicationVipSummaryLifecycleStateEnum = map[string]ApplicationVipSummaryLifecycleStateEnum{ + "PROVISIONING": ApplicationVipSummaryLifecycleStateProvisioning, + "AVAILABLE": ApplicationVipSummaryLifecycleStateAvailable, + "TERMINATING": ApplicationVipSummaryLifecycleStateTerminating, + "TERMINATED": ApplicationVipSummaryLifecycleStateTerminated, + "FAILED": ApplicationVipSummaryLifecycleStateFailed, +} + +var mappingApplicationVipSummaryLifecycleStateEnumLowerCase = map[string]ApplicationVipSummaryLifecycleStateEnum{ + "provisioning": ApplicationVipSummaryLifecycleStateProvisioning, + "available": ApplicationVipSummaryLifecycleStateAvailable, + "terminating": ApplicationVipSummaryLifecycleStateTerminating, + "terminated": ApplicationVipSummaryLifecycleStateTerminated, + "failed": ApplicationVipSummaryLifecycleStateFailed, +} + +// GetApplicationVipSummaryLifecycleStateEnumValues Enumerates the set of values for ApplicationVipSummaryLifecycleStateEnum +func GetApplicationVipSummaryLifecycleStateEnumValues() []ApplicationVipSummaryLifecycleStateEnum { + values := make([]ApplicationVipSummaryLifecycleStateEnum, 0) + for _, v := range mappingApplicationVipSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetApplicationVipSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for ApplicationVipSummaryLifecycleStateEnum +func GetApplicationVipSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "PROVISIONING", + "AVAILABLE", + "TERMINATING", + "TERMINATED", + "FAILED", + } +} + +// GetMappingApplicationVipSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApplicationVipSummaryLifecycleStateEnum(val string) (ApplicationVipSummaryLifecycleStateEnum, bool) { + enum, ok := mappingApplicationVipSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/autonomous_container_database.go b/database/autonomous_container_database.go index d5a5cfe3b3..97e44d05b7 100644 --- a/database/autonomous_container_database.go +++ b/database/autonomous_container_database.go @@ -119,22 +119,27 @@ type AutonomousContainerDatabase struct { // The wallet name for Oracle Key Vault. KeyStoreWalletName *string `mandatory:"false" json:"keyStoreWalletName"` - // The amount of memory (in GBs) enabled per each CPU in the Autonomous VM Cluster. + // The amount of memory (in GBs) enabled per OCPU or ECPU in the Autonomous VM Cluster.See Compute Models (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` - // Sum of CPUs available on the Autonomous VM Cluster + Sum of reclaimable CPUs available in the Autonomous Container Database. + // Sum of CPUs available on the Autonomous VM Cluster + Sum of reclaimable CPUs available in the Autonomous Container Database.
+ // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` - // The number of CPUs allocated to the Autonomous VM cluster. + // The number of CPUs allocated to the Autonomous VM cluster.
+ // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. TotalCpus *int `mandatory:"false" json:"totalCpus"` - // CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // For Autonomous Databases on Dedicated Exadata Infrastructure: + // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` - // An array of CPU values that can be used to successfully provision a single Autonomous Database. + // An array of CPU values that can be used to successfully provision a single Autonomous Database.\ + // For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The compute model of the Autonomous VM Cluster. + // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel AutonomousContainerDatabaseComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } diff --git a/database/autonomous_container_database_summary.go b/database/autonomous_container_database_summary.go index 5672cb9661..2e0b9af77f 100644 --- a/database/autonomous_container_database_summary.go +++ b/database/autonomous_container_database_summary.go @@ -119,22 +119,27 @@ type AutonomousContainerDatabaseSummary struct { // The wallet name for Oracle Key Vault. KeyStoreWalletName *string `mandatory:"false" json:"keyStoreWalletName"` - // The amount of memory (in GBs) enabled per each CPU in the Autonomous VM Cluster. + // The amount of memory (in GBs) enabled per OCPU or ECPU in the Autonomous VM Cluster.See Compute Models (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` - // Sum of CPUs available on the Autonomous VM Cluster + Sum of reclaimable CPUs available in the Autonomous Container Database. + // Sum of CPUs available on the Autonomous VM Cluster + Sum of reclaimable CPUs available in the Autonomous Container Database.
+ // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` - // The number of CPUs allocated to the Autonomous VM cluster. + // The number of CPUs allocated to the Autonomous VM cluster.
+ // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. TotalCpus *int `mandatory:"false" json:"totalCpus"` - // CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // For Autonomous Databases on Dedicated Exadata Infrastructure: + // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` - // An array of CPU values that can be used to successfully provision a single Autonomous Database. + // An array of CPU values that can be used to successfully provision a single Autonomous Database.\ + // For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The compute model of the Autonomous VM Cluster. + // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel AutonomousContainerDatabaseSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` } diff --git a/database/autonomous_data_warehouse.go b/database/autonomous_data_warehouse.go index c7f2d02914..98c7e2d690 100644 --- a/database/autonomous_data_warehouse.go +++ b/database/autonomous_data_warehouse.go @@ -39,9 +39,6 @@ type AutonomousDataWarehouse struct { // Information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED "HIDDEN" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. - AdditionalDatabaseStatus []string `mandatory:"false" json:"additionalDatabaseStatus"` - // The date and time the database was created. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/database/autonomous_data_warehouse_summary.go b/database/autonomous_data_warehouse_summary.go index e5ddfc8939..ce68b855e7 100644 --- a/database/autonomous_data_warehouse_summary.go +++ b/database/autonomous_data_warehouse_summary.go @@ -40,9 +40,6 @@ type AutonomousDataWarehouseSummary struct { // Information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED "HIDDEN" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. - AdditionalDatabaseStatus []string `mandatory:"false" json:"additionalDatabaseStatus"` - // The date and time the database was created. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/database/autonomous_database.go b/database/autonomous_database.go index 2e1b1e88ee..49038b5d62 100644 --- a/database/autonomous_database.go +++ b/database/autonomous_database.go @@ -36,9 +36,6 @@ type AutonomousDatabase struct { // Information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED "HIDDEN" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. - AdditionalDatabaseStatus []string `mandatory:"false" json:"additionalDatabaseStatus"` - // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` @@ -65,6 +62,7 @@ type AutonomousDatabase struct { LongTermBackupSchedule *LongTermBackUpScheduleDetails `mandatory:"false" json:"longTermBackupSchedule"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // System tags for this resource. Each key is predefined and scoped to a namespace. @@ -89,7 +87,8 @@ type AutonomousDatabase struct { // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ComputeModel AutonomousDatabaseComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` - // The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is on Shared or Dedicated infrastructure. For an Autonomous Database on Shared infrastructure, the 'ECPU' compute model requires values in multiples of two. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. + // The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is on Shared or Dedicated infrastructure. + // For an Autonomous Database on Shared infrastructure, the 'ECPU' compute model requires values in multiples of two. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. ComputeCount *float32 `mandatory:"false" json:"computeCount"` // Retention period, in days, for long-term backups @@ -109,7 +108,7 @@ type AutonomousDatabase struct { // An array of CPU values that an Autonomous Database can be scaled to. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The amount of memory (in GBs) enabled per each OCPU core in Autonomous VM Cluster. + // The amount of memory (in GBs) enabled per each CPU in the Autonomous VM Cluster. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The quantity of data in the database, in gigabytes. @@ -142,6 +141,7 @@ type AutonomousDatabase struct { // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel AutonomousDatabaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The amount of storage that has been used, in terabytes. @@ -174,7 +174,8 @@ type AutonomousDatabase struct { // The private endpoint for the resource. PrivateEndpoint *string `mandatory:"false" json:"privateEndpoint"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // The private endpoint Ip address for the resource. @@ -191,6 +192,7 @@ type AutonomousDatabase struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload AutonomousDatabaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // Indicates if the database-level access control is enabled. @@ -209,6 +211,7 @@ type AutonomousDatabase struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -224,6 +227,7 @@ type AutonomousDatabase struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // Information about Oracle APEX Application Development. @@ -247,7 +251,8 @@ type AutonomousDatabase struct { // The date and time when maintenance will end. TimeMaintenanceEnd *common.SDKTime `mandatory:"false" json:"timeMaintenanceEnd"` - // Indicates whether the Autonomous Database is a refreshable clone. + // Indicates if the Autonomous Database is a refreshable clone. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. IsRefreshableClone *bool `mandatory:"false" json:"isRefreshableClone"` // The date and time when last refresh happened. @@ -259,7 +264,8 @@ type AutonomousDatabase struct { // The date and time of next refresh. TimeOfNextRefresh *common.SDKTime `mandatory:"false" json:"timeOfNextRefresh"` - // The `DATABASE OPEN` mode. You can open the database in `READ_ONLY` or `READ_WRITE` mode. + // Indicates the Autonomous Database mode. The database can be opened in `READ_ONLY` or `READ_WRITE` mode. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. OpenMode AutonomousDatabaseOpenModeEnum `mandatory:"false" json:"openMode,omitempty"` // The refresh status of the clone. REFRESHING indicates that the clone is currently being refreshed with data from the source Autonomous Database. @@ -271,7 +277,8 @@ type AutonomousDatabase struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that was cloned to create the current Autonomous Database. SourceId *string `mandatory:"false" json:"sourceId"` - // The Autonomous Database permission level. Restricted mode allows access only to admin users. + // The Autonomous Database permission level. Restricted mode allows access only by admin users. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PermissionLevel AutonomousDatabasePermissionLevelEnum `mandatory:"false" json:"permissionLevel,omitempty"` // The timestamp of the last switchover operation for the Autonomous Database. @@ -327,7 +334,15 @@ type AutonomousDatabase struct { // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for shared Exadata infrastructure, standby databases located in the same region as the source primary database do not have OCIDs. PeerDbIds []string `mandatory:"false" json:"peerDbIds"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` // Indicates if the refreshable clone can be reconnected to its source database. @@ -340,7 +355,8 @@ type AutonomousDatabase struct { // follows a schedule that applies patches prior to the REGULAR schedule.The REGULAR maintenance schedule of this Autonomous Database follows the normal cycle. AutonomousMaintenanceScheduleType AutonomousDatabaseAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -359,7 +375,8 @@ type AutonomousDatabase struct { // The Oracle Database Edition that applies to the Autonomous databases. DatabaseEdition AutonomousDatabaseDatabaseEditionEnum `mandatory:"false" json:"databaseEdition,omitempty"` - // List of database tools details. + // The list of database tools details. + // 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"` // Indicates the local disaster recovery (DR) type of the Shared Autonomous Database. diff --git a/database/autonomous_database_summary.go b/database/autonomous_database_summary.go index 99ed37fe1a..5da5966073 100644 --- a/database/autonomous_database_summary.go +++ b/database/autonomous_database_summary.go @@ -37,9 +37,6 @@ type AutonomousDatabaseSummary struct { // Information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED "HIDDEN" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. - AdditionalDatabaseStatus []string `mandatory:"false" json:"additionalDatabaseStatus"` - // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` @@ -66,6 +63,7 @@ type AutonomousDatabaseSummary struct { LongTermBackupSchedule *LongTermBackUpScheduleDetails `mandatory:"false" json:"longTermBackupSchedule"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // System tags for this resource. Each key is predefined and scoped to a namespace. @@ -90,7 +88,8 @@ type AutonomousDatabaseSummary struct { // The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ComputeModel AutonomousDatabaseSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` - // The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is on Shared or Dedicated infrastructure. For an Autonomous Database on Shared infrastructure, the 'ECPU' compute model requires values in multiples of two. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. + // The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is on Shared or Dedicated infrastructure. + // For an Autonomous Database on Shared infrastructure, the 'ECPU' compute model requires values in multiples of two. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. ComputeCount *float32 `mandatory:"false" json:"computeCount"` // Retention period, in days, for long-term backups @@ -110,7 +109,7 @@ type AutonomousDatabaseSummary struct { // An array of CPU values that an Autonomous Database can be scaled to. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The amount of memory (in GBs) enabled per each OCPU core in Autonomous VM Cluster. + // The amount of memory (in GBs) enabled per each CPU in the Autonomous VM Cluster. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The quantity of data in the database, in gigabytes. @@ -143,6 +142,7 @@ type AutonomousDatabaseSummary struct { // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel AutonomousDatabaseSummaryLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The amount of storage that has been used, in terabytes. @@ -175,7 +175,8 @@ type AutonomousDatabaseSummary struct { // The private endpoint for the resource. PrivateEndpoint *string `mandatory:"false" json:"privateEndpoint"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // The private endpoint Ip address for the resource. @@ -192,6 +193,7 @@ type AutonomousDatabaseSummary struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload AutonomousDatabaseSummaryDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // Indicates if the database-level access control is enabled. @@ -210,6 +212,7 @@ type AutonomousDatabaseSummary struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -225,6 +228,7 @@ type AutonomousDatabaseSummary struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // Information about Oracle APEX Application Development. @@ -248,7 +252,8 @@ type AutonomousDatabaseSummary struct { // The date and time when maintenance will end. TimeMaintenanceEnd *common.SDKTime `mandatory:"false" json:"timeMaintenanceEnd"` - // Indicates whether the Autonomous Database is a refreshable clone. + // Indicates if the Autonomous Database is a refreshable clone. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. IsRefreshableClone *bool `mandatory:"false" json:"isRefreshableClone"` // The date and time when last refresh happened. @@ -260,7 +265,8 @@ type AutonomousDatabaseSummary struct { // The date and time of next refresh. TimeOfNextRefresh *common.SDKTime `mandatory:"false" json:"timeOfNextRefresh"` - // The `DATABASE OPEN` mode. You can open the database in `READ_ONLY` or `READ_WRITE` mode. + // Indicates the Autonomous Database mode. The database can be opened in `READ_ONLY` or `READ_WRITE` mode. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. OpenMode AutonomousDatabaseSummaryOpenModeEnum `mandatory:"false" json:"openMode,omitempty"` // The refresh status of the clone. REFRESHING indicates that the clone is currently being refreshed with data from the source Autonomous Database. @@ -272,7 +278,8 @@ type AutonomousDatabaseSummary struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the source Autonomous Database that was cloned to create the current Autonomous Database. SourceId *string `mandatory:"false" json:"sourceId"` - // The Autonomous Database permission level. Restricted mode allows access only to admin users. + // The Autonomous Database permission level. Restricted mode allows access only by admin users. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PermissionLevel AutonomousDatabaseSummaryPermissionLevelEnum `mandatory:"false" json:"permissionLevel,omitempty"` // The timestamp of the last switchover operation for the Autonomous Database. @@ -328,7 +335,15 @@ type AutonomousDatabaseSummary struct { // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for shared Exadata infrastructure, standby databases located in the same region as the source primary database do not have OCIDs. PeerDbIds []string `mandatory:"false" json:"peerDbIds"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` // Indicates if the refreshable clone can be reconnected to its source database. @@ -341,7 +356,8 @@ type AutonomousDatabaseSummary struct { // follows a schedule that applies patches prior to the REGULAR schedule.The REGULAR maintenance schedule of this Autonomous Database follows the normal cycle. AutonomousMaintenanceScheduleType AutonomousDatabaseSummaryAutonomousMaintenanceScheduleTypeEnum `mandatory:"false" json:"autonomousMaintenanceScheduleType,omitempty"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -360,7 +376,8 @@ type AutonomousDatabaseSummary struct { // The Oracle Database Edition that applies to the Autonomous databases. DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `mandatory:"false" json:"databaseEdition,omitempty"` - // List of database tools details. + // The list of database tools details. + // 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"` // Indicates the local disaster recovery (DR) type of the Shared Autonomous Database. diff --git a/database/autonomous_db_preview_version_summary.go b/database/autonomous_db_preview_version_summary.go index 45ad8e91bf..79547a769a 100644 --- a/database/autonomous_db_preview_version_summary.go +++ b/database/autonomous_db_preview_version_summary.go @@ -32,6 +32,7 @@ type AutonomousDbPreviewVersionSummary struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload AutonomousDbPreviewVersionSummaryDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // A URL that points to a detailed description of the preview version. diff --git a/database/autonomous_db_version_summary.go b/database/autonomous_db_version_summary.go index db24d7d9fe..f743fc8866 100644 --- a/database/autonomous_db_version_summary.go +++ b/database/autonomous_db_version_summary.go @@ -26,6 +26,7 @@ type AutonomousDbVersionSummary struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload AutonomousDbVersionSummaryDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // True if the database uses dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html). diff --git a/database/autonomous_vm_cluster.go b/database/autonomous_vm_cluster.go index eb9da6c54e..39cffb5bbf 100644 --- a/database/autonomous_vm_cluster.go +++ b/database/autonomous_vm_cluster.go @@ -51,7 +51,7 @@ type AutonomousVmCluster struct { // The number of enabled CPU cores. CpusEnabled *int `mandatory:"false" json:"cpusEnabled"` - // The compute model of the Autonomous VM Cluster. + // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel AutonomousVmClusterComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // The number of enabled OCPU cores. @@ -63,7 +63,7 @@ type AutonomousVmCluster struct { // The total number of Autonomous Container Databases that can be created. TotalContainerDatabases *int `mandatory:"false" json:"totalContainerDatabases"` - // The amount of memory (in GBs) enabled per each OCPU core. + // The amount of memory (in GBs) to be enabled per each CPU core. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The number of CPU cores enabled per VM cluster node. @@ -113,7 +113,9 @@ type AutonomousVmCluster struct { // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db servers. DbServers []string `mandatory:"false" json:"dbServers"` - // CPU cores that continue to be included in the count of OCPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available OCPUs at its parent AVMC level by restarting the Autonomous Container Database. + // For Autonomous Databases on Dedicated Exadata Infrastructure: + // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ReclaimableCpus *int `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. @@ -130,6 +132,12 @@ type AutonomousVmCluster struct { // Enable mutual TLS(mTLS) authentication for database while provisioning a VMCluster. Default is TLS. IsMtlsEnabled *bool `mandatory:"false" json:"isMtlsEnabled"` + + // The date and time of Database SSL certificate expiration. + TimeDatabaseSslCertificateExpires *common.SDKTime `mandatory:"false" json:"timeDatabaseSslCertificateExpires"` + + // The date and time of ORDS certificate expiration. + TimeOrdsCertificateExpires *common.SDKTime `mandatory:"false" json:"timeOrdsCertificateExpires"` } func (m AutonomousVmCluster) String() string { diff --git a/database/autonomous_vm_cluster_summary.go b/database/autonomous_vm_cluster_summary.go index 603cce12ac..9c3bacdcab 100644 --- a/database/autonomous_vm_cluster_summary.go +++ b/database/autonomous_vm_cluster_summary.go @@ -51,7 +51,7 @@ type AutonomousVmClusterSummary struct { // The number of enabled CPU cores. CpusEnabled *int `mandatory:"false" json:"cpusEnabled"` - // The compute model of the Autonomous VM Cluster. + // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel AutonomousVmClusterSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // The number of enabled OCPU cores. @@ -63,7 +63,7 @@ type AutonomousVmClusterSummary struct { // The total number of Autonomous Container Databases that can be created. TotalContainerDatabases *int `mandatory:"false" json:"totalContainerDatabases"` - // The amount of memory (in GBs) enabled per each OCPU core. + // The amount of memory (in GBs) to be enabled per each CPU core. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The number of CPU cores enabled per VM cluster node. @@ -113,7 +113,9 @@ type AutonomousVmClusterSummary struct { // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db servers. DbServers []string `mandatory:"false" json:"dbServers"` - // CPU cores that continue to be included in the count of OCPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available OCPUs at its parent AVMC level by restarting the Autonomous Container Database. + // For Autonomous Databases on Dedicated Exadata Infrastructure: + // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ReclaimableCpus *int `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. @@ -130,6 +132,12 @@ type AutonomousVmClusterSummary struct { // Enable mutual TLS(mTLS) authentication for database while provisioning a VMCluster. Default is TLS. IsMtlsEnabled *bool `mandatory:"false" json:"isMtlsEnabled"` + + // The date and time of Database SSL certificate expiration. + TimeDatabaseSslCertificateExpires *common.SDKTime `mandatory:"false" json:"timeDatabaseSslCertificateExpires"` + + // The date and time of ORDS certificate expiration. + TimeOrdsCertificateExpires *common.SDKTime `mandatory:"false" json:"timeOrdsCertificateExpires"` } func (m AutonomousVmClusterSummary) String() string { diff --git a/database/cloud_autonomous_vm_cluster.go b/database/cloud_autonomous_vm_cluster.go index 33e3e64eb5..d7f764973b 100644 --- a/database/cloud_autonomous_vm_cluster.go +++ b/database/cloud_autonomous_vm_cluster.go @@ -91,10 +91,10 @@ type CloudAutonomousVmCluster struct { // The number of CPU cores on the cloud Autonomous VM cluster. Only 1 decimal place is allowed for the fractional part. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` - // The compute model of the Cloud Autonomous VM Cluster. + // The compute model of the Cloud Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel CloudAutonomousVmClusterComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` - // The number of OCPU cores enabled per VM cluster node. + // The number of CPU cores enabled per VM cluster node. CpuCoreCountPerNode *int `mandatory:"false" json:"cpuCoreCountPerNode"` // The memory allocated in GBs. @@ -104,6 +104,7 @@ type CloudAutonomousVmCluster struct { // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CloudAutonomousVmClusterLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance run. @@ -126,7 +127,9 @@ type CloudAutonomousVmCluster struct { // CPU cores available for allocation to Autonomous Databases. AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` - // CPU cores that continue to be included in the count of OCPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available OCPUs at its parent AVMC level by restarting the Autonomous Container Database. + // For Autonomous Databases on Dedicated Exadata Infrastructure: + // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. @@ -144,7 +147,7 @@ type CloudAutonomousVmCluster struct { // The local node storage allocated in GBs. DbNodeStorageSizeInGBs *int `mandatory:"false" json:"dbNodeStorageSizeInGBs"` - // The amount of memory (in GBs) enabled per each OCPU core. + // The amount of memory (in GBs) enabled per each CPU core. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` } diff --git a/database/cloud_autonomous_vm_cluster_summary.go b/database/cloud_autonomous_vm_cluster_summary.go index 0b78184cee..6b9c471af6 100644 --- a/database/cloud_autonomous_vm_cluster_summary.go +++ b/database/cloud_autonomous_vm_cluster_summary.go @@ -91,10 +91,10 @@ type CloudAutonomousVmClusterSummary struct { // The number of CPU cores on the cloud Autonomous VM cluster. Only 1 decimal place is allowed for the fractional part. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` - // The compute model of the Cloud Autonomous VM Cluster. + // The compute model of the Cloud Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel CloudAutonomousVmClusterSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` - // The number of OCPU cores enabled per VM cluster node. + // The number of CPU cores enabled per VM cluster node. CpuCoreCountPerNode *int `mandatory:"false" json:"cpuCoreCountPerNode"` // The memory allocated in GBs. @@ -104,6 +104,7 @@ type CloudAutonomousVmClusterSummary struct { // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CloudAutonomousVmClusterSummaryLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance run. @@ -126,7 +127,9 @@ type CloudAutonomousVmClusterSummary struct { // CPU cores available for allocation to Autonomous Databases. AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` - // CPU cores that continue to be included in the count of OCPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available OCPUs at its parent AVMC level by restarting the Autonomous Container Database. + // For Autonomous Databases on Dedicated Exadata Infrastructure: + // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. @@ -144,7 +147,7 @@ type CloudAutonomousVmClusterSummary struct { // The local node storage allocated in GBs. DbNodeStorageSizeInGBs *int `mandatory:"false" json:"dbNodeStorageSizeInGBs"` - // The amount of memory (in GBs) enabled per each OCPU core. + // The amount of memory (in GBs) enabled per each CPU core. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` } diff --git a/database/create_application_vip_details.go b/database/create_application_vip_details.go new file mode 100644 index 0000000000..8e964ef86b --- /dev/null +++ b/database/create_application_vip_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateApplicationVipDetails Details to create an application virtual IP (VIP) address on a cloud VM cluster. +type CreateApplicationVipDetails struct { + + // The hostname of the application virtual IP (VIP) address. + HostnameLabel *string `mandatory:"true" json:"hostnameLabel"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cloud VM cluster associated with the application virtual IP (VIP) address. + CloudVmClusterId *string `mandatory:"true" json:"cloudVmClusterId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet associated with the application virtual IP (VIP) address. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB node associated with the application virtual IP (VIP) address. + DbNodeId *string `mandatory:"false" json:"dbNodeId"` + + // The application virtual IP (VIP) address. + IpAddress *string `mandatory:"false" json:"ipAddress"` +} + +func (m CreateApplicationVipDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateApplicationVipDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/database/create_application_vip_request_response.go b/database/create_application_vip_request_response.go new file mode 100644 index 0000000000..a83a11a391 --- /dev/null +++ b/database/create_application_vip_request_response.go @@ -0,0 +1,103 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateApplicationVipRequest wrapper for the CreateApplicationVip operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/CreateApplicationVip.go.html to see an example of how to use CreateApplicationVipRequest. +type CreateApplicationVipRequest struct { + + // Request to create a new application virtual IP (VIP) address. + CreateApplicationVipDetails `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 + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // 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 CreateApplicationVipRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateApplicationVipRequest) 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 CreateApplicationVipRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateApplicationVipRequest) 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 CreateApplicationVipRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateApplicationVipResponse wrapper for the CreateApplicationVip operation +type CreateApplicationVipResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApplicationVip instance + ApplicationVip `presentIn:"body"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateApplicationVipResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateApplicationVipResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/create_autonomous_database_base.go b/database/create_autonomous_database_base.go index dfee97ac1d..7f30f46869 100644 --- a/database/create_autonomous_database_base.go +++ b/database/create_autonomous_database_base.go @@ -37,7 +37,7 @@ type CreateAutonomousDatabaseBase interface { // AL16UTF16 or UTF8. GetNcharacterSet() *string - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. GetDbName() *string // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -52,9 +52,9 @@ type CreateAutonomousDatabaseBase interface { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. GetOcpuCount() *float32 @@ -63,6 +63,7 @@ type CreateAutonomousDatabaseBase interface { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. GetDbWorkload() CreateAutonomousDatabaseBaseDbWorkloadEnum // The size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed. For Autonomous Databases on dedicated Exadata infrastructure, the maximum storage value is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -76,6 +77,7 @@ type CreateAutonomousDatabaseBase interface { GetDataStorageSizeInGBs() *int // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled GetIsFreeTier() *bool // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -94,6 +96,7 @@ type CreateAutonomousDatabaseBase interface { // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. GetLicenseModel() CreateAutonomousDatabaseBaseLicenseModelEnum // If set to `TRUE`, indicates that an Autonomous Database preview version is being provisioned, and that the preview version's terms of service have been accepted. Note that preview version software is only available for databases on shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html). @@ -124,6 +127,7 @@ type CreateAutonomousDatabaseBase interface { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. GetWhitelistedIps() []string // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -139,6 +143,7 @@ type CreateAutonomousDatabaseBase interface { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. GetStandbyWhitelistedIps() []string // **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. @@ -162,7 +167,8 @@ type CreateAutonomousDatabaseBase interface { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. GetNsgIds() []string - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. GetPrivateEndpointLabel() *string // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -183,14 +189,23 @@ type CreateAutonomousDatabaseBase interface { // Customer Contacts. GetCustomerContacts() []CustomerContact - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. GetIsMtlsConnectionRequired() *bool // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database // follows a schedule that applies patches prior to the REGULAR schedule.The REGULAR maintenance schedule of this Autonomous Database follows the normal cycle. GetAutonomousMaintenanceScheduleType() CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum - // list of scheduled operations + // The list of scheduled operations. + // 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. GetScheduledOperations() []ScheduledOperationDetails // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -202,7 +217,8 @@ type CreateAutonomousDatabaseBase interface { // The Oracle Database Edition that applies to the Autonomous databases. GetDatabaseEdition() AutonomousDatabaseSummaryDatabaseEditionEnum - // List of database tools details. + // The list of database tools details. + // 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 // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. diff --git a/database/create_autonomous_database_clone_details.go b/database/create_autonomous_database_clone_details.go index 16408df3fc..d3041342fe 100644 --- a/database/create_autonomous_database_clone_details.go +++ b/database/create_autonomous_database_clone_details.go @@ -35,7 +35,7 @@ type CreateAutonomousDatabaseCloneDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. DbName *string `mandatory:"false" json:"dbName"` // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -47,9 +47,9 @@ type CreateAutonomousDatabaseCloneDetails struct { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` @@ -64,6 +64,7 @@ type CreateAutonomousDatabaseCloneDetails struct { DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -106,6 +107,7 @@ type CreateAutonomousDatabaseCloneDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -121,6 +123,7 @@ type CreateAutonomousDatabaseCloneDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // **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. @@ -144,7 +147,8 @@ type CreateAutonomousDatabaseCloneDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -165,10 +169,19 @@ type CreateAutonomousDatabaseCloneDetails struct { // Customer Contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -177,7 +190,8 @@ type CreateAutonomousDatabaseCloneDetails struct { // The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled. MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. @@ -200,12 +214,14 @@ type CreateAutonomousDatabaseCloneDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database diff --git a/database/create_autonomous_database_details.go b/database/create_autonomous_database_details.go index 65ea750baa..ad75fbed4c 100644 --- a/database/create_autonomous_database_details.go +++ b/database/create_autonomous_database_details.go @@ -32,7 +32,7 @@ type CreateAutonomousDatabaseDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. DbName *string `mandatory:"false" json:"dbName"` // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -44,9 +44,9 @@ type CreateAutonomousDatabaseDetails struct { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` @@ -61,6 +61,7 @@ type CreateAutonomousDatabaseDetails struct { DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -103,6 +104,7 @@ type CreateAutonomousDatabaseDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -118,6 +120,7 @@ type CreateAutonomousDatabaseDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // **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. @@ -141,7 +144,8 @@ type CreateAutonomousDatabaseDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -162,10 +166,19 @@ type CreateAutonomousDatabaseDetails struct { // Customer Contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -174,7 +187,8 @@ type CreateAutonomousDatabaseDetails struct { // The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled. MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. @@ -194,12 +208,14 @@ type CreateAutonomousDatabaseDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database diff --git a/database/create_autonomous_database_from_backup_details.go b/database/create_autonomous_database_from_backup_details.go index b10e14a015..93e469a8b1 100644 --- a/database/create_autonomous_database_from_backup_details.go +++ b/database/create_autonomous_database_from_backup_details.go @@ -35,7 +35,7 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. DbName *string `mandatory:"false" json:"dbName"` // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -47,9 +47,9 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` @@ -64,6 +64,7 @@ type CreateAutonomousDatabaseFromBackupDetails struct { DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -106,6 +107,7 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -121,6 +123,7 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // **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. @@ -144,7 +147,8 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -165,10 +169,19 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // Customer Contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -177,7 +190,8 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled. MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. @@ -200,12 +214,14 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database diff --git a/database/create_autonomous_database_from_backup_timestamp_details.go b/database/create_autonomous_database_from_backup_timestamp_details.go index 06a557dd79..6e198f8b6e 100644 --- a/database/create_autonomous_database_from_backup_timestamp_details.go +++ b/database/create_autonomous_database_from_backup_timestamp_details.go @@ -35,7 +35,7 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. DbName *string `mandatory:"false" json:"dbName"` // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -47,9 +47,9 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` @@ -64,6 +64,7 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -106,6 +107,7 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -121,6 +123,7 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // **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. @@ -144,7 +147,8 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -165,10 +169,19 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // Customer Contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -177,7 +190,8 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled. MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. @@ -206,12 +220,14 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database diff --git a/database/create_autonomous_vm_cluster_details.go b/database/create_autonomous_vm_cluster_details.go index 2e060208de..49c1248db7 100644 --- a/database/create_autonomous_vm_cluster_details.go +++ b/database/create_autonomous_vm_cluster_details.go @@ -45,10 +45,10 @@ type CreateAutonomousVmClusterDetails struct { // The number of CPU cores to enable per VM cluster node. CpuCoreCountPerNode *int `mandatory:"false" json:"cpuCoreCountPerNode"` - // The compute model of the Autonomous VM Cluster. + // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel CreateAutonomousVmClusterDetailsComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` - // The amount of memory (in GBs) to be enabled per each OCPU core. + // The amount of memory (in GBs) to be enabled per each CPU core. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The data disk group size to be allocated for Autonomous Databases, in TBs. diff --git a/database/create_cloud_autonomous_vm_cluster_details.go b/database/create_cloud_autonomous_vm_cluster_details.go index 77d0ad3006..58003099c4 100644 --- a/database/create_cloud_autonomous_vm_cluster_details.go +++ b/database/create_cloud_autonomous_vm_cluster_details.go @@ -36,10 +36,10 @@ type CreateCloudAutonomousVmClusterDetails struct { // The total number of Autonomous Container Databases that can be created. TotalContainerDatabases *int `mandatory:"false" json:"totalContainerDatabases"` - // The number of OCPU cores to be enabled per VM cluster node. + // The number of CPU cores to be enabled per VM cluster node. CpuCoreCountPerNode *int `mandatory:"false" json:"cpuCoreCountPerNode"` - // The amount of memory (in GBs) to be enabled per each OCPU core. + // The amount of memory (in GBs) to be enabled per each CPU core. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The data disk group size to be allocated for Autonomous Databases, in TBs. @@ -48,7 +48,7 @@ type CreateCloudAutonomousVmClusterDetails struct { // The time zone to use for the Cloud Autonomous VM cluster. For details, see DB System Time Zones (https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). ClusterTimeZone *string `mandatory:"false" json:"clusterTimeZone"` - // The compute model of the Cloud Autonomous VM Cluster. + // The compute model of the Cloud Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. ComputeModel CreateCloudAutonomousVmClusterDetailsComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // The list of database servers. @@ -60,6 +60,7 @@ type CreateCloudAutonomousVmClusterDetails struct { // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateCloudAutonomousVmClusterDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see Security Rules (https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). diff --git a/database/create_cross_region_autonomous_database_data_guard_details.go b/database/create_cross_region_autonomous_database_data_guard_details.go index b5ce3ba3b5..5597bce196 100644 --- a/database/create_cross_region_autonomous_database_data_guard_details.go +++ b/database/create_cross_region_autonomous_database_data_guard_details.go @@ -77,7 +77,7 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. DbName *string `mandatory:"false" json:"dbName"` // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -89,9 +89,9 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` @@ -106,6 +106,7 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -148,6 +149,7 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -163,6 +165,7 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // **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. @@ -186,7 +189,8 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -207,10 +211,19 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // Customer Contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -219,7 +232,8 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled. MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. @@ -239,12 +253,14 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database diff --git a/database/create_cross_region_disaster_recovery_details.go b/database/create_cross_region_disaster_recovery_details.go index 08e5f9da1f..e78eca62c3 100644 --- a/database/create_cross_region_disaster_recovery_details.go +++ b/database/create_cross_region_disaster_recovery_details.go @@ -75,7 +75,7 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. DbName *string `mandatory:"false" json:"dbName"` // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -87,9 +87,9 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` @@ -104,6 +104,7 @@ type CreateCrossRegionDisasterRecoveryDetails struct { DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -146,6 +147,7 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -161,6 +163,7 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // **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. @@ -184,7 +187,8 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -205,10 +209,19 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // Customer Contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -217,7 +230,8 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled. MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. @@ -237,12 +251,14 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database diff --git a/database/create_database_base.go b/database/create_database_base.go index af38314076..00e5679b38 100644 --- a/database/create_database_base.go +++ b/database/create_database_base.go @@ -23,7 +23,8 @@ type CreateDatabaseBase interface { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Database Home. GetDbHomeId() *string - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. GetDbVersion() *string // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. diff --git a/database/create_database_details.go b/database/create_database_details.go index fa2bf96d20..7fa6e26a6a 100644 --- a/database/create_database_details.go +++ b/database/create_database_details.go @@ -45,6 +45,8 @@ type CreateDatabaseDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` + // **Deprecated.** The dbWorkload field has been deprecated for Exadata Database Service on Dedicated Infrastructure, Exadata Database Service on Cloud@Customer, and Base Database Service. + // Support for this attribute will end in November 2023. You may choose to update your custom scripts to exclude the dbWorkload attribute. After November 2023 if you pass a value to the dbWorkload attribute, it will be ignored. // The database workload type. DbWorkload CreateDatabaseDetailsDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` diff --git a/database/create_database_from_backup.go b/database/create_database_from_backup.go index e125eca587..2444d6bb89 100644 --- a/database/create_database_from_backup.go +++ b/database/create_database_from_backup.go @@ -25,7 +25,8 @@ type CreateDatabaseFromBackup struct { Database *CreateDatabaseFromBackupDetails `mandatory:"true" json:"database"` - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbVersion *string `mandatory:"false" json:"dbVersion"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. diff --git a/database/create_db_home_details.go b/database/create_db_home_details.go index b761f21cb3..7142d315e6 100644 --- a/database/create_db_home_details.go +++ b/database/create_db_home_details.go @@ -19,7 +19,8 @@ import ( // **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. type CreateDbHomeDetails struct { - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbVersion *string `mandatory:"true" json:"dbVersion"` Database *CreateDatabaseDetails `mandatory:"true" json:"database"` diff --git a/database/create_db_home_with_db_system_id_details.go b/database/create_db_home_with_db_system_id_details.go index 9e9bcddf40..fc8b54f9cf 100644 --- a/database/create_db_home_with_db_system_id_details.go +++ b/database/create_db_home_with_db_system_id_details.go @@ -46,7 +46,8 @@ type CreateDbHomeWithDbSystemIdDetails struct { // If true, the customer acknowledges that the specified Oracle Database software is an older release that is not currently supported by OCI. IsDesupportedVersion *bool `mandatory:"false" json:"isDesupportedVersion"` - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbVersion *string `mandatory:"false" json:"dbVersion"` Database *CreateDatabaseDetails `mandatory:"false" json:"database"` diff --git a/database/create_db_home_with_vm_cluster_id_details.go b/database/create_db_home_with_vm_cluster_id_details.go index 13605c69e4..afc52187a8 100644 --- a/database/create_db_home_with_vm_cluster_id_details.go +++ b/database/create_db_home_with_vm_cluster_id_details.go @@ -46,7 +46,8 @@ type CreateDbHomeWithVmClusterIdDetails struct { // If true, the customer acknowledges that the specified Oracle Database software is an older release that is not currently supported by OCI. IsDesupportedVersion *bool `mandatory:"false" json:"isDesupportedVersion"` - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbVersion *string `mandatory:"false" json:"dbVersion"` Database *CreateDatabaseDetails `mandatory:"false" json:"database"` diff --git a/database/create_new_database_details.go b/database/create_new_database_details.go index b9b7411745..3dc093b01d 100644 --- a/database/create_new_database_details.go +++ b/database/create_new_database_details.go @@ -25,7 +25,8 @@ type CreateNewDatabaseDetails struct { Database *CreateDatabaseDetails `mandatory:"true" json:"database"` - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbVersion *string `mandatory:"false" json:"dbVersion"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. diff --git a/database/create_refreshable_autonomous_database_clone_details.go b/database/create_refreshable_autonomous_database_clone_details.go index c6cc1027cf..278d910eb7 100644 --- a/database/create_refreshable_autonomous_database_clone_details.go +++ b/database/create_refreshable_autonomous_database_clone_details.go @@ -35,7 +35,7 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // AL16UTF16 or UTF8. NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` - // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. DbName *string `mandatory:"false" json:"dbName"` // The number of OCPU cores to be made available to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. @@ -47,9 +47,9 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // The number of OCPU cores to be made available to the database. // The following points apply: - // - For Autonomous Databases on dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) + // - For Autonomous Databases on Dedicated Exadata infrastructure, to provision less than 1 core, enter a fractional value in an increment of 0.1. For example, you can provision 0.3 or 0.4 cores, but not 0.35 cores. (Note that fractional OCPU values are not supported for Autonomous Databasese on shared Exadata infrastructure.) // - To provision 1 or more cores, you must enter an integer between 1 and the maximum number of cores available for the infrastructure shape. For example, you can provision 2 cores or 3 cores, but not 2.5 cores. This applies to Autonomous Databases on both shared and dedicated Exadata infrastructure. - // For Autonomous Databases on dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. + // For Autonomous Databases on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `cpuCoreCount` parameter. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` @@ -64,6 +64,7 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. @@ -106,6 +107,7 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -121,6 +123,7 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // **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. @@ -144,7 +147,8 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -165,10 +169,19 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // Customer Contacts. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -177,7 +190,8 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // The number of Max OCPU cores to be made available to the autonomous database with auto scaling of cpu enabled. MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. @@ -200,12 +214,14 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The maintenance schedule type of the Autonomous Database on shared Exadata infrastructure. The EARLY maintenance schedule of this Autonomous Database diff --git a/database/database.go b/database/database.go index 15ce649ee9..77dab82504 100644 --- a/database/database.go +++ b/database/database.go @@ -51,6 +51,8 @@ type Database struct { // The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. PdbName *string `mandatory:"false" json:"pdbName"` + // **Deprecated.** The dbWorkload field has been deprecated for Exadata Database Service on Dedicated Infrastructure, Exadata Database Service on Cloud@Customer, and Base Database Service. + // Support for this attribute will end in November 2023. You may choose to update your custom scripts to exclude the dbWorkload attribute. After November 2023 if you pass a value to the dbWorkload attribute, it will be ignored. // The database workload type. DbWorkload *string `mandatory:"false" json:"dbWorkload"` diff --git a/database/database_client.go b/database/database_client.go index 6e570b36fd..edce956a75 100644 --- a/database/database_client.go +++ b/database/database_client.go @@ -1029,7 +1029,7 @@ func (client DatabaseClient) changeDatabaseSoftwareImageCompartment(ctx context. // ChangeDataguardRole Switch the Autonomous Container Database role between Standby and Snapshot Standby. // For more information about changing Autonomous Container Databases Dataguard Role, see -// Change Database Role to Snapshot Standby (https://docs.cloud.oracle.com/Content/Database/Concepts/databaseoverview.htm#changeRole). +// Convert Physical Standby to Snapshot Standby (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-D3B503F1-0032-4B0D-9F00-ACAE8151AB80) and Convert Snapshot Standby to Physical Standby (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html#ADBCL-GUID-E8D7E0EE-8244-467D-B33A-1BC6F969A0A4). // // See also // @@ -1841,6 +1841,68 @@ func (client DatabaseClient) convertToPdb(ctx context.Context, request common.OC return response, err } +// CreateApplicationVip Creates a new application virtual IP (VIP) address in the specified cloud VM cluster based on the request parameters you provide. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/CreateApplicationVip.go.html to see an example of how to use CreateApplicationVip API. +func (client DatabaseClient) CreateApplicationVip(ctx context.Context, request CreateApplicationVipRequest) (response CreateApplicationVipResponse, 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.createApplicationVip, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateApplicationVipResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateApplicationVipResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateApplicationVipResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateApplicationVipResponse") + } + return +} + +// createApplicationVip implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) createApplicationVip(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/applicationVip", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateApplicationVipResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVip/CreateApplicationVip" + err = common.PostProcessServiceError(err, "Database", "CreateApplicationVip", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateAutonomousContainerDatabase Creates an Autonomous Container Database in the specified Autonomous Exadata Infrastructure. // // See also @@ -3415,6 +3477,63 @@ func (client DatabaseClient) dbNodeAction(ctx context.Context, request common.OC return response, err } +// DeleteApplicationVip Deletes and deregisters the specified application virtual IP (VIP) address. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/DeleteApplicationVip.go.html to see an example of how to use DeleteApplicationVip API. +func (client DatabaseClient) DeleteApplicationVip(ctx context.Context, request DeleteApplicationVipRequest) (response DeleteApplicationVipResponse, 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.deleteApplicationVip, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteApplicationVipResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteApplicationVipResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteApplicationVipResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteApplicationVipResponse") + } + return +} + +// deleteApplicationVip implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) deleteApplicationVip(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/applicationVip/{applicationVipId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteApplicationVipResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVip/DeleteApplicationVip" + err = common.PostProcessServiceError(err, "Database", "DeleteApplicationVip", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteAutonomousDatabase Deletes the specified Autonomous Database. // // See also @@ -6641,6 +6760,63 @@ func (client DatabaseClient) generateRecommendedVmClusterNetwork(ctx context.Con return response, err } +// GetApplicationVip Gets information about a specified application virtual IP (VIP) address. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/GetApplicationVip.go.html to see an example of how to use GetApplicationVip API. +func (client DatabaseClient) GetApplicationVip(ctx context.Context, request GetApplicationVipRequest) (response GetApplicationVipResponse, 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.getApplicationVip, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetApplicationVipResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetApplicationVipResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetApplicationVipResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetApplicationVipResponse") + } + return +} + +// getApplicationVip implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getApplicationVip(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/applicationVip/{applicationVipId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetApplicationVipResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVip/GetApplicationVip" + err = common.PostProcessServiceError(err, "Database", "GetApplicationVip", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetAutonomousContainerDatabase Gets information about the specified Autonomous Container Database. // // See also @@ -9862,6 +10038,63 @@ func (client DatabaseClient) launchDbSystem(ctx context.Context, request common. return response, err } +// ListApplicationVips Gets a list of application virtual IP (VIP) addresses on a cloud VM cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ListApplicationVips.go.html to see an example of how to use ListApplicationVips API. +func (client DatabaseClient) ListApplicationVips(ctx context.Context, request ListApplicationVipsRequest) (response ListApplicationVipsResponse, 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.listApplicationVips, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListApplicationVipsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListApplicationVipsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListApplicationVipsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListApplicationVipsResponse") + } + return +} + +// listApplicationVips implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listApplicationVips(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/applicationVip", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListApplicationVipsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/ApplicationVipSummary/ListApplicationVips" + err = common.PostProcessServiceError(err, "Database", "ListApplicationVips", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListAutonomousContainerDatabaseDataguardAssociations Gets a list of the Autonomous Container Databases with Autonomous Data Guard-enabled associated with the specified Autonomous Container Database. // // See also @@ -14331,6 +14564,130 @@ func (client DatabaseClient) rotateAutonomousDatabaseEncryptionKey(ctx context.C return response, err } +// RotateAutonomousVmClusterOrdsCerts Rotates the Oracle REST Data Services (ORDS) certificates for Autonomous Exadata VM cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/RotateAutonomousVmClusterOrdsCerts.go.html to see an example of how to use RotateAutonomousVmClusterOrdsCerts API. +func (client DatabaseClient) RotateAutonomousVmClusterOrdsCerts(ctx context.Context, request RotateAutonomousVmClusterOrdsCertsRequest) (response RotateAutonomousVmClusterOrdsCertsResponse, 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.rotateAutonomousVmClusterOrdsCerts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RotateAutonomousVmClusterOrdsCertsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RotateAutonomousVmClusterOrdsCertsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RotateAutonomousVmClusterOrdsCertsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RotateAutonomousVmClusterOrdsCertsResponse") + } + return +} + +// rotateAutonomousVmClusterOrdsCerts implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) rotateAutonomousVmClusterOrdsCerts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/autonomousVmClusters/{autonomousVmClusterId}/actions/rotateOrdsCerts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RotateAutonomousVmClusterOrdsCertsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/RotateAutonomousVmClusterOrdsCerts" + err = common.PostProcessServiceError(err, "Database", "RotateAutonomousVmClusterOrdsCerts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RotateAutonomousVmClusterSslCerts Rotates the SSL certificates for Autonomous Exadata VM cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/RotateAutonomousVmClusterSslCerts.go.html to see an example of how to use RotateAutonomousVmClusterSslCerts API. +func (client DatabaseClient) RotateAutonomousVmClusterSslCerts(ctx context.Context, request RotateAutonomousVmClusterSslCertsRequest) (response RotateAutonomousVmClusterSslCertsResponse, 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.rotateAutonomousVmClusterSslCerts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RotateAutonomousVmClusterSslCertsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RotateAutonomousVmClusterSslCertsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RotateAutonomousVmClusterSslCertsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RotateAutonomousVmClusterSslCertsResponse") + } + return +} + +// rotateAutonomousVmClusterSslCerts implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) rotateAutonomousVmClusterSslCerts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/autonomousVmClusters/{autonomousVmClusterId}/actions/rotateSslCerts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RotateAutonomousVmClusterSslCertsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/AutonomousVmCluster/RotateAutonomousVmClusterSslCerts" + err = common.PostProcessServiceError(err, "Database", "RotateAutonomousVmClusterSslCerts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RotateCloudAutonomousVmClusterOrdsCerts Rotates the Oracle REST Data Services (ORDS) certificates for a cloud Autonomous Exadata VM cluster. // // See also diff --git a/database/database_summary.go b/database/database_summary.go index b30b02a775..c7a3d43130 100644 --- a/database/database_summary.go +++ b/database/database_summary.go @@ -53,6 +53,8 @@ type DatabaseSummary struct { // The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. PdbName *string `mandatory:"false" json:"pdbName"` + // **Deprecated.** The dbWorkload field has been deprecated for Exadata Database Service on Dedicated Infrastructure, Exadata Database Service on Cloud@Customer, and Base Database Service. + // Support for this attribute will end in November 2023. You may choose to update your custom scripts to exclude the dbWorkload attribute. After November 2023 if you pass a value to the dbWorkload attribute, it will be ignored. // The database workload type. DbWorkload *string `mandatory:"false" json:"dbWorkload"` diff --git a/database/database_upgrade_history_entry.go b/database/database_upgrade_history_entry.go index 0d1bd2f5ab..f9669def34 100644 --- a/database/database_upgrade_history_entry.go +++ b/database/database_upgrade_history_entry.go @@ -43,7 +43,8 @@ type DatabaseUpgradeHistoryEntry struct { // Additional information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. TargetDBVersion *string `mandatory:"false" json:"targetDBVersion"` // the database software image used for upgrading database. diff --git a/database/database_upgrade_history_entry_summary.go b/database/database_upgrade_history_entry_summary.go index 8993eab541..f226c68989 100644 --- a/database/database_upgrade_history_entry_summary.go +++ b/database/database_upgrade_history_entry_summary.go @@ -43,7 +43,8 @@ type DatabaseUpgradeHistoryEntrySummary struct { // Additional information about the current lifecycle state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. TargetDBVersion *string `mandatory:"false" json:"targetDBVersion"` // the database software image used for upgrading database. diff --git a/database/database_upgrade_with_db_version_details.go b/database/database_upgrade_with_db_version_details.go index 70068252a1..ba92b6b36d 100644 --- a/database/database_upgrade_with_db_version_details.go +++ b/database/database_upgrade_with_db_version_details.go @@ -19,7 +19,8 @@ import ( // DatabaseUpgradeWithDbVersionDetails Details of the Oracle Database software version number for upgrading a database. type DatabaseUpgradeWithDbVersionDetails struct { - // A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation. + // A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbVersion *string `mandatory:"true" json:"dbVersion"` // Additional upgrade options supported by DBUA(Database Upgrade Assistant). diff --git a/database/delete_application_vip_request_response.go b/database/delete_application_vip_request_response.go new file mode 100644 index 0000000000..4277bd0d4e --- /dev/null +++ b/database/delete_application_vip_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteApplicationVipRequest wrapper for the DeleteApplicationVip operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/DeleteApplicationVip.go.html to see an example of how to use DeleteApplicationVipRequest. +type DeleteApplicationVipRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the application virtual IP (VIP) address. + ApplicationVipId *string `mandatory:"true" contributesTo:"path" name:"applicationVipId"` + + // 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"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteApplicationVipRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteApplicationVipRequest) 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 DeleteApplicationVipRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteApplicationVipRequest) 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 DeleteApplicationVipRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteApplicationVipResponse wrapper for the DeleteApplicationVip operation +type DeleteApplicationVipResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteApplicationVipResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteApplicationVipResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/get_application_vip_request_response.go b/database/get_application_vip_request_response.go new file mode 100644 index 0000000000..1fd37ebdc3 --- /dev/null +++ b/database/get_application_vip_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetApplicationVipRequest wrapper for the GetApplicationVip operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/GetApplicationVip.go.html to see an example of how to use GetApplicationVipRequest. +type GetApplicationVipRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the application virtual IP (VIP) address. + ApplicationVipId *string `mandatory:"true" contributesTo:"path" name:"applicationVipId"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetApplicationVipRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetApplicationVipRequest) 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 GetApplicationVipRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetApplicationVipRequest) 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 GetApplicationVipRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetApplicationVipResponse wrapper for the GetApplicationVip operation +type GetApplicationVipResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApplicationVip instance + ApplicationVip `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetApplicationVipResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetApplicationVipResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/list_application_vips_request_response.go b/database/list_application_vips_request_response.go new file mode 100644 index 0000000000..3e2c75e621 --- /dev/null +++ b/database/list_application_vips_request_response.go @@ -0,0 +1,210 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListApplicationVipsRequest wrapper for the ListApplicationVips operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ListApplicationVips.go.html to see an example of how to use ListApplicationVipsRequest. +type ListApplicationVipsRequest struct { + + // The compartment OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the cloud VM cluster associated with the application virtual IP (VIP) address. + CloudVmClusterId *string `mandatory:"true" contributesTo:"query" name:"cloudVmClusterId"` + + // The maximum number of items to return per page. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder ListApplicationVipsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. You can provide one sort order (`sortOrder`). + // Default order for TIMECREATED is descending. + // Default order for DISPLAYNAME is ascending. + // The DISPLAYNAME sort order is case sensitive. + SortBy ListApplicationVipsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // A filter to return only resources that match the given lifecycle state exactly. + LifecycleState ApplicationVipSummaryLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" 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 ListApplicationVipsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListApplicationVipsRequest) 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 ListApplicationVipsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListApplicationVipsRequest) 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 ListApplicationVipsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListApplicationVipsSortOrderEnum(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(GetListApplicationVipsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListApplicationVipsSortByEnum(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(GetListApplicationVipsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingApplicationVipSummaryLifecycleStateEnum(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(GetApplicationVipSummaryLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListApplicationVipsResponse wrapper for the ListApplicationVips operation +type ListApplicationVipsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ApplicationVipSummary instances + Items []ApplicationVipSummary `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 there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListApplicationVipsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListApplicationVipsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListApplicationVipsSortOrderEnum Enum with underlying type: string +type ListApplicationVipsSortOrderEnum string + +// Set of constants representing the allowable values for ListApplicationVipsSortOrderEnum +const ( + ListApplicationVipsSortOrderAsc ListApplicationVipsSortOrderEnum = "ASC" + ListApplicationVipsSortOrderDesc ListApplicationVipsSortOrderEnum = "DESC" +) + +var mappingListApplicationVipsSortOrderEnum = map[string]ListApplicationVipsSortOrderEnum{ + "ASC": ListApplicationVipsSortOrderAsc, + "DESC": ListApplicationVipsSortOrderDesc, +} + +var mappingListApplicationVipsSortOrderEnumLowerCase = map[string]ListApplicationVipsSortOrderEnum{ + "asc": ListApplicationVipsSortOrderAsc, + "desc": ListApplicationVipsSortOrderDesc, +} + +// GetListApplicationVipsSortOrderEnumValues Enumerates the set of values for ListApplicationVipsSortOrderEnum +func GetListApplicationVipsSortOrderEnumValues() []ListApplicationVipsSortOrderEnum { + values := make([]ListApplicationVipsSortOrderEnum, 0) + for _, v := range mappingListApplicationVipsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListApplicationVipsSortOrderEnumStringValues Enumerates the set of values in String for ListApplicationVipsSortOrderEnum +func GetListApplicationVipsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListApplicationVipsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListApplicationVipsSortOrderEnum(val string) (ListApplicationVipsSortOrderEnum, bool) { + enum, ok := mappingListApplicationVipsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListApplicationVipsSortByEnum Enum with underlying type: string +type ListApplicationVipsSortByEnum string + +// Set of constants representing the allowable values for ListApplicationVipsSortByEnum +const ( + ListApplicationVipsSortByDisplayname ListApplicationVipsSortByEnum = "DISPLAYNAME" + ListApplicationVipsSortByTimecreated ListApplicationVipsSortByEnum = "TIMECREATED" +) + +var mappingListApplicationVipsSortByEnum = map[string]ListApplicationVipsSortByEnum{ + "DISPLAYNAME": ListApplicationVipsSortByDisplayname, + "TIMECREATED": ListApplicationVipsSortByTimecreated, +} + +var mappingListApplicationVipsSortByEnumLowerCase = map[string]ListApplicationVipsSortByEnum{ + "displayname": ListApplicationVipsSortByDisplayname, + "timecreated": ListApplicationVipsSortByTimecreated, +} + +// GetListApplicationVipsSortByEnumValues Enumerates the set of values for ListApplicationVipsSortByEnum +func GetListApplicationVipsSortByEnumValues() []ListApplicationVipsSortByEnum { + values := make([]ListApplicationVipsSortByEnum, 0) + for _, v := range mappingListApplicationVipsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListApplicationVipsSortByEnumStringValues Enumerates the set of values in String for ListApplicationVipsSortByEnum +func GetListApplicationVipsSortByEnumStringValues() []string { + return []string{ + "DISPLAYNAME", + "TIMECREATED", + } +} + +// GetMappingListApplicationVipsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListApplicationVipsSortByEnum(val string) (ListApplicationVipsSortByEnum, bool) { + enum, ok := mappingListApplicationVipsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/rotate_autonomous_vm_cluster_ords_certs_details.go b/database/rotate_autonomous_vm_cluster_ords_certs_details.go new file mode 100644 index 0000000000..e95e7b2e7a --- /dev/null +++ b/database/rotate_autonomous_vm_cluster_ords_certs_details.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RotateAutonomousVmClusterOrdsCertsDetails The details for configuring the SSL certificates on Autonomous VM Cluster +type RotateAutonomousVmClusterOrdsCertsDetails struct { + + // Specify SYSTEM for using Oracle managed certificates. Specify BYOC when you want to bring your own certificate. + CertificateGenerationType RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum `mandatory:"true" json:"certificateGenerationType"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the certificate to use. + CertificateId *string `mandatory:"false" json:"certificateId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the certificate authority. + CertificateAuthorityId *string `mandatory:"false" json:"certificateAuthorityId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the certificate bundle. + CaBundleId *string `mandatory:"false" json:"caBundleId"` +} + +func (m RotateAutonomousVmClusterOrdsCertsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RotateAutonomousVmClusterOrdsCertsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum(string(m.CertificateGenerationType)); !ok && m.CertificateGenerationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CertificateGenerationType: %s. Supported values are: %s.", m.CertificateGenerationType, strings.Join(GetRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum Enum with underlying type: string +type RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum string + +// Set of constants representing the allowable values for RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum +const ( + RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeSystem RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum = "SYSTEM" + RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeByoc RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum = "BYOC" +) + +var mappingRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum = map[string]RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum{ + "SYSTEM": RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeSystem, + "BYOC": RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeByoc, +} + +var mappingRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnumLowerCase = map[string]RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum{ + "system": RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeSystem, + "byoc": RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeByoc, +} + +// GetRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnumValues Enumerates the set of values for RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum +func GetRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnumValues() []RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum { + values := make([]RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum, 0) + for _, v := range mappingRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum { + values = append(values, v) + } + return values +} + +// GetRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnumStringValues Enumerates the set of values in String for RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum +func GetRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnumStringValues() []string { + return []string{ + "SYSTEM", + "BYOC", + } +} + +// GetMappingRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum(val string) (RotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnum, bool) { + enum, ok := mappingRotateAutonomousVmClusterOrdsCertsDetailsCertificateGenerationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/rotate_autonomous_vm_cluster_ords_certs_request_response.go b/database/rotate_autonomous_vm_cluster_ords_certs_request_response.go new file mode 100644 index 0000000000..5e84a8c419 --- /dev/null +++ b/database/rotate_autonomous_vm_cluster_ords_certs_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RotateAutonomousVmClusterOrdsCertsRequest wrapper for the RotateAutonomousVmClusterOrdsCerts operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/RotateAutonomousVmClusterOrdsCerts.go.html to see an example of how to use RotateAutonomousVmClusterOrdsCertsRequest. +type RotateAutonomousVmClusterOrdsCertsRequest struct { + + // Request to rotate the Oracle REST Data Services (ORDS) certificates on Autonomous Exadata VM cluster. + RotateAutonomousVmClusterOrdsCertsDetails `contributesTo:"body"` + + // The autonomous VM cluster OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + AutonomousVmClusterId *string `mandatory:"true" contributesTo:"path" name:"autonomousVmClusterId"` + + // Unique identifier for the request. + 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 + // may 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 RotateAutonomousVmClusterOrdsCertsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RotateAutonomousVmClusterOrdsCertsRequest) 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 RotateAutonomousVmClusterOrdsCertsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RotateAutonomousVmClusterOrdsCertsRequest) 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 RotateAutonomousVmClusterOrdsCertsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RotateAutonomousVmClusterOrdsCertsResponse wrapper for the RotateAutonomousVmClusterOrdsCerts operation +type RotateAutonomousVmClusterOrdsCertsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RotateAutonomousVmClusterOrdsCertsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RotateAutonomousVmClusterOrdsCertsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/rotate_autonomous_vm_cluster_ssl_certs_details.go b/database/rotate_autonomous_vm_cluster_ssl_certs_details.go new file mode 100644 index 0000000000..f1301a8ff1 --- /dev/null +++ b/database/rotate_autonomous_vm_cluster_ssl_certs_details.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RotateAutonomousVmClusterSslCertsDetails The details for configuring the ORDS certificates on Autonomous VM Cluster +type RotateAutonomousVmClusterSslCertsDetails struct { + + // Specify SYSTEM for using Oracle managed certificates. Specify BYOC when you want to bring your own certificate. + CertificateGenerationType RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum `mandatory:"true" json:"certificateGenerationType"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the certificate to use. + CertificateId *string `mandatory:"false" json:"certificateId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the certificate authority. + CertificateAuthorityId *string `mandatory:"false" json:"certificateAuthorityId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the certificate bundle. + CaBundleId *string `mandatory:"false" json:"caBundleId"` +} + +func (m RotateAutonomousVmClusterSslCertsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RotateAutonomousVmClusterSslCertsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum(string(m.CertificateGenerationType)); !ok && m.CertificateGenerationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CertificateGenerationType: %s. Supported values are: %s.", m.CertificateGenerationType, strings.Join(GetRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum Enum with underlying type: string +type RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum string + +// Set of constants representing the allowable values for RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum +const ( + RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeSystem RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum = "SYSTEM" + RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeByoc RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum = "BYOC" +) + +var mappingRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum = map[string]RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum{ + "SYSTEM": RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeSystem, + "BYOC": RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeByoc, +} + +var mappingRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnumLowerCase = map[string]RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum{ + "system": RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeSystem, + "byoc": RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeByoc, +} + +// GetRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnumValues Enumerates the set of values for RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum +func GetRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnumValues() []RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum { + values := make([]RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum, 0) + for _, v := range mappingRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum { + values = append(values, v) + } + return values +} + +// GetRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnumStringValues Enumerates the set of values in String for RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum +func GetRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnumStringValues() []string { + return []string{ + "SYSTEM", + "BYOC", + } +} + +// GetMappingRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum(val string) (RotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnum, bool) { + enum, ok := mappingRotateAutonomousVmClusterSslCertsDetailsCertificateGenerationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/rotate_autonomous_vm_cluster_ssl_certs_request_response.go b/database/rotate_autonomous_vm_cluster_ssl_certs_request_response.go new file mode 100644 index 0000000000..e261504978 --- /dev/null +++ b/database/rotate_autonomous_vm_cluster_ssl_certs_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RotateAutonomousVmClusterSslCertsRequest wrapper for the RotateAutonomousVmClusterSslCerts operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/RotateAutonomousVmClusterSslCerts.go.html to see an example of how to use RotateAutonomousVmClusterSslCertsRequest. +type RotateAutonomousVmClusterSslCertsRequest struct { + + // Request to rotate the SSL certificates on Autonomous Exadata VM cluster. + RotateAutonomousVmClusterSslCertsDetails `contributesTo:"body"` + + // The autonomous VM cluster OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + AutonomousVmClusterId *string `mandatory:"true" contributesTo:"path" name:"autonomousVmClusterId"` + + // Unique identifier for the request. + 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 + // may 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 RotateAutonomousVmClusterSslCertsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RotateAutonomousVmClusterSslCertsRequest) 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 RotateAutonomousVmClusterSslCertsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RotateAutonomousVmClusterSslCertsRequest) 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 RotateAutonomousVmClusterSslCertsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RotateAutonomousVmClusterSslCertsResponse wrapper for the RotateAutonomousVmClusterSslCerts operation +type RotateAutonomousVmClusterSslCertsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RotateAutonomousVmClusterSslCertsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RotateAutonomousVmClusterSslCertsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/update_autonomous_database_details.go b/database/update_autonomous_database_details.go index ccb96dd61a..8b4be9d115 100644 --- a/database/update_autonomous_database_details.go +++ b/database/update_autonomous_database_details.go @@ -23,13 +23,18 @@ import ( // **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API. type UpdateAutonomousDatabaseDetails struct { - // The number of CPUs to be made available to the Autonomous Database. + // The number of CPUs to be made available to the Autonomous Database.
+ // For Autonomous Databases on Dedicated Exadata Infrastructure: + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - It is suggested to use 'computeCount' parameter if you want to use fractional value to provision less than 1 core. // **Note:** This parameter cannot be used with the `ocpuCount` or `computeCount` parameter. + // This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. CpuCoreCount *int `mandatory:"false" json:"cpuCoreCount"` LongTermBackupSchedule *LongTermBackUpScheduleDetails `mandatory:"false" json:"longTermBackupSchedule"` - // The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is on Shared or Dedicated infrastructure. For an Autonomous Database on Shared infrastructure, the 'ECPU' compute model requires values in multiples of two. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value.@endif + // The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is on Shared or Dedicated Exadata Infrastructure. For an Autonomous Database on Shared Exadata Infrastructure, the ECPU compute model requires values in multiples of two. Required when using the computeModel parameter. When using the cpuCoreCount parameter, computeCount must be null. + // This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. ComputeCount *float32 `mandatory:"false" json:"computeCount"` // The number of OCPU cores to be made available to the Autonomous Database. @@ -40,6 +45,7 @@ type UpdateAutonomousDatabaseDetails struct { // The size, in terabytes, of the data volume that will be created and attached to the database. For Autonomous Databases on dedicated Exadata infrastructure, the maximum storage value is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `dataStorageSizeInGBs` parameter. + // This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. DataStorageSizeInTBs *int `mandatory:"false" json:"dataStorageSizeInTBs"` // Applies to dedicated Exadata infrastructure only. @@ -47,19 +53,21 @@ type UpdateAutonomousDatabaseDetails struct { // **Note:** This parameter cannot be used with the `dataStorageSizeInTBs` parameter. DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` - // The user-friendly name for the Autonomous Database. The name does not have to be unique. The display name can only be updated for Autonomous Databases - // using dedicated Exadata infrastructure. + // The user-friendly name for the Autonomous Database. The name does not have to be unique. The display name can only be updated for Autonomous Databases using dedicated Exadata Infrastructure. This parameter may not be updated in parallel with dbVersion. DisplayName *string `mandatory:"false" json:"displayName"` // 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. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isLocalDataGuardEnabled IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` // The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. It must be different from the last four passwords and it must not be a password used within the last 24 hours. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, whitelistedIps, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, or isFreeTier. AdminPassword *string `mandatory:"false" json:"adminPassword"` // New name for this Autonomous Database. // For databases using dedicated Exadata infrastructure, the name must begin with an alphabetic character, and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. // For databases using shared Exadata infrastructure, the name must begin with an alphabetic character, and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails. DbName *string `mandatory:"false" json:"dbName"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -76,12 +84,14 @@ type UpdateAutonomousDatabaseDetails struct { // - DW - indicates an Autonomous Data Warehouse database // - AJD - indicates an Autonomous JSON Database // - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. DbWorkload UpdateAutonomousDatabaseDetailsDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` // The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel UpdateAutonomousDatabaseDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // Indicates if the database-level access control is enabled. @@ -100,6 +110,7 @@ type UpdateAutonomousDatabaseDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. WhitelistedIps []string `mandatory:"false" json:"whitelistedIps"` // This field will be null if the Autonomous Database is not Data Guard enabled or Access Control is disabled. @@ -115,12 +126,14 @@ type UpdateAutonomousDatabaseDetails struct { // For Exadata Cloud@Customer, this is an array of IP addresses or CIDR (Classless Inter-Domain Routing) notations. // Example: `["1.1.1.1","1.1.1.0/24","1.1.2.25"]` // For an update operation, if you want to delete all the IPs in the ACL, use an array with a single empty string entry. + // This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. StandbyWhitelistedIps []string `mandatory:"false" json:"standbyWhitelistedIps"` // Indicates whether auto scaling is enabled for the Autonomous Database OCPU core count. Setting to `TRUE` enables auto scaling. Setting to `FALSE` disables auto scaling. The default value is true. Auto scaling is available for databases on shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) only. IsAutoScalingEnabled *bool `mandatory:"false" json:"isAutoScalingEnabled"` - // Indicates whether the Autonomous Database is a refreshable clone. + // Indicates if the Autonomous Database is a refreshable clone. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. IsRefreshableClone *bool `mandatory:"false" json:"isRefreshableClone"` // The refresh mode of the clone. AUTOMATIC indicates that the clone is automatically being refreshed with data from the source Autonomous Database. @@ -130,6 +143,7 @@ type UpdateAutonomousDatabaseDetails struct { // Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure. // To create a local standby, set to `TRUE`. To delete a local standby, set to `FALSE`. For more information on using Autonomous Data Guard on shared Exadata infrastructure (local and cross-region) , see About Standby Databases (https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-data-guard-about.html#GUID-045AD017-8120-4BDC-AF58-7430FFE28D2B) // To enable cross-region Autonomous Data Guard on shared Exadata infrastructure, see CreateCrossRegionAutonomousDatabaseDataGuardDetails. + // This cannot be updated in parallel with any of the following: isMTLSRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. IsLocalDataGuardEnabled *bool `mandatory:"false" json:"isLocalDataGuardEnabled"` // ** Deprecated. ** Indicates whether the Autonomous Database has a local (in-region) standby database. Not applicable when creating a cross-region Autonomous Data Guard associations, or to @@ -146,10 +160,12 @@ type UpdateAutonomousDatabaseDetails struct { // A valid Oracle Database version for Autonomous Database. DbVersion *string `mandatory:"false" json:"dbVersion"` - // The `DATABASE OPEN` mode. You can open the database in `READ_ONLY` or `READ_WRITE` mode. + // Indicates the Autonomous Database mode. The database can be opened in `READ_ONLY` or `READ_WRITE` mode. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. OpenMode UpdateAutonomousDatabaseDetailsOpenModeEnum `mandatory:"false" json:"openMode,omitempty"` - // The Autonomous Database permission level. Restricted mode allows access only to admin users. + // The Autonomous Database permission level. Restricted mode allows access only by admin users. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PermissionLevel UpdateAutonomousDatabaseDetailsPermissionLevelEnum `mandatory:"false" json:"permissionLevel,omitempty"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. @@ -162,7 +178,8 @@ type UpdateAutonomousDatabaseDetails struct { // This restriction applies to both the client subnet and the backup subnet. SubnetId *string `mandatory:"false" json:"subnetId"` - // The private endpoint label for the resource. Setting this to an empty string, after the private endpoint database gets created, will change the same private endpoint database to the public endpoint database. + // The resource's private endpoint label. Setting this to an empty string, after the creation of the private endpoint database, changes the private endpoint database to a public endpoint database. + // This setting cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. PrivateEndpointLabel *string `mandatory:"false" json:"privateEndpointLabel"` // The private endpoint Ip address for the resource. @@ -173,13 +190,23 @@ type UpdateAutonomousDatabaseDetails struct { // - A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty. NsgIds []string `mandatory:"false" json:"nsgIds"` - // Customer Contacts. Setting this to an empty list removes all customer contacts of an Oracle Autonomous Database. + // Customer Contacts. Setting this to an empty list removes all customer contacts of an Oracle + // This cannot be updated in parallel with any of the following: isMTLSConnectionRequired, scheduledOperations, or dbToolsDetails. CustomerContacts []CustomerContact `mandatory:"false" json:"customerContacts"` - // Indicates whether the Autonomous Database requires mTLS connections. + // Specifies if the Autonomous Database requires mTLS connections. + // This may not be updated in parallel with any of the following: licenseModel, databaseEdition, cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, whitelistedIps, openMode, permissionLevel, db-workload, privateEndpointLabel, nsgIds, customerContacts, dbVersion, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + // Service Change: The default value of the isMTLSConnectionRequired attribute will change from true to false on July 1, 2023 in the following APIs: + // - CreateAutonomousDatabase + // - GetAutonomousDatabase + // - UpdateAutonomousDatabase + // Details: Prior to the July 1, 2023 change, the isMTLSConnectionRequired attribute default value was true. This applies to Autonomous Databases on shared Exadata infrastructure. + // Does this impact me? If you use or maintain custom scripts or Terraform scripts referencing the CreateAutonomousDatabase, GetAutonomousDatabase, or UpdateAutonomousDatabase APIs, you want to check, and possibly modify, the scripts for the changed default value of the attribute. Should you choose not to leave your scripts unchanged, the API calls containing this attribute will continue to work, but the default value will switch from true to false. + // How do I make this change? Using either OCI SDKs or command line tools, update your custom scripts to explicitly set the isMTLSConnectionRequired attribute to true. IsMtlsConnectionRequired *bool `mandatory:"false" json:"isMtlsConnectionRequired"` - // list of scheduled operations + // The list of scheduled operations. + // 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"` // Indicates if auto scaling is enabled for the Autonomous Database storage. The default value is `FALSE`. @@ -189,9 +216,11 @@ type UpdateAutonomousDatabaseDetails struct { MaxCpuCoreCount *int `mandatory:"false" json:"maxCpuCoreCount"` // The Oracle Database Edition that applies to the Autonomous databases. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `mandatory:"false" json:"databaseEdition,omitempty"` - // List of database tools details. + // The list of database tools details. + // 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"` // The OCI vault secret [/Content/General/Concepts/identifiers.htm]OCID. diff --git a/database/update_cloud_autonomous_vm_cluster_details.go b/database/update_cloud_autonomous_vm_cluster_details.go index 2c675a9cb3..f1bf09e845 100644 --- a/database/update_cloud_autonomous_vm_cluster_details.go +++ b/database/update_cloud_autonomous_vm_cluster_details.go @@ -30,6 +30,7 @@ type UpdateCloudAutonomousVmClusterDetails struct { // License Included allows you to subscribe to new Oracle Database software licenses and the Database service. // Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null because the attribute is already set at the // Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`. + // This cannot be updated in parallel with any of the following: cpuCoreCount, computeCount, maxCpuCoreCount, dataStorageSizeInTBs, adminPassword, isMTLSConnectionRequired, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. LicenseModel UpdateCloudAutonomousVmClusterDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see Security Rules (https://docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). diff --git a/datasafe/alerts_update_details.go b/datasafe/alerts_update_details.go index 2c2fd61496..c1575afea2 100644 --- a/datasafe/alerts_update_details.go +++ b/datasafe/alerts_update_details.go @@ -15,7 +15,7 @@ import ( "strings" ) -// AlertsUpdateDetails Details to perform update all action on alerts. +// AlertsUpdateDetails The details to update alerts in the specified compartment. type AlertsUpdateDetails struct { // The status of the alert. @@ -24,7 +24,7 @@ type AlertsUpdateDetails struct { // The OCID of the compartment that contains the alerts. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The OCID of the target associated with alerts. + // The OCID of the target database associated with the alerts. TargetId *string `mandatory:"false" json:"targetId"` } diff --git a/datasafe/alerts_update_request_response.go b/datasafe/alerts_update_request_response.go index 25efdddb69..332056934b 100644 --- a/datasafe/alerts_update_request_response.go +++ b/datasafe/alerts_update_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/AlertsUpdate.go.html to see an example of how to use AlertsUpdateRequest. type AlertsUpdateRequest struct { - // Details to update alerts within a given compartment. + // The details to update the alerts in the specified compartment. AlertsUpdateDetails `contributesTo:"body"` // Unique identifier for the request. diff --git a/datasafe/apply_sdm_masking_policy_difference_details.go b/datasafe/apply_sdm_masking_policy_difference_details.go new file mode 100644 index 0000000000..c3ee25934f --- /dev/null +++ b/datasafe/apply_sdm_masking_policy_difference_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApplySdmMaskingPolicyDifferenceDetails Details to apply the SDM masking policy difference to a masking policy. +type ApplySdmMaskingPolicyDifferenceDetails struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"false" json:"sdmMaskingPolicyDifferenceId"` +} + +func (m ApplySdmMaskingPolicyDifferenceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApplySdmMaskingPolicyDifferenceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/apply_sdm_masking_policy_difference_request_response.go b/datasafe/apply_sdm_masking_policy_difference_request_response.go new file mode 100644 index 0000000000..79707a574f --- /dev/null +++ b/datasafe/apply_sdm_masking_policy_difference_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ApplySdmMaskingPolicyDifferenceRequest wrapper for the ApplySdmMaskingPolicyDifference operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ApplySdmMaskingPolicyDifference.go.html to see an example of how to use ApplySdmMaskingPolicyDifferenceRequest. +type ApplySdmMaskingPolicyDifferenceRequest struct { + + // The OCID of the masking policy. + MaskingPolicyId *string `mandatory:"true" contributesTo:"path" name:"maskingPolicyId"` + + // Details to apply the SDM Masking policy difference columns to a masking policy. + ApplySdmMaskingPolicyDifferenceDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the if-match parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ApplySdmMaskingPolicyDifferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ApplySdmMaskingPolicyDifferenceRequest) 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 ApplySdmMaskingPolicyDifferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ApplySdmMaskingPolicyDifferenceRequest) 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 ApplySdmMaskingPolicyDifferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApplySdmMaskingPolicyDifferenceResponse wrapper for the ApplySdmMaskingPolicyDifference operation +type ApplySdmMaskingPolicyDifferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID of the work request. Use GetWorkRequest with this OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ApplySdmMaskingPolicyDifferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ApplySdmMaskingPolicyDifferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/audit_event_aggregation_dimensions.go b/datasafe/audit_event_aggregation_dimensions.go index ffa74439bc..2c2834a762 100644 --- a/datasafe/audit_event_aggregation_dimensions.go +++ b/datasafe/audit_event_aggregation_dimensions.go @@ -15,10 +15,10 @@ import ( "strings" ) -// AuditEventAggregationDimensions Details of aggregation dimensions used for summarizing audit events. +// AuditEventAggregationDimensions The details of the aggregation dimensions used for summarizing audit events. type AuditEventAggregationDimensions struct { - // Time of audit event occurrence in the target database. + // The time the audit event occurred in the target database. AuditEventTime []common.SDKTime `mandatory:"false" json:"auditEventTime"` // Name of the database user whose actions were audited. @@ -48,7 +48,7 @@ type AuditEventAggregationDimensions struct { // Type of auditing. AuditType []AuditEventAggregationDimensionsAuditTypeEnum `mandatory:"false" json:"auditType,omitempty"` - // Name of the detail action executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. + // The name of the event executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. EventName []string `mandatory:"false" json:"eventName"` } diff --git a/datasafe/audit_event_aggregation_items.go b/datasafe/audit_event_aggregation_items.go index 89eae1da57..ae93b918b9 100644 --- a/datasafe/audit_event_aggregation_items.go +++ b/datasafe/audit_event_aggregation_items.go @@ -15,7 +15,7 @@ import ( "strings" ) -// AuditEventAggregationItems Details of audit events aggregation items. +// AuditEventAggregationItems The details of audit events aggregation items. type AuditEventAggregationItems struct { // Name of the aggregation. diff --git a/datasafe/audit_event_summary.go b/datasafe/audit_event_summary.go index ce15c3b0cb..daf6c2289e 100644 --- a/datasafe/audit_event_summary.go +++ b/datasafe/audit_event_summary.go @@ -21,7 +21,7 @@ type AuditEventSummary struct { // The OCID of the audit event. Id *string `mandatory:"true" json:"id"` - // The OCID of the compartment containing the audit event. This is the same audited target database resource comparment. + // The OCID of the compartment containing the audit event. This is the same as that of audit profile of the target database resource compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` // The OCID of the target database that was audited. @@ -36,52 +36,52 @@ type AuditEventSummary struct { // - INSTALLED_DATABASE - Represents databases running on-premises or on compute instances. DatabaseType AuditEventSummaryDatabaseTypeEnum `mandatory:"true" json:"databaseType"` - // Time of audit event occurrence in the target database. + // The time of the audit event occurrence in the target database. AuditEventTime *common.SDKTime `mandatory:"true" json:"auditEventTime"` - // Timestamp when this audit event was collected from the target database by Data Safe. + // The timestamp when this audit event was collected from the target database by Data Safe. TimeCollected *common.SDKTime `mandatory:"true" json:"timeCollected"` // Indicates whether an alert was raised for this audit event. IsAlerted *bool `mandatory:"true" json:"isAlerted"` - // Name of the database user whose actions were audited. + // The name of the database user whose actions were audited. DbUserName *string `mandatory:"false" json:"dbUserName"` - // Class of the target that was audited. + // The class of the target that was audited. TargetClass AuditEventSummaryTargetClassEnum `mandatory:"false" json:"targetClass,omitempty"` - // Name of the operating system user for the database session. + // The name of the operating system user for the database session. OsUserName *string `mandatory:"false" json:"osUserName"` - // Name of the action executed by the user on the target database. i.e ALTER, CREATE, DROP. + // The name of the action executed by the user on the target database. i.e ALTER, CREATE, DROP. Operation *string `mandatory:"false" json:"operation"` // Indicates whether the operation was a success or a failure. OperationStatus AuditEventSummaryOperationStatusEnum `mandatory:"false" json:"operationStatus,omitempty"` - // Name of the detail action executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. + // The name of the detail action executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. EventName *string `mandatory:"false" json:"eventName"` // Oracle Error code generated by the action. Zero indicates the action was successful. ErrorCode *string `mandatory:"false" json:"errorCode"` - // Detailed message on why the Error occurred. + // The detailed message on why the Error occurred. ErrorMessage *string `mandatory:"false" json:"errorMessage"` - // Type of object in the source database affected by the action. i.e PL/SQL, SYNONYM, PACKAGE BODY. + // The type of the object in the source database affected by the action. i.e PL/SQL, SYNONYM, PACKAGE BODY. ObjectType *string `mandatory:"false" json:"objectType"` - // Name of the object affected by the action. + // The name of the object affected by the action. ObjectName *string `mandatory:"false" json:"objectName"` - // Schema name of object affected but the action. + // The schema name of the object affected by the action. ObjectOwner *string `mandatory:"false" json:"objectOwner"` - // Name of the host machine from which the session was spawned. + // The name of the host machine from which the session was spawned. ClientHostname *string `mandatory:"false" json:"clientHostname"` - // IP address of the host from which the session was spawned. + // The IP address of the host machine from which the session was spawned. ClientIp *string `mandatory:"false" json:"clientIp"` // The OCID of the audit trail that generated this audit event. To be noted, this field has been deprecated. @@ -114,7 +114,7 @@ type AuditEventSummary struct { // Comma-seperated list of audit policies that caused the current audit event. AuditPolicies *string `mandatory:"false" json:"auditPolicies"` - // Type of auditing. + // The type of the auditing. AuditType AuditEventSummaryAuditTypeEnum `mandatory:"false" json:"auditType,omitempty"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) diff --git a/datasafe/audit_policy_aggregation_items.go b/datasafe/audit_policy_aggregation_items.go index 7a2e8417e9..275f9b1b06 100644 --- a/datasafe/audit_policy_aggregation_items.go +++ b/datasafe/audit_policy_aggregation_items.go @@ -15,11 +15,11 @@ import ( "strings" ) -// AuditPolicyAggregationItems Details of audit profile aggregation items. +// AuditPolicyAggregationItems The details of the audit profile aggregation items. type AuditPolicyAggregationItems struct { Dimensions *AuditPolicyDimensions `mandatory:"false" json:"dimensions"` - // Total count of aggregated metric. + // The total count of the aggregated metric. Count *int64 `mandatory:"false" json:"count"` } diff --git a/datasafe/audit_policy_dimensions.go b/datasafe/audit_policy_dimensions.go index f86c04bca4..d6b5c1e463 100644 --- a/datasafe/audit_policy_dimensions.go +++ b/datasafe/audit_policy_dimensions.go @@ -21,8 +21,11 @@ type AuditPolicyDimensions struct { // The category to which the audit policy belongs. AuditPolicyCategory AuditPolicyCategoryEnum `mandatory:"false" json:"auditPolicyCategory,omitempty"` - // Indicates the audit policy name. Refer to the documentation (https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827) for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + // The name of the audit policy. Refer to the documentation (https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827) for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. AuditPolicyName *string `mandatory:"false" json:"auditPolicyName"` + + // The OCID of the target database for which the audit policy will be created. + TargetId *string `mandatory:"false" json:"targetId"` } func (m AuditPolicyDimensions) String() string { diff --git a/datasafe/audit_trail.go b/datasafe/audit_trail.go index 743eadfb67..a9493728ec 100644 --- a/datasafe/audit_trail.go +++ b/datasafe/audit_trail.go @@ -45,8 +45,7 @@ type AuditTrail struct { // The current sub-state of the audit trail. Status AuditTrailStatusEnum `mandatory:"true" json:"status"` - // The OCID of the compartment that contains the audit trail and its same as the compartment - // of audit profile resource. + // The OCID of the compartment that contains the audit trail and is the same as the compartment of the audit profile resource. CompartmentId *string `mandatory:"true" json:"compartmentId"` // Details about the current state of the audit trail in Data Safe. @@ -69,7 +68,7 @@ type AuditTrail struct { // The OCID of the workrequest for audit trail which collects audit records. WorkRequestId *string `mandatory:"false" json:"workRequestId"` - // The date and time until which the audit events are collected from target database by Data Safe audit trail + // The date and time until when the audit events were collected from the target database by the Data Safe audit trail // collection process, in the format defined by RFC3339. TimeLastCollected *common.SDKTime `mandatory:"false" json:"timeLastCollected"` diff --git a/datasafe/audit_trail_collection.go b/datasafe/audit_trail_collection.go index de1d4adeaa..ba5c81eebe 100644 --- a/datasafe/audit_trail_collection.go +++ b/datasafe/audit_trail_collection.go @@ -15,7 +15,7 @@ import ( "strings" ) -// AuditTrailCollection Collection of audit trail summary. +// AuditTrailCollection Collection of audit trail detail objects. type AuditTrailCollection struct { // Array of audit trail summary. diff --git a/datasafe/change_report_compartment_details.go b/datasafe/change_report_compartment_details.go index f155472553..5a18da98c3 100644 --- a/datasafe/change_report_compartment_details.go +++ b/datasafe/change_report_compartment_details.go @@ -15,7 +15,7 @@ import ( "strings" ) -// ChangeReportCompartmentDetails Details for which compartment to move the resource to. +// ChangeReportCompartmentDetails The details for moving the audit report to a different compartment. type ChangeReportCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment diff --git a/datasafe/change_sdm_masking_policy_difference_compartment_details.go b/datasafe/change_sdm_masking_policy_difference_compartment_details.go new file mode 100644 index 0000000000..f1d8720cac --- /dev/null +++ b/datasafe/change_sdm_masking_policy_difference_compartment_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeSdmMaskingPolicyDifferenceCompartmentDetails Details to change the compartment of a SDM masking policy difference. +type ChangeSdmMaskingPolicyDifferenceCompartmentDetails struct { + + // The OCID of the compartment where the SDM masking policy difference should be moved. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeSdmMaskingPolicyDifferenceCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeSdmMaskingPolicyDifferenceCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/change_sdm_masking_policy_difference_compartment_request_response.go b/datasafe/change_sdm_masking_policy_difference_compartment_request_response.go new file mode 100644 index 0000000000..8686b342b6 --- /dev/null +++ b/datasafe/change_sdm_masking_policy_difference_compartment_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeSdmMaskingPolicyDifferenceCompartmentRequest wrapper for the ChangeSdmMaskingPolicyDifferenceCompartment operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ChangeSdmMaskingPolicyDifferenceCompartment.go.html to see an example of how to use ChangeSdmMaskingPolicyDifferenceCompartmentRequest. +type ChangeSdmMaskingPolicyDifferenceCompartmentRequest struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"true" contributesTo:"path" name:"sdmMaskingPolicyDifferenceId"` + + // The details used to change the compartment of a resource. + ChangeSdmMaskingPolicyDifferenceCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the if-match parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeSdmMaskingPolicyDifferenceCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeSdmMaskingPolicyDifferenceCompartmentRequest) 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 ChangeSdmMaskingPolicyDifferenceCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeSdmMaskingPolicyDifferenceCompartmentRequest) 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 ChangeSdmMaskingPolicyDifferenceCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeSdmMaskingPolicyDifferenceCompartmentResponse wrapper for the ChangeSdmMaskingPolicyDifferenceCompartment operation +type ChangeSdmMaskingPolicyDifferenceCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeSdmMaskingPolicyDifferenceCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeSdmMaskingPolicyDifferenceCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/change_target_alert_policy_association_compartment_details.go b/datasafe/change_target_alert_policy_association_compartment_details.go index 2b4fcf2427..728b071ced 100644 --- a/datasafe/change_target_alert_policy_association_compartment_details.go +++ b/datasafe/change_target_alert_policy_association_compartment_details.go @@ -18,7 +18,7 @@ import ( // ChangeTargetAlertPolicyAssociationCompartmentDetails The details used to change the compartment of a target-alert policy association. type ChangeTargetAlertPolicyAssociationCompartmentDetails struct { - // The OCID of the new compartment to move the target-alert policy association to. + // The OCID of the compartment to move the target-alert policy association to. CompartmentId *string `mandatory:"true" json:"compartmentId"` } diff --git a/datasafe/column.go b/datasafe/column.go index 802296d729..b91743b2cd 100644 --- a/datasafe/column.go +++ b/datasafe/column.go @@ -15,7 +15,7 @@ import ( "strings" ) -// Column Description of a column +// Column The description of the column. type Column struct { // Name of the column displayed on UI. diff --git a/datasafe/column_filter.go b/datasafe/column_filter.go index a48fb69e61..423c49e70f 100644 --- a/datasafe/column_filter.go +++ b/datasafe/column_filter.go @@ -27,10 +27,10 @@ type ColumnFilter struct { // An array of expressions based on the operator type. A filter may have one or more expressions. Expressions []string `mandatory:"true" json:"expressions"` - // Indicates if the filter is enabled. Values can either be 'true' or 'false'. + // Indicates whether the filter is enabled. Values can either be 'true' or 'false'. IsEnabled *bool `mandatory:"true" json:"isEnabled"` - // Indicates if the filter is hidden. Values can either be 'true' or 'false'. + // Indicates whether the filter is hidden. Values can either be 'true' or 'false'. IsHidden *bool `mandatory:"true" json:"isHidden"` } diff --git a/datasafe/column_sorting.go b/datasafe/column_sorting.go index df2f179959..0541685c34 100644 --- a/datasafe/column_sorting.go +++ b/datasafe/column_sorting.go @@ -15,7 +15,7 @@ import ( "strings" ) -// ColumnSorting Sorting the data at the column level. +// ColumnSorting Sorts the data at the column level. type ColumnSorting struct { // Name of the column that must be sorted. diff --git a/datasafe/create_masking_policy_details.go b/datasafe/create_masking_policy_details.go index b8c8a1c28c..92ac0f1948 100644 --- a/datasafe/create_masking_policy_details.go +++ b/datasafe/create_masking_policy_details.go @@ -63,13 +63,14 @@ type CreateMaskingPolicyDetails struct { // Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), // 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree - // of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + // of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the // Oracle Database parallel execution framework when choosing an explicit degree of parallelism. ParallelDegree *string `mandatory:"false" json:"parallelDegree"` // Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), // 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree - // attribute is used. + // attribute is used. Note that few objects may remain invalid even after recompiling once and you may have to further + // recompile manually using UTL_RECOMP package. Recompile MaskingPolicyRecompileEnum `mandatory:"false" json:"recompile,omitempty"` // A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before diff --git a/datasafe/create_report_definition_details.go b/datasafe/create_report_definition_details.go index 2e7f064653..311dd443bb 100644 --- a/datasafe/create_report_definition_details.go +++ b/datasafe/create_report_definition_details.go @@ -39,7 +39,7 @@ type CreateReportDefinitionDetails struct { // An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). Summary []Summary `mandatory:"true" json:"summary"` - // A description of the report definition. + // The description of the report definition. Description *string `mandatory:"false" json:"description"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) diff --git a/datasafe/create_sdm_masking_policy_difference_details.go b/datasafe/create_sdm_masking_policy_difference_details.go new file mode 100644 index 0000000000..2072e67ec4 --- /dev/null +++ b/datasafe/create_sdm_masking_policy_difference_details.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateSdmMaskingPolicyDifferenceDetails Details to create a new SDM masking policy difference. +type CreateSdmMaskingPolicyDifferenceDetails struct { + + // The OCID of the masking policy. Note that if the masking policy is not associated with an SDM, CreateSdmMaskingPolicyDifference + // operation won't be allowed. + MaskingPolicyId *string `mandatory:"true" json:"maskingPolicyId"` + + // The OCID of the compartment where the SDM masking policy difference resource should be created. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of the SDM masking policy difference. It defines the difference scope. + // NEW identifies new sensitive columns in the sensitive data model that are not in the masking policy. + // DELETED identifies columns that are present in the masking policy but have been deleted from the sensitive data model. + // MODIFIED identifies columns that are present in the sensitive data model as well as the masking policy but some of their attributes have been modified. + // ALL covers all the above three scenarios and reports new, deleted and modified columns. + DifferenceType SdmMaskingPolicyDifferenceDifferenceTypeEnum `mandatory:"false" json:"differenceType,omitempty"` + + // A user-friendly name for the SDM masking policy difference. Does not have to be unique, and it is changeable. Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateSdmMaskingPolicyDifferenceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateSdmMaskingPolicyDifferenceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingSdmMaskingPolicyDifferenceDifferenceTypeEnum(string(m.DifferenceType)); !ok && m.DifferenceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DifferenceType: %s. Supported values are: %s.", m.DifferenceType, strings.Join(GetSdmMaskingPolicyDifferenceDifferenceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/create_sdm_masking_policy_difference_request_response.go b/datasafe/create_sdm_masking_policy_difference_request_response.go new file mode 100644 index 0000000000..eaaa1f82d0 --- /dev/null +++ b/datasafe/create_sdm_masking_policy_difference_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateSdmMaskingPolicyDifferenceRequest wrapper for the CreateSdmMaskingPolicyDifference operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/CreateSdmMaskingPolicyDifference.go.html to see an example of how to use CreateSdmMaskingPolicyDifferenceRequest. +type CreateSdmMaskingPolicyDifferenceRequest struct { + + // The details used to create a SDM masking policy difference resource + CreateSdmMaskingPolicyDifferenceDetails `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"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSdmMaskingPolicyDifferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSdmMaskingPolicyDifferenceRequest) 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 CreateSdmMaskingPolicyDifferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSdmMaskingPolicyDifferenceRequest) 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 CreateSdmMaskingPolicyDifferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateSdmMaskingPolicyDifferenceResponse wrapper for the CreateSdmMaskingPolicyDifference operation +type CreateSdmMaskingPolicyDifferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SdmMaskingPolicyDifference instance + SdmMaskingPolicyDifference `presentIn:"body"` + + // For optimistic concurrency control. For more information, see ETags for Optimistic Concurrency Control (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + Etag *string `presentIn:"header" name:"etag"` + + // The OCID of the work request. Use GetWorkRequest with this OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The URI of the SDM Masking policy difference. + Location *string `presentIn:"header" name:"location"` +} + +func (response CreateSdmMaskingPolicyDifferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSdmMaskingPolicyDifferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/database_details.go b/datasafe/database_details.go index 7da60932d9..d2dac1c58e 100644 --- a/datasafe/database_details.go +++ b/datasafe/database_details.go @@ -17,8 +17,6 @@ import ( ) // DatabaseDetails Details of the database for the registration in Data Safe. -// To choose applicable database type and infrastructure type refer to -// https://confluence.oci.oraclecorp.com/display/DATASAFE/Target+V2+Design type DatabaseDetails interface { // The infrastructure type the database is running on. diff --git a/datasafe/datasafe_client.go b/datasafe/datasafe_client.go index b6aebab290..14f225cd15 100644 --- a/datasafe/datasafe_client.go +++ b/datasafe/datasafe_client.go @@ -211,7 +211,7 @@ func (client DataSafeClient) addMaskingColumnsFromSdm(ctx context.Context, reque return response, err } -// AlertsUpdate Update alerts within a given compartment. +// AlertsUpdate Updates alerts in the specified compartment. // // See also // @@ -335,6 +335,74 @@ func (client DataSafeClient) applyDiscoveryJobResults(ctx context.Context, reque return response, err } +// ApplySdmMaskingPolicyDifference Applies the difference of a SDM Masking policy difference resource to the specified masking policy. Note that the plannedAction attribute +// of difference columns is used for processing. You should first use PatchSdmMaskingPolicyDifferenceColumns to set the plannedAction +// attribute of the difference columns you want to process. ApplySdmMaskingPolicyDifference automatically reads the plannedAction +// attribute and updates the masking policy to reflect the actions you planned. If the sdmMaskingPolicydifferenceId is not passed, the +// latest sdmMaskingPolicydifference is used. Note that if the masking policy associated with the SdmMaskingPolicyDifference used for this +// operation is not associated with the original SDM anymore, this operation won't be allowed. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ApplySdmMaskingPolicyDifference.go.html to see an example of how to use ApplySdmMaskingPolicyDifference API. +// A default retry strategy applies to this operation ApplySdmMaskingPolicyDifference() +func (client DataSafeClient) ApplySdmMaskingPolicyDifference(ctx context.Context, request ApplySdmMaskingPolicyDifferenceRequest) (response ApplySdmMaskingPolicyDifferenceResponse, 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.applySdmMaskingPolicyDifference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ApplySdmMaskingPolicyDifferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ApplySdmMaskingPolicyDifferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ApplySdmMaskingPolicyDifferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ApplySdmMaskingPolicyDifferenceResponse") + } + return +} + +// applySdmMaskingPolicyDifference implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) applySdmMaskingPolicyDifference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/maskingPolicies/{maskingPolicyId}/maskingColumns/actions/applyDifferenceToMaskingColumns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ApplySdmMaskingPolicyDifferenceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ApplySdmMaskingPolicyDifference" + err = common.PostProcessServiceError(err, "DataSafe", "ApplySdmMaskingPolicyDifference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CalculateAuditVolumeAvailable Calculates the volume of audit events available on the target database to be collected. Measurable up to the defined retention period of the audit target resource. // // See also @@ -1275,6 +1343,69 @@ func (client DataSafeClient) changeRetention(ctx context.Context, request common return response, err } +// ChangeSdmMaskingPolicyDifferenceCompartment Moves the specified SDM masking policy difference into a different compartment. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ChangeSdmMaskingPolicyDifferenceCompartment.go.html to see an example of how to use ChangeSdmMaskingPolicyDifferenceCompartment API. +// A default retry strategy applies to this operation ChangeSdmMaskingPolicyDifferenceCompartment() +func (client DataSafeClient) ChangeSdmMaskingPolicyDifferenceCompartment(ctx context.Context, request ChangeSdmMaskingPolicyDifferenceCompartmentRequest) (response ChangeSdmMaskingPolicyDifferenceCompartmentResponse, 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.changeSdmMaskingPolicyDifferenceCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeSdmMaskingPolicyDifferenceCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeSdmMaskingPolicyDifferenceCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeSdmMaskingPolicyDifferenceCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeSdmMaskingPolicyDifferenceCompartmentResponse") + } + return +} + +// changeSdmMaskingPolicyDifferenceCompartment implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) changeSdmMaskingPolicyDifferenceCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeSdmMaskingPolicyDifferenceCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/ChangeSdmMaskingPolicyDifferenceCompartment" + err = common.PostProcessServiceError(err, "DataSafe", "ChangeSdmMaskingPolicyDifferenceCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeSecurityAssessmentCompartment Moves the specified saved security assessment or future scheduled assessments into a different compartment. // To start, call first the operation ListSecurityAssessments with filters "type = save_schedule". This returns the scheduleAssessmentId. Then, call this changeCompartment with the scheduleAssessmentId. // The existing saved security assessments created due to the schedule are not moved. However, all new saves will be associated with the new compartment. @@ -2331,6 +2462,73 @@ func (client DataSafeClient) createReportDefinition(ctx context.Context, request return response, err } +// CreateSdmMaskingPolicyDifference Creates SDM masking policy difference for the specified masking policy. It finds the difference between +// masking columns of the masking policy and sensitive columns of the SDM. After performing this operation, +// you can use ListDifferenceColumns to view the difference columns, PatchSdmMaskingPolicyDifferenceColumns +// to specify the action you want perform on these columns, and then ApplySdmMaskingPolicyDifference to process the +// difference columns and apply them to the masking policy. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/CreateSdmMaskingPolicyDifference.go.html to see an example of how to use CreateSdmMaskingPolicyDifference API. +// A default retry strategy applies to this operation CreateSdmMaskingPolicyDifference() +func (client DataSafeClient) CreateSdmMaskingPolicyDifference(ctx context.Context, request CreateSdmMaskingPolicyDifferenceRequest) (response CreateSdmMaskingPolicyDifferenceResponse, 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.createSdmMaskingPolicyDifference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSdmMaskingPolicyDifferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSdmMaskingPolicyDifferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSdmMaskingPolicyDifferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSdmMaskingPolicyDifferenceResponse") + } + return +} + +// createSdmMaskingPolicyDifference implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) createSdmMaskingPolicyDifference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/sdmMaskingPolicyDifferences", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateSdmMaskingPolicyDifferenceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "DataSafe", "CreateSdmMaskingPolicyDifference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateSecurityAssessment Creates a new saved security assessment for one or multiple targets in a compartment. When this operation is performed, // it will save the latest assessments in the specified compartment. If a schedule is passed, it will persist the latest assessments, // at the defined date and time, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). @@ -3424,6 +3622,64 @@ func (client DataSafeClient) deleteReportDefinition(ctx context.Context, request return response, err } +// DeleteSdmMaskingPolicyDifference Deletes the specified SDM Masking policy difference. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/DeleteSdmMaskingPolicyDifference.go.html to see an example of how to use DeleteSdmMaskingPolicyDifference API. +// A default retry strategy applies to this operation DeleteSdmMaskingPolicyDifference() +func (client DataSafeClient) DeleteSdmMaskingPolicyDifference(ctx context.Context, request DeleteSdmMaskingPolicyDifferenceRequest) (response DeleteSdmMaskingPolicyDifferenceResponse, 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.deleteSdmMaskingPolicyDifference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSdmMaskingPolicyDifferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSdmMaskingPolicyDifferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSdmMaskingPolicyDifferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSdmMaskingPolicyDifferenceResponse") + } + return +} + +// deleteSdmMaskingPolicyDifference implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) deleteSdmMaskingPolicyDifference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteSdmMaskingPolicyDifferenceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/DeleteSdmMaskingPolicyDifference" + err = common.PostProcessServiceError(err, "DataSafe", "DeleteSdmMaskingPolicyDifference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteSecurityAssessment Deletes the specified saved security assessment or schedule. To delete a security assessment schedule, // first call the operation ListSecurityAssessments with filters "type = save_schedule". // That operation returns the scheduleAssessmentId. Then, call DeleteSecurityAssessment with the scheduleAssessmentId. @@ -4942,7 +5198,7 @@ func (client DataSafeClient) generateUserAssessmentReport(ctx context.Context, r return response, err } -// GetAlert Gets the details of alert by its ID. +// GetAlert Gets the details of the specified alerts. // // See also // @@ -5531,6 +5787,64 @@ func (client DataSafeClient) getDataSafePrivateEndpoint(ctx context.Context, req return response, err } +// GetDifferenceColumn Gets the details of the specified SDM Masking policy difference column. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetDifferenceColumn.go.html to see an example of how to use GetDifferenceColumn API. +// A default retry strategy applies to this operation GetDifferenceColumn() +func (client DataSafeClient) GetDifferenceColumn(ctx context.Context, request GetDifferenceColumnRequest) (response GetDifferenceColumnResponse, 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.getDifferenceColumn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDifferenceColumnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDifferenceColumnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDifferenceColumnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDifferenceColumnResponse") + } + return +} + +// getDifferenceColumn implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) getDifferenceColumn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns/{differenceColumnKey}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDifferenceColumnResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DifferenceColumn/GetDifferenceColumn" + err = common.PostProcessServiceError(err, "DataSafe", "GetDifferenceColumn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetDiscoveryJob Gets the details of the specified discovery job. // // See also @@ -5937,13 +6251,15 @@ func (client DataSafeClient) getOnPremConnector(ctx context.Context, request com return response, err } -// GetReport Gets a report by identifier +// GetProfile Lists the details of given profile available on the target. +// The GetProfile operation returns only the profiles in the specified 'userAssessmentId'. +// This does not include any subcompartments of the current compartment. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetReport.go.html to see an example of how to use GetReport API. -// A default retry strategy applies to this operation GetReport() -func (client DataSafeClient) GetReport(ctx context.Context, request GetReportRequest) (response GetReportResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetProfile.go.html to see an example of how to use GetProfile API. +// A default retry strategy applies to this operation GetProfile() +func (client DataSafeClient) GetProfile(ctx context.Context, request GetProfileRequest) (response GetProfileResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5952,42 +6268,42 @@ func (client DataSafeClient) GetReport(ctx context.Context, request GetReportReq if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getReport, policy) + ociResponse, err = common.Retry(ctx, request, client.getProfile, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetProfileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetReportResponse{} + response = GetProfileResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetReportResponse); ok { + if convertedResponse, ok := ociResponse.(GetProfileResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetReportResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetProfileResponse") } return } -// getReport implements the OCIOperation interface (enables retrying operations) -func (client DataSafeClient) getReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getProfile implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) getProfile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/reports/{reportId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/userAssessments/{userAssessmentId}/profiles/{profileName}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetReportResponse + var response GetProfileResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Report/GetReport" - err = common.PostProcessServiceError(err, "DataSafe", "GetReport", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/GetProfile" + err = common.PostProcessServiceError(err, "DataSafe", "GetProfile", apiReferenceLink) return response, err } @@ -5995,13 +6311,13 @@ func (client DataSafeClient) getReport(ctx context.Context, request common.OCIRe return response, err } -// GetReportContent Downloads the specified report in the form of PDF or XLXS. +// GetReport Gets a report by identifier // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetReportContent.go.html to see an example of how to use GetReportContent API. -// A default retry strategy applies to this operation GetReportContent() -func (client DataSafeClient) GetReportContent(ctx context.Context, request GetReportContentRequest) (response GetReportContentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetReport.go.html to see an example of how to use GetReport API. +// A default retry strategy applies to this operation GetReport() +func (client DataSafeClient) GetReport(ctx context.Context, request GetReportRequest) (response GetReportResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -6010,7 +6326,65 @@ func (client DataSafeClient) GetReportContent(ctx context.Context, request GetRe if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getReportContent, policy) + ociResponse, err = common.Retry(ctx, request, client.getReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetReportResponse") + } + return +} + +// getReport implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) getReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/reports/{reportId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetReportResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Report/GetReport" + err = common.PostProcessServiceError(err, "DataSafe", "GetReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetReportContent Downloads the specified report in the form of PDF or XLXS. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetReportContent.go.html to see an example of how to use GetReportContent API. +// A default retry strategy applies to this operation GetReportContent() +func (client DataSafeClient) GetReportContent(ctx context.Context, request GetReportContentRequest) (response GetReportContentResponse, 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.getReportContent, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { @@ -6110,6 +6484,64 @@ func (client DataSafeClient) getReportDefinition(ctx context.Context, request co return response, err } +// GetSdmMaskingPolicyDifference Gets the details of the specified SDM Masking policy difference. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetSdmMaskingPolicyDifference.go.html to see an example of how to use GetSdmMaskingPolicyDifference API. +// A default retry strategy applies to this operation GetSdmMaskingPolicyDifference() +func (client DataSafeClient) GetSdmMaskingPolicyDifference(ctx context.Context, request GetSdmMaskingPolicyDifferenceRequest) (response GetSdmMaskingPolicyDifferenceResponse, 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.getSdmMaskingPolicyDifference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSdmMaskingPolicyDifferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSdmMaskingPolicyDifferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSdmMaskingPolicyDifferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSdmMaskingPolicyDifferenceResponse") + } + return +} + +// getSdmMaskingPolicyDifference implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) getSdmMaskingPolicyDifference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetSdmMaskingPolicyDifferenceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/GetSdmMaskingPolicyDifference" + err = common.PostProcessServiceError(err, "DataSafe", "GetSdmMaskingPolicyDifference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetSecurityAssessment Gets the details of the specified security assessment. // // See also @@ -6690,7 +7122,7 @@ func (client DataSafeClient) getWorkRequest(ctx context.Context, request common. return response, err } -// ListAlertAnalytics Returns aggregation details of alerts. +// ListAlertAnalytics Returns the aggregation details of the alerts. // // See also // @@ -6986,11 +7418,16 @@ func (client DataSafeClient) listAuditArchiveRetrievals(ctx context.Context, req return response, err } -// ListAuditEventAnalytics By default ListAuditEventAnalytics operation will return all of the summary columns. To filter desired summary columns, specify -// it in the `summaryOf` query parameter. -// **Example:** /ListAuditEventAnalytics?summaryField=targetName&summaryField=userName&summaryField=clientHostName&summaryField -// &summaryField=dmls&summaryField=privilege_changes&summaryField=ddls&summaryField=login_failure&summaryField=login_success -// &summaryField=eventcount&q=(operationTime ge '2021-06-13T23:49:14')&groupBy=targetName +// ListAuditEventAnalytics By default the ListAuditEventAnalytics operation will return all of the summary columns. To filter for a specific summary column, specify +// it in the `summaryField` query parameter. +// **Example:** +// /ListAuditEventAnalytics?summaryField=targetName&summaryField=userName&summaryField=clientHostname +// &summaryField=dmls&summaryField=privilegeChanges&summaryField=ddls&summaryField=loginFailure&summaryField=loginSuccess +// &summaryField=allRecord&q=(auditEventTime ge "2021-06-13T23:49:14") +// /ListAuditEventAnalytics?timeStarted=2022-08-18T11:02:26.000Z&timeEnded=2022-08-24T11:02:26.000Z +// This will give number of events grouped by periods. Period can be 1 day, 1 week, etc. +// /ListAuditEventAnalytics?summaryField=targetName&groupBy=targetName +// This will give the number of events group by targetName. Only targetName summary column would be returned. // // See also // @@ -7190,6 +7627,76 @@ func (client DataSafeClient) listAuditPolicies(ctx context.Context, request comm return response, err } +// ListAuditPolicyAnalytics Gets a list of aggregated audit policy details on the target databases. A audit policy aggregation +// helps understand the overall state of policies provisioned on targets. +// It is especially useful to create dashboards or to support analytics. +// The parameter `accessLevel` specifies whether to return only those compartments for which the +// requestor has INSPECT permissions on at least one resource directly +// or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if +// principal doesn't have access to even one of the child compartments. This is valid only when +// `compartmentIdInSubtree` is set to `true`. +// The parameter `compartmentIdInSubtree` applies when you perform SummarizedAuditPolicyInfo on the specified +// `compartmentId` and when it is set to true, the entire hierarchy of compartments can be returned. +// To get a full list of all compartments and subcompartments in the tenancy (root compartment), +// set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. +// **Example:** ListAuditPolicyAnalytics?groupBy=auditPolicyCategory +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListAuditPolicyAnalytics.go.html to see an example of how to use ListAuditPolicyAnalytics API. +// A default retry strategy applies to this operation ListAuditPolicyAnalytics() +func (client DataSafeClient) ListAuditPolicyAnalytics(ctx context.Context, request ListAuditPolicyAnalyticsRequest) (response ListAuditPolicyAnalyticsResponse, 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.listAuditPolicyAnalytics, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAuditPolicyAnalyticsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAuditPolicyAnalyticsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAuditPolicyAnalyticsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAuditPolicyAnalyticsResponse") + } + return +} + +// listAuditPolicyAnalytics implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listAuditPolicyAnalytics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/auditPolicyAnalytics", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListAuditPolicyAnalyticsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicyAnalyticCollection/ListAuditPolicyAnalytics" + err = common.PostProcessServiceError(err, "DataSafe", "ListAuditPolicyAnalytics", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListAuditProfileAnalytics Gets a list of audit profile aggregated details . A audit profile aggregation helps understand the overall state of audit profile profiles. // As an example, it helps understand how many audit profiles have paid usage. It is especially useful to create dashboards or to support analytics. // The parameter `accessLevel` specifies whether to return only those compartments for which the @@ -7696,6 +8203,64 @@ func (client DataSafeClient) listDataSafePrivateEndpoints(ctx context.Context, r return response, err } +// ListDifferenceColumns Gets a list of columns of a SDM masking policy difference resource based on the specified query parameters. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListDifferenceColumns.go.html to see an example of how to use ListDifferenceColumns API. +// A default retry strategy applies to this operation ListDifferenceColumns() +func (client DataSafeClient) ListDifferenceColumns(ctx context.Context, request ListDifferenceColumnsRequest) (response ListDifferenceColumnsResponse, 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.listDifferenceColumns, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDifferenceColumnsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDifferenceColumnsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDifferenceColumnsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDifferenceColumnsResponse") + } + return +} + +// listDifferenceColumns implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listDifferenceColumns(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListDifferenceColumnsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/ListDifferenceColumns" + err = common.PostProcessServiceError(err, "DataSafe", "ListDifferenceColumns", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListDiscoveryAnalytics Gets consolidated discovery analytics data based on the specified query parameters. // If CompartmentIdInSubtreeQueryParam is specified as true, the behaviour // is equivalent to accessLevel "ACCESSIBLE" by default. @@ -8225,6 +8790,64 @@ func (client DataSafeClient) listMaskingColumns(ctx context.Context, request com return response, err } +// ListMaskingObjects Gets a list of masking objects present in the specified masking policy and based on the specified query parameters. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListMaskingObjects.go.html to see an example of how to use ListMaskingObjects API. +// A default retry strategy applies to this operation ListMaskingObjects() +func (client DataSafeClient) ListMaskingObjects(ctx context.Context, request ListMaskingObjectsRequest) (response ListMaskingObjectsResponse, 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.listMaskingObjects, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListMaskingObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListMaskingObjectsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListMaskingObjectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMaskingObjectsResponse") + } + return +} + +// listMaskingObjects implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listMaskingObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/maskingPolicies/{maskingPolicyId}/maskingObjects", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListMaskingObjectsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingObjectCollection/ListMaskingObjects" + err = common.PostProcessServiceError(err, "DataSafe", "ListMaskingObjects", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListMaskingPolicies Gets a list of masking policies based on the specified query parameters. // // See also @@ -8274,8 +8897,182 @@ func (client DataSafeClient) listMaskingPolicies(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingPolicies" - err = common.PostProcessServiceError(err, "DataSafe", "ListMaskingPolicies", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingPolicies" + err = common.PostProcessServiceError(err, "DataSafe", "ListMaskingPolicies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListMaskingReports Gets a list of masking reports based on the specified query parameters. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListMaskingReports.go.html to see an example of how to use ListMaskingReports API. +// A default retry strategy applies to this operation ListMaskingReports() +func (client DataSafeClient) ListMaskingReports(ctx context.Context, request ListMaskingReportsRequest) (response ListMaskingReportsResponse, 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.listMaskingReports, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListMaskingReportsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListMaskingReportsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListMaskingReportsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMaskingReportsResponse") + } + return +} + +// listMaskingReports implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listMaskingReports(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/maskingReports", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListMaskingReportsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingReports" + err = common.PostProcessServiceError(err, "DataSafe", "ListMaskingReports", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListMaskingSchemas Gets a list of masking schemas present in the specified masking policy and based on the specified query parameters. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListMaskingSchemas.go.html to see an example of how to use ListMaskingSchemas API. +// A default retry strategy applies to this operation ListMaskingSchemas() +func (client DataSafeClient) ListMaskingSchemas(ctx context.Context, request ListMaskingSchemasRequest) (response ListMaskingSchemasResponse, 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.listMaskingSchemas, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListMaskingSchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListMaskingSchemasResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListMaskingSchemasResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListMaskingSchemasResponse") + } + return +} + +// listMaskingSchemas implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listMaskingSchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/maskingPolicies/{maskingPolicyId}/maskingSchemas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListMaskingSchemasResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingSchemaCollection/ListMaskingSchemas" + err = common.PostProcessServiceError(err, "DataSafe", "ListMaskingSchemas", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListOnPremConnectors Gets a list of on-premises connectors. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListOnPremConnectors.go.html to see an example of how to use ListOnPremConnectors API. +// A default retry strategy applies to this operation ListOnPremConnectors() +func (client DataSafeClient) ListOnPremConnectors(ctx context.Context, request ListOnPremConnectorsRequest) (response ListOnPremConnectorsResponse, 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.listOnPremConnectors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListOnPremConnectorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListOnPremConnectorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListOnPremConnectorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListOnPremConnectorsResponse") + } + return +} + +// listOnPremConnectors implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listOnPremConnectors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/onPremConnectors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListOnPremConnectorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnectorSummary/ListOnPremConnectors" + err = common.PostProcessServiceError(err, "DataSafe", "ListOnPremConnectors", apiReferenceLink) return response, err } @@ -8283,13 +9080,24 @@ func (client DataSafeClient) listMaskingPolicies(ctx context.Context, request co return response, err } -// ListMaskingReports Gets a list of masking reports based on the specified query parameters. +// ListProfileAnalytics Gets a list of aggregated user profile details in the specified compartment. This provides information about the +// overall profiles available. For example, the user profile details include how many users have the profile assigned +// and do how many use password verification function. This data is especially useful content for dashboards or to support analytics. +// When you perform the ListProfileAnalytics operation, if the parameter compartmentIdInSubtree is set to "true," and if the +// parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT +// permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the +// root compartment. If the requestor does not have access to at least one subcompartment of the compartment specified by +// compartmentId, then "Not Authorized" is returned. +// The parameter compartmentIdInSubtree applies when you perform ListProfileAnalytics on the compartmentId passed and when it is +// set to true, the entire hierarchy of compartments can be returned. +// To use ListProfileAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment, +// set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListMaskingReports.go.html to see an example of how to use ListMaskingReports API. -// A default retry strategy applies to this operation ListMaskingReports() -func (client DataSafeClient) ListMaskingReports(ctx context.Context, request ListMaskingReportsRequest) (response ListMaskingReportsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListProfileAnalytics.go.html to see an example of how to use ListProfileAnalytics API. +// A default retry strategy applies to this operation ListProfileAnalytics() +func (client DataSafeClient) ListProfileAnalytics(ctx context.Context, request ListProfileAnalyticsRequest) (response ListProfileAnalyticsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -8298,42 +9106,42 @@ func (client DataSafeClient) ListMaskingReports(ctx context.Context, request Lis if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listMaskingReports, policy) + ociResponse, err = common.Retry(ctx, request, client.listProfileAnalytics, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMaskingReportsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListProfileAnalyticsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMaskingReportsResponse{} + response = ListProfileAnalyticsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMaskingReportsResponse); ok { + if convertedResponse, ok := ociResponse.(ListProfileAnalyticsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMaskingReportsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListProfileAnalyticsResponse") } return } -// listMaskingReports implements the OCIOperation interface (enables retrying operations) -func (client DataSafeClient) listMaskingReports(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listProfileAnalytics implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listProfileAnalytics(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/maskingReports", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/userAssessments/{userAssessmentId}/profileAnalytics", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMaskingReportsResponse + var response ListProfileAnalyticsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/ListMaskingReports" - err = common.PostProcessServiceError(err, "DataSafe", "ListMaskingReports", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Profile/ListProfileAnalytics" + err = common.PostProcessServiceError(err, "DataSafe", "ListProfileAnalytics", apiReferenceLink) return response, err } @@ -8341,13 +9149,24 @@ func (client DataSafeClient) listMaskingReports(ctx context.Context, request com return response, err } -// ListOnPremConnectors Gets a list of on-premises connectors. +// ListProfileSummaries Gets a list of user profiles containing the profile details along with the target id and user counts. +// The ListProfiles operation returns only the profiles belonging to a certain target. If compartment type user assessment +// id is provided, then profile information for all the targets belonging to the pertaining compartment is returned. +// The list does not include any subcompartments of the compartment under consideration. +// The parameter 'accessLevel' specifies whether to return only those compartments for which the requestor has +// INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a +// subcompartment) or to return Not Authorized if Principal doesn't have access to even one of the child compartments. +// This is valid only when 'compartmentIdInSubtree' is set to 'true'. +// The parameter 'compartmentIdInSubtree' applies when you perform ListUserProfiles on the 'compartmentId' belonging +// to the assessmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. +// To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter +// 'compartmentIdInSubtree' to true and 'accessLevel' to ACCESSIBLE. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListOnPremConnectors.go.html to see an example of how to use ListOnPremConnectors API. -// A default retry strategy applies to this operation ListOnPremConnectors() -func (client DataSafeClient) ListOnPremConnectors(ctx context.Context, request ListOnPremConnectorsRequest) (response ListOnPremConnectorsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListProfileSummaries.go.html to see an example of how to use ListProfileSummaries API. +// A default retry strategy applies to this operation ListProfileSummaries() +func (client DataSafeClient) ListProfileSummaries(ctx context.Context, request ListProfileSummariesRequest) (response ListProfileSummariesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -8356,42 +9175,42 @@ func (client DataSafeClient) ListOnPremConnectors(ctx context.Context, request L if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOnPremConnectors, policy) + ociResponse, err = common.Retry(ctx, request, client.listProfileSummaries, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListOnPremConnectorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListProfileSummariesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOnPremConnectorsResponse{} + response = ListProfileSummariesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOnPremConnectorsResponse); ok { + if convertedResponse, ok := ociResponse.(ListProfileSummariesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOnPremConnectorsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListProfileSummariesResponse") } return } -// listOnPremConnectors implements the OCIOperation interface (enables retrying operations) -func (client DataSafeClient) listOnPremConnectors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listProfileSummaries implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listProfileSummaries(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/onPremConnectors", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/userAssessments/{userAssessmentId}/profiles", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOnPremConnectorsResponse + var response ListProfileSummariesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/OnPremConnectorSummary/ListOnPremConnectors" - err = common.PostProcessServiceError(err, "DataSafe", "ListOnPremConnectors", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/ListProfileSummaries" + err = common.PostProcessServiceError(err, "DataSafe", "ListProfileSummaries", apiReferenceLink) return response, err } @@ -8633,6 +9452,64 @@ func (client DataSafeClient) listSchemas(ctx context.Context, request common.OCI return response, err } +// ListSdmMaskingPolicyDifferences Gets a list of SDM and masking policy difference resources based on the specified query parameters. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSdmMaskingPolicyDifferences.go.html to see an example of how to use ListSdmMaskingPolicyDifferences API. +// A default retry strategy applies to this operation ListSdmMaskingPolicyDifferences() +func (client DataSafeClient) ListSdmMaskingPolicyDifferences(ctx context.Context, request ListSdmMaskingPolicyDifferencesRequest) (response ListSdmMaskingPolicyDifferencesResponse, 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.listSdmMaskingPolicyDifferences, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSdmMaskingPolicyDifferencesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSdmMaskingPolicyDifferencesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSdmMaskingPolicyDifferencesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSdmMaskingPolicyDifferencesResponse") + } + return +} + +// listSdmMaskingPolicyDifferences implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listSdmMaskingPolicyDifferences(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/sdmMaskingPolicyDifferences", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSdmMaskingPolicyDifferencesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/ListSdmMaskingPolicyDifferences" + err = common.PostProcessServiceError(err, "DataSafe", "ListSdmMaskingPolicyDifferences", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListSecurityAssessments Gets a list of security assessments. // The ListSecurityAssessments operation returns only the assessments in the specified `compartmentId`. // The list does not include any subcompartments of the compartmentId passed. @@ -8818,6 +9695,122 @@ func (client DataSafeClient) listSensitiveDataModels(ctx context.Context, reques return response, err } +// ListSensitiveObjects Gets a list of sensitive objects present in the specified sensitive data model based on the specified query parameters. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSensitiveObjects.go.html to see an example of how to use ListSensitiveObjects API. +// A default retry strategy applies to this operation ListSensitiveObjects() +func (client DataSafeClient) ListSensitiveObjects(ctx context.Context, request ListSensitiveObjectsRequest) (response ListSensitiveObjectsResponse, 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.listSensitiveObjects, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSensitiveObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSensitiveObjectsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSensitiveObjectsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSensitiveObjectsResponse") + } + return +} + +// listSensitiveObjects implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listSensitiveObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveObjects", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSensitiveObjectsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveObjectCollection/ListSensitiveObjects" + err = common.PostProcessServiceError(err, "DataSafe", "ListSensitiveObjects", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSensitiveSchemas Gets a list of sensitive schemas present in the specified sensitive data model based on the specified query parameters. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSensitiveSchemas.go.html to see an example of how to use ListSensitiveSchemas API. +// A default retry strategy applies to this operation ListSensitiveSchemas() +func (client DataSafeClient) ListSensitiveSchemas(ctx context.Context, request ListSensitiveSchemasRequest) (response ListSensitiveSchemasResponse, 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.listSensitiveSchemas, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSensitiveSchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSensitiveSchemasResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSensitiveSchemasResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSensitiveSchemasResponse") + } + return +} + +// listSensitiveSchemas implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) listSensitiveSchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveSchemas", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSensitiveSchemasResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SensitiveSchemaCollection/ListSensitiveSchemas" + err = common.PostProcessServiceError(err, "DataSafe", "ListSensitiveSchemas", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListSensitiveTypes Gets a list of sensitive types based on the specified query parameters. // // See also @@ -9544,7 +10537,7 @@ func (client DataSafeClient) modifyGlobalSettings(ctx context.Context, request c return response, err } -// PatchAlerts Patch alerts. Updates one or more alerts by specifying alert Ids. +// PatchAlerts Updates the status of one or more alert specified by the alert IDs. // // See also // @@ -9721,6 +10714,65 @@ func (client DataSafeClient) patchMaskingColumns(ctx context.Context, request co return response, err } +// PatchSdmMaskingPolicyDifferenceColumns Patches one or more SDM masking policy difference columns. You can use this operation to set the plannedAction attribute before using +// ApplySdmMaskingPolicyDifference to process the difference based on this attribute. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/PatchSdmMaskingPolicyDifferenceColumns.go.html to see an example of how to use PatchSdmMaskingPolicyDifferenceColumns API. +// A default retry strategy applies to this operation PatchSdmMaskingPolicyDifferenceColumns() +func (client DataSafeClient) PatchSdmMaskingPolicyDifferenceColumns(ctx context.Context, request PatchSdmMaskingPolicyDifferenceColumnsRequest) (response PatchSdmMaskingPolicyDifferenceColumnsResponse, 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.patchSdmMaskingPolicyDifferenceColumns, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PatchSdmMaskingPolicyDifferenceColumnsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PatchSdmMaskingPolicyDifferenceColumnsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PatchSdmMaskingPolicyDifferenceColumnsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchSdmMaskingPolicyDifferenceColumnsResponse") + } + return +} + +// patchSdmMaskingPolicyDifferenceColumns implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) patchSdmMaskingPolicyDifferenceColumns(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}/differenceColumns", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PatchSdmMaskingPolicyDifferenceColumnsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/PatchSdmMaskingPolicyDifferenceColumns" + err = common.PostProcessServiceError(err, "DataSafe", "PatchSdmMaskingPolicyDifferenceColumns", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // PatchSensitiveColumns Patches one or more columns in the specified sensitive data model. Use it to create, update, or delete sensitive columns. // To create sensitive columns, use CreateSensitiveColumnDetails as the patch value. And to update sensitive columns, // use UpdateSensitiveColumnDetails as the patch value. @@ -9781,7 +10833,7 @@ func (client DataSafeClient) patchSensitiveColumns(ctx context.Context, request return response, err } -// PatchTargetAlertPolicyAssociation Creates new target-alert policy associations that will be applied on target. +// PatchTargetAlertPolicyAssociation Creates new target-alert policy associations that will be applied on the target database. // // See also // @@ -10031,7 +11083,7 @@ func (client DataSafeClient) refreshUserAssessment(ctx context.Context, request return response, err } -// RemoveScheduleReport Deletes schedule of a PDF or XLS report. +// RemoveScheduleReport Deletes the schedule of a PDF or XLS report. // // See also // @@ -10779,7 +11831,7 @@ func (client DataSafeClient) unsetUserAssessmentBaseline(ctx context.Context, re return response, err } -// UpdateAlert Updates alert status of the specified alert. +// UpdateAlert Updates the status of the specified alert. // // See also // @@ -11486,6 +12538,64 @@ func (client DataSafeClient) updateReportDefinition(ctx context.Context, request return response, err } +// UpdateSdmMaskingPolicyDifference Updates one or more attributes of the specified sdm masking policy difference. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/UpdateSdmMaskingPolicyDifference.go.html to see an example of how to use UpdateSdmMaskingPolicyDifference API. +// A default retry strategy applies to this operation UpdateSdmMaskingPolicyDifference() +func (client DataSafeClient) UpdateSdmMaskingPolicyDifference(ctx context.Context, request UpdateSdmMaskingPolicyDifferenceRequest) (response UpdateSdmMaskingPolicyDifferenceResponse, 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.updateSdmMaskingPolicyDifference, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateSdmMaskingPolicyDifferenceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateSdmMaskingPolicyDifferenceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateSdmMaskingPolicyDifferenceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateSdmMaskingPolicyDifferenceResponse") + } + return +} + +// updateSdmMaskingPolicyDifference implements the OCIOperation interface (enables retrying operations) +func (client DataSafeClient) updateSdmMaskingPolicyDifference(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/sdmMaskingPolicyDifferences/{sdmMaskingPolicyDifferenceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateSdmMaskingPolicyDifferenceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SdmMaskingPolicyDifference/UpdateSdmMaskingPolicyDifference" + err = common.PostProcessServiceError(err, "DataSafe", "UpdateSdmMaskingPolicyDifference", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateSecurityAssessment Updates one or more attributes of the specified security assessment. This operation allows to update the security assessment displayName, description, or schedule. // // See also diff --git a/datasafe/delete_sdm_masking_policy_difference_request_response.go b/datasafe/delete_sdm_masking_policy_difference_request_response.go new file mode 100644 index 0000000000..30fcaaa446 --- /dev/null +++ b/datasafe/delete_sdm_masking_policy_difference_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteSdmMaskingPolicyDifferenceRequest wrapper for the DeleteSdmMaskingPolicyDifference operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/DeleteSdmMaskingPolicyDifference.go.html to see an example of how to use DeleteSdmMaskingPolicyDifferenceRequest. +type DeleteSdmMaskingPolicyDifferenceRequest struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"true" contributesTo:"path" name:"sdmMaskingPolicyDifferenceId"` + + // 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"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSdmMaskingPolicyDifferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSdmMaskingPolicyDifferenceRequest) 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 DeleteSdmMaskingPolicyDifferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSdmMaskingPolicyDifferenceRequest) 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 DeleteSdmMaskingPolicyDifferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteSdmMaskingPolicyDifferenceResponse wrapper for the DeleteSdmMaskingPolicyDifference operation +type DeleteSdmMaskingPolicyDifferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request. Use GetWorkRequest with this OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSdmMaskingPolicyDifferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSdmMaskingPolicyDifferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/difference_column.go b/datasafe/difference_column.go new file mode 100644 index 0000000000..bf85b7e8aa --- /dev/null +++ b/datasafe/difference_column.go @@ -0,0 +1,218 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DifferenceColumn A SDM masking policy difference column. It can be one of the following three types: +// NEW: A new column in the sensitive data model that is not in the masking policy. +// DELETED: A column that is present in the masking policy but has been deleted from the sensitive data model. +// MODIFIED: A column that is present in the masking policy as well as the sensitive data model but some of its attributes have been modified. +type DifferenceColumn struct { + + // The unique key that identifies the SDM masking policy difference column. + Key *string `mandatory:"true" json:"key"` + + // The type of the SDM masking policy difference column. It can be one of the following three types: + // NEW: A new sensitive column in the sensitive data model that is not in the masking policy. + // DELETED: A column that is present in the masking policy but has been deleted from the sensitive data model. + // MODIFIED: A column that is present in the masking policy as well as the sensitive data model but some of its attributes have been modified. + DifferenceType DifferenceColumnDifferenceTypeEnum `mandatory:"true" json:"differenceType"` + + // The database schema that contains the difference column. + SchemaName *string `mandatory:"true" json:"schemaName"` + + // The database object that contains the difference column. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The name of the difference column. + ColumnName *string `mandatory:"true" json:"columnName"` + + // Specifies how to process the difference column. It's set to SYNC by default. Use the PatchSdmMaskingPolicyDifferenceColumns operation to update this attribute. You can choose one of the following options: + // SYNC: To sync the difference column and update the masking policy to reflect the changes. + // NO_SYNC: To not sync the difference column so that it doesn't change the masking policy. + // After specifying the planned action, you can use the ApplySdmMaskingPolicyDifference operation to automatically process the difference columns. + PlannedAction DifferenceColumnPlannedActionEnum `mandatory:"true" json:"plannedAction"` + + // Indicates if the difference column has been processed. Use GetDifferenceColumn operation to + // track whether the difference column has already been processed and applied to the masking policy. + SyncStatus DifferenceColumnSyncStatusEnum `mandatory:"true" json:"syncStatus"` + + // The unique key that identifies the sensitive column represented by the SDM masking policy difference column. + SensitiveColumnkey *string `mandatory:"false" json:"sensitiveColumnkey"` + + // The unique key that identifies the masking column represented by the SDM masking policy difference column. + MaskingColumnkey *string `mandatory:"false" json:"maskingColumnkey"` + + // The OCID of the sensitive type associated with the difference column. + SensitiveTypeId *string `mandatory:"false" json:"sensitiveTypeId"` + + // The date and time the SDM masking policy difference column was last synced, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastSynced *common.SDKTime `mandatory:"false" json:"timeLastSynced"` +} + +func (m DifferenceColumn) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DifferenceColumn) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDifferenceColumnDifferenceTypeEnum(string(m.DifferenceType)); !ok && m.DifferenceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DifferenceType: %s. Supported values are: %s.", m.DifferenceType, strings.Join(GetDifferenceColumnDifferenceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDifferenceColumnPlannedActionEnum(string(m.PlannedAction)); !ok && m.PlannedAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PlannedAction: %s. Supported values are: %s.", m.PlannedAction, strings.Join(GetDifferenceColumnPlannedActionEnumStringValues(), ","))) + } + if _, ok := GetMappingDifferenceColumnSyncStatusEnum(string(m.SyncStatus)); !ok && m.SyncStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SyncStatus: %s. Supported values are: %s.", m.SyncStatus, strings.Join(GetDifferenceColumnSyncStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DifferenceColumnDifferenceTypeEnum Enum with underlying type: string +type DifferenceColumnDifferenceTypeEnum string + +// Set of constants representing the allowable values for DifferenceColumnDifferenceTypeEnum +const ( + DifferenceColumnDifferenceTypeNew DifferenceColumnDifferenceTypeEnum = "NEW" + DifferenceColumnDifferenceTypeModified DifferenceColumnDifferenceTypeEnum = "MODIFIED" + DifferenceColumnDifferenceTypeDeleted DifferenceColumnDifferenceTypeEnum = "DELETED" +) + +var mappingDifferenceColumnDifferenceTypeEnum = map[string]DifferenceColumnDifferenceTypeEnum{ + "NEW": DifferenceColumnDifferenceTypeNew, + "MODIFIED": DifferenceColumnDifferenceTypeModified, + "DELETED": DifferenceColumnDifferenceTypeDeleted, +} + +var mappingDifferenceColumnDifferenceTypeEnumLowerCase = map[string]DifferenceColumnDifferenceTypeEnum{ + "new": DifferenceColumnDifferenceTypeNew, + "modified": DifferenceColumnDifferenceTypeModified, + "deleted": DifferenceColumnDifferenceTypeDeleted, +} + +// GetDifferenceColumnDifferenceTypeEnumValues Enumerates the set of values for DifferenceColumnDifferenceTypeEnum +func GetDifferenceColumnDifferenceTypeEnumValues() []DifferenceColumnDifferenceTypeEnum { + values := make([]DifferenceColumnDifferenceTypeEnum, 0) + for _, v := range mappingDifferenceColumnDifferenceTypeEnum { + values = append(values, v) + } + return values +} + +// GetDifferenceColumnDifferenceTypeEnumStringValues Enumerates the set of values in String for DifferenceColumnDifferenceTypeEnum +func GetDifferenceColumnDifferenceTypeEnumStringValues() []string { + return []string{ + "NEW", + "MODIFIED", + "DELETED", + } +} + +// GetMappingDifferenceColumnDifferenceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDifferenceColumnDifferenceTypeEnum(val string) (DifferenceColumnDifferenceTypeEnum, bool) { + enum, ok := mappingDifferenceColumnDifferenceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DifferenceColumnPlannedActionEnum Enum with underlying type: string +type DifferenceColumnPlannedActionEnum string + +// Set of constants representing the allowable values for DifferenceColumnPlannedActionEnum +const ( + DifferenceColumnPlannedActionSync DifferenceColumnPlannedActionEnum = "SYNC" + DifferenceColumnPlannedActionNoSync DifferenceColumnPlannedActionEnum = "NO_SYNC" +) + +var mappingDifferenceColumnPlannedActionEnum = map[string]DifferenceColumnPlannedActionEnum{ + "SYNC": DifferenceColumnPlannedActionSync, + "NO_SYNC": DifferenceColumnPlannedActionNoSync, +} + +var mappingDifferenceColumnPlannedActionEnumLowerCase = map[string]DifferenceColumnPlannedActionEnum{ + "sync": DifferenceColumnPlannedActionSync, + "no_sync": DifferenceColumnPlannedActionNoSync, +} + +// GetDifferenceColumnPlannedActionEnumValues Enumerates the set of values for DifferenceColumnPlannedActionEnum +func GetDifferenceColumnPlannedActionEnumValues() []DifferenceColumnPlannedActionEnum { + values := make([]DifferenceColumnPlannedActionEnum, 0) + for _, v := range mappingDifferenceColumnPlannedActionEnum { + values = append(values, v) + } + return values +} + +// GetDifferenceColumnPlannedActionEnumStringValues Enumerates the set of values in String for DifferenceColumnPlannedActionEnum +func GetDifferenceColumnPlannedActionEnumStringValues() []string { + return []string{ + "SYNC", + "NO_SYNC", + } +} + +// GetMappingDifferenceColumnPlannedActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDifferenceColumnPlannedActionEnum(val string) (DifferenceColumnPlannedActionEnum, bool) { + enum, ok := mappingDifferenceColumnPlannedActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DifferenceColumnSyncStatusEnum Enum with underlying type: string +type DifferenceColumnSyncStatusEnum string + +// Set of constants representing the allowable values for DifferenceColumnSyncStatusEnum +const ( + DifferenceColumnSyncStatusSynced DifferenceColumnSyncStatusEnum = "SYNCED" + DifferenceColumnSyncStatusNotSynced DifferenceColumnSyncStatusEnum = "NOT_SYNCED" +) + +var mappingDifferenceColumnSyncStatusEnum = map[string]DifferenceColumnSyncStatusEnum{ + "SYNCED": DifferenceColumnSyncStatusSynced, + "NOT_SYNCED": DifferenceColumnSyncStatusNotSynced, +} + +var mappingDifferenceColumnSyncStatusEnumLowerCase = map[string]DifferenceColumnSyncStatusEnum{ + "synced": DifferenceColumnSyncStatusSynced, + "not_synced": DifferenceColumnSyncStatusNotSynced, +} + +// GetDifferenceColumnSyncStatusEnumValues Enumerates the set of values for DifferenceColumnSyncStatusEnum +func GetDifferenceColumnSyncStatusEnumValues() []DifferenceColumnSyncStatusEnum { + values := make([]DifferenceColumnSyncStatusEnum, 0) + for _, v := range mappingDifferenceColumnSyncStatusEnum { + values = append(values, v) + } + return values +} + +// GetDifferenceColumnSyncStatusEnumStringValues Enumerates the set of values in String for DifferenceColumnSyncStatusEnum +func GetDifferenceColumnSyncStatusEnumStringValues() []string { + return []string{ + "SYNCED", + "NOT_SYNCED", + } +} + +// GetMappingDifferenceColumnSyncStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDifferenceColumnSyncStatusEnum(val string) (DifferenceColumnSyncStatusEnum, bool) { + enum, ok := mappingDifferenceColumnSyncStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/difference_column_summary.go b/datasafe/difference_column_summary.go new file mode 100644 index 0000000000..d7f72f754d --- /dev/null +++ b/datasafe/difference_column_summary.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DifferenceColumnSummary Summary of a SDM masking policy difference column. +type DifferenceColumnSummary struct { + + // The unique key that identifies the SDM masking policy difference column. + Key *string `mandatory:"true" json:"key"` + + // The type of the SDM masking policy difference column. It can be one of the following three types: + // NEW: A new sensitive column in the sensitive data model that is not in the masking policy. + // DELETED: A column that is present in the masking policy but has been deleted from the sensitive data model. + // MODIFIED: A column that is present in the masking policy as well as the sensitive data model but some of its attributes have been modified. + DifferenceType DifferenceColumnDifferenceTypeEnum `mandatory:"true" json:"differenceType"` + + // The database schema that contains the difference column. + SchemaName *string `mandatory:"true" json:"schemaName"` + + // The database object that contains the difference column. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The name of the difference column. + ColumnName *string `mandatory:"true" json:"columnName"` + + // Specifies how to process the difference column. It's set to SYNC by default. Use the PatchSdmMaskingPolicyDifferenceColumns operation to update this attribute. You can choose one of the following options: + // SYNC: To sync the difference column and update the masking policy to reflect the changes. + // NO_SYNC: To not sync the difference column so that it doesn't change the masking policy. + // After specifying the planned action, you can use the ApplySdmMaskingPolicyDifference operation to automatically process the difference columns. + PlannedAction DifferenceColumnPlannedActionEnum `mandatory:"true" json:"plannedAction"` + + // Indicates if the difference column has been processed.Use GetDifferenceColumn operation to track whether the difference column has + // already been processed and applied to the masking policy. + SyncStatus DifferenceColumnSyncStatusEnum `mandatory:"true" json:"syncStatus"` + + // The unique key that identifies the sensitive column represented by the SDM masking policy difference column. + SensitiveColumnkey *string `mandatory:"false" json:"sensitiveColumnkey"` + + // The unique key that identifies the masking column represented by the SDM masking policy difference column. + MaskingColumnkey *string `mandatory:"false" json:"maskingColumnkey"` + + // The OCID of the sensitive type associated with the difference column. + SensitiveTypeId *string `mandatory:"false" json:"sensitiveTypeId"` + + // The date and time the SDM masking policy difference column was last synced, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastSynced *common.SDKTime `mandatory:"false" json:"timeLastSynced"` +} + +func (m DifferenceColumnSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DifferenceColumnSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDifferenceColumnDifferenceTypeEnum(string(m.DifferenceType)); !ok && m.DifferenceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DifferenceType: %s. Supported values are: %s.", m.DifferenceType, strings.Join(GetDifferenceColumnDifferenceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDifferenceColumnPlannedActionEnum(string(m.PlannedAction)); !ok && m.PlannedAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PlannedAction: %s. Supported values are: %s.", m.PlannedAction, strings.Join(GetDifferenceColumnPlannedActionEnumStringValues(), ","))) + } + if _, ok := GetMappingDifferenceColumnSyncStatusEnum(string(m.SyncStatus)); !ok && m.SyncStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SyncStatus: %s. Supported values are: %s.", m.SyncStatus, strings.Join(GetDifferenceColumnSyncStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/generate_report_details.go b/datasafe/generate_report_details.go index 25c63ce36a..13dce4a310 100644 --- a/datasafe/generate_report_details.go +++ b/datasafe/generate_report_details.go @@ -34,13 +34,13 @@ type GenerateReportDetails struct { // The description of the report to be generated Description *string `mandatory:"false" json:"description"` - // Specifies the time before which the data needs to be reported. + // Specifies the time until which the data needs to be reported. TimeLessThan *common.SDKTime `mandatory:"false" json:"timeLessThan"` // Specifies the time after which the data needs to be reported. TimeGreaterThan *common.SDKTime `mandatory:"false" json:"timeGreaterThan"` - // Specifies the limit on number of rows in report. + // Specifies the limit on the number of rows in the report. RowLimit *int `mandatory:"false" json:"rowLimit"` } diff --git a/datasafe/get_difference_column_request_response.go b/datasafe/get_difference_column_request_response.go new file mode 100644 index 0000000000..4fdbbfaff1 --- /dev/null +++ b/datasafe/get_difference_column_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDifferenceColumnRequest wrapper for the GetDifferenceColumn operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetDifferenceColumn.go.html to see an example of how to use GetDifferenceColumnRequest. +type GetDifferenceColumnRequest struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"true" contributesTo:"path" name:"sdmMaskingPolicyDifferenceId"` + + // The unique key that identifies the difference column. + DifferenceColumnKey *string `mandatory:"true" contributesTo:"path" name:"differenceColumnKey"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDifferenceColumnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDifferenceColumnRequest) 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 GetDifferenceColumnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDifferenceColumnRequest) 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 GetDifferenceColumnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDifferenceColumnResponse wrapper for the GetDifferenceColumn operation +type GetDifferenceColumnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DifferenceColumn instance + DifferenceColumn `presentIn:"body"` + + // For optimistic concurrency control. For more information, see ETags for Optimistic Concurrency Control (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDifferenceColumnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDifferenceColumnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/get_profile_request_response.go b/datasafe/get_profile_request_response.go new file mode 100644 index 0000000000..5749d126d3 --- /dev/null +++ b/datasafe/get_profile_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetProfileRequest wrapper for the GetProfile operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetProfile.go.html to see an example of how to use GetProfileRequest. +type GetProfileRequest struct { + + // The OCID of the user assessment. + UserAssessmentId *string `mandatory:"true" contributesTo:"path" name:"userAssessmentId"` + + // Profile name to get detailed information . + ProfileName *string `mandatory:"true" contributesTo:"path" name:"profileName"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetProfileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetProfileRequest) 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 GetProfileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetProfileRequest) 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 GetProfileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetProfileResponse wrapper for the GetProfile operation +type GetProfileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Profile instance + Items []Profile `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response GetProfileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetProfileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/get_sdm_masking_policy_difference_request_response.go b/datasafe/get_sdm_masking_policy_difference_request_response.go new file mode 100644 index 0000000000..616d8646cd --- /dev/null +++ b/datasafe/get_sdm_masking_policy_difference_request_response.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSdmMaskingPolicyDifferenceRequest wrapper for the GetSdmMaskingPolicyDifference operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/GetSdmMaskingPolicyDifference.go.html to see an example of how to use GetSdmMaskingPolicyDifferenceRequest. +type GetSdmMaskingPolicyDifferenceRequest struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"true" contributesTo:"path" name:"sdmMaskingPolicyDifferenceId"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSdmMaskingPolicyDifferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSdmMaskingPolicyDifferenceRequest) 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 GetSdmMaskingPolicyDifferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSdmMaskingPolicyDifferenceRequest) 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 GetSdmMaskingPolicyDifferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSdmMaskingPolicyDifferenceResponse wrapper for the GetSdmMaskingPolicyDifference operation +type GetSdmMaskingPolicyDifferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SdmMaskingPolicyDifference instance + SdmMaskingPolicyDifference `presentIn:"body"` + + // For optimistic concurrency control. For more information, see ETags for Optimistic Concurrency Control (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#eleven) + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSdmMaskingPolicyDifferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSdmMaskingPolicyDifferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/list_alert_analytics_request_response.go b/datasafe/list_alert_analytics_request_response.go index 546f6a779e..be0ccdbc04 100644 --- a/datasafe/list_alert_analytics_request_response.go +++ b/datasafe/list_alert_analytics_request_response.go @@ -69,7 +69,9 @@ type ListAlertAnalyticsRequest struct { // at RFC3339 (https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, // text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. // (Numeric and boolean values should not be quoted.) - // **Example:** query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1') + // **Example:** | + // query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1') + // query=(featureDetails.userName eq "user") and (targetNames eq "target_1") // Supported fields: // severity // status @@ -81,6 +83,8 @@ type ListAlertAnalyticsRequest struct { // displayName // timeCreated // timeUpdated + // featureDetails.* (* can be any field in nestedStrMap in Feature Attributes in Alert Summary. For example - + // userName,object,clientHostname,osUserName,clientIPs,clientId,commandText,commandParam,clientProgram,objectType,targetOwner) ScimQuery *string `mandatory:"false" contributesTo:"query" name:"scimQuery"` // Specifies a subset of summarized fields to be returned in the response. diff --git a/datasafe/list_alert_policies_request_response.go b/datasafe/list_alert_policies_request_response.go index 18c2205b85..4d9cef8113 100644 --- a/datasafe/list_alert_policies_request_response.go +++ b/datasafe/list_alert_policies_request_response.go @@ -45,7 +45,7 @@ type ListAlertPoliciesRequest struct { // The sort order to use, either ascending (ASC) or descending (DESC). SortOrder ListAlertPoliciesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - // The field to sort by. Only one sort order may be provided. + // The field to sort by. Only one sort parameter may be provided. SortBy ListAlertPoliciesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` // Unique identifier for the request. diff --git a/datasafe/list_alerts_request_response.go b/datasafe/list_alerts_request_response.go index 5556ed851d..e351e0f306 100644 --- a/datasafe/list_alerts_request_response.go +++ b/datasafe/list_alerts_request_response.go @@ -54,7 +54,9 @@ type ListAlertsRequest struct { // at RFC3339 (https://tools.ietf.org/html/draft-ietf-scim-api-12). In SCIM filtering expressions, // text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. // (Numeric and boolean values should not be quoted.) - // **Example:** query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1') + // **Example:** | + // query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1') + // query=(featureDetails.userName eq "user") and (targetNames eq "target_1") // Supported fields: // severity // status @@ -66,6 +68,8 @@ type ListAlertsRequest struct { // displayName // timeCreated // timeUpdated + // featureDetails.* (* can be any field in nestedStrMap in Feature Attributes in Alert Summary. For example - + // userName,object,clientHostname,osUserName,clientIPs,clientId,commandText,commandParam,clientProgram,objectType,targetOwner) ScimQuery *string `mandatory:"false" contributesTo:"query" name:"scimQuery"` // Specifies a subset of fields to be returned in the response. diff --git a/datasafe/list_audit_policy_analytics_request_response.go b/datasafe/list_audit_policy_analytics_request_response.go new file mode 100644 index 0000000000..d0d299662c --- /dev/null +++ b/datasafe/list_audit_policy_analytics_request_response.go @@ -0,0 +1,353 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAuditPolicyAnalyticsRequest wrapper for the ListAuditPolicyAnalytics operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListAuditPolicyAnalytics.go.html to see an example of how to use ListAuditPolicyAnalyticsRequest. +type ListAuditPolicyAnalyticsRequest struct { + + // A filter to return only resources that match the specified compartment OCID. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Default is false. + // When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + // Setting this to ACCESSIBLE returns only those compartments for which the + // user has INSPECT permissions directly or indirectly (permissions can be on a + // resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + AccessLevel ListAuditPolicyAnalyticsAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"accessLevel" omitEmpty:"true"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The group by parameter to summarize audit policy aggregation. + GroupBy []ListAuditPolicyAnalyticsGroupByEnum `contributesTo:"query" name:"groupBy" omitEmpty:"true" collectionFormat:"multi"` + + // The category to which the audit policy belongs to. + AuditPolicyCategory ListAuditPolicyAnalyticsAuditPolicyCategoryEnum `mandatory:"false" contributesTo:"query" name:"auditPolicyCategory" omitEmpty:"true"` + + // In case of seeded policies, it is the policy name defined by Data Safe. + // In case of custom Policies, it is the policy name that is used to create the policies on the target database. + // In case of Oracle Pre-seeded policies, it is the default policy name of the same. + AuditPolicyName *string `mandatory:"false" contributesTo:"query" name:"auditPolicyName"` + + // A filter to return only items related to a specific target OCID. + TargetId *string `mandatory:"false" contributesTo:"query" name:"targetId"` + + // The current state of the audit policy. + LifecycleState ListAuditPolicyAnalyticsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAuditPolicyAnalyticsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAuditPolicyAnalyticsRequest) 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 ListAuditPolicyAnalyticsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAuditPolicyAnalyticsRequest) 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 ListAuditPolicyAnalyticsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAuditPolicyAnalyticsAccessLevelEnum(string(request.AccessLevel)); !ok && request.AccessLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessLevel: %s. Supported values are: %s.", request.AccessLevel, strings.Join(GetListAuditPolicyAnalyticsAccessLevelEnumStringValues(), ","))) + } + for _, val := range request.GroupBy { + if _, ok := GetMappingListAuditPolicyAnalyticsGroupByEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for GroupBy: %s. Supported values are: %s.", val, strings.Join(GetListAuditPolicyAnalyticsGroupByEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingListAuditPolicyAnalyticsAuditPolicyCategoryEnum(string(request.AuditPolicyCategory)); !ok && request.AuditPolicyCategory != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuditPolicyCategory: %s. Supported values are: %s.", request.AuditPolicyCategory, strings.Join(GetListAuditPolicyAnalyticsAuditPolicyCategoryEnumStringValues(), ","))) + } + if _, ok := GetMappingListAuditPolicyAnalyticsLifecycleStateEnum(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(GetListAuditPolicyAnalyticsLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAuditPolicyAnalyticsResponse wrapper for the ListAuditPolicyAnalytics operation +type ListAuditPolicyAnalyticsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AuditPolicyAnalyticCollection instances + AuditPolicyAnalyticCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListAuditPolicyAnalyticsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAuditPolicyAnalyticsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAuditPolicyAnalyticsAccessLevelEnum Enum with underlying type: string +type ListAuditPolicyAnalyticsAccessLevelEnum string + +// Set of constants representing the allowable values for ListAuditPolicyAnalyticsAccessLevelEnum +const ( + ListAuditPolicyAnalyticsAccessLevelRestricted ListAuditPolicyAnalyticsAccessLevelEnum = "RESTRICTED" + ListAuditPolicyAnalyticsAccessLevelAccessible ListAuditPolicyAnalyticsAccessLevelEnum = "ACCESSIBLE" +) + +var mappingListAuditPolicyAnalyticsAccessLevelEnum = map[string]ListAuditPolicyAnalyticsAccessLevelEnum{ + "RESTRICTED": ListAuditPolicyAnalyticsAccessLevelRestricted, + "ACCESSIBLE": ListAuditPolicyAnalyticsAccessLevelAccessible, +} + +var mappingListAuditPolicyAnalyticsAccessLevelEnumLowerCase = map[string]ListAuditPolicyAnalyticsAccessLevelEnum{ + "restricted": ListAuditPolicyAnalyticsAccessLevelRestricted, + "accessible": ListAuditPolicyAnalyticsAccessLevelAccessible, +} + +// GetListAuditPolicyAnalyticsAccessLevelEnumValues Enumerates the set of values for ListAuditPolicyAnalyticsAccessLevelEnum +func GetListAuditPolicyAnalyticsAccessLevelEnumValues() []ListAuditPolicyAnalyticsAccessLevelEnum { + values := make([]ListAuditPolicyAnalyticsAccessLevelEnum, 0) + for _, v := range mappingListAuditPolicyAnalyticsAccessLevelEnum { + values = append(values, v) + } + return values +} + +// GetListAuditPolicyAnalyticsAccessLevelEnumStringValues Enumerates the set of values in String for ListAuditPolicyAnalyticsAccessLevelEnum +func GetListAuditPolicyAnalyticsAccessLevelEnumStringValues() []string { + return []string{ + "RESTRICTED", + "ACCESSIBLE", + } +} + +// GetMappingListAuditPolicyAnalyticsAccessLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAuditPolicyAnalyticsAccessLevelEnum(val string) (ListAuditPolicyAnalyticsAccessLevelEnum, bool) { + enum, ok := mappingListAuditPolicyAnalyticsAccessLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAuditPolicyAnalyticsGroupByEnum Enum with underlying type: string +type ListAuditPolicyAnalyticsGroupByEnum string + +// Set of constants representing the allowable values for ListAuditPolicyAnalyticsGroupByEnum +const ( + ListAuditPolicyAnalyticsGroupByAuditpolicycategory ListAuditPolicyAnalyticsGroupByEnum = "auditPolicyCategory" + ListAuditPolicyAnalyticsGroupByAuditpolicyname ListAuditPolicyAnalyticsGroupByEnum = "auditPolicyName" + ListAuditPolicyAnalyticsGroupByTargetid ListAuditPolicyAnalyticsGroupByEnum = "targetId" +) + +var mappingListAuditPolicyAnalyticsGroupByEnum = map[string]ListAuditPolicyAnalyticsGroupByEnum{ + "auditPolicyCategory": ListAuditPolicyAnalyticsGroupByAuditpolicycategory, + "auditPolicyName": ListAuditPolicyAnalyticsGroupByAuditpolicyname, + "targetId": ListAuditPolicyAnalyticsGroupByTargetid, +} + +var mappingListAuditPolicyAnalyticsGroupByEnumLowerCase = map[string]ListAuditPolicyAnalyticsGroupByEnum{ + "auditpolicycategory": ListAuditPolicyAnalyticsGroupByAuditpolicycategory, + "auditpolicyname": ListAuditPolicyAnalyticsGroupByAuditpolicyname, + "targetid": ListAuditPolicyAnalyticsGroupByTargetid, +} + +// GetListAuditPolicyAnalyticsGroupByEnumValues Enumerates the set of values for ListAuditPolicyAnalyticsGroupByEnum +func GetListAuditPolicyAnalyticsGroupByEnumValues() []ListAuditPolicyAnalyticsGroupByEnum { + values := make([]ListAuditPolicyAnalyticsGroupByEnum, 0) + for _, v := range mappingListAuditPolicyAnalyticsGroupByEnum { + values = append(values, v) + } + return values +} + +// GetListAuditPolicyAnalyticsGroupByEnumStringValues Enumerates the set of values in String for ListAuditPolicyAnalyticsGroupByEnum +func GetListAuditPolicyAnalyticsGroupByEnumStringValues() []string { + return []string{ + "auditPolicyCategory", + "auditPolicyName", + "targetId", + } +} + +// GetMappingListAuditPolicyAnalyticsGroupByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAuditPolicyAnalyticsGroupByEnum(val string) (ListAuditPolicyAnalyticsGroupByEnum, bool) { + enum, ok := mappingListAuditPolicyAnalyticsGroupByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAuditPolicyAnalyticsAuditPolicyCategoryEnum Enum with underlying type: string +type ListAuditPolicyAnalyticsAuditPolicyCategoryEnum string + +// Set of constants representing the allowable values for ListAuditPolicyAnalyticsAuditPolicyCategoryEnum +const ( + ListAuditPolicyAnalyticsAuditPolicyCategoryBasicActivity ListAuditPolicyAnalyticsAuditPolicyCategoryEnum = "BASIC_ACTIVITY" + ListAuditPolicyAnalyticsAuditPolicyCategoryAdminUserActivity ListAuditPolicyAnalyticsAuditPolicyCategoryEnum = "ADMIN_USER_ACTIVITY" + ListAuditPolicyAnalyticsAuditPolicyCategoryUserActivity ListAuditPolicyAnalyticsAuditPolicyCategoryEnum = "USER_ACTIVITY" + ListAuditPolicyAnalyticsAuditPolicyCategoryOraclePredefined ListAuditPolicyAnalyticsAuditPolicyCategoryEnum = "ORACLE_PREDEFINED" + ListAuditPolicyAnalyticsAuditPolicyCategoryComplianceStandard ListAuditPolicyAnalyticsAuditPolicyCategoryEnum = "COMPLIANCE_STANDARD" + ListAuditPolicyAnalyticsAuditPolicyCategoryCustom ListAuditPolicyAnalyticsAuditPolicyCategoryEnum = "CUSTOM" +) + +var mappingListAuditPolicyAnalyticsAuditPolicyCategoryEnum = map[string]ListAuditPolicyAnalyticsAuditPolicyCategoryEnum{ + "BASIC_ACTIVITY": ListAuditPolicyAnalyticsAuditPolicyCategoryBasicActivity, + "ADMIN_USER_ACTIVITY": ListAuditPolicyAnalyticsAuditPolicyCategoryAdminUserActivity, + "USER_ACTIVITY": ListAuditPolicyAnalyticsAuditPolicyCategoryUserActivity, + "ORACLE_PREDEFINED": ListAuditPolicyAnalyticsAuditPolicyCategoryOraclePredefined, + "COMPLIANCE_STANDARD": ListAuditPolicyAnalyticsAuditPolicyCategoryComplianceStandard, + "CUSTOM": ListAuditPolicyAnalyticsAuditPolicyCategoryCustom, +} + +var mappingListAuditPolicyAnalyticsAuditPolicyCategoryEnumLowerCase = map[string]ListAuditPolicyAnalyticsAuditPolicyCategoryEnum{ + "basic_activity": ListAuditPolicyAnalyticsAuditPolicyCategoryBasicActivity, + "admin_user_activity": ListAuditPolicyAnalyticsAuditPolicyCategoryAdminUserActivity, + "user_activity": ListAuditPolicyAnalyticsAuditPolicyCategoryUserActivity, + "oracle_predefined": ListAuditPolicyAnalyticsAuditPolicyCategoryOraclePredefined, + "compliance_standard": ListAuditPolicyAnalyticsAuditPolicyCategoryComplianceStandard, + "custom": ListAuditPolicyAnalyticsAuditPolicyCategoryCustom, +} + +// GetListAuditPolicyAnalyticsAuditPolicyCategoryEnumValues Enumerates the set of values for ListAuditPolicyAnalyticsAuditPolicyCategoryEnum +func GetListAuditPolicyAnalyticsAuditPolicyCategoryEnumValues() []ListAuditPolicyAnalyticsAuditPolicyCategoryEnum { + values := make([]ListAuditPolicyAnalyticsAuditPolicyCategoryEnum, 0) + for _, v := range mappingListAuditPolicyAnalyticsAuditPolicyCategoryEnum { + values = append(values, v) + } + return values +} + +// GetListAuditPolicyAnalyticsAuditPolicyCategoryEnumStringValues Enumerates the set of values in String for ListAuditPolicyAnalyticsAuditPolicyCategoryEnum +func GetListAuditPolicyAnalyticsAuditPolicyCategoryEnumStringValues() []string { + return []string{ + "BASIC_ACTIVITY", + "ADMIN_USER_ACTIVITY", + "USER_ACTIVITY", + "ORACLE_PREDEFINED", + "COMPLIANCE_STANDARD", + "CUSTOM", + } +} + +// GetMappingListAuditPolicyAnalyticsAuditPolicyCategoryEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAuditPolicyAnalyticsAuditPolicyCategoryEnum(val string) (ListAuditPolicyAnalyticsAuditPolicyCategoryEnum, bool) { + enum, ok := mappingListAuditPolicyAnalyticsAuditPolicyCategoryEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAuditPolicyAnalyticsLifecycleStateEnum Enum with underlying type: string +type ListAuditPolicyAnalyticsLifecycleStateEnum string + +// Set of constants representing the allowable values for ListAuditPolicyAnalyticsLifecycleStateEnum +const ( + ListAuditPolicyAnalyticsLifecycleStateCreating ListAuditPolicyAnalyticsLifecycleStateEnum = "CREATING" + ListAuditPolicyAnalyticsLifecycleStateUpdating ListAuditPolicyAnalyticsLifecycleStateEnum = "UPDATING" + ListAuditPolicyAnalyticsLifecycleStateActive ListAuditPolicyAnalyticsLifecycleStateEnum = "ACTIVE" + ListAuditPolicyAnalyticsLifecycleStateFailed ListAuditPolicyAnalyticsLifecycleStateEnum = "FAILED" + ListAuditPolicyAnalyticsLifecycleStateNeedsAttention ListAuditPolicyAnalyticsLifecycleStateEnum = "NEEDS_ATTENTION" + ListAuditPolicyAnalyticsLifecycleStateDeleting ListAuditPolicyAnalyticsLifecycleStateEnum = "DELETING" + ListAuditPolicyAnalyticsLifecycleStateDeleted ListAuditPolicyAnalyticsLifecycleStateEnum = "DELETED" +) + +var mappingListAuditPolicyAnalyticsLifecycleStateEnum = map[string]ListAuditPolicyAnalyticsLifecycleStateEnum{ + "CREATING": ListAuditPolicyAnalyticsLifecycleStateCreating, + "UPDATING": ListAuditPolicyAnalyticsLifecycleStateUpdating, + "ACTIVE": ListAuditPolicyAnalyticsLifecycleStateActive, + "FAILED": ListAuditPolicyAnalyticsLifecycleStateFailed, + "NEEDS_ATTENTION": ListAuditPolicyAnalyticsLifecycleStateNeedsAttention, + "DELETING": ListAuditPolicyAnalyticsLifecycleStateDeleting, + "DELETED": ListAuditPolicyAnalyticsLifecycleStateDeleted, +} + +var mappingListAuditPolicyAnalyticsLifecycleStateEnumLowerCase = map[string]ListAuditPolicyAnalyticsLifecycleStateEnum{ + "creating": ListAuditPolicyAnalyticsLifecycleStateCreating, + "updating": ListAuditPolicyAnalyticsLifecycleStateUpdating, + "active": ListAuditPolicyAnalyticsLifecycleStateActive, + "failed": ListAuditPolicyAnalyticsLifecycleStateFailed, + "needs_attention": ListAuditPolicyAnalyticsLifecycleStateNeedsAttention, + "deleting": ListAuditPolicyAnalyticsLifecycleStateDeleting, + "deleted": ListAuditPolicyAnalyticsLifecycleStateDeleted, +} + +// GetListAuditPolicyAnalyticsLifecycleStateEnumValues Enumerates the set of values for ListAuditPolicyAnalyticsLifecycleStateEnum +func GetListAuditPolicyAnalyticsLifecycleStateEnumValues() []ListAuditPolicyAnalyticsLifecycleStateEnum { + values := make([]ListAuditPolicyAnalyticsLifecycleStateEnum, 0) + for _, v := range mappingListAuditPolicyAnalyticsLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListAuditPolicyAnalyticsLifecycleStateEnumStringValues Enumerates the set of values in String for ListAuditPolicyAnalyticsLifecycleStateEnum +func GetListAuditPolicyAnalyticsLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "FAILED", + "NEEDS_ATTENTION", + "DELETING", + "DELETED", + } +} + +// GetMappingListAuditPolicyAnalyticsLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAuditPolicyAnalyticsLifecycleStateEnum(val string) (ListAuditPolicyAnalyticsLifecycleStateEnum, bool) { + enum, ok := mappingListAuditPolicyAnalyticsLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_difference_columns_request_response.go b/datasafe/list_difference_columns_request_response.go new file mode 100644 index 0000000000..300314e981 --- /dev/null +++ b/datasafe/list_difference_columns_request_response.go @@ -0,0 +1,239 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDifferenceColumnsRequest wrapper for the ListDifferenceColumns operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListDifferenceColumns.go.html to see an example of how to use ListDifferenceColumnsRequest. +type ListDifferenceColumnsRequest struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"true" contributesTo:"path" name:"sdmMaskingPolicyDifferenceId"` + + // A filter to return only the SDM masking policy difference columns that match the specified difference type + DifferenceType SdmMaskingPolicyDifferenceDifferenceTypeEnum `mandatory:"false" contributesTo:"query" name:"differenceType" omitEmpty:"true"` + + // A filter to return only the SDM masking policy difference columns that match the specified planned action. + PlannedAction DifferenceColumnPlannedActionEnum `mandatory:"false" contributesTo:"query" name:"plannedAction" omitEmpty:"true"` + + // A filter to return the SDM masking policy difference columns based on the value of their syncStatus attribute. + SyncStatus DifferenceColumnSyncStatusEnum `mandatory:"false" contributesTo:"query" name:"syncStatus" omitEmpty:"true"` + + // A filter to return only items related to specific schema name. + SchemaName []string `contributesTo:"query" name:"schemaName" collectionFormat:"multi"` + + // A filter to return only items related to a specific object name. + ObjectName []string `contributesTo:"query" name:"objectName" collectionFormat:"multi"` + + // A filter to return only a specific column based on column name. + ColumnName []string `contributesTo:"query" name:"columnName" collectionFormat:"multi"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListDifferenceColumnsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. You can specify only one sort order (sortOrder). The default order for schemaName is descending. + // The default order for differenceType, schemaName, objectName, columnName and plannedAction is ascending. + SortBy ListDifferenceColumnsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // 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 ListDifferenceColumnsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDifferenceColumnsRequest) 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 ListDifferenceColumnsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDifferenceColumnsRequest) 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 ListDifferenceColumnsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSdmMaskingPolicyDifferenceDifferenceTypeEnum(string(request.DifferenceType)); !ok && request.DifferenceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DifferenceType: %s. Supported values are: %s.", request.DifferenceType, strings.Join(GetSdmMaskingPolicyDifferenceDifferenceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingDifferenceColumnPlannedActionEnum(string(request.PlannedAction)); !ok && request.PlannedAction != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PlannedAction: %s. Supported values are: %s.", request.PlannedAction, strings.Join(GetDifferenceColumnPlannedActionEnumStringValues(), ","))) + } + if _, ok := GetMappingDifferenceColumnSyncStatusEnum(string(request.SyncStatus)); !ok && request.SyncStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SyncStatus: %s. Supported values are: %s.", request.SyncStatus, strings.Join(GetDifferenceColumnSyncStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListDifferenceColumnsSortOrderEnum(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(GetListDifferenceColumnsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListDifferenceColumnsSortByEnum(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(GetListDifferenceColumnsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDifferenceColumnsResponse wrapper for the ListDifferenceColumns operation +type ListDifferenceColumnsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SdmMaskingPolicyDifferenceColumnCollection instances + SdmMaskingPolicyDifferenceColumnCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListDifferenceColumnsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDifferenceColumnsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDifferenceColumnsSortOrderEnum Enum with underlying type: string +type ListDifferenceColumnsSortOrderEnum string + +// Set of constants representing the allowable values for ListDifferenceColumnsSortOrderEnum +const ( + ListDifferenceColumnsSortOrderAsc ListDifferenceColumnsSortOrderEnum = "ASC" + ListDifferenceColumnsSortOrderDesc ListDifferenceColumnsSortOrderEnum = "DESC" +) + +var mappingListDifferenceColumnsSortOrderEnum = map[string]ListDifferenceColumnsSortOrderEnum{ + "ASC": ListDifferenceColumnsSortOrderAsc, + "DESC": ListDifferenceColumnsSortOrderDesc, +} + +var mappingListDifferenceColumnsSortOrderEnumLowerCase = map[string]ListDifferenceColumnsSortOrderEnum{ + "asc": ListDifferenceColumnsSortOrderAsc, + "desc": ListDifferenceColumnsSortOrderDesc, +} + +// GetListDifferenceColumnsSortOrderEnumValues Enumerates the set of values for ListDifferenceColumnsSortOrderEnum +func GetListDifferenceColumnsSortOrderEnumValues() []ListDifferenceColumnsSortOrderEnum { + values := make([]ListDifferenceColumnsSortOrderEnum, 0) + for _, v := range mappingListDifferenceColumnsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDifferenceColumnsSortOrderEnumStringValues Enumerates the set of values in String for ListDifferenceColumnsSortOrderEnum +func GetListDifferenceColumnsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDifferenceColumnsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDifferenceColumnsSortOrderEnum(val string) (ListDifferenceColumnsSortOrderEnum, bool) { + enum, ok := mappingListDifferenceColumnsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDifferenceColumnsSortByEnum Enum with underlying type: string +type ListDifferenceColumnsSortByEnum string + +// Set of constants representing the allowable values for ListDifferenceColumnsSortByEnum +const ( + ListDifferenceColumnsSortByDifferencetype ListDifferenceColumnsSortByEnum = "differenceType" + ListDifferenceColumnsSortBySchemaname ListDifferenceColumnsSortByEnum = "schemaName" + ListDifferenceColumnsSortByObjectname ListDifferenceColumnsSortByEnum = "objectName" + ListDifferenceColumnsSortByColumnname ListDifferenceColumnsSortByEnum = "columnName" + ListDifferenceColumnsSortByPlannedaction ListDifferenceColumnsSortByEnum = "plannedAction" +) + +var mappingListDifferenceColumnsSortByEnum = map[string]ListDifferenceColumnsSortByEnum{ + "differenceType": ListDifferenceColumnsSortByDifferencetype, + "schemaName": ListDifferenceColumnsSortBySchemaname, + "objectName": ListDifferenceColumnsSortByObjectname, + "columnName": ListDifferenceColumnsSortByColumnname, + "plannedAction": ListDifferenceColumnsSortByPlannedaction, +} + +var mappingListDifferenceColumnsSortByEnumLowerCase = map[string]ListDifferenceColumnsSortByEnum{ + "differencetype": ListDifferenceColumnsSortByDifferencetype, + "schemaname": ListDifferenceColumnsSortBySchemaname, + "objectname": ListDifferenceColumnsSortByObjectname, + "columnname": ListDifferenceColumnsSortByColumnname, + "plannedaction": ListDifferenceColumnsSortByPlannedaction, +} + +// GetListDifferenceColumnsSortByEnumValues Enumerates the set of values for ListDifferenceColumnsSortByEnum +func GetListDifferenceColumnsSortByEnumValues() []ListDifferenceColumnsSortByEnum { + values := make([]ListDifferenceColumnsSortByEnum, 0) + for _, v := range mappingListDifferenceColumnsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDifferenceColumnsSortByEnumStringValues Enumerates the set of values in String for ListDifferenceColumnsSortByEnum +func GetListDifferenceColumnsSortByEnumStringValues() []string { + return []string{ + "differenceType", + "schemaName", + "objectName", + "columnName", + "plannedAction", + } +} + +// GetMappingListDifferenceColumnsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDifferenceColumnsSortByEnum(val string) (ListDifferenceColumnsSortByEnum, bool) { + enum, ok := mappingListDifferenceColumnsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_findings_request_response.go b/datasafe/list_findings_request_response.go index 50bcf50801..d401d24c1a 100644 --- a/datasafe/list_findings_request_response.go +++ b/datasafe/list_findings_request_response.go @@ -27,6 +27,9 @@ type ListFindingsRequest struct { // A filter to return only findings of a particular risk level. Severity ListFindingsSeverityEnum `mandatory:"false" contributesTo:"query" name:"severity" omitEmpty:"true"` + // An optional filter to return only findings containing the specified reference. + References ListFindingsReferencesEnum `mandatory:"false" contributesTo:"query" name:"references" omitEmpty:"true"` + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` @@ -85,6 +88,9 @@ func (request ListFindingsRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingListFindingsSeverityEnum(string(request.Severity)); !ok && request.Severity != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", request.Severity, strings.Join(GetListFindingsSeverityEnumStringValues(), ","))) } + if _, ok := GetMappingListFindingsReferencesEnum(string(request.References)); !ok && request.References != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for References: %s. Supported values are: %s.", request.References, strings.Join(GetListFindingsReferencesEnumStringValues(), ","))) + } if _, ok := GetMappingListFindingsAccessLevelEnum(string(request.AccessLevel)); !ok && request.AccessLevel != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessLevel: %s. Supported values are: %s.", request.AccessLevel, strings.Join(GetListFindingsAccessLevelEnumStringValues(), ","))) } @@ -182,6 +188,52 @@ func GetMappingListFindingsSeverityEnum(val string) (ListFindingsSeverityEnum, b return enum, ok } +// ListFindingsReferencesEnum Enum with underlying type: string +type ListFindingsReferencesEnum string + +// Set of constants representing the allowable values for ListFindingsReferencesEnum +const ( + ListFindingsReferencesStig ListFindingsReferencesEnum = "STIG" + ListFindingsReferencesCis ListFindingsReferencesEnum = "CIS" + ListFindingsReferencesGdpr ListFindingsReferencesEnum = "GDPR" +) + +var mappingListFindingsReferencesEnum = map[string]ListFindingsReferencesEnum{ + "STIG": ListFindingsReferencesStig, + "CIS": ListFindingsReferencesCis, + "GDPR": ListFindingsReferencesGdpr, +} + +var mappingListFindingsReferencesEnumLowerCase = map[string]ListFindingsReferencesEnum{ + "stig": ListFindingsReferencesStig, + "cis": ListFindingsReferencesCis, + "gdpr": ListFindingsReferencesGdpr, +} + +// GetListFindingsReferencesEnumValues Enumerates the set of values for ListFindingsReferencesEnum +func GetListFindingsReferencesEnumValues() []ListFindingsReferencesEnum { + values := make([]ListFindingsReferencesEnum, 0) + for _, v := range mappingListFindingsReferencesEnum { + values = append(values, v) + } + return values +} + +// GetListFindingsReferencesEnumStringValues Enumerates the set of values in String for ListFindingsReferencesEnum +func GetListFindingsReferencesEnumStringValues() []string { + return []string{ + "STIG", + "CIS", + "GDPR", + } +} + +// GetMappingListFindingsReferencesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListFindingsReferencesEnum(val string) (ListFindingsReferencesEnum, bool) { + enum, ok := mappingListFindingsReferencesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + // ListFindingsAccessLevelEnum Enum with underlying type: string type ListFindingsAccessLevelEnum string diff --git a/datasafe/list_masking_objects_request_response.go b/datasafe/list_masking_objects_request_response.go new file mode 100644 index 0000000000..cb505a045c --- /dev/null +++ b/datasafe/list_masking_objects_request_response.go @@ -0,0 +1,265 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMaskingObjectsRequest wrapper for the ListMaskingObjects operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListMaskingObjects.go.html to see an example of how to use ListMaskingObjectsRequest. +type ListMaskingObjectsRequest struct { + + // The OCID of the masking policy. + MaskingPolicyId *string `mandatory:"true" contributesTo:"path" name:"maskingPolicyId"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListMaskingObjectsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. You can specify only one sort order (sortOrder). + // The default order is ascending. + SortBy ListMaskingObjectsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // A filter to return only items related to specific schema name. + SchemaName []string `contributesTo:"query" name:"schemaName" collectionFormat:"multi"` + + // A filter to return only items related to a specific object name. + ObjectName []string `contributesTo:"query" name:"objectName" collectionFormat:"multi"` + + // A filter to return only items related to a specific object type. + ObjectType []ListMaskingObjectsObjectTypeEnum `contributesTo:"query" name:"objectType" omitEmpty:"true" collectionFormat:"multi"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListMaskingObjectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMaskingObjectsRequest) 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 ListMaskingObjectsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMaskingObjectsRequest) 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 ListMaskingObjectsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListMaskingObjectsSortOrderEnum(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(GetListMaskingObjectsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListMaskingObjectsSortByEnum(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(GetListMaskingObjectsSortByEnumStringValues(), ","))) + } + for _, val := range request.ObjectType { + if _, ok := GetMappingListMaskingObjectsObjectTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ObjectType: %s. Supported values are: %s.", val, strings.Join(GetListMaskingObjectsObjectTypeEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMaskingObjectsResponse wrapper for the ListMaskingObjects operation +type ListMaskingObjectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of MaskingObjectCollection instances + MaskingObjectCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListMaskingObjectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMaskingObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListMaskingObjectsSortOrderEnum Enum with underlying type: string +type ListMaskingObjectsSortOrderEnum string + +// Set of constants representing the allowable values for ListMaskingObjectsSortOrderEnum +const ( + ListMaskingObjectsSortOrderAsc ListMaskingObjectsSortOrderEnum = "ASC" + ListMaskingObjectsSortOrderDesc ListMaskingObjectsSortOrderEnum = "DESC" +) + +var mappingListMaskingObjectsSortOrderEnum = map[string]ListMaskingObjectsSortOrderEnum{ + "ASC": ListMaskingObjectsSortOrderAsc, + "DESC": ListMaskingObjectsSortOrderDesc, +} + +var mappingListMaskingObjectsSortOrderEnumLowerCase = map[string]ListMaskingObjectsSortOrderEnum{ + "asc": ListMaskingObjectsSortOrderAsc, + "desc": ListMaskingObjectsSortOrderDesc, +} + +// GetListMaskingObjectsSortOrderEnumValues Enumerates the set of values for ListMaskingObjectsSortOrderEnum +func GetListMaskingObjectsSortOrderEnumValues() []ListMaskingObjectsSortOrderEnum { + values := make([]ListMaskingObjectsSortOrderEnum, 0) + for _, v := range mappingListMaskingObjectsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListMaskingObjectsSortOrderEnumStringValues Enumerates the set of values in String for ListMaskingObjectsSortOrderEnum +func GetListMaskingObjectsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListMaskingObjectsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMaskingObjectsSortOrderEnum(val string) (ListMaskingObjectsSortOrderEnum, bool) { + enum, ok := mappingListMaskingObjectsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListMaskingObjectsSortByEnum Enum with underlying type: string +type ListMaskingObjectsSortByEnum string + +// Set of constants representing the allowable values for ListMaskingObjectsSortByEnum +const ( + ListMaskingObjectsSortBySchemaname ListMaskingObjectsSortByEnum = "schemaName" + ListMaskingObjectsSortByObjectname ListMaskingObjectsSortByEnum = "objectName" + ListMaskingObjectsSortByObjecttype ListMaskingObjectsSortByEnum = "objectType" +) + +var mappingListMaskingObjectsSortByEnum = map[string]ListMaskingObjectsSortByEnum{ + "schemaName": ListMaskingObjectsSortBySchemaname, + "objectName": ListMaskingObjectsSortByObjectname, + "objectType": ListMaskingObjectsSortByObjecttype, +} + +var mappingListMaskingObjectsSortByEnumLowerCase = map[string]ListMaskingObjectsSortByEnum{ + "schemaname": ListMaskingObjectsSortBySchemaname, + "objectname": ListMaskingObjectsSortByObjectname, + "objecttype": ListMaskingObjectsSortByObjecttype, +} + +// GetListMaskingObjectsSortByEnumValues Enumerates the set of values for ListMaskingObjectsSortByEnum +func GetListMaskingObjectsSortByEnumValues() []ListMaskingObjectsSortByEnum { + values := make([]ListMaskingObjectsSortByEnum, 0) + for _, v := range mappingListMaskingObjectsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListMaskingObjectsSortByEnumStringValues Enumerates the set of values in String for ListMaskingObjectsSortByEnum +func GetListMaskingObjectsSortByEnumStringValues() []string { + return []string{ + "schemaName", + "objectName", + "objectType", + } +} + +// GetMappingListMaskingObjectsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMaskingObjectsSortByEnum(val string) (ListMaskingObjectsSortByEnum, bool) { + enum, ok := mappingListMaskingObjectsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListMaskingObjectsObjectTypeEnum Enum with underlying type: string +type ListMaskingObjectsObjectTypeEnum string + +// Set of constants representing the allowable values for ListMaskingObjectsObjectTypeEnum +const ( + ListMaskingObjectsObjectTypeAll ListMaskingObjectsObjectTypeEnum = "ALL" + ListMaskingObjectsObjectTypeTable ListMaskingObjectsObjectTypeEnum = "TABLE" + ListMaskingObjectsObjectTypeEditioningView ListMaskingObjectsObjectTypeEnum = "EDITIONING_VIEW" +) + +var mappingListMaskingObjectsObjectTypeEnum = map[string]ListMaskingObjectsObjectTypeEnum{ + "ALL": ListMaskingObjectsObjectTypeAll, + "TABLE": ListMaskingObjectsObjectTypeTable, + "EDITIONING_VIEW": ListMaskingObjectsObjectTypeEditioningView, +} + +var mappingListMaskingObjectsObjectTypeEnumLowerCase = map[string]ListMaskingObjectsObjectTypeEnum{ + "all": ListMaskingObjectsObjectTypeAll, + "table": ListMaskingObjectsObjectTypeTable, + "editioning_view": ListMaskingObjectsObjectTypeEditioningView, +} + +// GetListMaskingObjectsObjectTypeEnumValues Enumerates the set of values for ListMaskingObjectsObjectTypeEnum +func GetListMaskingObjectsObjectTypeEnumValues() []ListMaskingObjectsObjectTypeEnum { + values := make([]ListMaskingObjectsObjectTypeEnum, 0) + for _, v := range mappingListMaskingObjectsObjectTypeEnum { + values = append(values, v) + } + return values +} + +// GetListMaskingObjectsObjectTypeEnumStringValues Enumerates the set of values in String for ListMaskingObjectsObjectTypeEnum +func GetListMaskingObjectsObjectTypeEnumStringValues() []string { + return []string{ + "ALL", + "TABLE", + "EDITIONING_VIEW", + } +} + +// GetMappingListMaskingObjectsObjectTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMaskingObjectsObjectTypeEnum(val string) (ListMaskingObjectsObjectTypeEnum, bool) { + enum, ok := mappingListMaskingObjectsObjectTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_masking_schemas_request_response.go b/datasafe/list_masking_schemas_request_response.go new file mode 100644 index 0000000000..80c4024258 --- /dev/null +++ b/datasafe/list_masking_schemas_request_response.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMaskingSchemasRequest wrapper for the ListMaskingSchemas operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListMaskingSchemas.go.html to see an example of how to use ListMaskingSchemasRequest. +type ListMaskingSchemasRequest struct { + + // The OCID of the masking policy. + MaskingPolicyId *string `mandatory:"true" contributesTo:"path" name:"maskingPolicyId"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListMaskingSchemasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. You can specify only one sort order (sortOrder). + // The default order is ascending. + SortBy ListMaskingSchemasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // A filter to return only items related to specific schema name. + SchemaName []string `contributesTo:"query" name:"schemaName" collectionFormat:"multi"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListMaskingSchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMaskingSchemasRequest) 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 ListMaskingSchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMaskingSchemasRequest) 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 ListMaskingSchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListMaskingSchemasSortOrderEnum(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(GetListMaskingSchemasSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListMaskingSchemasSortByEnum(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(GetListMaskingSchemasSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMaskingSchemasResponse wrapper for the ListMaskingSchemas operation +type ListMaskingSchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of MaskingSchemaCollection instances + MaskingSchemaCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListMaskingSchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMaskingSchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListMaskingSchemasSortOrderEnum Enum with underlying type: string +type ListMaskingSchemasSortOrderEnum string + +// Set of constants representing the allowable values for ListMaskingSchemasSortOrderEnum +const ( + ListMaskingSchemasSortOrderAsc ListMaskingSchemasSortOrderEnum = "ASC" + ListMaskingSchemasSortOrderDesc ListMaskingSchemasSortOrderEnum = "DESC" +) + +var mappingListMaskingSchemasSortOrderEnum = map[string]ListMaskingSchemasSortOrderEnum{ + "ASC": ListMaskingSchemasSortOrderAsc, + "DESC": ListMaskingSchemasSortOrderDesc, +} + +var mappingListMaskingSchemasSortOrderEnumLowerCase = map[string]ListMaskingSchemasSortOrderEnum{ + "asc": ListMaskingSchemasSortOrderAsc, + "desc": ListMaskingSchemasSortOrderDesc, +} + +// GetListMaskingSchemasSortOrderEnumValues Enumerates the set of values for ListMaskingSchemasSortOrderEnum +func GetListMaskingSchemasSortOrderEnumValues() []ListMaskingSchemasSortOrderEnum { + values := make([]ListMaskingSchemasSortOrderEnum, 0) + for _, v := range mappingListMaskingSchemasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListMaskingSchemasSortOrderEnumStringValues Enumerates the set of values in String for ListMaskingSchemasSortOrderEnum +func GetListMaskingSchemasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListMaskingSchemasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMaskingSchemasSortOrderEnum(val string) (ListMaskingSchemasSortOrderEnum, bool) { + enum, ok := mappingListMaskingSchemasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListMaskingSchemasSortByEnum Enum with underlying type: string +type ListMaskingSchemasSortByEnum string + +// Set of constants representing the allowable values for ListMaskingSchemasSortByEnum +const ( + ListMaskingSchemasSortBySchemaname ListMaskingSchemasSortByEnum = "schemaName" +) + +var mappingListMaskingSchemasSortByEnum = map[string]ListMaskingSchemasSortByEnum{ + "schemaName": ListMaskingSchemasSortBySchemaname, +} + +var mappingListMaskingSchemasSortByEnumLowerCase = map[string]ListMaskingSchemasSortByEnum{ + "schemaname": ListMaskingSchemasSortBySchemaname, +} + +// GetListMaskingSchemasSortByEnumValues Enumerates the set of values for ListMaskingSchemasSortByEnum +func GetListMaskingSchemasSortByEnumValues() []ListMaskingSchemasSortByEnum { + values := make([]ListMaskingSchemasSortByEnum, 0) + for _, v := range mappingListMaskingSchemasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListMaskingSchemasSortByEnumStringValues Enumerates the set of values in String for ListMaskingSchemasSortByEnum +func GetListMaskingSchemasSortByEnumStringValues() []string { + return []string{ + "schemaName", + } +} + +// GetMappingListMaskingSchemasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMaskingSchemasSortByEnum(val string) (ListMaskingSchemasSortByEnum, bool) { + enum, ok := mappingListMaskingSchemasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_profile_analytics_request_response.go b/datasafe/list_profile_analytics_request_response.go new file mode 100644 index 0000000000..fd7e8c0362 --- /dev/null +++ b/datasafe/list_profile_analytics_request_response.go @@ -0,0 +1,265 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListProfileAnalyticsRequest wrapper for the ListProfileAnalytics operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListProfileAnalytics.go.html to see an example of how to use ListProfileAnalyticsRequest. +type ListProfileAnalyticsRequest struct { + + // The OCID of the user assessment. + UserAssessmentId *string `mandatory:"true" contributesTo:"path" name:"userAssessmentId"` + + // A filter to return only resources that match the specified compartment OCID. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Default is false. + // When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + // Setting this to ACCESSIBLE returns only those compartments for which the + // user has INSPECT permissions directly or indirectly (permissions can be on a + // resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + AccessLevel ListProfileAnalyticsAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"accessLevel" omitEmpty:"true"` + + // A filter to return only items related to a specific target OCID. + TargetId *string `mandatory:"false" contributesTo:"query" name:"targetId"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only items that match the specified profile name. + ProfileName *string `mandatory:"false" contributesTo:"query" name:"profileName"` + + // The field used for sorting. Only one sorting order (sortOrder) can be specified. + // The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + // The DISPLAYNAME sort order is case sensitive. + SortBy ListProfileAnalyticsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListProfileAnalyticsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListProfileAnalyticsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListProfileAnalyticsRequest) 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 ListProfileAnalyticsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListProfileAnalyticsRequest) 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 ListProfileAnalyticsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListProfileAnalyticsAccessLevelEnum(string(request.AccessLevel)); !ok && request.AccessLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessLevel: %s. Supported values are: %s.", request.AccessLevel, strings.Join(GetListProfileAnalyticsAccessLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingListProfileAnalyticsSortByEnum(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(GetListProfileAnalyticsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListProfileAnalyticsSortOrderEnum(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(GetListProfileAnalyticsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListProfileAnalyticsResponse wrapper for the ListProfileAnalytics operation +type ListProfileAnalyticsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ProfileAggregation instances + Items []ProfileAggregation `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListProfileAnalyticsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListProfileAnalyticsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListProfileAnalyticsAccessLevelEnum Enum with underlying type: string +type ListProfileAnalyticsAccessLevelEnum string + +// Set of constants representing the allowable values for ListProfileAnalyticsAccessLevelEnum +const ( + ListProfileAnalyticsAccessLevelRestricted ListProfileAnalyticsAccessLevelEnum = "RESTRICTED" + ListProfileAnalyticsAccessLevelAccessible ListProfileAnalyticsAccessLevelEnum = "ACCESSIBLE" +) + +var mappingListProfileAnalyticsAccessLevelEnum = map[string]ListProfileAnalyticsAccessLevelEnum{ + "RESTRICTED": ListProfileAnalyticsAccessLevelRestricted, + "ACCESSIBLE": ListProfileAnalyticsAccessLevelAccessible, +} + +var mappingListProfileAnalyticsAccessLevelEnumLowerCase = map[string]ListProfileAnalyticsAccessLevelEnum{ + "restricted": ListProfileAnalyticsAccessLevelRestricted, + "accessible": ListProfileAnalyticsAccessLevelAccessible, +} + +// GetListProfileAnalyticsAccessLevelEnumValues Enumerates the set of values for ListProfileAnalyticsAccessLevelEnum +func GetListProfileAnalyticsAccessLevelEnumValues() []ListProfileAnalyticsAccessLevelEnum { + values := make([]ListProfileAnalyticsAccessLevelEnum, 0) + for _, v := range mappingListProfileAnalyticsAccessLevelEnum { + values = append(values, v) + } + return values +} + +// GetListProfileAnalyticsAccessLevelEnumStringValues Enumerates the set of values in String for ListProfileAnalyticsAccessLevelEnum +func GetListProfileAnalyticsAccessLevelEnumStringValues() []string { + return []string{ + "RESTRICTED", + "ACCESSIBLE", + } +} + +// GetMappingListProfileAnalyticsAccessLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProfileAnalyticsAccessLevelEnum(val string) (ListProfileAnalyticsAccessLevelEnum, bool) { + enum, ok := mappingListProfileAnalyticsAccessLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListProfileAnalyticsSortByEnum Enum with underlying type: string +type ListProfileAnalyticsSortByEnum string + +// Set of constants representing the allowable values for ListProfileAnalyticsSortByEnum +const ( + ListProfileAnalyticsSortByTimecreated ListProfileAnalyticsSortByEnum = "TIMECREATED" + ListProfileAnalyticsSortByDisplayname ListProfileAnalyticsSortByEnum = "DISPLAYNAME" +) + +var mappingListProfileAnalyticsSortByEnum = map[string]ListProfileAnalyticsSortByEnum{ + "TIMECREATED": ListProfileAnalyticsSortByTimecreated, + "DISPLAYNAME": ListProfileAnalyticsSortByDisplayname, +} + +var mappingListProfileAnalyticsSortByEnumLowerCase = map[string]ListProfileAnalyticsSortByEnum{ + "timecreated": ListProfileAnalyticsSortByTimecreated, + "displayname": ListProfileAnalyticsSortByDisplayname, +} + +// GetListProfileAnalyticsSortByEnumValues Enumerates the set of values for ListProfileAnalyticsSortByEnum +func GetListProfileAnalyticsSortByEnumValues() []ListProfileAnalyticsSortByEnum { + values := make([]ListProfileAnalyticsSortByEnum, 0) + for _, v := range mappingListProfileAnalyticsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListProfileAnalyticsSortByEnumStringValues Enumerates the set of values in String for ListProfileAnalyticsSortByEnum +func GetListProfileAnalyticsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListProfileAnalyticsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProfileAnalyticsSortByEnum(val string) (ListProfileAnalyticsSortByEnum, bool) { + enum, ok := mappingListProfileAnalyticsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListProfileAnalyticsSortOrderEnum Enum with underlying type: string +type ListProfileAnalyticsSortOrderEnum string + +// Set of constants representing the allowable values for ListProfileAnalyticsSortOrderEnum +const ( + ListProfileAnalyticsSortOrderAsc ListProfileAnalyticsSortOrderEnum = "ASC" + ListProfileAnalyticsSortOrderDesc ListProfileAnalyticsSortOrderEnum = "DESC" +) + +var mappingListProfileAnalyticsSortOrderEnum = map[string]ListProfileAnalyticsSortOrderEnum{ + "ASC": ListProfileAnalyticsSortOrderAsc, + "DESC": ListProfileAnalyticsSortOrderDesc, +} + +var mappingListProfileAnalyticsSortOrderEnumLowerCase = map[string]ListProfileAnalyticsSortOrderEnum{ + "asc": ListProfileAnalyticsSortOrderAsc, + "desc": ListProfileAnalyticsSortOrderDesc, +} + +// GetListProfileAnalyticsSortOrderEnumValues Enumerates the set of values for ListProfileAnalyticsSortOrderEnum +func GetListProfileAnalyticsSortOrderEnumValues() []ListProfileAnalyticsSortOrderEnum { + values := make([]ListProfileAnalyticsSortOrderEnum, 0) + for _, v := range mappingListProfileAnalyticsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListProfileAnalyticsSortOrderEnumStringValues Enumerates the set of values in String for ListProfileAnalyticsSortOrderEnum +func GetListProfileAnalyticsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListProfileAnalyticsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProfileAnalyticsSortOrderEnum(val string) (ListProfileAnalyticsSortOrderEnum, bool) { + enum, ok := mappingListProfileAnalyticsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_profile_summaries_request_response.go b/datasafe/list_profile_summaries_request_response.go new file mode 100644 index 0000000000..f2898d7dd0 --- /dev/null +++ b/datasafe/list_profile_summaries_request_response.go @@ -0,0 +1,331 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListProfileSummariesRequest wrapper for the ListProfileSummaries operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListProfileSummaries.go.html to see an example of how to use ListProfileSummariesRequest. +type ListProfileSummariesRequest struct { + + // The OCID of the user assessment. + UserAssessmentId *string `mandatory:"true" contributesTo:"path" name:"userAssessmentId"` + + // A filter to return only resources that match the specified compartment OCID. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Default is false. + // When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + // Setting this to ACCESSIBLE returns only those compartments for which the + // user has INSPECT permissions directly or indirectly (permissions can be on a + // resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + AccessLevel ListProfileSummariesAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"accessLevel" omitEmpty:"true"` + + // A filter to return only items related to a specific target OCID. + TargetId *string `mandatory:"false" contributesTo:"query" name:"targetId"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // A filter to return only items that match the specified profile name. + ProfileName *string `mandatory:"false" contributesTo:"query" name:"profileName"` + + // An optional filter to return the user created profiles. + IsUserCreated *bool `mandatory:"false" contributesTo:"query" name:"isUserCreated"` + + // An optional filter to filter the profiles based on password verification function. + PasswordVerificationFunction *string `mandatory:"false" contributesTo:"query" name:"passwordVerificationFunction"` + + // An optional filter to return the profiles having user count greater than or equal to the provided value. + UserCountGreaterThanOrEqual *string `mandatory:"false" contributesTo:"query" name:"userCountGreaterThanOrEqual"` + + // An optional filter to return the profiles having user count less than the provided value. + UserCountLessThan *string `mandatory:"false" contributesTo:"query" name:"userCountLessThan"` + + // An optional filter to return the profiles having allow failed login attempts number greater than or equal to the provided value. + // String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + FailedLoginAttemptsGreaterThanOrEqual *string `mandatory:"false" contributesTo:"query" name:"failedLoginAttemptsGreaterThanOrEqual"` + + // An optional filter to return the profiles having failed login attempts number less than the provided value. + // String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + FailedLoginAttemptsLessThan *string `mandatory:"false" contributesTo:"query" name:"failedLoginAttemptsLessThan"` + + // An optional filter to return the profiles permitting the user to spawn multiple sessions having count. + // greater than or equal to the provided value. String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + SessionsPerUserGreaterThanOrEqual *string `mandatory:"false" contributesTo:"query" name:"sessionsPerUserGreaterThanOrEqual"` + + // An optional filter to return the profiles permitting the user to spawn multiple sessions having count less than + // the provided value. String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + SessionsPerUserLessThan *string `mandatory:"false" contributesTo:"query" name:"sessionsPerUserLessThan"` + + // An optional filter to return the profiles allowing inactive account time in days greater than or equal to the provided value. + // String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + InactiveAccountTimeGreaterThanOrEqual *string `mandatory:"false" contributesTo:"query" name:"inactiveAccountTimeGreaterThanOrEqual"` + + // An optional filter to return the profiles allowing inactive account time in days less than the provided value. + // String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + InactiveAccountTimeLessThan *string `mandatory:"false" contributesTo:"query" name:"inactiveAccountTimeLessThan"` + + // An optional filter to return the profiles having password lock number greater than or equal to the provided value. + // String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + PasswordLockTimeGreaterThanOrEqual *string `mandatory:"false" contributesTo:"query" name:"passwordLockTimeGreaterThanOrEqual"` + + // An optional filter to return the profiles having password lock number less than the provided value. + // String value is used for accommodating the "UNLIMITED" and "DEFAULT" values. + PasswordLockTimeLessThan *string `mandatory:"false" contributesTo:"query" name:"passwordLockTimeLessThan"` + + // The field to sort by. You can specify only one sort order (sortOrder). The default order is targetId ASC. + SortBy ListProfileSummariesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListProfileSummariesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListProfileSummariesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListProfileSummariesRequest) 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 ListProfileSummariesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListProfileSummariesRequest) 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 ListProfileSummariesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListProfileSummariesAccessLevelEnum(string(request.AccessLevel)); !ok && request.AccessLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AccessLevel: %s. Supported values are: %s.", request.AccessLevel, strings.Join(GetListProfileSummariesAccessLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingListProfileSummariesSortByEnum(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(GetListProfileSummariesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListProfileSummariesSortOrderEnum(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(GetListProfileSummariesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListProfileSummariesResponse wrapper for the ListProfileSummaries operation +type ListProfileSummariesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ProfileSummary instances + Items []ProfileSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListProfileSummariesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListProfileSummariesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListProfileSummariesAccessLevelEnum Enum with underlying type: string +type ListProfileSummariesAccessLevelEnum string + +// Set of constants representing the allowable values for ListProfileSummariesAccessLevelEnum +const ( + ListProfileSummariesAccessLevelRestricted ListProfileSummariesAccessLevelEnum = "RESTRICTED" + ListProfileSummariesAccessLevelAccessible ListProfileSummariesAccessLevelEnum = "ACCESSIBLE" +) + +var mappingListProfileSummariesAccessLevelEnum = map[string]ListProfileSummariesAccessLevelEnum{ + "RESTRICTED": ListProfileSummariesAccessLevelRestricted, + "ACCESSIBLE": ListProfileSummariesAccessLevelAccessible, +} + +var mappingListProfileSummariesAccessLevelEnumLowerCase = map[string]ListProfileSummariesAccessLevelEnum{ + "restricted": ListProfileSummariesAccessLevelRestricted, + "accessible": ListProfileSummariesAccessLevelAccessible, +} + +// GetListProfileSummariesAccessLevelEnumValues Enumerates the set of values for ListProfileSummariesAccessLevelEnum +func GetListProfileSummariesAccessLevelEnumValues() []ListProfileSummariesAccessLevelEnum { + values := make([]ListProfileSummariesAccessLevelEnum, 0) + for _, v := range mappingListProfileSummariesAccessLevelEnum { + values = append(values, v) + } + return values +} + +// GetListProfileSummariesAccessLevelEnumStringValues Enumerates the set of values in String for ListProfileSummariesAccessLevelEnum +func GetListProfileSummariesAccessLevelEnumStringValues() []string { + return []string{ + "RESTRICTED", + "ACCESSIBLE", + } +} + +// GetMappingListProfileSummariesAccessLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProfileSummariesAccessLevelEnum(val string) (ListProfileSummariesAccessLevelEnum, bool) { + enum, ok := mappingListProfileSummariesAccessLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListProfileSummariesSortByEnum Enum with underlying type: string +type ListProfileSummariesSortByEnum string + +// Set of constants representing the allowable values for ListProfileSummariesSortByEnum +const ( + ListProfileSummariesSortByProfilename ListProfileSummariesSortByEnum = "profileName" + ListProfileSummariesSortByTargetid ListProfileSummariesSortByEnum = "targetId" + ListProfileSummariesSortByIsusercreated ListProfileSummariesSortByEnum = "isUserCreated" + ListProfileSummariesSortByPasswordverificationfunction ListProfileSummariesSortByEnum = "passwordVerificationFunction" + ListProfileSummariesSortByUsercount ListProfileSummariesSortByEnum = "userCount" + ListProfileSummariesSortBySessionsperuser ListProfileSummariesSortByEnum = "sessionsPerUser" + ListProfileSummariesSortByInactiveaccounttime ListProfileSummariesSortByEnum = "inactiveAccountTime" + ListProfileSummariesSortByFailedloginattempts ListProfileSummariesSortByEnum = "failedLoginAttempts" +) + +var mappingListProfileSummariesSortByEnum = map[string]ListProfileSummariesSortByEnum{ + "profileName": ListProfileSummariesSortByProfilename, + "targetId": ListProfileSummariesSortByTargetid, + "isUserCreated": ListProfileSummariesSortByIsusercreated, + "passwordVerificationFunction": ListProfileSummariesSortByPasswordverificationfunction, + "userCount": ListProfileSummariesSortByUsercount, + "sessionsPerUser": ListProfileSummariesSortBySessionsperuser, + "inactiveAccountTime": ListProfileSummariesSortByInactiveaccounttime, + "failedLoginAttempts": ListProfileSummariesSortByFailedloginattempts, +} + +var mappingListProfileSummariesSortByEnumLowerCase = map[string]ListProfileSummariesSortByEnum{ + "profilename": ListProfileSummariesSortByProfilename, + "targetid": ListProfileSummariesSortByTargetid, + "isusercreated": ListProfileSummariesSortByIsusercreated, + "passwordverificationfunction": ListProfileSummariesSortByPasswordverificationfunction, + "usercount": ListProfileSummariesSortByUsercount, + "sessionsperuser": ListProfileSummariesSortBySessionsperuser, + "inactiveaccounttime": ListProfileSummariesSortByInactiveaccounttime, + "failedloginattempts": ListProfileSummariesSortByFailedloginattempts, +} + +// GetListProfileSummariesSortByEnumValues Enumerates the set of values for ListProfileSummariesSortByEnum +func GetListProfileSummariesSortByEnumValues() []ListProfileSummariesSortByEnum { + values := make([]ListProfileSummariesSortByEnum, 0) + for _, v := range mappingListProfileSummariesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListProfileSummariesSortByEnumStringValues Enumerates the set of values in String for ListProfileSummariesSortByEnum +func GetListProfileSummariesSortByEnumStringValues() []string { + return []string{ + "profileName", + "targetId", + "isUserCreated", + "passwordVerificationFunction", + "userCount", + "sessionsPerUser", + "inactiveAccountTime", + "failedLoginAttempts", + } +} + +// GetMappingListProfileSummariesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProfileSummariesSortByEnum(val string) (ListProfileSummariesSortByEnum, bool) { + enum, ok := mappingListProfileSummariesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListProfileSummariesSortOrderEnum Enum with underlying type: string +type ListProfileSummariesSortOrderEnum string + +// Set of constants representing the allowable values for ListProfileSummariesSortOrderEnum +const ( + ListProfileSummariesSortOrderAsc ListProfileSummariesSortOrderEnum = "ASC" + ListProfileSummariesSortOrderDesc ListProfileSummariesSortOrderEnum = "DESC" +) + +var mappingListProfileSummariesSortOrderEnum = map[string]ListProfileSummariesSortOrderEnum{ + "ASC": ListProfileSummariesSortOrderAsc, + "DESC": ListProfileSummariesSortOrderDesc, +} + +var mappingListProfileSummariesSortOrderEnumLowerCase = map[string]ListProfileSummariesSortOrderEnum{ + "asc": ListProfileSummariesSortOrderAsc, + "desc": ListProfileSummariesSortOrderDesc, +} + +// GetListProfileSummariesSortOrderEnumValues Enumerates the set of values for ListProfileSummariesSortOrderEnum +func GetListProfileSummariesSortOrderEnumValues() []ListProfileSummariesSortOrderEnum { + values := make([]ListProfileSummariesSortOrderEnum, 0) + for _, v := range mappingListProfileSummariesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListProfileSummariesSortOrderEnumStringValues Enumerates the set of values in String for ListProfileSummariesSortOrderEnum +func GetListProfileSummariesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListProfileSummariesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListProfileSummariesSortOrderEnum(val string) (ListProfileSummariesSortOrderEnum, bool) { + enum, ok := mappingListProfileSummariesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_report_definitions_request_response.go b/datasafe/list_report_definitions_request_response.go index 5e5c98025b..7e9ca8215f 100644 --- a/datasafe/list_report_definitions_request_response.go +++ b/datasafe/list_report_definitions_request_response.go @@ -43,7 +43,7 @@ type ListReportDefinitionsRequest struct { // The sort order to use, either ascending (ASC) or descending (DESC). SortOrder ListReportDefinitionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - // The field used for sorting. Only one sorting order (sortOrder) can be specified. + // The field used for sorting. Only one sorting parameter order (sortOrder) can be specified. // The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. // The DISPLAYNAME sort order is case sensitive. SortBy ListReportDefinitionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` diff --git a/datasafe/list_sdm_masking_policy_differences_request_response.go b/datasafe/list_sdm_masking_policy_differences_request_response.go new file mode 100644 index 0000000000..c55b160d45 --- /dev/null +++ b/datasafe/list_sdm_masking_policy_differences_request_response.go @@ -0,0 +1,266 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSdmMaskingPolicyDifferencesRequest wrapper for the ListSdmMaskingPolicyDifferences operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSdmMaskingPolicyDifferences.go.html to see an example of how to use ListSdmMaskingPolicyDifferencesRequest. +type ListSdmMaskingPolicyDifferencesRequest struct { + + // A filter to return only resources that match the specified compartment OCID. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Default is false. + // When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // Valid value is ACCESSIBLE. Default is ACCESSIBLE. + // Setting this to ACCESSIBLE returns only those compartments for which the + // user has INSPECT permissions directly or indirectly (permissions can be on a + // resource in a subcompartment). + DifferenceAccessLevel ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum `mandatory:"false" contributesTo:"query" name:"differenceAccessLevel" omitEmpty:"true"` + + // A filter to return only resources that match the specified display name. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only the resources that match the specified sensitive data model OCID. + SensitiveDataModelId *string `mandatory:"false" contributesTo:"query" name:"sensitiveDataModelId"` + + // A filter to return only the resources that match the specified lifecycle states. + LifecycleState SdmMaskingPolicyDifferenceLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only the resources that match the specified masking policy OCID. + MaskingPolicyId *string `mandatory:"false" contributesTo:"query" name:"maskingPolicyId"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListSdmMaskingPolicyDifferencesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreationStarted is descending. + // The default order for displayName is ascending. + SortBy ListSdmMaskingPolicyDifferencesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // 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 ListSdmMaskingPolicyDifferencesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSdmMaskingPolicyDifferencesRequest) 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 ListSdmMaskingPolicyDifferencesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSdmMaskingPolicyDifferencesRequest) 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 ListSdmMaskingPolicyDifferencesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum(string(request.DifferenceAccessLevel)); !ok && request.DifferenceAccessLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DifferenceAccessLevel: %s. Supported values are: %s.", request.DifferenceAccessLevel, strings.Join(GetListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingSdmMaskingPolicyDifferenceLifecycleStateEnum(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(GetSdmMaskingPolicyDifferenceLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListSdmMaskingPolicyDifferencesSortOrderEnum(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(GetListSdmMaskingPolicyDifferencesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListSdmMaskingPolicyDifferencesSortByEnum(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(GetListSdmMaskingPolicyDifferencesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSdmMaskingPolicyDifferencesResponse wrapper for the ListSdmMaskingPolicyDifferences operation +type ListSdmMaskingPolicyDifferencesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SdmMaskingPolicyDifferenceCollection instances + SdmMaskingPolicyDifferenceCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListSdmMaskingPolicyDifferencesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSdmMaskingPolicyDifferencesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum Enum with underlying type: string +type ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum string + +// Set of constants representing the allowable values for ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum +const ( + ListSdmMaskingPolicyDifferencesDifferenceAccessLevelAccessible ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum = "ACCESSIBLE" +) + +var mappingListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum = map[string]ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum{ + "ACCESSIBLE": ListSdmMaskingPolicyDifferencesDifferenceAccessLevelAccessible, +} + +var mappingListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnumLowerCase = map[string]ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum{ + "accessible": ListSdmMaskingPolicyDifferencesDifferenceAccessLevelAccessible, +} + +// GetListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnumValues Enumerates the set of values for ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum +func GetListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnumValues() []ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum { + values := make([]ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum, 0) + for _, v := range mappingListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum { + values = append(values, v) + } + return values +} + +// GetListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnumStringValues Enumerates the set of values in String for ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum +func GetListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnumStringValues() []string { + return []string{ + "ACCESSIBLE", + } +} + +// GetMappingListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum(val string) (ListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnum, bool) { + enum, ok := mappingListSdmMaskingPolicyDifferencesDifferenceAccessLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSdmMaskingPolicyDifferencesSortOrderEnum Enum with underlying type: string +type ListSdmMaskingPolicyDifferencesSortOrderEnum string + +// Set of constants representing the allowable values for ListSdmMaskingPolicyDifferencesSortOrderEnum +const ( + ListSdmMaskingPolicyDifferencesSortOrderAsc ListSdmMaskingPolicyDifferencesSortOrderEnum = "ASC" + ListSdmMaskingPolicyDifferencesSortOrderDesc ListSdmMaskingPolicyDifferencesSortOrderEnum = "DESC" +) + +var mappingListSdmMaskingPolicyDifferencesSortOrderEnum = map[string]ListSdmMaskingPolicyDifferencesSortOrderEnum{ + "ASC": ListSdmMaskingPolicyDifferencesSortOrderAsc, + "DESC": ListSdmMaskingPolicyDifferencesSortOrderDesc, +} + +var mappingListSdmMaskingPolicyDifferencesSortOrderEnumLowerCase = map[string]ListSdmMaskingPolicyDifferencesSortOrderEnum{ + "asc": ListSdmMaskingPolicyDifferencesSortOrderAsc, + "desc": ListSdmMaskingPolicyDifferencesSortOrderDesc, +} + +// GetListSdmMaskingPolicyDifferencesSortOrderEnumValues Enumerates the set of values for ListSdmMaskingPolicyDifferencesSortOrderEnum +func GetListSdmMaskingPolicyDifferencesSortOrderEnumValues() []ListSdmMaskingPolicyDifferencesSortOrderEnum { + values := make([]ListSdmMaskingPolicyDifferencesSortOrderEnum, 0) + for _, v := range mappingListSdmMaskingPolicyDifferencesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSdmMaskingPolicyDifferencesSortOrderEnumStringValues Enumerates the set of values in String for ListSdmMaskingPolicyDifferencesSortOrderEnum +func GetListSdmMaskingPolicyDifferencesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSdmMaskingPolicyDifferencesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSdmMaskingPolicyDifferencesSortOrderEnum(val string) (ListSdmMaskingPolicyDifferencesSortOrderEnum, bool) { + enum, ok := mappingListSdmMaskingPolicyDifferencesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSdmMaskingPolicyDifferencesSortByEnum Enum with underlying type: string +type ListSdmMaskingPolicyDifferencesSortByEnum string + +// Set of constants representing the allowable values for ListSdmMaskingPolicyDifferencesSortByEnum +const ( + ListSdmMaskingPolicyDifferencesSortByTimecreationstarted ListSdmMaskingPolicyDifferencesSortByEnum = "timeCreationStarted" + ListSdmMaskingPolicyDifferencesSortByDisplayname ListSdmMaskingPolicyDifferencesSortByEnum = "displayName" +) + +var mappingListSdmMaskingPolicyDifferencesSortByEnum = map[string]ListSdmMaskingPolicyDifferencesSortByEnum{ + "timeCreationStarted": ListSdmMaskingPolicyDifferencesSortByTimecreationstarted, + "displayName": ListSdmMaskingPolicyDifferencesSortByDisplayname, +} + +var mappingListSdmMaskingPolicyDifferencesSortByEnumLowerCase = map[string]ListSdmMaskingPolicyDifferencesSortByEnum{ + "timecreationstarted": ListSdmMaskingPolicyDifferencesSortByTimecreationstarted, + "displayname": ListSdmMaskingPolicyDifferencesSortByDisplayname, +} + +// GetListSdmMaskingPolicyDifferencesSortByEnumValues Enumerates the set of values for ListSdmMaskingPolicyDifferencesSortByEnum +func GetListSdmMaskingPolicyDifferencesSortByEnumValues() []ListSdmMaskingPolicyDifferencesSortByEnum { + values := make([]ListSdmMaskingPolicyDifferencesSortByEnum, 0) + for _, v := range mappingListSdmMaskingPolicyDifferencesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSdmMaskingPolicyDifferencesSortByEnumStringValues Enumerates the set of values in String for ListSdmMaskingPolicyDifferencesSortByEnum +func GetListSdmMaskingPolicyDifferencesSortByEnumStringValues() []string { + return []string{ + "timeCreationStarted", + "displayName", + } +} + +// GetMappingListSdmMaskingPolicyDifferencesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSdmMaskingPolicyDifferencesSortByEnum(val string) (ListSdmMaskingPolicyDifferencesSortByEnum, bool) { + enum, ok := mappingListSdmMaskingPolicyDifferencesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_sensitive_columns_request_response.go b/datasafe/list_sensitive_columns_request_response.go index 0d8a4160de..3910cc33e9 100644 --- a/datasafe/list_sensitive_columns_request_response.go +++ b/datasafe/list_sensitive_columns_request_response.go @@ -101,6 +101,10 @@ type ListSensitiveColumnsRequest struct { // Unique identifier for the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // A boolean flag indicating whether the search should be case-insensitive. + // The search is case-sensitive by default. Set this parameter to true to do case-insensitive search. + IsCaseInSensitive *bool `mandatory:"false" contributesTo:"query" name:"isCaseInSensitive"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/datasafe/list_sensitive_objects_request_response.go b/datasafe/list_sensitive_objects_request_response.go new file mode 100644 index 0000000000..2dfa302079 --- /dev/null +++ b/datasafe/list_sensitive_objects_request_response.go @@ -0,0 +1,265 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSensitiveObjectsRequest wrapper for the ListSensitiveObjects operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSensitiveObjects.go.html to see an example of how to use ListSensitiveObjectsRequest. +type ListSensitiveObjectsRequest struct { + + // The OCID of the sensitive data model. + SensitiveDataModelId *string `mandatory:"true" contributesTo:"path" name:"sensitiveDataModelId"` + + // A filter to return only items related to specific schema name. + SchemaName []string `contributesTo:"query" name:"schemaName" collectionFormat:"multi"` + + // A filter to return only items related to a specific object name. + ObjectName []string `contributesTo:"query" name:"objectName" collectionFormat:"multi"` + + // A filter to return only items related to a specific object type. + ObjectType []ListSensitiveObjectsObjectTypeEnum `contributesTo:"query" name:"objectType" omitEmpty:"true" collectionFormat:"multi"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListSensitiveObjectsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. You can specify only one sort order (sortOrder). + // The default order is ascending. + SortBy ListSensitiveObjectsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSensitiveObjectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSensitiveObjectsRequest) 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 ListSensitiveObjectsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSensitiveObjectsRequest) 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 ListSensitiveObjectsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.ObjectType { + if _, ok := GetMappingListSensitiveObjectsObjectTypeEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ObjectType: %s. Supported values are: %s.", val, strings.Join(GetListSensitiveObjectsObjectTypeEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingListSensitiveObjectsSortOrderEnum(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(GetListSensitiveObjectsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListSensitiveObjectsSortByEnum(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(GetListSensitiveObjectsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSensitiveObjectsResponse wrapper for the ListSensitiveObjects operation +type ListSensitiveObjectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SensitiveObjectCollection instances + SensitiveObjectCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListSensitiveObjectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSensitiveObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSensitiveObjectsObjectTypeEnum Enum with underlying type: string +type ListSensitiveObjectsObjectTypeEnum string + +// Set of constants representing the allowable values for ListSensitiveObjectsObjectTypeEnum +const ( + ListSensitiveObjectsObjectTypeAll ListSensitiveObjectsObjectTypeEnum = "ALL" + ListSensitiveObjectsObjectTypeTable ListSensitiveObjectsObjectTypeEnum = "TABLE" + ListSensitiveObjectsObjectTypeEditioningView ListSensitiveObjectsObjectTypeEnum = "EDITIONING_VIEW" +) + +var mappingListSensitiveObjectsObjectTypeEnum = map[string]ListSensitiveObjectsObjectTypeEnum{ + "ALL": ListSensitiveObjectsObjectTypeAll, + "TABLE": ListSensitiveObjectsObjectTypeTable, + "EDITIONING_VIEW": ListSensitiveObjectsObjectTypeEditioningView, +} + +var mappingListSensitiveObjectsObjectTypeEnumLowerCase = map[string]ListSensitiveObjectsObjectTypeEnum{ + "all": ListSensitiveObjectsObjectTypeAll, + "table": ListSensitiveObjectsObjectTypeTable, + "editioning_view": ListSensitiveObjectsObjectTypeEditioningView, +} + +// GetListSensitiveObjectsObjectTypeEnumValues Enumerates the set of values for ListSensitiveObjectsObjectTypeEnum +func GetListSensitiveObjectsObjectTypeEnumValues() []ListSensitiveObjectsObjectTypeEnum { + values := make([]ListSensitiveObjectsObjectTypeEnum, 0) + for _, v := range mappingListSensitiveObjectsObjectTypeEnum { + values = append(values, v) + } + return values +} + +// GetListSensitiveObjectsObjectTypeEnumStringValues Enumerates the set of values in String for ListSensitiveObjectsObjectTypeEnum +func GetListSensitiveObjectsObjectTypeEnumStringValues() []string { + return []string{ + "ALL", + "TABLE", + "EDITIONING_VIEW", + } +} + +// GetMappingListSensitiveObjectsObjectTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSensitiveObjectsObjectTypeEnum(val string) (ListSensitiveObjectsObjectTypeEnum, bool) { + enum, ok := mappingListSensitiveObjectsObjectTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSensitiveObjectsSortOrderEnum Enum with underlying type: string +type ListSensitiveObjectsSortOrderEnum string + +// Set of constants representing the allowable values for ListSensitiveObjectsSortOrderEnum +const ( + ListSensitiveObjectsSortOrderAsc ListSensitiveObjectsSortOrderEnum = "ASC" + ListSensitiveObjectsSortOrderDesc ListSensitiveObjectsSortOrderEnum = "DESC" +) + +var mappingListSensitiveObjectsSortOrderEnum = map[string]ListSensitiveObjectsSortOrderEnum{ + "ASC": ListSensitiveObjectsSortOrderAsc, + "DESC": ListSensitiveObjectsSortOrderDesc, +} + +var mappingListSensitiveObjectsSortOrderEnumLowerCase = map[string]ListSensitiveObjectsSortOrderEnum{ + "asc": ListSensitiveObjectsSortOrderAsc, + "desc": ListSensitiveObjectsSortOrderDesc, +} + +// GetListSensitiveObjectsSortOrderEnumValues Enumerates the set of values for ListSensitiveObjectsSortOrderEnum +func GetListSensitiveObjectsSortOrderEnumValues() []ListSensitiveObjectsSortOrderEnum { + values := make([]ListSensitiveObjectsSortOrderEnum, 0) + for _, v := range mappingListSensitiveObjectsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSensitiveObjectsSortOrderEnumStringValues Enumerates the set of values in String for ListSensitiveObjectsSortOrderEnum +func GetListSensitiveObjectsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSensitiveObjectsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSensitiveObjectsSortOrderEnum(val string) (ListSensitiveObjectsSortOrderEnum, bool) { + enum, ok := mappingListSensitiveObjectsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSensitiveObjectsSortByEnum Enum with underlying type: string +type ListSensitiveObjectsSortByEnum string + +// Set of constants representing the allowable values for ListSensitiveObjectsSortByEnum +const ( + ListSensitiveObjectsSortBySchemaname ListSensitiveObjectsSortByEnum = "schemaName" + ListSensitiveObjectsSortByObjectname ListSensitiveObjectsSortByEnum = "objectName" + ListSensitiveObjectsSortByObjecttype ListSensitiveObjectsSortByEnum = "objectType" +) + +var mappingListSensitiveObjectsSortByEnum = map[string]ListSensitiveObjectsSortByEnum{ + "schemaName": ListSensitiveObjectsSortBySchemaname, + "objectName": ListSensitiveObjectsSortByObjectname, + "objectType": ListSensitiveObjectsSortByObjecttype, +} + +var mappingListSensitiveObjectsSortByEnumLowerCase = map[string]ListSensitiveObjectsSortByEnum{ + "schemaname": ListSensitiveObjectsSortBySchemaname, + "objectname": ListSensitiveObjectsSortByObjectname, + "objecttype": ListSensitiveObjectsSortByObjecttype, +} + +// GetListSensitiveObjectsSortByEnumValues Enumerates the set of values for ListSensitiveObjectsSortByEnum +func GetListSensitiveObjectsSortByEnumValues() []ListSensitiveObjectsSortByEnum { + values := make([]ListSensitiveObjectsSortByEnum, 0) + for _, v := range mappingListSensitiveObjectsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSensitiveObjectsSortByEnumStringValues Enumerates the set of values in String for ListSensitiveObjectsSortByEnum +func GetListSensitiveObjectsSortByEnumStringValues() []string { + return []string{ + "schemaName", + "objectName", + "objectType", + } +} + +// GetMappingListSensitiveObjectsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSensitiveObjectsSortByEnum(val string) (ListSensitiveObjectsSortByEnum, bool) { + enum, ok := mappingListSensitiveObjectsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_sensitive_schemas_request_response.go b/datasafe/list_sensitive_schemas_request_response.go new file mode 100644 index 0000000000..cab77fe050 --- /dev/null +++ b/datasafe/list_sensitive_schemas_request_response.go @@ -0,0 +1,199 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSensitiveSchemasRequest wrapper for the ListSensitiveSchemas operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/ListSensitiveSchemas.go.html to see an example of how to use ListSensitiveSchemasRequest. +type ListSensitiveSchemasRequest struct { + + // The OCID of the sensitive data model. + SensitiveDataModelId *string `mandatory:"true" contributesTo:"path" name:"sensitiveDataModelId"` + + // A filter to return only items related to specific schema name. + SchemaName []string `contributesTo:"query" name:"schemaName" collectionFormat:"multi"` + + // For list pagination. The maximum number of items to return per page in a paginated "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous "List" call. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (ASC) or descending (DESC). + SortOrder ListSensitiveSchemasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. You can specify only one sort order (sortOrder). + // The default order is ascending. + SortBy ListSensitiveSchemasSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSensitiveSchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSensitiveSchemasRequest) 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 ListSensitiveSchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSensitiveSchemasRequest) 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 ListSensitiveSchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSensitiveSchemasSortOrderEnum(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(GetListSensitiveSchemasSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListSensitiveSchemasSortByEnum(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(GetListSensitiveSchemasSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSensitiveSchemasResponse wrapper for the ListSensitiveSchemas operation +type ListSensitiveSchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SensitiveSchemaCollection instances + SensitiveSchemaCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages of results remain. Include opc-next-page value as the page parameter for the subsequent GET request to get the next batch of items. For details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the previous batch of items. + OpcPrevPage *string `presentIn:"header" name:"opc-prev-page"` +} + +func (response ListSensitiveSchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSensitiveSchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSensitiveSchemasSortOrderEnum Enum with underlying type: string +type ListSensitiveSchemasSortOrderEnum string + +// Set of constants representing the allowable values for ListSensitiveSchemasSortOrderEnum +const ( + ListSensitiveSchemasSortOrderAsc ListSensitiveSchemasSortOrderEnum = "ASC" + ListSensitiveSchemasSortOrderDesc ListSensitiveSchemasSortOrderEnum = "DESC" +) + +var mappingListSensitiveSchemasSortOrderEnum = map[string]ListSensitiveSchemasSortOrderEnum{ + "ASC": ListSensitiveSchemasSortOrderAsc, + "DESC": ListSensitiveSchemasSortOrderDesc, +} + +var mappingListSensitiveSchemasSortOrderEnumLowerCase = map[string]ListSensitiveSchemasSortOrderEnum{ + "asc": ListSensitiveSchemasSortOrderAsc, + "desc": ListSensitiveSchemasSortOrderDesc, +} + +// GetListSensitiveSchemasSortOrderEnumValues Enumerates the set of values for ListSensitiveSchemasSortOrderEnum +func GetListSensitiveSchemasSortOrderEnumValues() []ListSensitiveSchemasSortOrderEnum { + values := make([]ListSensitiveSchemasSortOrderEnum, 0) + for _, v := range mappingListSensitiveSchemasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSensitiveSchemasSortOrderEnumStringValues Enumerates the set of values in String for ListSensitiveSchemasSortOrderEnum +func GetListSensitiveSchemasSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSensitiveSchemasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSensitiveSchemasSortOrderEnum(val string) (ListSensitiveSchemasSortOrderEnum, bool) { + enum, ok := mappingListSensitiveSchemasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSensitiveSchemasSortByEnum Enum with underlying type: string +type ListSensitiveSchemasSortByEnum string + +// Set of constants representing the allowable values for ListSensitiveSchemasSortByEnum +const ( + ListSensitiveSchemasSortBySchemaname ListSensitiveSchemasSortByEnum = "schemaName" +) + +var mappingListSensitiveSchemasSortByEnum = map[string]ListSensitiveSchemasSortByEnum{ + "schemaName": ListSensitiveSchemasSortBySchemaname, +} + +var mappingListSensitiveSchemasSortByEnumLowerCase = map[string]ListSensitiveSchemasSortByEnum{ + "schemaname": ListSensitiveSchemasSortBySchemaname, +} + +// GetListSensitiveSchemasSortByEnumValues Enumerates the set of values for ListSensitiveSchemasSortByEnum +func GetListSensitiveSchemasSortByEnumValues() []ListSensitiveSchemasSortByEnum { + values := make([]ListSensitiveSchemasSortByEnum, 0) + for _, v := range mappingListSensitiveSchemasSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSensitiveSchemasSortByEnumStringValues Enumerates the set of values in String for ListSensitiveSchemasSortByEnum +func GetListSensitiveSchemasSortByEnumStringValues() []string { + return []string{ + "schemaName", + } +} + +// GetMappingListSensitiveSchemasSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSensitiveSchemasSortByEnum(val string) (ListSensitiveSchemasSortByEnum, bool) { + enum, ok := mappingListSensitiveSchemasSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/list_target_alert_policy_associations_request_response.go b/datasafe/list_target_alert_policy_associations_request_response.go index 8f2fea7adf..2d4dab9052 100644 --- a/datasafe/list_target_alert_policy_associations_request_response.go +++ b/datasafe/list_target_alert_policy_associations_request_response.go @@ -42,7 +42,7 @@ type ListTargetAlertPolicyAssociationsRequest struct { // The sort order to use, either ascending (ASC) or descending (DESC). SortOrder ListTargetAlertPolicyAssociationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - // The field to sort by. Only one sort order may be provided. + // The field to sort by. Only one sort parameter may be provided. SortBy ListTargetAlertPolicyAssociationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` // Unique identifier for the request. diff --git a/datasafe/list_users_request_response.go b/datasafe/list_users_request_response.go index 67e7c15921..8a7320f27c 100644 --- a/datasafe/list_users_request_response.go +++ b/datasafe/list_users_request_response.go @@ -37,6 +37,21 @@ type ListUsersRequest struct { // A filter to return only items that match the specified user category. UserCategory *string `mandatory:"false" contributesTo:"query" name:"userCategory"` + // A filter to return only items that match the specified user role. + UserRole *string `mandatory:"false" contributesTo:"query" name:"userRole"` + + // A filter to return only items that match the specified user profile. + UserProfile *string `mandatory:"false" contributesTo:"query" name:"userProfile"` + + // A filter to return only items that match the specified user type. The possible values can be + // - ADMIN_PRIVILEGED + // - APPLICATION + // - PRIVILEGED + // - SCHEMA + // - NON_PRIVILEGED + // as specified by '#/definitions/userTypes'. + UserType *string `mandatory:"false" contributesTo:"query" name:"userType"` + // A filter to return only items that match the specified user key. UserKey *string `mandatory:"false" contributesTo:"query" name:"userKey"` diff --git a/datasafe/mask_data_details.go b/datasafe/mask_data_details.go index 5a31e051a8..35715927cf 100644 --- a/datasafe/mask_data_details.go +++ b/datasafe/mask_data_details.go @@ -54,6 +54,40 @@ type MaskDataDetails struct { // generation and executes the masking script stored in the Data Safe repository. It helps save time if there are no changes in // the database tables and their dependencies. IsExecuteSavedScriptEnabled *bool `mandatory:"false" json:"isExecuteSavedScriptEnabled"` + + // Indicates if the temporary tables created during a masking operation should be dropped after masking. + // Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive + // data values to mask values. These temporary tables are dropped after masking if this attribute is set as true. But, in some cases, you may want + // to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables + // must be dropped before the database is available for unprivileged users. + // If it's not provided, the value of the isDropTempTablesEnabled attribute in the MaskingPolicy resource is used. + IsDropTempTablesEnabled *bool `mandatory:"false" json:"isDropTempTablesEnabled"` + + // Indicates if redo logging is enabled during a masking operation. Set this attribute to true to + // enable redo logging. If set as flase, masking disables redo logging and flashback logging to purge any original unmasked + // data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, + // you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. + // If it's not provided, the value of the isRedoLoggingEnabled attribute in the MaskingPolicy resource is used. + IsRedoLoggingEnabled *bool `mandatory:"false" json:"isRedoLoggingEnabled"` + + // Indicates if statistics gathering is enabled. Set this attribute to false to disable statistics + // gathering. The masking process gathers statistics on masked database tables after masking completes. + // If it's not provided, the value of the isRefreshStatsEnabled attribute in the MaskingPolicy resource is used. + IsRefreshStatsEnabled *bool `mandatory:"false" json:"isRefreshStatsEnabled"` + + // Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), + // 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree + // of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the + // Oracle Database parallel execution framework when choosing an explicit degree of parallelism. + // If it's not provided, the value of the parallelDegree attribute in the MaskingPolicy resource is used. + ParallelDegree *string `mandatory:"false" json:"parallelDegree"` + + // Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), + // 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree + // attribute is used. Note that few objects may remain invalid even after recompiling once and you may have to further + // recompile manually using UTL_RECOMP package. + // If it's not provided, the value of the parallelDegree attribute in the MaskingPolicy resource is used. + Recompile *string `mandatory:"false" json:"recompile"` } func (m MaskDataDetails) String() string { diff --git a/datasafe/masking_object_collection.go b/datasafe/masking_object_collection.go new file mode 100644 index 0000000000..e74af1a68b --- /dev/null +++ b/datasafe/masking_object_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaskingObjectCollection A collection of masking object summary objects. +type MaskingObjectCollection struct { + + // An array of masking object summary objects. + Items []MaskingObjectSummary `mandatory:"true" json:"items"` +} + +func (m MaskingObjectCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MaskingObjectCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/masking_object_summary.go b/datasafe/masking_object_summary.go new file mode 100644 index 0000000000..312182c97b --- /dev/null +++ b/datasafe/masking_object_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaskingObjectSummary Summary of a masking object present in a masking policy. +type MaskingObjectSummary struct { + + // The database schema that contains the masking column. + SchemaName *string `mandatory:"true" json:"schemaName"` + + // The database object that contains the masking column. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The type of the database object that contains the masking column. + ObjectType ObjectTypeEnum `mandatory:"true" json:"objectType"` +} + +func (m MaskingObjectSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MaskingObjectSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingObjectTypeEnum(string(m.ObjectType)); !ok && m.ObjectType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ObjectType: %s. Supported values are: %s.", m.ObjectType, strings.Join(GetObjectTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/masking_policy.go b/datasafe/masking_policy.go index 123ca3fe76..e6a97ae030 100644 --- a/datasafe/masking_policy.go +++ b/datasafe/masking_policy.go @@ -61,13 +61,14 @@ type MaskingPolicy struct { // Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), // 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree - // of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + // of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the // Oracle Database parallel execution framework when choosing an explicit degree of parallelism. ParallelDegree *string `mandatory:"true" json:"parallelDegree"` // Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), // 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree - // attribute is used. + // attribute is used. Note that few objects may remain invalid even after recompiling once and you may have to further + // recompile manually using UTL_RECOMP package. Recompile MaskingPolicyRecompileEnum `mandatory:"true" json:"recompile"` // The description of the masking policy. diff --git a/datasafe/masking_report.go b/datasafe/masking_report.go index 1160440a27..e7598fd008 100644 --- a/datasafe/masking_report.go +++ b/datasafe/masking_report.go @@ -60,6 +60,21 @@ type MaskingReport struct { // The date and time the masking report was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Indicates if the temporary tables created during the masking operation were dropped after masking. + IsDropTempTablesEnabled *bool `mandatory:"false" json:"isDropTempTablesEnabled"` + + // Indicates if redo logging was enabled during the masking operation. + IsRedoLoggingEnabled *bool `mandatory:"false" json:"isRedoLoggingEnabled"` + + // Indicates if statistics gathering was enabled during the masking operation. + IsRefreshStatsEnabled *bool `mandatory:"false" json:"isRefreshStatsEnabled"` + + // Indicates if parallel execution was enabled during the masking operation. + ParallelDegree *string `mandatory:"false" json:"parallelDegree"` + + // Indicates how invalid objects were recompiled post the masking operation. + Recompile *string `mandatory:"false" json:"recompile"` } func (m MaskingReport) String() string { diff --git a/datasafe/masking_report_summary.go b/datasafe/masking_report_summary.go index 5364938904..c83e4e7149 100644 --- a/datasafe/masking_report_summary.go +++ b/datasafe/masking_report_summary.go @@ -59,6 +59,21 @@ type MaskingReportSummary struct { // The date and time the masking report was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Indicates if the temporary tables created during the masking operation were dropped after masking. + IsDropTempTablesEnabled *bool `mandatory:"false" json:"isDropTempTablesEnabled"` + + // Indicates if redo logging was enabled during the masking operation. + IsRedoLoggingEnabled *bool `mandatory:"false" json:"isRedoLoggingEnabled"` + + // Indicates if statistics gathering was enabled during the masking operation. + IsRefreshStatsEnabled *bool `mandatory:"false" json:"isRefreshStatsEnabled"` + + // Indicates if parallel execution was enabled during the masking operation. + ParallelDegree *string `mandatory:"false" json:"parallelDegree"` + + // Indicates how invalid objects were recompiled post the masking operation. + Recompile *string `mandatory:"false" json:"recompile"` } func (m MaskingReportSummary) String() string { diff --git a/datasafe/masking_schema_collection.go b/datasafe/masking_schema_collection.go new file mode 100644 index 0000000000..c044ddd868 --- /dev/null +++ b/datasafe/masking_schema_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaskingSchemaCollection A collection of masking schema summary objects. +type MaskingSchemaCollection struct { + + // An array of masking schema summary objects. + Items []MaskingSchemaSummary `mandatory:"true" json:"items"` +} + +func (m MaskingSchemaCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MaskingSchemaCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/masking_schema_summary.go b/datasafe/masking_schema_summary.go new file mode 100644 index 0000000000..c88a2fd275 --- /dev/null +++ b/datasafe/masking_schema_summary.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaskingSchemaSummary Summary of a masking schema present in masking policy. +type MaskingSchemaSummary struct { + + // The database schema that contains the masking column. + SchemaName *string `mandatory:"true" json:"schemaName"` +} + +func (m MaskingSchemaSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MaskingSchemaSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/patch_alerts_details.go b/datasafe/patch_alerts_details.go index 964a52da85..f5512883d3 100644 --- a/datasafe/patch_alerts_details.go +++ b/datasafe/patch_alerts_details.go @@ -16,10 +16,10 @@ import ( "strings" ) -// PatchAlertsDetails Details for how to patch alerts. +// PatchAlertsDetails The alert details to update the status of one or more alert specified by the alert IDs. type PatchAlertsDetails struct { - // Array of patch instructions. + // Array of alert detail to update the status of the alert specified by the alert ID. Items []PatchInstruction `mandatory:"true" json:"items"` // The OCID of the compartment that contains the alerts. diff --git a/datasafe/patch_alerts_request_response.go b/datasafe/patch_alerts_request_response.go index eb58940fdf..5f619341dd 100644 --- a/datasafe/patch_alerts_request_response.go +++ b/datasafe/patch_alerts_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/PatchAlerts.go.html to see an example of how to use PatchAlertsRequest. type PatchAlertsRequest struct { - // Details to patch alerts. + // The alert details to update the status of one or more alert specified by the alert IDs. PatchAlertsDetails `contributesTo:"body"` // Unique identifier for the request. diff --git a/datasafe/patch_sdm_masking_policy_difference_columns_details.go b/datasafe/patch_sdm_masking_policy_difference_columns_details.go new file mode 100644 index 0000000000..cd54552d98 --- /dev/null +++ b/datasafe/patch_sdm_masking_policy_difference_columns_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchSdmMaskingPolicyDifferenceColumnsDetails Details to patch SDM masking policy difference. +type PatchSdmMaskingPolicyDifferenceColumnsDetails struct { + + // An array of patch instructions. + Items []PatchInstruction `mandatory:"false" json:"items"` +} + +func (m PatchSdmMaskingPolicyDifferenceColumnsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchSdmMaskingPolicyDifferenceColumnsDetails) 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 *PatchSdmMaskingPolicyDifferenceColumnsDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []patchinstruction `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]PatchInstruction, len(model.Items)) + for i, n := range model.Items { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Items[i] = nn.(PatchInstruction) + } else { + m.Items[i] = nil + } + } + + return +} diff --git a/datasafe/patch_sdm_masking_policy_difference_columns_request_response.go b/datasafe/patch_sdm_masking_policy_difference_columns_request_response.go new file mode 100644 index 0000000000..5e43ee3800 --- /dev/null +++ b/datasafe/patch_sdm_masking_policy_difference_columns_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchSdmMaskingPolicyDifferenceColumnsRequest wrapper for the PatchSdmMaskingPolicyDifferenceColumns operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/PatchSdmMaskingPolicyDifferenceColumns.go.html to see an example of how to use PatchSdmMaskingPolicyDifferenceColumnsRequest. +type PatchSdmMaskingPolicyDifferenceColumnsRequest struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"true" contributesTo:"path" name:"sdmMaskingPolicyDifferenceId"` + + // Details to patch difference columns. + PatchSdmMaskingPolicyDifferenceColumnsDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the if-match parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchSdmMaskingPolicyDifferenceColumnsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchSdmMaskingPolicyDifferenceColumnsRequest) 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 PatchSdmMaskingPolicyDifferenceColumnsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchSdmMaskingPolicyDifferenceColumnsRequest) 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 PatchSdmMaskingPolicyDifferenceColumnsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchSdmMaskingPolicyDifferenceColumnsResponse wrapper for the PatchSdmMaskingPolicyDifferenceColumns operation +type PatchSdmMaskingPolicyDifferenceColumnsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request. Use GetWorkRequest with this OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PatchSdmMaskingPolicyDifferenceColumnsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchSdmMaskingPolicyDifferenceColumnsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/patch_target_alert_policy_association_details.go b/datasafe/patch_target_alert_policy_association_details.go index d1b9cbcfdc..4fe0514130 100644 --- a/datasafe/patch_target_alert_policy_association_details.go +++ b/datasafe/patch_target_alert_policy_association_details.go @@ -16,7 +16,7 @@ import ( "strings" ) -// PatchTargetAlertPolicyAssociationDetails The details used to patch alert policy associations. +// PatchTargetAlertPolicyAssociationDetails The details used to create associations for target databases and audit policies. type PatchTargetAlertPolicyAssociationDetails struct { // An array of patch instructions. diff --git a/datasafe/patch_target_alert_policy_association_request_response.go b/datasafe/patch_target_alert_policy_association_request_response.go index a4c45b0f0a..7778f5f188 100644 --- a/datasafe/patch_target_alert_policy_association_request_response.go +++ b/datasafe/patch_target_alert_policy_association_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/PatchTargetAlertPolicyAssociation.go.html to see an example of how to use PatchTargetAlertPolicyAssociationRequest. type PatchTargetAlertPolicyAssociationRequest struct { - // The details used to patch target-alert policy associations. + // The details used to patch the target-alert policy associations. PatchTargetAlertPolicyAssociationDetails `contributesTo:"body"` // Unique identifier for the request. diff --git a/datasafe/profile.go b/datasafe/profile.go new file mode 100644 index 0000000000..e6c89f00d2 --- /dev/null +++ b/datasafe/profile.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Profile The comprehensive information about the user profiles available on a given target. +// It includes details such as profile name, failed login attempts, password reuse time, password verification function, +// password verification function implementation code snippet, sessions per user, connect time inactive account time, +// password lock time, cpu usage per session, target id, and compartment id. +type Profile struct { + + // The OCID of the user assessment corresponding to the target under consideration. + UserAssessmentId *string `mandatory:"true" json:"userAssessmentId"` + + // The name of the profile. + ProfileName *string `mandatory:"true" json:"profileName"` + + // The OCID of the compartment that contains the user assessment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the target database. + TargetId *string `mandatory:"false" json:"targetId"` + + // The number of users having a given profile. + UserCount *int `mandatory:"false" json:"userCount"` + + // Maximum times the user is allowed in fail login before the user account is locked. + FailedLoginAttempts *string `mandatory:"false" json:"failedLoginAttempts"` + + // Name of the PL/SQL that can be used for password verification. + PasswordVerificationFunction *string `mandatory:"false" json:"passwordVerificationFunction"` + + // Details about the PL/SQL that can be used for password verification. + PasswordVerificationFunctionDetails *string `mandatory:"false" json:"passwordVerificationFunctionDetails"` + + // Number of days the user account remains locked after failed login. + PasswordLockTime *string `mandatory:"false" json:"passwordLockTime"` + + // Number of days the password is valid before expiry. + PasswordLifeTime *string `mandatory:"false" json:"passwordLifeTime"` + + // Number of day after the user can use the already used password. + PasswordReuseMax *string `mandatory:"false" json:"passwordReuseMax"` + + // Number of days before which a password cannot be reused. + PasswordReuseTime *string `mandatory:"false" json:"passwordReuseTime"` + + // Number of days the password rollover is allowed. Minimum value can be 1/24 day (1 hour) to 60 days. + PasswordRolloverTime *string `mandatory:"false" json:"passwordRolloverTime"` + + // Number of grace days for user to change password. + PasswordGraceTime *string `mandatory:"false" json:"passwordGraceTime"` + + // Represents if the profile is created by user. + IsUserCreated *bool `mandatory:"false" json:"isUserCreated"` + + // Specify the number of concurrent sessions to which you want to limit the user. + SessionsPerUser *string `mandatory:"false" json:"sessionsPerUser"` + + // The permitted periods of continuous inactive time during a session, expressed in minutes. + // Long-running queries and other operations are not subject to this limit. + InactiveAccountTime *string `mandatory:"false" json:"inactiveAccountTime"` + + // Specify the total elapsed time limit for a session, expressed in minutes. + ConnectTime *string `mandatory:"false" json:"connectTime"` + + // Specify the permitted periods of continuous inactive time during a session, expressed in minutes. + IdleTime *string `mandatory:"false" json:"idleTime"` + + // Specify the total resource cost for a session, expressed in service units. Oracle Database calculates the total + // service units as a weighted sum of CPU_PER_SESSION, CONNECT_TIME, LOGICAL_READS_PER_SESSION, and PRIVATE_SGA. + CompositeLimit *string `mandatory:"false" json:"compositeLimit"` + + // Specify the CPU time limit for a call (a parse, execute, or fetch), expressed in hundredths of seconds. + CpuPerCall *string `mandatory:"false" json:"cpuPerCall"` + + // Specify the CPU time limit for a session, expressed in hundredth of seconds. + CpuPerSession *string `mandatory:"false" json:"cpuPerSession"` + + // Specify the permitted the number of data blocks read for a call to process a SQL statement (a parse, execute, or fetch). + LogicalReadsPerCall *string `mandatory:"false" json:"logicalReadsPerCall"` + + // Specify the permitted number of data blocks read in a session, including blocks read from memory and disk. + LogicalReadsPerSession *string `mandatory:"false" json:"logicalReadsPerSession"` + + // Specify the amount of private space a session can allocate in the shared pool of the system global area (SGA), + // expressed in bytes. + PrivateSga *string `mandatory:"false" json:"privateSga"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m Profile) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Profile) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/profile_aggregation.go b/datasafe/profile_aggregation.go new file mode 100644 index 0000000000..1fe12a2a19 --- /dev/null +++ b/datasafe/profile_aggregation.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProfileAggregation The profile aggregation provides information about the user profiles available on the database. +// For example, the user profile details include how many users have a given profile assigned +// and how many profiles have password verification function. +type ProfileAggregation struct { + + // The OCID of the latest user assessment corresponding to the target under consideration. A compartment + // type assessment can also be passed to profiles from all the targets from the corresponding compartment. + UserAssessmentId *string `mandatory:"true" json:"userAssessmentId"` + + // The OCID of the compartment that contains the user assessment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The array of profile aggregation data. + Items []map[string]interface{} `mandatory:"false" json:"items"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m ProfileAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProfileAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/profile_summary.go b/datasafe/profile_summary.go new file mode 100644 index 0000000000..697be7a9d5 --- /dev/null +++ b/datasafe/profile_summary.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProfileSummary The summary of information about the user profiles. It includes details such as profile name, failed login attempts, +// sessions per user, inactive account time, password lock time, user created, target id, and the compartment id. +type ProfileSummary struct { + + // The OCID of the latest user assessment corresponding to the target under consideration. A compartment + // type assessment can also be passed to profiles from all the targets from the corresponding compartment. + UserAssessmentId *string `mandatory:"true" json:"userAssessmentId"` + + // The OCID of the compartment that contains the user assessment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the target database. + TargetId *string `mandatory:"false" json:"targetId"` + + // The name of the profile. + ProfileName *string `mandatory:"false" json:"profileName"` + + // The number of users having a given profile. + UserCount *int `mandatory:"false" json:"userCount"` + + // Maximum times the user is allowed in fail login before the user account is locked. + FailedLoginAttempts *string `mandatory:"false" json:"failedLoginAttempts"` + + // PL/SQL that can be used for password verification. + PasswordVerificationFunction *string `mandatory:"false" json:"passwordVerificationFunction"` + + // The maximum number of sessions a user is allowed to create. + SessionsPerUser *string `mandatory:"false" json:"sessionsPerUser"` + + // The permitted periods of continuous inactive time during a session, expressed in minutes. + // Long-running queries and other operations are not subjected to this limit. + InactiveAccountTime *string `mandatory:"false" json:"inactiveAccountTime"` + + // Number of days the user account remains locked after failed login + PasswordLockTime *string `mandatory:"false" json:"passwordLockTime"` + + // Represents if the profile is created by user. + IsUserCreated *bool `mandatory:"false" json:"isUserCreated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m ProfileSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProfileSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/report.go b/datasafe/report.go index bf42d57015..89109bcfa2 100644 --- a/datasafe/report.go +++ b/datasafe/report.go @@ -15,7 +15,7 @@ import ( "strings" ) -// Report Description of Report. +// Report The description of the report. type Report struct { // The OCID of the report. @@ -27,10 +27,10 @@ type Report struct { // The OCID of the compartment containing the report. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Specifies the time at which the report was generated. + // Specifies the date and time the report was generated. TimeGenerated *common.SDKTime `mandatory:"true" json:"timeGenerated"` - // The current state of the report. + // The current state of the audit report. LifecycleState ReportLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` // The OCID of the report definition. @@ -42,7 +42,7 @@ type Report struct { // Specifies the format of report to be excel or pdf MimeType ReportMimeTypeEnum `mandatory:"false" json:"mimeType,omitempty"` - // The type of the report. + // The type of the audit report. Type ReportTypeEnum `mandatory:"false" json:"type,omitempty"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) diff --git a/datasafe/report_definition.go b/datasafe/report_definition.go index 5c2008bc0d..d74e17ae68 100644 --- a/datasafe/report_definition.go +++ b/datasafe/report_definition.go @@ -48,19 +48,19 @@ type ReportDefinition struct { // Specifies how the report definitions are ordered in the display. DisplayOrder *int `mandatory:"false" json:"displayOrder"` - // Specifies the time at which the report definition was created. + // Specifies the data and time the report definition was created. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - // The date and time of the report definition update in Data Safe. + // The date and time the report definition was update. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Additional scim filters used to specialize the report. + // Additional SCIM filters used to define the report. ScimFilter *string `mandatory:"false" json:"scimFilter"` // An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user). ColumnInfo []Column `mandatory:"false" json:"columnInfo"` - // An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. + // An array of columnFilter objects. A columnFilter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. ColumnFilters []ColumnFilter `mandatory:"false" json:"columnFilters"` // An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc. @@ -69,7 +69,7 @@ type ReportDefinition struct { // An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). Summary []Summary `mandatory:"false" json:"summary"` - // Schedule to generate the report periodically in the specified format: + // The schedule to generate the report periodically in the specified format: // ; // Allowed version strings - "v1" // v1's version specific schedule - @@ -84,20 +84,19 @@ type ReportDefinition struct { // No constraint introduced when it is '*'. When not, day of month must equal the given value Schedule *string `mandatory:"false" json:"schedule"` - // Specifies the format of report to be excel or pdf + // Specifies the format of the report ( either XLS or PDF ) ScheduledReportMimeType ReportDefinitionScheduledReportMimeTypeEnum `mandatory:"false" json:"scheduledReportMimeType,omitempty"` - // Specifies the limit on number of rows in report. + // Specifies the limit on the number of rows in the report. ScheduledReportRowLimit *int `mandatory:"false" json:"scheduledReportRowLimit"` // The name of the report to be scheduled. ScheduledReportName *string `mandatory:"false" json:"scheduledReportName"` - // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment - // in which the scheduled resource should be created. + // The OCID of the compartment in which the scheduled resource should be created. ScheduledReportCompartmentId *string `mandatory:"false" json:"scheduledReportCompartmentId"` - // The time span of records in report to be scheduled. + // The time span for the records in the report to be scheduled. // // Allowed period strings - "H","D","M","Y" // Each of the above fields potentially introduce constraints. A workRequest is created only @@ -108,7 +107,7 @@ type ReportDefinition struct { // 4. period = Y (The minimum period-value is 1) RecordTimeSpan *string `mandatory:"false" json:"recordTimeSpan"` - // The list of data protection regulations/standards used in the report that will help demonstrate compliance. + // The list of the data protection regulations/standards used in the report that will help demonstrate compliance. ComplianceStandards []string `mandatory:"false" json:"complianceStandards"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) diff --git a/datasafe/report_definition_collection.go b/datasafe/report_definition_collection.go index db8b124c3e..9eca2fdc3e 100644 --- a/datasafe/report_definition_collection.go +++ b/datasafe/report_definition_collection.go @@ -15,7 +15,7 @@ import ( "strings" ) -// ReportDefinitionCollection Collection of report definition summary. +// ReportDefinitionCollection Collection of report definition objects. type ReportDefinitionCollection struct { // Array of report definition summary. diff --git a/datasafe/report_definition_summary.go b/datasafe/report_definition_summary.go index c5d6b7a8ac..18ab428a3b 100644 --- a/datasafe/report_definition_summary.go +++ b/datasafe/report_definition_summary.go @@ -30,7 +30,7 @@ type ReportDefinitionSummary struct { // The OCID of the compartment containing the report definition. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // The current state of the report + // The current state of the audit report. LifecycleState ReportDefinitionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` // Specifies the name of the category that this report belongs to. @@ -51,17 +51,17 @@ type ReportDefinitionSummary struct { // Specifies the name of a resource that provides data for the report. For example alerts, events. DataSource ReportDefinitionDataSourceEnum `mandatory:"false" json:"dataSource,omitempty"` - // Schedule to generate the report periodically in the specified format: + // The schedule to generate the report periodically in the specified format: // ; // Allowed version strings - "v1" // v1's version specific schedule - - // Each of the above fields potentially introduce constraints. A workrequest is created only + // Each of the above fields potentially introduce constraints. A work request is created only // when clock time satisfies all the constraints. Constraints introduced: // 1. seconds = (So, the allowed range for is [0, 59]) // 2. minutes = (So, the allowed range for is [0, 59]) // 3. hours = (So, the allowed range for is [0, 23]) // 4. can be either '*' (without quotes or a number between 1(Monday) and 7(Sunday)) - // No constraint introduced when it is '*'. When not, day of week must equal the given value + // No constraint introduced when it is '*'. When not, day of week must equal the given value. // 5. can be either '*' (without quotes or a number between 1 and 28) // No constraint introduced when it is '*'. When not, day of month must equal the given value Schedule *string `mandatory:"false" json:"schedule"` diff --git a/datasafe/report_details.go b/datasafe/report_details.go index 0b8ba18b46..5738b63ce1 100644 --- a/datasafe/report_details.go +++ b/datasafe/report_details.go @@ -16,7 +16,7 @@ import ( "strings" ) -// ReportDetails Details for the report schedule. +// ReportDetails The details of the report schedule. type ReportDetails interface { } diff --git a/datasafe/report_summary.go b/datasafe/report_summary.go index 5cd16e01c0..c1d30197a8 100644 --- a/datasafe/report_summary.go +++ b/datasafe/report_summary.go @@ -39,7 +39,7 @@ type ReportSummary struct { // Description of the report. Description *string `mandatory:"false" json:"description"` - // Specifies the format of report to be excel or pdf + // Specifies the format of report to be excel or pdf. MimeType ReportSummaryMimeTypeEnum `mandatory:"false" json:"mimeType,omitempty"` // The type of the report. diff --git a/datasafe/schedule_audit_report_details.go b/datasafe/schedule_audit_report_details.go index 2d6ea54950..d4397146f0 100644 --- a/datasafe/schedule_audit_report_details.go +++ b/datasafe/schedule_audit_report_details.go @@ -30,7 +30,7 @@ type ScheduleAuditReportDetails struct { // 4. period = Y (The minimum period-value is 1) RecordTimeSpan *string `mandatory:"true" json:"recordTimeSpan"` - // Specifies the limit on number of rows in report. + // Specifies the limit on the number of rows in the report. RowLimit *int `mandatory:"false" json:"rowLimit"` } diff --git a/datasafe/schedule_report_details.go b/datasafe/schedule_report_details.go index 52228cf22e..3a5543f147 100644 --- a/datasafe/schedule_report_details.go +++ b/datasafe/schedule_report_details.go @@ -16,10 +16,10 @@ import ( "strings" ) -// ScheduleReportDetails Details for the report schedule. +// ScheduleReportDetails The details of the report schedule. type ScheduleReportDetails struct { - // Schedule to generate the report periodically in the specified format: + // The schedule to generate the report periodically in the specified format: // ; // Allowed version strings - "v1" // v1's version specific schedule - @@ -34,10 +34,10 @@ type ScheduleReportDetails struct { // No constraint introduced when it is '*'. When not, day of month must equal the given value Schedule *string `mandatory:"true" json:"schedule"` - // Specifies the format of report to be excel or pdf + // Specifies if the report will be in Excel or PDF format MimeType ScheduleReportDetailsMimeTypeEnum `mandatory:"true" json:"mimeType"` - // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + // The OCID of the compartment // in which the resource should be created. CompartmentId *string `mandatory:"true" json:"compartmentId"` diff --git a/datasafe/schedule_report_request_response.go b/datasafe/schedule_report_request_response.go index 61993272dc..44c501a813 100644 --- a/datasafe/schedule_report_request_response.go +++ b/datasafe/schedule_report_request_response.go @@ -21,7 +21,7 @@ type ScheduleReportRequest struct { // Unique report definition identifier ReportDefinitionId *string `mandatory:"true" contributesTo:"path" name:"reportDefinitionId"` - // Details for report schedule. It contains details such as schedule, PDF/XLS and number of rows. + // The details for the audit report schedule. It contains details such as schedule, PDF/XLS and number of rows. ScheduleReportDetails `contributesTo:"body"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/datasafe/sdm_masking_policy_difference.go b/datasafe/sdm_masking_policy_difference.go new file mode 100644 index 0000000000..cc5a835317 --- /dev/null +++ b/datasafe/sdm_masking_policy_difference.go @@ -0,0 +1,193 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SdmMaskingPolicyDifference A SDM masking policy difference resource. It helps track the difference between sensitive columns of SDM and masking columns of the masking policy. +type SdmMaskingPolicyDifference struct { + + // The OCID of the SDM masking policy difference. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment that contains the SDM masking policy difference. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The type of the SDM masking policy difference. It defines the difference scope. + // NEW identifies new sensitive columns in the sensitive data model that are not in the masking policy. + // DELETED identifies columns that are present in the masking policy but have been deleted from the sensitive data model. + // MODIFIED identifies columns that are present in the sensitive data model as well as the masking policy but some of their attributes have been modified. + // ALL covers all the above three scenarios and reports new, deleted and modified columns. + DifferenceType SdmMaskingPolicyDifferenceDifferenceTypeEnum `mandatory:"true" json:"differenceType"` + + // The display name of the SDM masking policy difference. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The date and time the SDM masking policy difference was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the SDM masking policy difference creation started, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreationStarted *common.SDKTime `mandatory:"true" json:"timeCreationStarted"` + + // The current state of the SDM masking policy difference. + LifecycleState SdmMaskingPolicyDifferenceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the sensitive data model associated with the SDM masking policy difference. + SensitiveDataModelId *string `mandatory:"true" json:"sensitiveDataModelId"` + + // The OCID of the masking policy associated with the SDM masking policy difference. + MaskingPolicyId *string `mandatory:"true" json:"maskingPolicyId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m SdmMaskingPolicyDifference) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SdmMaskingPolicyDifference) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSdmMaskingPolicyDifferenceDifferenceTypeEnum(string(m.DifferenceType)); !ok && m.DifferenceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DifferenceType: %s. Supported values are: %s.", m.DifferenceType, strings.Join(GetSdmMaskingPolicyDifferenceDifferenceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSdmMaskingPolicyDifferenceLifecycleStateEnum(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(GetSdmMaskingPolicyDifferenceLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SdmMaskingPolicyDifferenceDifferenceTypeEnum Enum with underlying type: string +type SdmMaskingPolicyDifferenceDifferenceTypeEnum string + +// Set of constants representing the allowable values for SdmMaskingPolicyDifferenceDifferenceTypeEnum +const ( + SdmMaskingPolicyDifferenceDifferenceTypeAll SdmMaskingPolicyDifferenceDifferenceTypeEnum = "ALL" + SdmMaskingPolicyDifferenceDifferenceTypeNew SdmMaskingPolicyDifferenceDifferenceTypeEnum = "NEW" + SdmMaskingPolicyDifferenceDifferenceTypeModified SdmMaskingPolicyDifferenceDifferenceTypeEnum = "MODIFIED" + SdmMaskingPolicyDifferenceDifferenceTypeDeleted SdmMaskingPolicyDifferenceDifferenceTypeEnum = "DELETED" +) + +var mappingSdmMaskingPolicyDifferenceDifferenceTypeEnum = map[string]SdmMaskingPolicyDifferenceDifferenceTypeEnum{ + "ALL": SdmMaskingPolicyDifferenceDifferenceTypeAll, + "NEW": SdmMaskingPolicyDifferenceDifferenceTypeNew, + "MODIFIED": SdmMaskingPolicyDifferenceDifferenceTypeModified, + "DELETED": SdmMaskingPolicyDifferenceDifferenceTypeDeleted, +} + +var mappingSdmMaskingPolicyDifferenceDifferenceTypeEnumLowerCase = map[string]SdmMaskingPolicyDifferenceDifferenceTypeEnum{ + "all": SdmMaskingPolicyDifferenceDifferenceTypeAll, + "new": SdmMaskingPolicyDifferenceDifferenceTypeNew, + "modified": SdmMaskingPolicyDifferenceDifferenceTypeModified, + "deleted": SdmMaskingPolicyDifferenceDifferenceTypeDeleted, +} + +// GetSdmMaskingPolicyDifferenceDifferenceTypeEnumValues Enumerates the set of values for SdmMaskingPolicyDifferenceDifferenceTypeEnum +func GetSdmMaskingPolicyDifferenceDifferenceTypeEnumValues() []SdmMaskingPolicyDifferenceDifferenceTypeEnum { + values := make([]SdmMaskingPolicyDifferenceDifferenceTypeEnum, 0) + for _, v := range mappingSdmMaskingPolicyDifferenceDifferenceTypeEnum { + values = append(values, v) + } + return values +} + +// GetSdmMaskingPolicyDifferenceDifferenceTypeEnumStringValues Enumerates the set of values in String for SdmMaskingPolicyDifferenceDifferenceTypeEnum +func GetSdmMaskingPolicyDifferenceDifferenceTypeEnumStringValues() []string { + return []string{ + "ALL", + "NEW", + "MODIFIED", + "DELETED", + } +} + +// GetMappingSdmMaskingPolicyDifferenceDifferenceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSdmMaskingPolicyDifferenceDifferenceTypeEnum(val string) (SdmMaskingPolicyDifferenceDifferenceTypeEnum, bool) { + enum, ok := mappingSdmMaskingPolicyDifferenceDifferenceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SdmMaskingPolicyDifferenceLifecycleStateEnum Enum with underlying type: string +type SdmMaskingPolicyDifferenceLifecycleStateEnum string + +// Set of constants representing the allowable values for SdmMaskingPolicyDifferenceLifecycleStateEnum +const ( + SdmMaskingPolicyDifferenceLifecycleStateCreating SdmMaskingPolicyDifferenceLifecycleStateEnum = "CREATING" + SdmMaskingPolicyDifferenceLifecycleStateActive SdmMaskingPolicyDifferenceLifecycleStateEnum = "ACTIVE" + SdmMaskingPolicyDifferenceLifecycleStateUpdating SdmMaskingPolicyDifferenceLifecycleStateEnum = "UPDATING" + SdmMaskingPolicyDifferenceLifecycleStateDeleting SdmMaskingPolicyDifferenceLifecycleStateEnum = "DELETING" + SdmMaskingPolicyDifferenceLifecycleStateDeleted SdmMaskingPolicyDifferenceLifecycleStateEnum = "DELETED" + SdmMaskingPolicyDifferenceLifecycleStateFailed SdmMaskingPolicyDifferenceLifecycleStateEnum = "FAILED" +) + +var mappingSdmMaskingPolicyDifferenceLifecycleStateEnum = map[string]SdmMaskingPolicyDifferenceLifecycleStateEnum{ + "CREATING": SdmMaskingPolicyDifferenceLifecycleStateCreating, + "ACTIVE": SdmMaskingPolicyDifferenceLifecycleStateActive, + "UPDATING": SdmMaskingPolicyDifferenceLifecycleStateUpdating, + "DELETING": SdmMaskingPolicyDifferenceLifecycleStateDeleting, + "DELETED": SdmMaskingPolicyDifferenceLifecycleStateDeleted, + "FAILED": SdmMaskingPolicyDifferenceLifecycleStateFailed, +} + +var mappingSdmMaskingPolicyDifferenceLifecycleStateEnumLowerCase = map[string]SdmMaskingPolicyDifferenceLifecycleStateEnum{ + "creating": SdmMaskingPolicyDifferenceLifecycleStateCreating, + "active": SdmMaskingPolicyDifferenceLifecycleStateActive, + "updating": SdmMaskingPolicyDifferenceLifecycleStateUpdating, + "deleting": SdmMaskingPolicyDifferenceLifecycleStateDeleting, + "deleted": SdmMaskingPolicyDifferenceLifecycleStateDeleted, + "failed": SdmMaskingPolicyDifferenceLifecycleStateFailed, +} + +// GetSdmMaskingPolicyDifferenceLifecycleStateEnumValues Enumerates the set of values for SdmMaskingPolicyDifferenceLifecycleStateEnum +func GetSdmMaskingPolicyDifferenceLifecycleStateEnumValues() []SdmMaskingPolicyDifferenceLifecycleStateEnum { + values := make([]SdmMaskingPolicyDifferenceLifecycleStateEnum, 0) + for _, v := range mappingSdmMaskingPolicyDifferenceLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSdmMaskingPolicyDifferenceLifecycleStateEnumStringValues Enumerates the set of values in String for SdmMaskingPolicyDifferenceLifecycleStateEnum +func GetSdmMaskingPolicyDifferenceLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingSdmMaskingPolicyDifferenceLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSdmMaskingPolicyDifferenceLifecycleStateEnum(val string) (SdmMaskingPolicyDifferenceLifecycleStateEnum, bool) { + enum, ok := mappingSdmMaskingPolicyDifferenceLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/sdm_masking_policy_difference_collection.go b/datasafe/sdm_masking_policy_difference_collection.go new file mode 100644 index 0000000000..23763ad28b --- /dev/null +++ b/datasafe/sdm_masking_policy_difference_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SdmMaskingPolicyDifferenceCollection A collection of SDM masking policy difference objects. +type SdmMaskingPolicyDifferenceCollection struct { + + // An array of SDM masking policy difference objects. + Items []SdmMaskingPolicyDifferenceSummary `mandatory:"true" json:"items"` +} + +func (m SdmMaskingPolicyDifferenceCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SdmMaskingPolicyDifferenceCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/sdm_masking_policy_difference_column_collection.go b/datasafe/sdm_masking_policy_difference_column_collection.go new file mode 100644 index 0000000000..241844408a --- /dev/null +++ b/datasafe/sdm_masking_policy_difference_column_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SdmMaskingPolicyDifferenceColumnCollection A collection of SDM masking policy difference column summary objects. +type SdmMaskingPolicyDifferenceColumnCollection struct { + + // An array of SDM masking policy difference column summary objects. + Items []DifferenceColumnSummary `mandatory:"true" json:"items"` +} + +func (m SdmMaskingPolicyDifferenceColumnCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SdmMaskingPolicyDifferenceColumnCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/sdm_masking_policy_difference_summary.go b/datasafe/sdm_masking_policy_difference_summary.go new file mode 100644 index 0000000000..c0d2bd3ea3 --- /dev/null +++ b/datasafe/sdm_masking_policy_difference_summary.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SdmMaskingPolicyDifferenceSummary Summary of a SDM masking policy difference. +type SdmMaskingPolicyDifferenceSummary struct { + + // The OCID of the SDM masking policy difference. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment to contain the SDM masking policy difference. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The display name of the SDM masking policy difference. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The date and time the SDM masking policy difference was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time the SDM masking policy difference creation started, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeCreationStarted *common.SDKTime `mandatory:"true" json:"timeCreationStarted"` + + // The OCID of the sensitive data model associated with the SDM masking policy difference. + SensitiveDataModelId *string `mandatory:"true" json:"sensitiveDataModelId"` + + // The OCID of the masking policy associated with the SDM masking policy difference. + MaskingPolicyId *string `mandatory:"true" json:"maskingPolicyId"` + + // The current state of the SDM masking policy difference. + LifecycleState SdmMaskingPolicyDifferenceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The type of difference. + DifferenceType SdmMaskingPolicyDifferenceDifferenceTypeEnum `mandatory:"true" json:"differenceType"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m SdmMaskingPolicyDifferenceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SdmMaskingPolicyDifferenceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSdmMaskingPolicyDifferenceLifecycleStateEnum(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(GetSdmMaskingPolicyDifferenceLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingSdmMaskingPolicyDifferenceDifferenceTypeEnum(string(m.DifferenceType)); !ok && m.DifferenceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DifferenceType: %s. Supported values are: %s.", m.DifferenceType, strings.Join(GetSdmMaskingPolicyDifferenceDifferenceTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/security_assessment.go b/datasafe/security_assessment.go index 0f24b85f7a..50d345c0b0 100644 --- a/datasafe/security_assessment.go +++ b/datasafe/security_assessment.go @@ -50,6 +50,9 @@ type SecurityAssessment struct { // the latest assessment or refresh action is executed. It is also automatically updated when a target is deleted or move to a different compartment. Type SecurityAssessmentTypeEnum `mandatory:"true" json:"type"` + // The date and time when the security assessment was last run. Conforms to the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastAssessed *common.SDKTime `mandatory:"false" json:"timeLastAssessed"` + // List containing maps as values. // Example: `{"Operations": [ {"CostCenter": "42"} ] }` IgnoredTargets []interface{} `mandatory:"false" json:"ignoredTargets"` diff --git a/datasafe/security_assessment_references.go b/datasafe/security_assessment_references.go new file mode 100644 index 0000000000..aae4e8bec2 --- /dev/null +++ b/datasafe/security_assessment_references.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "strings" +) + +// SecurityAssessmentReferencesEnum Enum with underlying type: string +type SecurityAssessmentReferencesEnum string + +// Set of constants representing the allowable values for SecurityAssessmentReferencesEnum +const ( + SecurityAssessmentReferencesStig SecurityAssessmentReferencesEnum = "STIG" + SecurityAssessmentReferencesCis SecurityAssessmentReferencesEnum = "CIS" + SecurityAssessmentReferencesGdpr SecurityAssessmentReferencesEnum = "GDPR" +) + +var mappingSecurityAssessmentReferencesEnum = map[string]SecurityAssessmentReferencesEnum{ + "STIG": SecurityAssessmentReferencesStig, + "CIS": SecurityAssessmentReferencesCis, + "GDPR": SecurityAssessmentReferencesGdpr, +} + +var mappingSecurityAssessmentReferencesEnumLowerCase = map[string]SecurityAssessmentReferencesEnum{ + "stig": SecurityAssessmentReferencesStig, + "cis": SecurityAssessmentReferencesCis, + "gdpr": SecurityAssessmentReferencesGdpr, +} + +// GetSecurityAssessmentReferencesEnumValues Enumerates the set of values for SecurityAssessmentReferencesEnum +func GetSecurityAssessmentReferencesEnumValues() []SecurityAssessmentReferencesEnum { + values := make([]SecurityAssessmentReferencesEnum, 0) + for _, v := range mappingSecurityAssessmentReferencesEnum { + values = append(values, v) + } + return values +} + +// GetSecurityAssessmentReferencesEnumStringValues Enumerates the set of values in String for SecurityAssessmentReferencesEnum +func GetSecurityAssessmentReferencesEnumStringValues() []string { + return []string{ + "STIG", + "CIS", + "GDPR", + } +} + +// GetMappingSecurityAssessmentReferencesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSecurityAssessmentReferencesEnum(val string) (SecurityAssessmentReferencesEnum, bool) { + enum, ok := mappingSecurityAssessmentReferencesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/datasafe/security_assessment_summary.go b/datasafe/security_assessment_summary.go index 5d967880b7..06653602a9 100644 --- a/datasafe/security_assessment_summary.go +++ b/datasafe/security_assessment_summary.go @@ -53,6 +53,9 @@ type SecurityAssessmentSummary struct { // Details about the current state of the security assessment. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // The date and time when the security assessment was last run. Conforms to the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastAssessed *common.SDKTime `mandatory:"false" json:"timeLastAssessed"` + // List containing maps as values. // Example: `{"Operations": [ {"CostCenter": "42"} ] }` IgnoredTargetIds []interface{} `mandatory:"false" json:"ignoredTargetIds"` diff --git a/datasafe/sensitive_object_collection.go b/datasafe/sensitive_object_collection.go new file mode 100644 index 0000000000..5069e48bd5 --- /dev/null +++ b/datasafe/sensitive_object_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SensitiveObjectCollection A collection of sensitive object summary objects. +type SensitiveObjectCollection struct { + + // An array of sensitive object summary objects. + Items []SensitiveObjectSummary `mandatory:"true" json:"items"` +} + +func (m SensitiveObjectCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SensitiveObjectCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/sensitive_object_summary.go b/datasafe/sensitive_object_summary.go new file mode 100644 index 0000000000..d69f7cd430 --- /dev/null +++ b/datasafe/sensitive_object_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SensitiveObjectSummary Summary of a sensitive object present in a sensitive data model. +type SensitiveObjectSummary struct { + + // The database schema that contains the sensitive column. + SchemaName *string `mandatory:"true" json:"schemaName"` + + // The database object that contains the sensitive column. + ObjectName *string `mandatory:"true" json:"objectName"` + + // The type of the database object that contains the sensitive column. + ObjectType ObjectTypeEnum `mandatory:"true" json:"objectType"` +} + +func (m SensitiveObjectSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SensitiveObjectSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingObjectTypeEnum(string(m.ObjectType)); !ok && m.ObjectType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ObjectType: %s. Supported values are: %s.", m.ObjectType, strings.Join(GetObjectTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/sensitive_schema_collection.go b/datasafe/sensitive_schema_collection.go new file mode 100644 index 0000000000..af4d362bc7 --- /dev/null +++ b/datasafe/sensitive_schema_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SensitiveSchemaCollection A collection of sensitive schema summary objects. +type SensitiveSchemaCollection struct { + + // An array of sensitive schema summary objects. + Items []SensitiveSchemaSummary `mandatory:"true" json:"items"` +} + +func (m SensitiveSchemaCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SensitiveSchemaCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/sensitive_schema_summary.go b/datasafe/sensitive_schema_summary.go new file mode 100644 index 0000000000..754723ce92 --- /dev/null +++ b/datasafe/sensitive_schema_summary.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SensitiveSchemaSummary Summary of a sensitive schema present in a sensitive data model. +type SensitiveSchemaSummary struct { + + // The database schema that contains the sensitive column. + SchemaName *string `mandatory:"true" json:"schemaName"` +} + +func (m SensitiveSchemaSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SensitiveSchemaSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/target_alert_policy_association.go b/datasafe/target_alert_policy_association.go index 88849466d8..82225dbd00 100644 --- a/datasafe/target_alert_policy_association.go +++ b/datasafe/target_alert_policy_association.go @@ -15,7 +15,7 @@ import ( "strings" ) -// TargetAlertPolicyAssociation An association of target to alert policy +// TargetAlertPolicyAssociation The association of the target database to an alert policy. type TargetAlertPolicyAssociation struct { // The OCID of the target-alert policy association. diff --git a/datasafe/update_data_safe_private_endpoint_details.go b/datasafe/update_data_safe_private_endpoint_details.go index b7bd75fd31..e9c4b0220c 100644 --- a/datasafe/update_data_safe_private_endpoint_details.go +++ b/datasafe/update_data_safe_private_endpoint_details.go @@ -19,7 +19,7 @@ import ( type UpdateDataSafePrivateEndpointDetails struct { // The display name of the private endpoint. - DisplayName *string `mandatory:"true" json:"displayName"` + DisplayName *string `mandatory:"false" json:"displayName"` // The description of the private endpoint. Description *string `mandatory:"false" json:"description"` diff --git a/datasafe/update_masking_policy_details.go b/datasafe/update_masking_policy_details.go index 1825b79625..4b6ec1d72a 100644 --- a/datasafe/update_masking_policy_details.go +++ b/datasafe/update_masking_policy_details.go @@ -44,13 +44,14 @@ type UpdateMaskingPolicyDetails struct { // Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), // 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree - // of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + // of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the // Oracle Database parallel execution framework when choosing an explicit degree of parallelism. ParallelDegree *string `mandatory:"false" json:"parallelDegree"` // Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), // 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree - // attribute is used. + // attribute is used. Note that few objects may remain invalid even after recompiling once and you may have to further + // recompile manually using UTL_RECOMP package. Recompile MaskingPolicyRecompileEnum `mandatory:"false" json:"recompile,omitempty"` // A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before diff --git a/datasafe/update_report_definition_details.go b/datasafe/update_report_definition_details.go index c0c1f15494..bc18b01601 100644 --- a/datasafe/update_report_definition_details.go +++ b/datasafe/update_report_definition_details.go @@ -33,7 +33,7 @@ type UpdateReportDefinitionDetails struct { // An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). Summary []Summary `mandatory:"true" json:"summary"` - // A description of the report definition. + // The description of the report definition. Description *string `mandatory:"false" json:"description"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) diff --git a/datasafe/update_sdm_masking_policy_difference_details.go b/datasafe/update_sdm_masking_policy_difference_details.go new file mode 100644 index 0000000000..66957dfe59 --- /dev/null +++ b/datasafe/update_sdm_masking_policy_difference_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Data Safe API +// +// APIs for using Oracle Data Safe. +// + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateSdmMaskingPolicyDifferenceDetails Details to update a sdm masking policy difference. +type UpdateSdmMaskingPolicyDifferenceDetails struct { + + // The display name of the sdm masking policy difference. The name does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateSdmMaskingPolicyDifferenceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateSdmMaskingPolicyDifferenceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/datasafe/update_sdm_masking_policy_difference_request_response.go b/datasafe/update_sdm_masking_policy_difference_request_response.go new file mode 100644 index 0000000000..7c582d72b7 --- /dev/null +++ b/datasafe/update_sdm_masking_policy_difference_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package datasafe + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateSdmMaskingPolicyDifferenceRequest wrapper for the UpdateSdmMaskingPolicyDifference operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datasafe/UpdateSdmMaskingPolicyDifference.go.html to see an example of how to use UpdateSdmMaskingPolicyDifferenceRequest. +type UpdateSdmMaskingPolicyDifferenceRequest struct { + + // The OCID of the SDM masking policy difference. + SdmMaskingPolicyDifferenceId *string `mandatory:"true" contributesTo:"path" name:"sdmMaskingPolicyDifferenceId"` + + // Details to update a sdm masking policy difference. + UpdateSdmMaskingPolicyDifferenceDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the if-match parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateSdmMaskingPolicyDifferenceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateSdmMaskingPolicyDifferenceRequest) 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 UpdateSdmMaskingPolicyDifferenceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateSdmMaskingPolicyDifferenceRequest) 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 UpdateSdmMaskingPolicyDifferenceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateSdmMaskingPolicyDifferenceResponse wrapper for the UpdateSdmMaskingPolicyDifference operation +type UpdateSdmMaskingPolicyDifferenceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request. Use GetWorkRequest with this OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateSdmMaskingPolicyDifferenceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateSdmMaskingPolicyDifferenceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/datasafe/user_assessment.go b/datasafe/user_assessment.go index cedff7af36..cca1ce4cc6 100644 --- a/datasafe/user_assessment.go +++ b/datasafe/user_assessment.go @@ -41,6 +41,7 @@ type UserAssessment struct { // SAVED: A saved user assessment. LATEST assessments will always be saved to maintain the history of runs. A SAVED assessment is also generated by a 'refresh' action (triggered by the user). // SAVE_SCHEDULE: A schedule to periodically save LATEST assessments. // COMPARTMENT: An automatic managed assessment type that stores all details of targets in one compartment. This will keep an up-to-date status of all potential risks identified in the compartment. + // It also keeps track of user count and target count for each profile available on the targets in a given compartment. // It is automatically updated once the latest assessment or refresh action is executed, as well as when a target is deleted or moved to a different compartment. Type UserAssessmentTypeEnum `mandatory:"true" json:"type"` @@ -92,6 +93,9 @@ type UserAssessment struct { // Array of database target OCIDs. TargetIds []string `mandatory:"false" json:"targetIds"` + // The date and time the user assessment was last run, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastAssessed *common.SDKTime `mandatory:"false" json:"timeLastAssessed"` + // Indicates whether the user assessment was created by system or user. TriggeredBy UserAssessmentTriggeredByEnum `mandatory:"false" json:"triggeredBy,omitempty"` diff --git a/datasafe/user_assessment_summary.go b/datasafe/user_assessment_summary.go index 4a20cd8613..9cff198857 100644 --- a/datasafe/user_assessment_summary.go +++ b/datasafe/user_assessment_summary.go @@ -92,6 +92,9 @@ type UserAssessmentSummary struct { // Array of database target OCIDs. TargetIds []string `mandatory:"false" json:"targetIds"` + // The date and time the user assessment was last run, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + TimeLastAssessed *common.SDKTime `mandatory:"false" json:"timeLastAssessed"` + // Indicates whether the user assessment was created by system or user. TriggeredBy UserAssessmentSummaryTriggeredByEnum `mandatory:"false" json:"triggeredBy,omitempty"` diff --git a/datasafe/work_request.go b/datasafe/work_request.go index 8af8adcd63..1f5ba1c92e 100644 --- a/datasafe/work_request.go +++ b/datasafe/work_request.go @@ -165,6 +165,11 @@ const ( WorkRequestOperationTypeUpdateLibraryMaskingFormat WorkRequestOperationTypeEnum = "UPDATE_LIBRARY_MASKING_FORMAT" WorkRequestOperationTypeAddColumnsFromSdm WorkRequestOperationTypeEnum = "ADD_COLUMNS_FROM_SDM" WorkRequestOperationTypeMaskingJob WorkRequestOperationTypeEnum = "MASKING_JOB" + WorkRequestOperationTypeCreateDifference WorkRequestOperationTypeEnum = "CREATE_DIFFERENCE" + WorkRequestOperationTypeDeleteDifference WorkRequestOperationTypeEnum = "DELETE_DIFFERENCE" + WorkRequestOperationTypeUpdateDifference WorkRequestOperationTypeEnum = "UPDATE_DIFFERENCE" + WorkRequestOperationTypePatchDifference WorkRequestOperationTypeEnum = "PATCH_DIFFERENCE" + WorkRequestOperationTypeApplyDifference WorkRequestOperationTypeEnum = "APPLY_DIFFERENCE" WorkRequestOperationTypeCreateSchedule WorkRequestOperationTypeEnum = "CREATE_SCHEDULE" WorkRequestOperationTypeRemoveScheduleReport WorkRequestOperationTypeEnum = "REMOVE_SCHEDULE_REPORT" WorkRequestOperationTypeUpdateAllAlert WorkRequestOperationTypeEnum = "UPDATE_ALL_ALERT" @@ -264,6 +269,11 @@ var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnu "UPDATE_LIBRARY_MASKING_FORMAT": WorkRequestOperationTypeUpdateLibraryMaskingFormat, "ADD_COLUMNS_FROM_SDM": WorkRequestOperationTypeAddColumnsFromSdm, "MASKING_JOB": WorkRequestOperationTypeMaskingJob, + "CREATE_DIFFERENCE": WorkRequestOperationTypeCreateDifference, + "DELETE_DIFFERENCE": WorkRequestOperationTypeDeleteDifference, + "UPDATE_DIFFERENCE": WorkRequestOperationTypeUpdateDifference, + "PATCH_DIFFERENCE": WorkRequestOperationTypePatchDifference, + "APPLY_DIFFERENCE": WorkRequestOperationTypeApplyDifference, "CREATE_SCHEDULE": WorkRequestOperationTypeCreateSchedule, "REMOVE_SCHEDULE_REPORT": WorkRequestOperationTypeRemoveScheduleReport, "UPDATE_ALL_ALERT": WorkRequestOperationTypeUpdateAllAlert, @@ -363,6 +373,11 @@ var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperati "update_library_masking_format": WorkRequestOperationTypeUpdateLibraryMaskingFormat, "add_columns_from_sdm": WorkRequestOperationTypeAddColumnsFromSdm, "masking_job": WorkRequestOperationTypeMaskingJob, + "create_difference": WorkRequestOperationTypeCreateDifference, + "delete_difference": WorkRequestOperationTypeDeleteDifference, + "update_difference": WorkRequestOperationTypeUpdateDifference, + "patch_difference": WorkRequestOperationTypePatchDifference, + "apply_difference": WorkRequestOperationTypeApplyDifference, "create_schedule": WorkRequestOperationTypeCreateSchedule, "remove_schedule_report": WorkRequestOperationTypeRemoveScheduleReport, "update_all_alert": WorkRequestOperationTypeUpdateAllAlert, @@ -473,6 +488,11 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", + "CREATE_DIFFERENCE", + "DELETE_DIFFERENCE", + "UPDATE_DIFFERENCE", + "PATCH_DIFFERENCE", + "APPLY_DIFFERENCE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", diff --git a/datasafe/work_request_summary.go b/datasafe/work_request_summary.go index e18bfd902d..581a8fccf6 100644 --- a/datasafe/work_request_summary.go +++ b/datasafe/work_request_summary.go @@ -164,6 +164,11 @@ const ( WorkRequestSummaryOperationTypeUpdateLibraryMaskingFormat WorkRequestSummaryOperationTypeEnum = "UPDATE_LIBRARY_MASKING_FORMAT" WorkRequestSummaryOperationTypeAddColumnsFromSdm WorkRequestSummaryOperationTypeEnum = "ADD_COLUMNS_FROM_SDM" WorkRequestSummaryOperationTypeMaskingJob WorkRequestSummaryOperationTypeEnum = "MASKING_JOB" + WorkRequestSummaryOperationTypeCreateDifference WorkRequestSummaryOperationTypeEnum = "CREATE_DIFFERENCE" + WorkRequestSummaryOperationTypeDeleteDifference WorkRequestSummaryOperationTypeEnum = "DELETE_DIFFERENCE" + WorkRequestSummaryOperationTypeUpdateDifference WorkRequestSummaryOperationTypeEnum = "UPDATE_DIFFERENCE" + WorkRequestSummaryOperationTypePatchDifference WorkRequestSummaryOperationTypeEnum = "PATCH_DIFFERENCE" + WorkRequestSummaryOperationTypeApplyDifference WorkRequestSummaryOperationTypeEnum = "APPLY_DIFFERENCE" WorkRequestSummaryOperationTypeCreateSchedule WorkRequestSummaryOperationTypeEnum = "CREATE_SCHEDULE" WorkRequestSummaryOperationTypeRemoveScheduleReport WorkRequestSummaryOperationTypeEnum = "REMOVE_SCHEDULE_REPORT" WorkRequestSummaryOperationTypeUpdateAllAlert WorkRequestSummaryOperationTypeEnum = "UPDATE_ALL_ALERT" @@ -262,6 +267,11 @@ var mappingWorkRequestSummaryOperationTypeEnum = map[string]WorkRequestSummaryOp "UPDATE_LIBRARY_MASKING_FORMAT": WorkRequestSummaryOperationTypeUpdateLibraryMaskingFormat, "ADD_COLUMNS_FROM_SDM": WorkRequestSummaryOperationTypeAddColumnsFromSdm, "MASKING_JOB": WorkRequestSummaryOperationTypeMaskingJob, + "CREATE_DIFFERENCE": WorkRequestSummaryOperationTypeCreateDifference, + "DELETE_DIFFERENCE": WorkRequestSummaryOperationTypeDeleteDifference, + "UPDATE_DIFFERENCE": WorkRequestSummaryOperationTypeUpdateDifference, + "PATCH_DIFFERENCE": WorkRequestSummaryOperationTypePatchDifference, + "APPLY_DIFFERENCE": WorkRequestSummaryOperationTypeApplyDifference, "CREATE_SCHEDULE": WorkRequestSummaryOperationTypeCreateSchedule, "REMOVE_SCHEDULE_REPORT": WorkRequestSummaryOperationTypeRemoveScheduleReport, "UPDATE_ALL_ALERT": WorkRequestSummaryOperationTypeUpdateAllAlert, @@ -360,6 +370,11 @@ var mappingWorkRequestSummaryOperationTypeEnumLowerCase = map[string]WorkRequest "update_library_masking_format": WorkRequestSummaryOperationTypeUpdateLibraryMaskingFormat, "add_columns_from_sdm": WorkRequestSummaryOperationTypeAddColumnsFromSdm, "masking_job": WorkRequestSummaryOperationTypeMaskingJob, + "create_difference": WorkRequestSummaryOperationTypeCreateDifference, + "delete_difference": WorkRequestSummaryOperationTypeDeleteDifference, + "update_difference": WorkRequestSummaryOperationTypeUpdateDifference, + "patch_difference": WorkRequestSummaryOperationTypePatchDifference, + "apply_difference": WorkRequestSummaryOperationTypeApplyDifference, "create_schedule": WorkRequestSummaryOperationTypeCreateSchedule, "remove_schedule_report": WorkRequestSummaryOperationTypeRemoveScheduleReport, "update_all_alert": WorkRequestSummaryOperationTypeUpdateAllAlert, @@ -469,6 +484,11 @@ func GetWorkRequestSummaryOperationTypeEnumStringValues() []string { "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", + "CREATE_DIFFERENCE", + "DELETE_DIFFERENCE", + "UPDATE_DIFFERENCE", + "PATCH_DIFFERENCE", + "APPLY_DIFFERENCE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", diff --git a/opsi/addm_db_collection.go b/opsi/addm_db_collection.go new file mode 100644 index 0000000000..50d7828571 --- /dev/null +++ b/opsi/addm_db_collection.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbCollection The result of ADDM databases +type AddmDbCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of ADDM database summary data + Items []AddmDbSummary `mandatory:"true" json:"items"` +} + +func (m AddmDbCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_finding_aggregation.go b/opsi/addm_db_finding_aggregation.go new file mode 100644 index 0000000000..806494c307 --- /dev/null +++ b/opsi/addm_db_finding_aggregation.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbFindingAggregation Summarizes a specific ADDM finding +type AddmDbFindingAggregation struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Unique finding id + FindingId *string `mandatory:"true" json:"findingId"` + + // Category name + CategoryName *string `mandatory:"true" json:"categoryName"` + + // Category display name + CategoryDisplayName *string `mandatory:"true" json:"categoryDisplayName"` + + // Finding name + Name *string `mandatory:"true" json:"name"` + + // Finding message + Message *string `mandatory:"true" json:"message"` + + // Overall impact in terms of percentage of total activity + ImpactOverallPercent *float64 `mandatory:"true" json:"impactOverallPercent"` + + // Maximum impact in terms of percentage of total activity + ImpactMaxPercent *float64 `mandatory:"true" json:"impactMaxPercent"` + + // Number of occurrences for this finding + FrequencyCount *int `mandatory:"true" json:"frequencyCount"` + + // Number of recommendations for this finding + RecommendationCount *int `mandatory:"true" json:"recommendationCount"` + + // Impact in terms of average active sessions + ImpactAvgActiveSessions *float64 `mandatory:"false" json:"impactAvgActiveSessions"` +} + +func (m AddmDbFindingAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbFindingAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_finding_aggregation_collection.go b/opsi/addm_db_finding_aggregation_collection.go new file mode 100644 index 0000000000..6f19a42edb --- /dev/null +++ b/opsi/addm_db_finding_aggregation_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbFindingAggregationCollection Summarizes ADDM findings over specified time period +type AddmDbFindingAggregationCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of ADDM finding summaries + Items []AddmDbFindingAggregation `mandatory:"true" json:"items"` +} + +func (m AddmDbFindingAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbFindingAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_finding_category_collection.go b/opsi/addm_db_finding_category_collection.go new file mode 100644 index 0000000000..4d2fee730f --- /dev/null +++ b/opsi/addm_db_finding_category_collection.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbFindingCategoryCollection List of finding categories +type AddmDbFindingCategoryCollection struct { + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of finding categories + Items []AddmDbFindingCategorySummary `mandatory:"true" json:"items"` +} + +func (m AddmDbFindingCategoryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbFindingCategoryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_finding_category_summary.go b/opsi/addm_db_finding_category_summary.go new file mode 100644 index 0000000000..c949b386e0 --- /dev/null +++ b/opsi/addm_db_finding_category_summary.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbFindingCategorySummary Finding category summary +type AddmDbFindingCategorySummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Name of finding category + Name *string `mandatory:"true" json:"name"` + + // Display name of finding category + DisplayName *string `mandatory:"true" json:"displayName"` +} + +func (m AddmDbFindingCategorySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbFindingCategorySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_findings_time_series_collection.go b/opsi/addm_db_findings_time_series_collection.go new file mode 100644 index 0000000000..e818cb13f3 --- /dev/null +++ b/opsi/addm_db_findings_time_series_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbFindingsTimeSeriesCollection ADDM findings time series response. +type AddmDbFindingsTimeSeriesCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of ADDM finding time series data + Items []AddmDbFindingsTimeSeriesSummary `mandatory:"true" json:"items"` +} + +func (m AddmDbFindingsTimeSeriesCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbFindingsTimeSeriesCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_findings_time_series_summary.go b/opsi/addm_db_findings_time_series_summary.go new file mode 100644 index 0000000000..193ed437b7 --- /dev/null +++ b/opsi/addm_db_findings_time_series_summary.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbFindingsTimeSeriesSummary ADDM findings time series data +type AddmDbFindingsTimeSeriesSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Unique ADDM task id + TaskId *int `mandatory:"true" json:"taskId"` + + // ADDM task name + TaskName *string `mandatory:"true" json:"taskName"` + + // Unique finding id + FindingId *string `mandatory:"true" json:"findingId"` + + // Timestamp when finding was generated + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` + + // Category name + CategoryName *string `mandatory:"true" json:"categoryName"` + + // Category display name + CategoryDisplayName *string `mandatory:"true" json:"categoryDisplayName"` + + // Finding name + Name *string `mandatory:"true" json:"name"` + + // Finding message + Message *string `mandatory:"true" json:"message"` + + // Impact in terms of percentage of total activity + ImpactPercent *float64 `mandatory:"true" json:"impactPercent"` + + // Impact in terms of average active sessions + ImpactAvgActiveSessions *float64 `mandatory:"true" json:"impactAvgActiveSessions"` + + // Start Timestamp of snapshot + TimeAnalysisStarted *common.SDKTime `mandatory:"false" json:"timeAnalysisStarted"` + + // End Timestamp of snapshot + TimeAnalysisEnded *common.SDKTime `mandatory:"false" json:"timeAnalysisEnded"` + + // DB time in seconds for the snapshot + AnalysisDbTimeInSecs *float64 `mandatory:"false" json:"analysisDbTimeInSecs"` + + // DB avg active sessions for the snapshot + AnalysisAvgActiveSessions *float64 `mandatory:"false" json:"analysisAvgActiveSessions"` + + // Impact in seconds + ImpactDbTimeInSecs *float64 `mandatory:"false" json:"impactDbTimeInSecs"` +} + +func (m AddmDbFindingsTimeSeriesSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbFindingsTimeSeriesSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_parameter_aggregation.go b/opsi/addm_db_parameter_aggregation.go new file mode 100644 index 0000000000..ea6a6c8f55 --- /dev/null +++ b/opsi/addm_db_parameter_aggregation.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbParameterAggregation Summarizes change history for specific database parameter +type AddmDbParameterAggregation struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Name of parameter + Name *string `mandatory:"true" json:"name"` + + // Indicates whether the parameter's value changed during the selected time range (TRUE) or + // did not change during the selected time range (FALSE) + IsChanged *bool `mandatory:"true" json:"isChanged"` + + // Number of database instance + InstNum *int `mandatory:"false" json:"instNum"` + + // Parameter default value + DefaultValue *string `mandatory:"false" json:"defaultValue"` + + // Parameter value when time period began + BeginValue *string `mandatory:"false" json:"beginValue"` + + // Parameter value when time period ended + EndValue *string `mandatory:"false" json:"endValue"` + + // Indicates whether the parameter's end value was set to the default value (TRUE) or was + // specified in the parameter file (FALSE) + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // Indicates whether the parameter has been modified after instance starup + // MODIFIED - Parameter has been modified with ALTER SESSION + // SYSTEM_MOD - Parameter has been modified with ALTER SYSTEM + // FALSE - Parameter has not been modified after instance starup + ValueModified *string `mandatory:"false" json:"valueModified"` + + // Indicates whether the parameter is a high impact parameter (TRUE) or not (FALSE) + IsHighImpact *bool `mandatory:"false" json:"isHighImpact"` +} + +func (m AddmDbParameterAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbParameterAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_parameter_aggregation_collection.go b/opsi/addm_db_parameter_aggregation_collection.go new file mode 100644 index 0000000000..4d612f8c74 --- /dev/null +++ b/opsi/addm_db_parameter_aggregation_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbParameterAggregationCollection Summarizes AWR parameter change history over specified time period +type AddmDbParameterAggregationCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of AWR parameter change summaries + Items []AddmDbParameterAggregation `mandatory:"true" json:"items"` +} + +func (m AddmDbParameterAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbParameterAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_parameter_category_collection.go b/opsi/addm_db_parameter_category_collection.go new file mode 100644 index 0000000000..888addf1ae --- /dev/null +++ b/opsi/addm_db_parameter_category_collection.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbParameterCategoryCollection List of database parameter categories +type AddmDbParameterCategoryCollection struct { + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of database parameter categories + Items []AddmDbParameterCategorySummary `mandatory:"true" json:"items"` +} + +func (m AddmDbParameterCategoryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbParameterCategoryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_parameter_category_summary.go b/opsi/addm_db_parameter_category_summary.go new file mode 100644 index 0000000000..e045c8a66d --- /dev/null +++ b/opsi/addm_db_parameter_category_summary.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbParameterCategorySummary Database parameter category summary +type AddmDbParameterCategorySummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Name of database parameter category + Name *string `mandatory:"true" json:"name"` + + // Display name of database parameter category + DisplayName *string `mandatory:"true" json:"displayName"` +} + +func (m AddmDbParameterCategorySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbParameterCategorySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_parameter_change_aggregation.go b/opsi/addm_db_parameter_change_aggregation.go new file mode 100644 index 0000000000..ca5fd1f924 --- /dev/null +++ b/opsi/addm_db_parameter_change_aggregation.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbParameterChangeAggregation Change record for AWR database parameter +type AddmDbParameterChangeAggregation struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Begin time of interval which includes change + TimeBegin *common.SDKTime `mandatory:"true" json:"timeBegin"` + + // End time of interval which includes change + TimeEnd *common.SDKTime `mandatory:"true" json:"timeEnd"` + + // Instance number + InstNum *int `mandatory:"true" json:"instNum"` + + // AWR snapshot id which includes the parameter value change + SnapshotId *int `mandatory:"true" json:"snapshotId"` + + // Previous value + PreviousValue *string `mandatory:"false" json:"previousValue"` + + // Current value + Value *string `mandatory:"false" json:"value"` +} + +func (m AddmDbParameterChangeAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbParameterChangeAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_parameter_change_aggregation_collection.go b/opsi/addm_db_parameter_change_aggregation_collection.go new file mode 100644 index 0000000000..e122e28d6d --- /dev/null +++ b/opsi/addm_db_parameter_change_aggregation_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbParameterChangeAggregationCollection Summarizes AWR parameter change history over specified time period for specified parameter +type AddmDbParameterChangeAggregationCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of AWR parameter changes + Items []AddmDbParameterChangeAggregation `mandatory:"true" json:"items"` +} + +func (m AddmDbParameterChangeAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbParameterChangeAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_recommendation_aggregation.go b/opsi/addm_db_recommendation_aggregation.go new file mode 100644 index 0000000000..849a0b0c6d --- /dev/null +++ b/opsi/addm_db_recommendation_aggregation.go @@ -0,0 +1,130 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbRecommendationAggregation Summarizes a specific ADDM recommendation +type AddmDbRecommendationAggregation struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Recommendation message + Message *string `mandatory:"true" json:"message"` + + // Type of recommendation + Type *string `mandatory:"false" json:"type"` + + // Indicates implementation of the recommended action requires a database restart in order for it + // to take effect. Possible values "Y", "N" and null. + RequiresDbRestart *string `mandatory:"false" json:"requiresDbRestart"` + + // Actions that can be performed to implement the recommendation (such as 'ALTER PARAMETER', + // 'RUN SQL TUNING ADVISOR') + ImplementActions []string `mandatory:"false" json:"implementActions"` + + // Recommendation message + Rationale *string `mandatory:"false" json:"rationale"` + + // Maximum estimated benefit in terms of percentage of total activity + MaxBenefitPercent *float64 `mandatory:"false" json:"maxBenefitPercent"` + + // Overall estimated benefit in terms of percentage of total activity + OverallBenefitPercent *float64 `mandatory:"false" json:"overallBenefitPercent"` + + // Maximum estimated benefit in terms of average active sessions + MaxBenefitAvgActiveSessions *float64 `mandatory:"false" json:"maxBenefitAvgActiveSessions"` + + // Number of occurrences for this recommendation + FrequencyCount *int `mandatory:"false" json:"frequencyCount"` + + RelatedObject RelatedObjectTypeDetails `mandatory:"false" json:"relatedObject"` +} + +func (m AddmDbRecommendationAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbRecommendationAggregation) 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 *AddmDbRecommendationAggregation) UnmarshalJSON(data []byte) (e error) { + model := struct { + Type *string `json:"type"` + RequiresDbRestart *string `json:"requiresDbRestart"` + ImplementActions []string `json:"implementActions"` + Rationale *string `json:"rationale"` + MaxBenefitPercent *float64 `json:"maxBenefitPercent"` + OverallBenefitPercent *float64 `json:"overallBenefitPercent"` + MaxBenefitAvgActiveSessions *float64 `json:"maxBenefitAvgActiveSessions"` + FrequencyCount *int `json:"frequencyCount"` + RelatedObject relatedobjecttypedetails `json:"relatedObject"` + Id *string `json:"id"` + Message *string `json:"message"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Type = model.Type + + m.RequiresDbRestart = model.RequiresDbRestart + + m.ImplementActions = make([]string, len(model.ImplementActions)) + for i, n := range model.ImplementActions { + m.ImplementActions[i] = n + } + + m.Rationale = model.Rationale + + m.MaxBenefitPercent = model.MaxBenefitPercent + + m.OverallBenefitPercent = model.OverallBenefitPercent + + m.MaxBenefitAvgActiveSessions = model.MaxBenefitAvgActiveSessions + + m.FrequencyCount = model.FrequencyCount + + nn, e = model.RelatedObject.UnmarshalPolymorphicJSON(model.RelatedObject.JsonData) + if e != nil { + return + } + if nn != nil { + m.RelatedObject = nn.(RelatedObjectTypeDetails) + } else { + m.RelatedObject = nil + } + + m.Id = model.Id + + m.Message = model.Message + + return +} diff --git a/opsi/addm_db_recommendation_aggregation_collection.go b/opsi/addm_db_recommendation_aggregation_collection.go new file mode 100644 index 0000000000..eda3e6a564 --- /dev/null +++ b/opsi/addm_db_recommendation_aggregation_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbRecommendationAggregationCollection Summarizes ADDM recommendations over specified time period +type AddmDbRecommendationAggregationCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of ADDM recommendation summaries + Items []AddmDbRecommendationAggregation `mandatory:"true" json:"items"` +} + +func (m AddmDbRecommendationAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbRecommendationAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_recommendation_category_collection.go b/opsi/addm_db_recommendation_category_collection.go new file mode 100644 index 0000000000..5d1b23d839 --- /dev/null +++ b/opsi/addm_db_recommendation_category_collection.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbRecommendationCategoryCollection List of recommendation categories +type AddmDbRecommendationCategoryCollection struct { + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of recommendation categories + Items []AddmDbRecommendationCategorySummary `mandatory:"true" json:"items"` +} + +func (m AddmDbRecommendationCategoryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbRecommendationCategoryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_recommendation_category_summary.go b/opsi/addm_db_recommendation_category_summary.go new file mode 100644 index 0000000000..3bbb09e5e3 --- /dev/null +++ b/opsi/addm_db_recommendation_category_summary.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbRecommendationCategorySummary Recommendation category summary +type AddmDbRecommendationCategorySummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Name of recommendation category + Name *string `mandatory:"true" json:"name"` + + // Display name of recommendation category + DisplayName *string `mandatory:"true" json:"displayName"` +} + +func (m AddmDbRecommendationCategorySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbRecommendationCategorySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_recommendations_time_series_collection.go b/opsi/addm_db_recommendations_time_series_collection.go new file mode 100644 index 0000000000..2d2cd87f55 --- /dev/null +++ b/opsi/addm_db_recommendations_time_series_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbRecommendationsTimeSeriesCollection ADDM recommendations time series +type AddmDbRecommendationsTimeSeriesCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of ADDM recommendations time series data + Items []AddmDbRecommendationsTimeSeriesSummary `mandatory:"true" json:"items"` +} + +func (m AddmDbRecommendationsTimeSeriesCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbRecommendationsTimeSeriesCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_recommendations_time_series_summary.go b/opsi/addm_db_recommendations_time_series_summary.go new file mode 100644 index 0000000000..b6dbe1d205 --- /dev/null +++ b/opsi/addm_db_recommendations_time_series_summary.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbRecommendationsTimeSeriesSummary ADDM recommendation +type AddmDbRecommendationsTimeSeriesSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Unique ADDM task id + TaskId *int `mandatory:"true" json:"taskId"` + + // ADDM task name + TaskName *string `mandatory:"true" json:"taskName"` + + // Timestamp when recommendation was generated + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` + + // Start Timestamp of snapshot + TimeAnalysisStarted *common.SDKTime `mandatory:"false" json:"timeAnalysisStarted"` + + // End Timestamp of snapshot + TimeAnalysisEnded *common.SDKTime `mandatory:"false" json:"timeAnalysisEnded"` + + // Type of recommendation + Type *string `mandatory:"false" json:"type"` + + // DB time in seconds for the snapshot + AnalysisDbTimeInSecs *float64 `mandatory:"false" json:"analysisDbTimeInSecs"` + + // DB avg active sessions for the snapshot + AnalysisAvgActiveSessions *float64 `mandatory:"false" json:"analysisAvgActiveSessions"` + + // Maximum estimated benefit in terms of percentage of total activity + MaxBenefitPercent *float64 `mandatory:"false" json:"maxBenefitPercent"` + + // Maximum estimated benefit in terms of seconds + MaxBenefitDbTimeInSecs *float64 `mandatory:"false" json:"maxBenefitDbTimeInSecs"` + + // Maximum estimated benefit in terms of average active sessions + MaxBenefitAvgActiveSessions *float64 `mandatory:"false" json:"maxBenefitAvgActiveSessions"` + + RelatedObject RelatedObjectTypeDetails `mandatory:"false" json:"relatedObject"` +} + +func (m AddmDbRecommendationsTimeSeriesSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbRecommendationsTimeSeriesSummary) 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 *AddmDbRecommendationsTimeSeriesSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + TimeAnalysisStarted *common.SDKTime `json:"timeAnalysisStarted"` + TimeAnalysisEnded *common.SDKTime `json:"timeAnalysisEnded"` + Type *string `json:"type"` + AnalysisDbTimeInSecs *float64 `json:"analysisDbTimeInSecs"` + AnalysisAvgActiveSessions *float64 `json:"analysisAvgActiveSessions"` + MaxBenefitPercent *float64 `json:"maxBenefitPercent"` + MaxBenefitDbTimeInSecs *float64 `json:"maxBenefitDbTimeInSecs"` + MaxBenefitAvgActiveSessions *float64 `json:"maxBenefitAvgActiveSessions"` + RelatedObject relatedobjecttypedetails `json:"relatedObject"` + Id *string `json:"id"` + TaskId *int `json:"taskId"` + TaskName *string `json:"taskName"` + Timestamp *common.SDKTime `json:"timestamp"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.TimeAnalysisStarted = model.TimeAnalysisStarted + + m.TimeAnalysisEnded = model.TimeAnalysisEnded + + m.Type = model.Type + + m.AnalysisDbTimeInSecs = model.AnalysisDbTimeInSecs + + m.AnalysisAvgActiveSessions = model.AnalysisAvgActiveSessions + + m.MaxBenefitPercent = model.MaxBenefitPercent + + m.MaxBenefitDbTimeInSecs = model.MaxBenefitDbTimeInSecs + + m.MaxBenefitAvgActiveSessions = model.MaxBenefitAvgActiveSessions + + nn, e = model.RelatedObject.UnmarshalPolymorphicJSON(model.RelatedObject.JsonData) + if e != nil { + return + } + if nn != nil { + m.RelatedObject = nn.(RelatedObjectTypeDetails) + } else { + m.RelatedObject = nil + } + + m.Id = model.Id + + m.TaskId = model.TaskId + + m.TaskName = model.TaskName + + m.Timestamp = model.Timestamp + + return +} diff --git a/opsi/addm_db_schema_object_collection.go b/opsi/addm_db_schema_object_collection.go new file mode 100644 index 0000000000..325aa04c43 --- /dev/null +++ b/opsi/addm_db_schema_object_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbSchemaObjectCollection Summarizes Schema Objects over specified time period +type AddmDbSchemaObjectCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of Schema Objects + Items []AddmDbSchemaObjectSummary `mandatory:"true" json:"items"` +} + +func (m AddmDbSchemaObjectCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbSchemaObjectCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_schema_object_summary.go b/opsi/addm_db_schema_object_summary.go new file mode 100644 index 0000000000..ddacbe10e4 --- /dev/null +++ b/opsi/addm_db_schema_object_summary.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbSchemaObjectSummary Details for a given object id +type AddmDbSchemaObjectSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // Object id (from RDBMS) + ObjectIdentifier *int `mandatory:"true" json:"objectIdentifier"` + + // Owner of object + Owner *string `mandatory:"true" json:"owner"` + + // Name of object + ObjectName *string `mandatory:"true" json:"objectName"` + + // Type of the object (such as TABLE, INDEX) + ObjectType *string `mandatory:"true" json:"objectType"` + + // Subobject name; for example, partition name + SubObjectName *string `mandatory:"false" json:"subObjectName"` +} + +func (m AddmDbSchemaObjectSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbSchemaObjectSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_sql_statement_collection.go b/opsi/addm_db_sql_statement_collection.go new file mode 100644 index 0000000000..58028a1b94 --- /dev/null +++ b/opsi/addm_db_sql_statement_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbSqlStatementCollection Summarizes SQL statements over specified time period +type AddmDbSqlStatementCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // List of database details data + DatabaseDetailsItems []DatabaseDetails `mandatory:"true" json:"databaseDetailsItems"` + + // List of SQL statements + Items []AddmDbSqlStatementSummary `mandatory:"true" json:"items"` +} + +func (m AddmDbSqlStatementCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbSqlStatementCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_sql_statement_summary.go b/opsi/addm_db_sql_statement_summary.go new file mode 100644 index 0000000000..7f99dd36fd --- /dev/null +++ b/opsi/addm_db_sql_statement_summary.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbSqlStatementSummary Details for a given SQL ID +type AddmDbSqlStatementSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Database insight. + Id *string `mandatory:"true" json:"id"` + + // SQL identifier + SqlIdentifier *string `mandatory:"true" json:"sqlIdentifier"` + + // First 3800 characters of the SQL text + SqlText *string `mandatory:"true" json:"sqlText"` + + // SQL identifier + IsSqlTextTruncated *bool `mandatory:"true" json:"isSqlTextTruncated"` + + // SQL command name (such as SELECT, INSERT) + SqlCommand *string `mandatory:"true" json:"sqlCommand"` +} + +func (m AddmDbSqlStatementSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbSqlStatementSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_db_summary.go b/opsi/addm_db_summary.go new file mode 100644 index 0000000000..3e90997bf0 --- /dev/null +++ b/opsi/addm_db_summary.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmDbSummary ADDM summary for a database +type AddmDbSummary struct { + DatabaseDetails *DatabaseDetails `mandatory:"true" json:"databaseDetails"` + + // Number of ADDM findings + NumberOfFindings *int `mandatory:"false" json:"numberOfFindings"` + + // Number of ADDM tasks + NumberOfAddmTasks *int `mandatory:"false" json:"numberOfAddmTasks"` + + // The start timestamp that was passed into the request. + TimeFirstSnapshotBegin *common.SDKTime `mandatory:"false" json:"timeFirstSnapshotBegin"` + + // The end timestamp that was passed into the request. + TimeLatestSnapshotEnd *common.SDKTime `mandatory:"false" json:"timeLatestSnapshotEnd"` + + // AWR snapshot id. + SnapshotIntervalStart *string `mandatory:"false" json:"snapshotIntervalStart"` + + // AWR snapshot id. + SnapshotIntervalEnd *string `mandatory:"false" json:"snapshotIntervalEnd"` + + // Maximum overall impact in terms of percentage of total activity + MaxOverallImpact *float64 `mandatory:"false" json:"maxOverallImpact"` + + // Category name + MostFrequentCategoryName *string `mandatory:"false" json:"mostFrequentCategoryName"` + + // Category display name + MostFrequentCategoryDisplayName *string `mandatory:"false" json:"mostFrequentCategoryDisplayName"` +} + +func (m AddmDbSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmDbSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/addm_report.go b/opsi/addm_report.go new file mode 100644 index 0000000000..826c46bc43 --- /dev/null +++ b/opsi/addm_report.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddmReport ADDM Tasks. +type AddmReport struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // TASK_ID in the oracle database view DBA_ADDM_TASKS + TaskIdentifier *string `mandatory:"true" json:"taskIdentifier"` + + // Internal id of the database. + DatabaseIdentifier *string `mandatory:"true" json:"databaseIdentifier"` + + // AWR snapshot id. + SnapshotIntervalStart *string `mandatory:"true" json:"snapshotIntervalStart"` + + // AWR snapshot id. + SnapshotIntervalEnd *string `mandatory:"true" json:"snapshotIntervalEnd"` + + // The complete ADDM report + AddmReport *string `mandatory:"true" json:"addmReport"` +} + +func (m AddmReport) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddmReport) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/database_configuration_metric_group.go b/opsi/database_configuration_metric_group.go index 686f36a847..abde2c4b6b 100644 --- a/opsi/database_configuration_metric_group.go +++ b/opsi/database_configuration_metric_group.go @@ -66,6 +66,10 @@ func (m *databaseconfigurationmetricgroup) UnmarshalPolymorphicJSON(data []byte) mm := DbExternalInstance{} err = json.Unmarshal(data, &mm) return mm, err + case "DB_PARAMETERS": + mm := DbParameters{} + err = json.Unmarshal(data, &mm) + return mm, err case "DB_EXTERNAL_PROPERTIES": mm := DbExternalProperties{} err = json.Unmarshal(data, &mm) @@ -104,18 +108,21 @@ const ( DatabaseConfigurationMetricGroupMetricNameExternalProperties DatabaseConfigurationMetricGroupMetricNameEnum = "DB_EXTERNAL_PROPERTIES" DatabaseConfigurationMetricGroupMetricNameExternalInstance DatabaseConfigurationMetricGroupMetricNameEnum = "DB_EXTERNAL_INSTANCE" DatabaseConfigurationMetricGroupMetricNameOsConfigInstance DatabaseConfigurationMetricGroupMetricNameEnum = "DB_OS_CONFIG_INSTANCE" + DatabaseConfigurationMetricGroupMetricNameParameters DatabaseConfigurationMetricGroupMetricNameEnum = "DB_PARAMETERS" ) var mappingDatabaseConfigurationMetricGroupMetricNameEnum = map[string]DatabaseConfigurationMetricGroupMetricNameEnum{ "DB_EXTERNAL_PROPERTIES": DatabaseConfigurationMetricGroupMetricNameExternalProperties, "DB_EXTERNAL_INSTANCE": DatabaseConfigurationMetricGroupMetricNameExternalInstance, "DB_OS_CONFIG_INSTANCE": DatabaseConfigurationMetricGroupMetricNameOsConfigInstance, + "DB_PARAMETERS": DatabaseConfigurationMetricGroupMetricNameParameters, } var mappingDatabaseConfigurationMetricGroupMetricNameEnumLowerCase = map[string]DatabaseConfigurationMetricGroupMetricNameEnum{ "db_external_properties": DatabaseConfigurationMetricGroupMetricNameExternalProperties, "db_external_instance": DatabaseConfigurationMetricGroupMetricNameExternalInstance, "db_os_config_instance": DatabaseConfigurationMetricGroupMetricNameOsConfigInstance, + "db_parameters": DatabaseConfigurationMetricGroupMetricNameParameters, } // GetDatabaseConfigurationMetricGroupMetricNameEnumValues Enumerates the set of values for DatabaseConfigurationMetricGroupMetricNameEnum @@ -133,6 +140,7 @@ func GetDatabaseConfigurationMetricGroupMetricNameEnumStringValues() []string { "DB_EXTERNAL_PROPERTIES", "DB_EXTERNAL_INSTANCE", "DB_OS_CONFIG_INSTANCE", + "DB_PARAMETERS", } } diff --git a/opsi/database_parameter_type_details.go b/opsi/database_parameter_type_details.go new file mode 100644 index 0000000000..8de8a93aa4 --- /dev/null +++ b/opsi/database_parameter_type_details.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DatabaseParameterTypeDetails Database parameter details +type DatabaseParameterTypeDetails struct { + + // Name of database parameter + Name *string `mandatory:"true" json:"name"` +} + +func (m DatabaseParameterTypeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DatabaseParameterTypeDetails) 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 DatabaseParameterTypeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDatabaseParameterTypeDetails DatabaseParameterTypeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDatabaseParameterTypeDetails + }{ + "DATABASE_PARAMETER", + (MarshalTypeDatabaseParameterTypeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/opsi/db_parameters.go b/opsi/db_parameters.go new file mode 100644 index 0000000000..5b3fd3a063 --- /dev/null +++ b/opsi/db_parameters.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbParameters Initialization parameters for a database. +type DbParameters struct { + + // Database instance number. + InstanceNumber *int `mandatory:"true" json:"instanceNumber"` + + // Database parameter name. + ParameterName *string `mandatory:"true" json:"parameterName"` + + // Database parameter value. + ParameterValue *string `mandatory:"true" json:"parameterValue"` + + // Collection timestamp + // Example: `"2020-05-06T00:00:00.000Z"` + TimeCollected *common.SDKTime `mandatory:"false" json:"timeCollected"` + + // AWR snapshot id for the parameter value + SnapshotId *int `mandatory:"false" json:"snapshotId"` + + // Indicates whether the parameter's value changed in given snapshot or not. + IsChanged *string `mandatory:"false" json:"isChanged"` + + // Indicates whether this value is the default value or not. + IsDefault *string `mandatory:"false" json:"isDefault"` +} + +//GetTimeCollected returns TimeCollected +func (m DbParameters) GetTimeCollected() *common.SDKTime { + return m.TimeCollected +} + +func (m DbParameters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbParameters) 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 DbParameters) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDbParameters DbParameters + s := struct { + DiscriminatorParam string `json:"metricName"` + MarshalTypeDbParameters + }{ + "DB_PARAMETERS", + (MarshalTypeDbParameters)(m), + } + + return json.Marshal(&s) +} diff --git a/opsi/ingest_addm_reports_details.go b/opsi/ingest_addm_reports_details.go new file mode 100644 index 0000000000..a67209b0ed --- /dev/null +++ b/opsi/ingest_addm_reports_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IngestAddmReportsDetails Collection of Addm reports +type IngestAddmReportsDetails struct { + + // List of Addm reports + Items []AddmReport `mandatory:"true" json:"items"` +} + +func (m IngestAddmReportsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IngestAddmReportsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/ingest_addm_reports_request_response.go b/opsi/ingest_addm_reports_request_response.go new file mode 100644 index 0000000000..122c3ee1d4 --- /dev/null +++ b/opsi/ingest_addm_reports_request_response.go @@ -0,0 +1,112 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// IngestAddmReportsRequest wrapper for the IngestAddmReports operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/IngestAddmReports.go.html to see an example of how to use IngestAddmReportsRequest. +type IngestAddmReportsRequest struct { + + // Collection of addm reports for a particular database. + IngestAddmReportsDetails `contributesTo:"body"` + + // Optional OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId *string `mandatory:"false" contributesTo:"query" name:"databaseId"` + + // OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database insight resource. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` + // parameter to the value of the etag from a previous get, create, or update response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request that can be retried in case of a timeout or + // server error without risk of executing the same action again. Retry tokens expire after 24 + // hours. + // *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting + // operations, such as a resource being deleted or purged from the system. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request IngestAddmReportsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request IngestAddmReportsRequest) 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 IngestAddmReportsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request IngestAddmReportsRequest) 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 IngestAddmReportsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IngestAddmReportsResponse wrapper for the IngestAddmReports operation +type IngestAddmReportsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IngestAddmReportsResponseDetails instance + IngestAddmReportsResponseDetails `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response IngestAddmReportsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response IngestAddmReportsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/opsi/ingest_addm_reports_response_details.go b/opsi/ingest_addm_reports_response_details.go new file mode 100644 index 0000000000..b0ae84800f --- /dev/null +++ b/opsi/ingest_addm_reports_response_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IngestAddmReportsResponseDetails The response object returned from IngestAddmReports operation. +type IngestAddmReportsResponseDetails struct { + + // Success message returned as a result of the upload. + Message *string `mandatory:"true" json:"message"` +} + +func (m IngestAddmReportsResponseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IngestAddmReportsResponseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/opsi/list_addm_db_finding_categories_request_response.go b/opsi/list_addm_db_finding_categories_request_response.go new file mode 100644 index 0000000000..efdf891f9a --- /dev/null +++ b/opsi/list_addm_db_finding_categories_request_response.go @@ -0,0 +1,234 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddmDbFindingCategoriesRequest wrapper for the ListAddmDbFindingCategories operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbFindingCategories.go.html to see an example of how to use ListAddmDbFindingCategoriesRequest. +type ListAddmDbFindingCategoriesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder ListAddmDbFindingCategoriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the finding categories + SortBy ListAddmDbFindingCategoriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 ListAddmDbFindingCategoriesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddmDbFindingCategoriesRequest) 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 ListAddmDbFindingCategoriesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddmDbFindingCategoriesRequest) 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 ListAddmDbFindingCategoriesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddmDbFindingCategoriesSortOrderEnum(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(GetListAddmDbFindingCategoriesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddmDbFindingCategoriesSortByEnum(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(GetListAddmDbFindingCategoriesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddmDbFindingCategoriesResponse wrapper for the ListAddmDbFindingCategories operation +type ListAddmDbFindingCategoriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbFindingCategoryCollection instances + AddmDbFindingCategoryCollection `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 ListAddmDbFindingCategoriesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddmDbFindingCategoriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddmDbFindingCategoriesSortOrderEnum Enum with underlying type: string +type ListAddmDbFindingCategoriesSortOrderEnum string + +// Set of constants representing the allowable values for ListAddmDbFindingCategoriesSortOrderEnum +const ( + ListAddmDbFindingCategoriesSortOrderAsc ListAddmDbFindingCategoriesSortOrderEnum = "ASC" + ListAddmDbFindingCategoriesSortOrderDesc ListAddmDbFindingCategoriesSortOrderEnum = "DESC" +) + +var mappingListAddmDbFindingCategoriesSortOrderEnum = map[string]ListAddmDbFindingCategoriesSortOrderEnum{ + "ASC": ListAddmDbFindingCategoriesSortOrderAsc, + "DESC": ListAddmDbFindingCategoriesSortOrderDesc, +} + +var mappingListAddmDbFindingCategoriesSortOrderEnumLowerCase = map[string]ListAddmDbFindingCategoriesSortOrderEnum{ + "asc": ListAddmDbFindingCategoriesSortOrderAsc, + "desc": ListAddmDbFindingCategoriesSortOrderDesc, +} + +// GetListAddmDbFindingCategoriesSortOrderEnumValues Enumerates the set of values for ListAddmDbFindingCategoriesSortOrderEnum +func GetListAddmDbFindingCategoriesSortOrderEnumValues() []ListAddmDbFindingCategoriesSortOrderEnum { + values := make([]ListAddmDbFindingCategoriesSortOrderEnum, 0) + for _, v := range mappingListAddmDbFindingCategoriesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbFindingCategoriesSortOrderEnumStringValues Enumerates the set of values in String for ListAddmDbFindingCategoriesSortOrderEnum +func GetListAddmDbFindingCategoriesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddmDbFindingCategoriesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbFindingCategoriesSortOrderEnum(val string) (ListAddmDbFindingCategoriesSortOrderEnum, bool) { + enum, ok := mappingListAddmDbFindingCategoriesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddmDbFindingCategoriesSortByEnum Enum with underlying type: string +type ListAddmDbFindingCategoriesSortByEnum string + +// Set of constants representing the allowable values for ListAddmDbFindingCategoriesSortByEnum +const ( + ListAddmDbFindingCategoriesSortByName ListAddmDbFindingCategoriesSortByEnum = "name" +) + +var mappingListAddmDbFindingCategoriesSortByEnum = map[string]ListAddmDbFindingCategoriesSortByEnum{ + "name": ListAddmDbFindingCategoriesSortByName, +} + +var mappingListAddmDbFindingCategoriesSortByEnumLowerCase = map[string]ListAddmDbFindingCategoriesSortByEnum{ + "name": ListAddmDbFindingCategoriesSortByName, +} + +// GetListAddmDbFindingCategoriesSortByEnumValues Enumerates the set of values for ListAddmDbFindingCategoriesSortByEnum +func GetListAddmDbFindingCategoriesSortByEnumValues() []ListAddmDbFindingCategoriesSortByEnum { + values := make([]ListAddmDbFindingCategoriesSortByEnum, 0) + for _, v := range mappingListAddmDbFindingCategoriesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbFindingCategoriesSortByEnumStringValues Enumerates the set of values in String for ListAddmDbFindingCategoriesSortByEnum +func GetListAddmDbFindingCategoriesSortByEnumStringValues() []string { + return []string{ + "name", + } +} + +// GetMappingListAddmDbFindingCategoriesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbFindingCategoriesSortByEnum(val string) (ListAddmDbFindingCategoriesSortByEnum, bool) { + enum, ok := mappingListAddmDbFindingCategoriesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/list_addm_db_findings_time_series_request_response.go b/opsi/list_addm_db_findings_time_series_request_response.go new file mode 100644 index 0000000000..8d4b113b81 --- /dev/null +++ b/opsi/list_addm_db_findings_time_series_request_response.go @@ -0,0 +1,253 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddmDbFindingsTimeSeriesRequest wrapper for the ListAddmDbFindingsTimeSeries operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbFindingsTimeSeries.go.html to see an example of how to use ListAddmDbFindingsTimeSeriesRequest. +type ListAddmDbFindingsTimeSeriesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // The optional single value query parameter to filter by database instance number. + InstanceNumber *string `mandatory:"false" contributesTo:"query" name:"instanceNumber"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // Optional value filter to match the finding category exactly. + CategoryName *string `mandatory:"false" contributesTo:"query" name:"categoryName"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder ListAddmDbFindingsTimeSeriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the ADDM finding time series summary data + SortBy ListAddmDbFindingsTimeSeriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 ListAddmDbFindingsTimeSeriesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddmDbFindingsTimeSeriesRequest) 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 ListAddmDbFindingsTimeSeriesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddmDbFindingsTimeSeriesRequest) 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 ListAddmDbFindingsTimeSeriesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddmDbFindingsTimeSeriesSortOrderEnum(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(GetListAddmDbFindingsTimeSeriesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddmDbFindingsTimeSeriesSortByEnum(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(GetListAddmDbFindingsTimeSeriesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddmDbFindingsTimeSeriesResponse wrapper for the ListAddmDbFindingsTimeSeries operation +type ListAddmDbFindingsTimeSeriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbFindingsTimeSeriesCollection instances + AddmDbFindingsTimeSeriesCollection `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 ListAddmDbFindingsTimeSeriesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddmDbFindingsTimeSeriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddmDbFindingsTimeSeriesSortOrderEnum Enum with underlying type: string +type ListAddmDbFindingsTimeSeriesSortOrderEnum string + +// Set of constants representing the allowable values for ListAddmDbFindingsTimeSeriesSortOrderEnum +const ( + ListAddmDbFindingsTimeSeriesSortOrderAsc ListAddmDbFindingsTimeSeriesSortOrderEnum = "ASC" + ListAddmDbFindingsTimeSeriesSortOrderDesc ListAddmDbFindingsTimeSeriesSortOrderEnum = "DESC" +) + +var mappingListAddmDbFindingsTimeSeriesSortOrderEnum = map[string]ListAddmDbFindingsTimeSeriesSortOrderEnum{ + "ASC": ListAddmDbFindingsTimeSeriesSortOrderAsc, + "DESC": ListAddmDbFindingsTimeSeriesSortOrderDesc, +} + +var mappingListAddmDbFindingsTimeSeriesSortOrderEnumLowerCase = map[string]ListAddmDbFindingsTimeSeriesSortOrderEnum{ + "asc": ListAddmDbFindingsTimeSeriesSortOrderAsc, + "desc": ListAddmDbFindingsTimeSeriesSortOrderDesc, +} + +// GetListAddmDbFindingsTimeSeriesSortOrderEnumValues Enumerates the set of values for ListAddmDbFindingsTimeSeriesSortOrderEnum +func GetListAddmDbFindingsTimeSeriesSortOrderEnumValues() []ListAddmDbFindingsTimeSeriesSortOrderEnum { + values := make([]ListAddmDbFindingsTimeSeriesSortOrderEnum, 0) + for _, v := range mappingListAddmDbFindingsTimeSeriesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbFindingsTimeSeriesSortOrderEnumStringValues Enumerates the set of values in String for ListAddmDbFindingsTimeSeriesSortOrderEnum +func GetListAddmDbFindingsTimeSeriesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddmDbFindingsTimeSeriesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbFindingsTimeSeriesSortOrderEnum(val string) (ListAddmDbFindingsTimeSeriesSortOrderEnum, bool) { + enum, ok := mappingListAddmDbFindingsTimeSeriesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddmDbFindingsTimeSeriesSortByEnum Enum with underlying type: string +type ListAddmDbFindingsTimeSeriesSortByEnum string + +// Set of constants representing the allowable values for ListAddmDbFindingsTimeSeriesSortByEnum +const ( + ListAddmDbFindingsTimeSeriesSortByTimestamp ListAddmDbFindingsTimeSeriesSortByEnum = "timestamp" +) + +var mappingListAddmDbFindingsTimeSeriesSortByEnum = map[string]ListAddmDbFindingsTimeSeriesSortByEnum{ + "timestamp": ListAddmDbFindingsTimeSeriesSortByTimestamp, +} + +var mappingListAddmDbFindingsTimeSeriesSortByEnumLowerCase = map[string]ListAddmDbFindingsTimeSeriesSortByEnum{ + "timestamp": ListAddmDbFindingsTimeSeriesSortByTimestamp, +} + +// GetListAddmDbFindingsTimeSeriesSortByEnumValues Enumerates the set of values for ListAddmDbFindingsTimeSeriesSortByEnum +func GetListAddmDbFindingsTimeSeriesSortByEnumValues() []ListAddmDbFindingsTimeSeriesSortByEnum { + values := make([]ListAddmDbFindingsTimeSeriesSortByEnum, 0) + for _, v := range mappingListAddmDbFindingsTimeSeriesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbFindingsTimeSeriesSortByEnumStringValues Enumerates the set of values in String for ListAddmDbFindingsTimeSeriesSortByEnum +func GetListAddmDbFindingsTimeSeriesSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListAddmDbFindingsTimeSeriesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbFindingsTimeSeriesSortByEnum(val string) (ListAddmDbFindingsTimeSeriesSortByEnum, bool) { + enum, ok := mappingListAddmDbFindingsTimeSeriesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/list_addm_db_parameter_categories_request_response.go b/opsi/list_addm_db_parameter_categories_request_response.go new file mode 100644 index 0000000000..e1c417dc4d --- /dev/null +++ b/opsi/list_addm_db_parameter_categories_request_response.go @@ -0,0 +1,234 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddmDbParameterCategoriesRequest wrapper for the ListAddmDbParameterCategories operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbParameterCategories.go.html to see an example of how to use ListAddmDbParameterCategoriesRequest. +type ListAddmDbParameterCategoriesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder ListAddmDbParameterCategoriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the database parameter categories + SortBy ListAddmDbParameterCategoriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 ListAddmDbParameterCategoriesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddmDbParameterCategoriesRequest) 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 ListAddmDbParameterCategoriesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddmDbParameterCategoriesRequest) 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 ListAddmDbParameterCategoriesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddmDbParameterCategoriesSortOrderEnum(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(GetListAddmDbParameterCategoriesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddmDbParameterCategoriesSortByEnum(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(GetListAddmDbParameterCategoriesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddmDbParameterCategoriesResponse wrapper for the ListAddmDbParameterCategories operation +type ListAddmDbParameterCategoriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbParameterCategoryCollection instances + AddmDbParameterCategoryCollection `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 ListAddmDbParameterCategoriesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddmDbParameterCategoriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddmDbParameterCategoriesSortOrderEnum Enum with underlying type: string +type ListAddmDbParameterCategoriesSortOrderEnum string + +// Set of constants representing the allowable values for ListAddmDbParameterCategoriesSortOrderEnum +const ( + ListAddmDbParameterCategoriesSortOrderAsc ListAddmDbParameterCategoriesSortOrderEnum = "ASC" + ListAddmDbParameterCategoriesSortOrderDesc ListAddmDbParameterCategoriesSortOrderEnum = "DESC" +) + +var mappingListAddmDbParameterCategoriesSortOrderEnum = map[string]ListAddmDbParameterCategoriesSortOrderEnum{ + "ASC": ListAddmDbParameterCategoriesSortOrderAsc, + "DESC": ListAddmDbParameterCategoriesSortOrderDesc, +} + +var mappingListAddmDbParameterCategoriesSortOrderEnumLowerCase = map[string]ListAddmDbParameterCategoriesSortOrderEnum{ + "asc": ListAddmDbParameterCategoriesSortOrderAsc, + "desc": ListAddmDbParameterCategoriesSortOrderDesc, +} + +// GetListAddmDbParameterCategoriesSortOrderEnumValues Enumerates the set of values for ListAddmDbParameterCategoriesSortOrderEnum +func GetListAddmDbParameterCategoriesSortOrderEnumValues() []ListAddmDbParameterCategoriesSortOrderEnum { + values := make([]ListAddmDbParameterCategoriesSortOrderEnum, 0) + for _, v := range mappingListAddmDbParameterCategoriesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbParameterCategoriesSortOrderEnumStringValues Enumerates the set of values in String for ListAddmDbParameterCategoriesSortOrderEnum +func GetListAddmDbParameterCategoriesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddmDbParameterCategoriesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbParameterCategoriesSortOrderEnum(val string) (ListAddmDbParameterCategoriesSortOrderEnum, bool) { + enum, ok := mappingListAddmDbParameterCategoriesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddmDbParameterCategoriesSortByEnum Enum with underlying type: string +type ListAddmDbParameterCategoriesSortByEnum string + +// Set of constants representing the allowable values for ListAddmDbParameterCategoriesSortByEnum +const ( + ListAddmDbParameterCategoriesSortByName ListAddmDbParameterCategoriesSortByEnum = "name" +) + +var mappingListAddmDbParameterCategoriesSortByEnum = map[string]ListAddmDbParameterCategoriesSortByEnum{ + "name": ListAddmDbParameterCategoriesSortByName, +} + +var mappingListAddmDbParameterCategoriesSortByEnumLowerCase = map[string]ListAddmDbParameterCategoriesSortByEnum{ + "name": ListAddmDbParameterCategoriesSortByName, +} + +// GetListAddmDbParameterCategoriesSortByEnumValues Enumerates the set of values for ListAddmDbParameterCategoriesSortByEnum +func GetListAddmDbParameterCategoriesSortByEnumValues() []ListAddmDbParameterCategoriesSortByEnum { + values := make([]ListAddmDbParameterCategoriesSortByEnum, 0) + for _, v := range mappingListAddmDbParameterCategoriesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbParameterCategoriesSortByEnumStringValues Enumerates the set of values in String for ListAddmDbParameterCategoriesSortByEnum +func GetListAddmDbParameterCategoriesSortByEnumStringValues() []string { + return []string{ + "name", + } +} + +// GetMappingListAddmDbParameterCategoriesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbParameterCategoriesSortByEnum(val string) (ListAddmDbParameterCategoriesSortByEnum, bool) { + enum, ok := mappingListAddmDbParameterCategoriesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/list_addm_db_recommendation_categories_request_response.go b/opsi/list_addm_db_recommendation_categories_request_response.go new file mode 100644 index 0000000000..a28b1d733f --- /dev/null +++ b/opsi/list_addm_db_recommendation_categories_request_response.go @@ -0,0 +1,234 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddmDbRecommendationCategoriesRequest wrapper for the ListAddmDbRecommendationCategories operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbRecommendationCategories.go.html to see an example of how to use ListAddmDbRecommendationCategoriesRequest. +type ListAddmDbRecommendationCategoriesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder ListAddmDbRecommendationCategoriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the recommendation categories + SortBy ListAddmDbRecommendationCategoriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 ListAddmDbRecommendationCategoriesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddmDbRecommendationCategoriesRequest) 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 ListAddmDbRecommendationCategoriesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddmDbRecommendationCategoriesRequest) 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 ListAddmDbRecommendationCategoriesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddmDbRecommendationCategoriesSortOrderEnum(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(GetListAddmDbRecommendationCategoriesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddmDbRecommendationCategoriesSortByEnum(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(GetListAddmDbRecommendationCategoriesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddmDbRecommendationCategoriesResponse wrapper for the ListAddmDbRecommendationCategories operation +type ListAddmDbRecommendationCategoriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbRecommendationCategoryCollection instances + AddmDbRecommendationCategoryCollection `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 ListAddmDbRecommendationCategoriesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddmDbRecommendationCategoriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddmDbRecommendationCategoriesSortOrderEnum Enum with underlying type: string +type ListAddmDbRecommendationCategoriesSortOrderEnum string + +// Set of constants representing the allowable values for ListAddmDbRecommendationCategoriesSortOrderEnum +const ( + ListAddmDbRecommendationCategoriesSortOrderAsc ListAddmDbRecommendationCategoriesSortOrderEnum = "ASC" + ListAddmDbRecommendationCategoriesSortOrderDesc ListAddmDbRecommendationCategoriesSortOrderEnum = "DESC" +) + +var mappingListAddmDbRecommendationCategoriesSortOrderEnum = map[string]ListAddmDbRecommendationCategoriesSortOrderEnum{ + "ASC": ListAddmDbRecommendationCategoriesSortOrderAsc, + "DESC": ListAddmDbRecommendationCategoriesSortOrderDesc, +} + +var mappingListAddmDbRecommendationCategoriesSortOrderEnumLowerCase = map[string]ListAddmDbRecommendationCategoriesSortOrderEnum{ + "asc": ListAddmDbRecommendationCategoriesSortOrderAsc, + "desc": ListAddmDbRecommendationCategoriesSortOrderDesc, +} + +// GetListAddmDbRecommendationCategoriesSortOrderEnumValues Enumerates the set of values for ListAddmDbRecommendationCategoriesSortOrderEnum +func GetListAddmDbRecommendationCategoriesSortOrderEnumValues() []ListAddmDbRecommendationCategoriesSortOrderEnum { + values := make([]ListAddmDbRecommendationCategoriesSortOrderEnum, 0) + for _, v := range mappingListAddmDbRecommendationCategoriesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbRecommendationCategoriesSortOrderEnumStringValues Enumerates the set of values in String for ListAddmDbRecommendationCategoriesSortOrderEnum +func GetListAddmDbRecommendationCategoriesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddmDbRecommendationCategoriesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbRecommendationCategoriesSortOrderEnum(val string) (ListAddmDbRecommendationCategoriesSortOrderEnum, bool) { + enum, ok := mappingListAddmDbRecommendationCategoriesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddmDbRecommendationCategoriesSortByEnum Enum with underlying type: string +type ListAddmDbRecommendationCategoriesSortByEnum string + +// Set of constants representing the allowable values for ListAddmDbRecommendationCategoriesSortByEnum +const ( + ListAddmDbRecommendationCategoriesSortByName ListAddmDbRecommendationCategoriesSortByEnum = "name" +) + +var mappingListAddmDbRecommendationCategoriesSortByEnum = map[string]ListAddmDbRecommendationCategoriesSortByEnum{ + "name": ListAddmDbRecommendationCategoriesSortByName, +} + +var mappingListAddmDbRecommendationCategoriesSortByEnumLowerCase = map[string]ListAddmDbRecommendationCategoriesSortByEnum{ + "name": ListAddmDbRecommendationCategoriesSortByName, +} + +// GetListAddmDbRecommendationCategoriesSortByEnumValues Enumerates the set of values for ListAddmDbRecommendationCategoriesSortByEnum +func GetListAddmDbRecommendationCategoriesSortByEnumValues() []ListAddmDbRecommendationCategoriesSortByEnum { + values := make([]ListAddmDbRecommendationCategoriesSortByEnum, 0) + for _, v := range mappingListAddmDbRecommendationCategoriesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbRecommendationCategoriesSortByEnumStringValues Enumerates the set of values in String for ListAddmDbRecommendationCategoriesSortByEnum +func GetListAddmDbRecommendationCategoriesSortByEnumStringValues() []string { + return []string{ + "name", + } +} + +// GetMappingListAddmDbRecommendationCategoriesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbRecommendationCategoriesSortByEnum(val string) (ListAddmDbRecommendationCategoriesSortByEnum, bool) { + enum, ok := mappingListAddmDbRecommendationCategoriesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/list_addm_db_recommendations_time_series_request_response.go b/opsi/list_addm_db_recommendations_time_series_request_response.go new file mode 100644 index 0000000000..8bd670450b --- /dev/null +++ b/opsi/list_addm_db_recommendations_time_series_request_response.go @@ -0,0 +1,269 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddmDbRecommendationsTimeSeriesRequest wrapper for the ListAddmDbRecommendationsTimeSeries operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbRecommendationsTimeSeries.go.html to see an example of how to use ListAddmDbRecommendationsTimeSeriesRequest. +type ListAddmDbRecommendationsTimeSeriesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // The optional single value query parameter to filter by database instance number. + InstanceNumber *string `mandatory:"false" contributesTo:"query" name:"instanceNumber"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // Optional value filter to match the finding category exactly. + CategoryName *string `mandatory:"false" contributesTo:"query" name:"categoryName"` + + // Optional filter to return only resources whose sql id matches the value given. Only considered when + // categoryName is SQL_TUNING. + SqlIdentifier *string `mandatory:"false" contributesTo:"query" name:"sqlIdentifier"` + + // Optional filter to return only resources whose owner or name contains the substring given. The + // match is not case sensitive. Only considered when categoryName is SCHEMA_OBJECT. + OwnerOrNameContains *string `mandatory:"false" contributesTo:"query" name:"ownerOrNameContains"` + + // Optional filter to return only resources whose name contains the substring given. The + // match is not case sensitive. Only considered when categoryName is DATABASE_CONFIGURATION. + NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"` + + // Optional filter to return only resources whose name exactly matches the substring given. The + // match is case sensitive. Only considered when categoryName is DATABASE_CONFIGURATION. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder ListAddmDbRecommendationsTimeSeriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the ADDM recommendation time series summary data + SortBy ListAddmDbRecommendationsTimeSeriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 ListAddmDbRecommendationsTimeSeriesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddmDbRecommendationsTimeSeriesRequest) 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 ListAddmDbRecommendationsTimeSeriesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddmDbRecommendationsTimeSeriesRequest) 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 ListAddmDbRecommendationsTimeSeriesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddmDbRecommendationsTimeSeriesSortOrderEnum(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(GetListAddmDbRecommendationsTimeSeriesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddmDbRecommendationsTimeSeriesSortByEnum(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(GetListAddmDbRecommendationsTimeSeriesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddmDbRecommendationsTimeSeriesResponse wrapper for the ListAddmDbRecommendationsTimeSeries operation +type ListAddmDbRecommendationsTimeSeriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbRecommendationsTimeSeriesCollection instances + AddmDbRecommendationsTimeSeriesCollection `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 ListAddmDbRecommendationsTimeSeriesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddmDbRecommendationsTimeSeriesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddmDbRecommendationsTimeSeriesSortOrderEnum Enum with underlying type: string +type ListAddmDbRecommendationsTimeSeriesSortOrderEnum string + +// Set of constants representing the allowable values for ListAddmDbRecommendationsTimeSeriesSortOrderEnum +const ( + ListAddmDbRecommendationsTimeSeriesSortOrderAsc ListAddmDbRecommendationsTimeSeriesSortOrderEnum = "ASC" + ListAddmDbRecommendationsTimeSeriesSortOrderDesc ListAddmDbRecommendationsTimeSeriesSortOrderEnum = "DESC" +) + +var mappingListAddmDbRecommendationsTimeSeriesSortOrderEnum = map[string]ListAddmDbRecommendationsTimeSeriesSortOrderEnum{ + "ASC": ListAddmDbRecommendationsTimeSeriesSortOrderAsc, + "DESC": ListAddmDbRecommendationsTimeSeriesSortOrderDesc, +} + +var mappingListAddmDbRecommendationsTimeSeriesSortOrderEnumLowerCase = map[string]ListAddmDbRecommendationsTimeSeriesSortOrderEnum{ + "asc": ListAddmDbRecommendationsTimeSeriesSortOrderAsc, + "desc": ListAddmDbRecommendationsTimeSeriesSortOrderDesc, +} + +// GetListAddmDbRecommendationsTimeSeriesSortOrderEnumValues Enumerates the set of values for ListAddmDbRecommendationsTimeSeriesSortOrderEnum +func GetListAddmDbRecommendationsTimeSeriesSortOrderEnumValues() []ListAddmDbRecommendationsTimeSeriesSortOrderEnum { + values := make([]ListAddmDbRecommendationsTimeSeriesSortOrderEnum, 0) + for _, v := range mappingListAddmDbRecommendationsTimeSeriesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbRecommendationsTimeSeriesSortOrderEnumStringValues Enumerates the set of values in String for ListAddmDbRecommendationsTimeSeriesSortOrderEnum +func GetListAddmDbRecommendationsTimeSeriesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddmDbRecommendationsTimeSeriesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbRecommendationsTimeSeriesSortOrderEnum(val string) (ListAddmDbRecommendationsTimeSeriesSortOrderEnum, bool) { + enum, ok := mappingListAddmDbRecommendationsTimeSeriesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddmDbRecommendationsTimeSeriesSortByEnum Enum with underlying type: string +type ListAddmDbRecommendationsTimeSeriesSortByEnum string + +// Set of constants representing the allowable values for ListAddmDbRecommendationsTimeSeriesSortByEnum +const ( + ListAddmDbRecommendationsTimeSeriesSortByTimestamp ListAddmDbRecommendationsTimeSeriesSortByEnum = "timestamp" +) + +var mappingListAddmDbRecommendationsTimeSeriesSortByEnum = map[string]ListAddmDbRecommendationsTimeSeriesSortByEnum{ + "timestamp": ListAddmDbRecommendationsTimeSeriesSortByTimestamp, +} + +var mappingListAddmDbRecommendationsTimeSeriesSortByEnumLowerCase = map[string]ListAddmDbRecommendationsTimeSeriesSortByEnum{ + "timestamp": ListAddmDbRecommendationsTimeSeriesSortByTimestamp, +} + +// GetListAddmDbRecommendationsTimeSeriesSortByEnumValues Enumerates the set of values for ListAddmDbRecommendationsTimeSeriesSortByEnum +func GetListAddmDbRecommendationsTimeSeriesSortByEnumValues() []ListAddmDbRecommendationsTimeSeriesSortByEnum { + values := make([]ListAddmDbRecommendationsTimeSeriesSortByEnum, 0) + for _, v := range mappingListAddmDbRecommendationsTimeSeriesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbRecommendationsTimeSeriesSortByEnumStringValues Enumerates the set of values in String for ListAddmDbRecommendationsTimeSeriesSortByEnum +func GetListAddmDbRecommendationsTimeSeriesSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListAddmDbRecommendationsTimeSeriesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbRecommendationsTimeSeriesSortByEnum(val string) (ListAddmDbRecommendationsTimeSeriesSortByEnum, bool) { + enum, ok := mappingListAddmDbRecommendationsTimeSeriesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/list_addm_dbs_request_response.go b/opsi/list_addm_dbs_request_response.go new file mode 100644 index 0000000000..01dde8ae23 --- /dev/null +++ b/opsi/list_addm_dbs_request_response.go @@ -0,0 +1,251 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddmDbsRequest wrapper for the ListAddmDbs operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbs.go.html to see an example of how to use ListAddmDbsRequest. +type ListAddmDbsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder ListAddmDbsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting ADDM database data + SortBy ListAddmDbsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 ListAddmDbsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddmDbsRequest) 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 ListAddmDbsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddmDbsRequest) 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 ListAddmDbsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddmDbsSortOrderEnum(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(GetListAddmDbsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddmDbsSortByEnum(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(GetListAddmDbsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddmDbsResponse wrapper for the ListAddmDbs operation +type ListAddmDbsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbCollection instances + AddmDbCollection `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 ListAddmDbsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddmDbsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddmDbsSortOrderEnum Enum with underlying type: string +type ListAddmDbsSortOrderEnum string + +// Set of constants representing the allowable values for ListAddmDbsSortOrderEnum +const ( + ListAddmDbsSortOrderAsc ListAddmDbsSortOrderEnum = "ASC" + ListAddmDbsSortOrderDesc ListAddmDbsSortOrderEnum = "DESC" +) + +var mappingListAddmDbsSortOrderEnum = map[string]ListAddmDbsSortOrderEnum{ + "ASC": ListAddmDbsSortOrderAsc, + "DESC": ListAddmDbsSortOrderDesc, +} + +var mappingListAddmDbsSortOrderEnumLowerCase = map[string]ListAddmDbsSortOrderEnum{ + "asc": ListAddmDbsSortOrderAsc, + "desc": ListAddmDbsSortOrderDesc, +} + +// GetListAddmDbsSortOrderEnumValues Enumerates the set of values for ListAddmDbsSortOrderEnum +func GetListAddmDbsSortOrderEnumValues() []ListAddmDbsSortOrderEnum { + values := make([]ListAddmDbsSortOrderEnum, 0) + for _, v := range mappingListAddmDbsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbsSortOrderEnumStringValues Enumerates the set of values in String for ListAddmDbsSortOrderEnum +func GetListAddmDbsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddmDbsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbsSortOrderEnum(val string) (ListAddmDbsSortOrderEnum, bool) { + enum, ok := mappingListAddmDbsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddmDbsSortByEnum Enum with underlying type: string +type ListAddmDbsSortByEnum string + +// Set of constants representing the allowable values for ListAddmDbsSortByEnum +const ( + ListAddmDbsSortByDatabasename ListAddmDbsSortByEnum = "databaseName" + ListAddmDbsSortByNumberoffindings ListAddmDbsSortByEnum = "numberOfFindings" +) + +var mappingListAddmDbsSortByEnum = map[string]ListAddmDbsSortByEnum{ + "databaseName": ListAddmDbsSortByDatabasename, + "numberOfFindings": ListAddmDbsSortByNumberoffindings, +} + +var mappingListAddmDbsSortByEnumLowerCase = map[string]ListAddmDbsSortByEnum{ + "databasename": ListAddmDbsSortByDatabasename, + "numberoffindings": ListAddmDbsSortByNumberoffindings, +} + +// GetListAddmDbsSortByEnumValues Enumerates the set of values for ListAddmDbsSortByEnum +func GetListAddmDbsSortByEnumValues() []ListAddmDbsSortByEnum { + values := make([]ListAddmDbsSortByEnum, 0) + for _, v := range mappingListAddmDbsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddmDbsSortByEnumStringValues Enumerates the set of values in String for ListAddmDbsSortByEnum +func GetListAddmDbsSortByEnumStringValues() []string { + return []string{ + "databaseName", + "numberOfFindings", + } +} + +// GetMappingListAddmDbsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddmDbsSortByEnum(val string) (ListAddmDbsSortByEnum, bool) { + enum, ok := mappingListAddmDbsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/opsi_operationsinsights_client.go b/opsi/opsi_operationsinsights_client.go index e8937dc78d..f3ef613782 100644 --- a/opsi/opsi_operationsinsights_client.go +++ b/opsi/opsi_operationsinsights_client.go @@ -3130,6 +3130,70 @@ func (client OperationsInsightsClient) getWorkRequest(ctx context.Context, reque return response, err } +// IngestAddmReports This endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline. +// Either databaseId or id must be specified. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/IngestAddmReports.go.html to see an example of how to use IngestAddmReports API. +// A default retry strategy applies to this operation IngestAddmReports() +func (client OperationsInsightsClient) IngestAddmReports(ctx context.Context, request IngestAddmReportsRequest) (response IngestAddmReportsResponse, 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.ingestAddmReports, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = IngestAddmReportsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = IngestAddmReportsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(IngestAddmReportsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into IngestAddmReportsResponse") + } + return +} + +// ingestAddmReports implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) ingestAddmReports(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/databaseInsights/actions/ingestAddmReports", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response IngestAddmReportsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/IngestAddmReports" + err = common.PostProcessServiceError(err, "OperationsInsights", "IngestAddmReports", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // IngestDatabaseConfiguration This is a generic ingest endpoint for all database configuration metrics. // // See also @@ -3576,13 +3640,13 @@ func (client OperationsInsightsClient) ingestSqlText(ctx context.Context, reques return response, err } -// ListAwrDatabaseSnapshots Lists AWR snapshots for the specified database in the AWR. +// ListAddmDbFindingCategories Gets list of ADDM finding categories. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrDatabaseSnapshots.go.html to see an example of how to use ListAwrDatabaseSnapshots API. -// A default retry strategy applies to this operation ListAwrDatabaseSnapshots() -func (client OperationsInsightsClient) ListAwrDatabaseSnapshots(ctx context.Context, request ListAwrDatabaseSnapshotsRequest) (response ListAwrDatabaseSnapshotsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbFindingCategories.go.html to see an example of how to use ListAddmDbFindingCategories API. +// A default retry strategy applies to this operation ListAddmDbFindingCategories() +func (client OperationsInsightsClient) ListAddmDbFindingCategories(ctx context.Context, request ListAddmDbFindingCategoriesRequest) (response ListAddmDbFindingCategoriesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3591,42 +3655,42 @@ func (client OperationsInsightsClient) ListAwrDatabaseSnapshots(ctx context.Cont if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listAwrDatabaseSnapshots, policy) + ociResponse, err = common.Retry(ctx, request, client.listAddmDbFindingCategories, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAwrDatabaseSnapshotsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAddmDbFindingCategoriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAwrDatabaseSnapshotsResponse{} + response = ListAddmDbFindingCategoriesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAwrDatabaseSnapshotsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAddmDbFindingCategoriesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAwrDatabaseSnapshotsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAddmDbFindingCategoriesResponse") } return } -// listAwrDatabaseSnapshots implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listAwrDatabaseSnapshots(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAddmDbFindingCategories implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAddmDbFindingCategories(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs/{awrHubId}/awrDatabaseSnapshots", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbFindingCategories", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAwrDatabaseSnapshotsResponse + var response ListAddmDbFindingCategoriesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabaseSnapshots" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrDatabaseSnapshots", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbFindingCategories" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAddmDbFindingCategories", apiReferenceLink) return response, err } @@ -3634,13 +3698,13 @@ func (client OperationsInsightsClient) listAwrDatabaseSnapshots(ctx context.Cont return response, err } -// ListAwrDatabases Gets the list of databases and their snapshot summary details available in the AWRHub. +// ListAddmDbFindingsTimeSeries Get the ADDM findings time series for the specified databases for a given time period. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrDatabases.go.html to see an example of how to use ListAwrDatabases API. -// A default retry strategy applies to this operation ListAwrDatabases() -func (client OperationsInsightsClient) ListAwrDatabases(ctx context.Context, request ListAwrDatabasesRequest) (response ListAwrDatabasesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbFindingsTimeSeries.go.html to see an example of how to use ListAddmDbFindingsTimeSeries API. +// A default retry strategy applies to this operation ListAddmDbFindingsTimeSeries() +func (client OperationsInsightsClient) ListAddmDbFindingsTimeSeries(ctx context.Context, request ListAddmDbFindingsTimeSeriesRequest) (response ListAddmDbFindingsTimeSeriesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3649,42 +3713,42 @@ func (client OperationsInsightsClient) ListAwrDatabases(ctx context.Context, req if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listAwrDatabases, policy) + ociResponse, err = common.Retry(ctx, request, client.listAddmDbFindingsTimeSeries, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAwrDatabasesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAddmDbFindingsTimeSeriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAwrDatabasesResponse{} + response = ListAddmDbFindingsTimeSeriesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAwrDatabasesResponse); ok { + if convertedResponse, ok := ociResponse.(ListAddmDbFindingsTimeSeriesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAwrDatabasesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAddmDbFindingsTimeSeriesResponse") } return } -// listAwrDatabases implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listAwrDatabases(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAddmDbFindingsTimeSeries implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAddmDbFindingsTimeSeries(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs/{awrHubId}/awrDatabases", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbFindingsTimeSeries", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAwrDatabasesResponse + var response ListAddmDbFindingsTimeSeriesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabases" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrDatabases", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbFindingsTimeSeries" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAddmDbFindingsTimeSeries", apiReferenceLink) return response, err } @@ -3692,13 +3756,13 @@ func (client OperationsInsightsClient) listAwrDatabases(ctx context.Context, req return response, err } -// ListAwrHubs Gets a list of AWR hubs. Either compartmentId or id must be specified. All these resources are expected to be in root compartment. +// ListAddmDbParameterCategories Gets list of ADDM database parameter categories for the specified databases. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrHubs.go.html to see an example of how to use ListAwrHubs API. -// A default retry strategy applies to this operation ListAwrHubs() -func (client OperationsInsightsClient) ListAwrHubs(ctx context.Context, request ListAwrHubsRequest) (response ListAwrHubsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbParameterCategories.go.html to see an example of how to use ListAddmDbParameterCategories API. +// A default retry strategy applies to this operation ListAddmDbParameterCategories() +func (client OperationsInsightsClient) ListAddmDbParameterCategories(ctx context.Context, request ListAddmDbParameterCategoriesRequest) (response ListAddmDbParameterCategoriesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3707,42 +3771,42 @@ func (client OperationsInsightsClient) ListAwrHubs(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listAwrHubs, policy) + ociResponse, err = common.Retry(ctx, request, client.listAddmDbParameterCategories, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAwrHubsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAddmDbParameterCategoriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAwrHubsResponse{} + response = ListAddmDbParameterCategoriesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAwrHubsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAddmDbParameterCategoriesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAwrHubsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAddmDbParameterCategoriesResponse") } return } -// listAwrHubs implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listAwrHubs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAddmDbParameterCategories implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAddmDbParameterCategories(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbParameterCategories", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAwrHubsResponse + var response ListAddmDbParameterCategoriesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrHubs" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrHubs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbParameterCategories" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAddmDbParameterCategories", apiReferenceLink) return response, err } @@ -3750,14 +3814,13 @@ func (client OperationsInsightsClient) listAwrHubs(ctx context.Context, request return response, err } -// ListAwrSnapshots Lists AWR snapshots for the specified source database in the AWR hub. The difference between the timeGreaterThanOrEqualTo and timeLessThanOrEqualTo should not exceed an elapsed range of 1 day. -// The timeGreaterThanOrEqualTo & timeLessThanOrEqualTo params are optional. If these params are not provided, by default last 1 day snapshots will be returned. +// ListAddmDbRecommendationCategories Gets list of ADDM recommendation categories for the specified databases. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrSnapshots.go.html to see an example of how to use ListAwrSnapshots API. -// A default retry strategy applies to this operation ListAwrSnapshots() -func (client OperationsInsightsClient) ListAwrSnapshots(ctx context.Context, request ListAwrSnapshotsRequest) (response ListAwrSnapshotsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbRecommendationCategories.go.html to see an example of how to use ListAddmDbRecommendationCategories API. +// A default retry strategy applies to this operation ListAddmDbRecommendationCategories() +func (client OperationsInsightsClient) ListAddmDbRecommendationCategories(ctx context.Context, request ListAddmDbRecommendationCategoriesRequest) (response ListAddmDbRecommendationCategoriesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3766,42 +3829,42 @@ func (client OperationsInsightsClient) ListAwrSnapshots(ctx context.Context, req if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listAwrSnapshots, policy) + ociResponse, err = common.Retry(ctx, request, client.listAddmDbRecommendationCategories, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAwrSnapshotsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAddmDbRecommendationCategoriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAwrSnapshotsResponse{} + response = ListAddmDbRecommendationCategoriesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAwrSnapshotsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAddmDbRecommendationCategoriesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAwrSnapshotsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAddmDbRecommendationCategoriesResponse") } return } -// listAwrSnapshots implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listAwrSnapshots(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAddmDbRecommendationCategories implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAddmDbRecommendationCategories(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs/{awrHubId}/awrSnapshots", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbRecommendationCategories", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAwrSnapshotsResponse + var response ListAddmDbRecommendationCategoriesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrSnapshots" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrSnapshots", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbRecommendationCategories" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAddmDbRecommendationCategories", apiReferenceLink) return response, err } @@ -3809,14 +3872,13 @@ func (client OperationsInsightsClient) listAwrSnapshots(ctx context.Context, req return response, err } -// ListDatabaseConfigurations Gets a list of database insight configurations based on the query parameters specified. Either compartmentId or databaseInsightId query parameter must be specified. -// When both compartmentId and compartmentIdInSubtree are specified, a list of database insight configurations in that compartment and in all sub-compartments will be returned. +// ListAddmDbRecommendationsTimeSeries Gets time series data for ADDM recommendations for the specified databases. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListDatabaseConfigurations.go.html to see an example of how to use ListDatabaseConfigurations API. -// A default retry strategy applies to this operation ListDatabaseConfigurations() -func (client OperationsInsightsClient) ListDatabaseConfigurations(ctx context.Context, request ListDatabaseConfigurationsRequest) (response ListDatabaseConfigurationsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbRecommendationsTimeSeries.go.html to see an example of how to use ListAddmDbRecommendationsTimeSeries API. +// A default retry strategy applies to this operation ListAddmDbRecommendationsTimeSeries() +func (client OperationsInsightsClient) ListAddmDbRecommendationsTimeSeries(ctx context.Context, request ListAddmDbRecommendationsTimeSeriesRequest) (response ListAddmDbRecommendationsTimeSeriesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3825,42 +3887,42 @@ func (client OperationsInsightsClient) ListDatabaseConfigurations(ctx context.Co if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listDatabaseConfigurations, policy) + ociResponse, err = common.Retry(ctx, request, client.listAddmDbRecommendationsTimeSeries, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDatabaseConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAddmDbRecommendationsTimeSeriesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDatabaseConfigurationsResponse{} + response = ListAddmDbRecommendationsTimeSeriesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDatabaseConfigurationsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAddmDbRecommendationsTimeSeriesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDatabaseConfigurationsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAddmDbRecommendationsTimeSeriesResponse") } return } -// listDatabaseConfigurations implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listDatabaseConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAddmDbRecommendationsTimeSeries implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAddmDbRecommendationsTimeSeries(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/databaseConfigurations", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbRecommendationsTimeSeries", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDatabaseConfigurationsResponse + var response ListAddmDbRecommendationsTimeSeriesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseConfigurations" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListDatabaseConfigurations", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbRecommendationsTimeSeries" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAddmDbRecommendationsTimeSeries", apiReferenceLink) return response, err } @@ -3868,14 +3930,13 @@ func (client OperationsInsightsClient) listDatabaseConfigurations(ctx context.Co return response, err } -// ListDatabaseInsights Gets a list of database insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. -// When both compartmentId and compartmentIdInSubtree are specified, a list of database insights in that compartment and in all sub-compartments will be returned. +// ListAddmDbs Gets a list of ADDM database information // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListDatabaseInsights.go.html to see an example of how to use ListDatabaseInsights API. -// A default retry strategy applies to this operation ListDatabaseInsights() -func (client OperationsInsightsClient) ListDatabaseInsights(ctx context.Context, request ListDatabaseInsightsRequest) (response ListDatabaseInsightsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAddmDbs.go.html to see an example of how to use ListAddmDbs API. +// A default retry strategy applies to this operation ListAddmDbs() +func (client OperationsInsightsClient) ListAddmDbs(ctx context.Context, request ListAddmDbsRequest) (response ListAddmDbsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3884,42 +3945,42 @@ func (client OperationsInsightsClient) ListDatabaseInsights(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listDatabaseInsights, policy) + ociResponse, err = common.Retry(ctx, request, client.listAddmDbs, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDatabaseInsightsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAddmDbsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDatabaseInsightsResponse{} + response = ListAddmDbsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDatabaseInsightsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAddmDbsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDatabaseInsightsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAddmDbsResponse") } return } -// listDatabaseInsights implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listDatabaseInsights(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAddmDbs implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAddmDbs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbs", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDatabaseInsightsResponse + var response ListAddmDbsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseInsights" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListDatabaseInsights", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListAddmDbs" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAddmDbs", apiReferenceLink) return response, err } @@ -3927,14 +3988,13 @@ func (client OperationsInsightsClient) listDatabaseInsights(ctx context.Context, return response, err } -// ListEnterpriseManagerBridges Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. -// When both compartmentId and compartmentIdInSubtree are specified, a list of bridges in that compartment and in all sub-compartments will be returned. +// ListAwrDatabaseSnapshots Lists AWR snapshots for the specified database in the AWR. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListEnterpriseManagerBridges.go.html to see an example of how to use ListEnterpriseManagerBridges API. -// A default retry strategy applies to this operation ListEnterpriseManagerBridges() -func (client OperationsInsightsClient) ListEnterpriseManagerBridges(ctx context.Context, request ListEnterpriseManagerBridgesRequest) (response ListEnterpriseManagerBridgesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrDatabaseSnapshots.go.html to see an example of how to use ListAwrDatabaseSnapshots API. +// A default retry strategy applies to this operation ListAwrDatabaseSnapshots() +func (client OperationsInsightsClient) ListAwrDatabaseSnapshots(ctx context.Context, request ListAwrDatabaseSnapshotsRequest) (response ListAwrDatabaseSnapshotsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -3943,42 +4003,42 @@ func (client OperationsInsightsClient) ListEnterpriseManagerBridges(ctx context. if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listEnterpriseManagerBridges, policy) + ociResponse, err = common.Retry(ctx, request, client.listAwrDatabaseSnapshots, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListEnterpriseManagerBridgesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAwrDatabaseSnapshotsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListEnterpriseManagerBridgesResponse{} + response = ListAwrDatabaseSnapshotsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListEnterpriseManagerBridgesResponse); ok { + if convertedResponse, ok := ociResponse.(ListAwrDatabaseSnapshotsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListEnterpriseManagerBridgesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAwrDatabaseSnapshotsResponse") } return } -// listEnterpriseManagerBridges implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listEnterpriseManagerBridges(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAwrDatabaseSnapshots implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAwrDatabaseSnapshots(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/enterpriseManagerBridges", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs/{awrHubId}/awrDatabaseSnapshots", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListEnterpriseManagerBridgesResponse + var response ListAwrDatabaseSnapshotsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListEnterpriseManagerBridges" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListEnterpriseManagerBridges", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabaseSnapshots" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrDatabaseSnapshots", apiReferenceLink) return response, err } @@ -3986,13 +4046,13 @@ func (client OperationsInsightsClient) listEnterpriseManagerBridges(ctx context. return response, err } -// ListExadataConfigurations Gets a list of exadata insight configurations. Either compartmentId or exadataInsightsId query parameter must be specified. +// ListAwrDatabases Gets the list of databases and their snapshot summary details available in the AWRHub. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListExadataConfigurations.go.html to see an example of how to use ListExadataConfigurations API. -// A default retry strategy applies to this operation ListExadataConfigurations() -func (client OperationsInsightsClient) ListExadataConfigurations(ctx context.Context, request ListExadataConfigurationsRequest) (response ListExadataConfigurationsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrDatabases.go.html to see an example of how to use ListAwrDatabases API. +// A default retry strategy applies to this operation ListAwrDatabases() +func (client OperationsInsightsClient) ListAwrDatabases(ctx context.Context, request ListAwrDatabasesRequest) (response ListAwrDatabasesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4001,42 +4061,42 @@ func (client OperationsInsightsClient) ListExadataConfigurations(ctx context.Con if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listExadataConfigurations, policy) + ociResponse, err = common.Retry(ctx, request, client.listAwrDatabases, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListExadataConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAwrDatabasesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListExadataConfigurationsResponse{} + response = ListAwrDatabasesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListExadataConfigurationsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAwrDatabasesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListExadataConfigurationsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAwrDatabasesResponse") } return } -// listExadataConfigurations implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listExadataConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAwrDatabases implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAwrDatabases(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exadataInsights/exadataConfigurations", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs/{awrHubId}/awrDatabases", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListExadataConfigurationsResponse + var response ListAwrDatabasesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataConfigurations" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListExadataConfigurations", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrDatabases" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrDatabases", apiReferenceLink) return response, err } @@ -4044,14 +4104,13 @@ func (client OperationsInsightsClient) listExadataConfigurations(ctx context.Con return response, err } -// ListExadataInsights Gets a list of Exadata insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. -// When both compartmentId and compartmentIdInSubtree are specified, a list of Exadata insights in that compartment and in all sub-compartments will be returned. +// ListAwrHubs Gets a list of AWR hubs. Either compartmentId or id must be specified. All these resources are expected to be in root compartment. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListExadataInsights.go.html to see an example of how to use ListExadataInsights API. -// A default retry strategy applies to this operation ListExadataInsights() -func (client OperationsInsightsClient) ListExadataInsights(ctx context.Context, request ListExadataInsightsRequest) (response ListExadataInsightsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrHubs.go.html to see an example of how to use ListAwrHubs API. +// A default retry strategy applies to this operation ListAwrHubs() +func (client OperationsInsightsClient) ListAwrHubs(ctx context.Context, request ListAwrHubsRequest) (response ListAwrHubsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4060,42 +4119,42 @@ func (client OperationsInsightsClient) ListExadataInsights(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listExadataInsights, policy) + ociResponse, err = common.Retry(ctx, request, client.listAwrHubs, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListExadataInsightsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAwrHubsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListExadataInsightsResponse{} + response = ListAwrHubsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListExadataInsightsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAwrHubsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListExadataInsightsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAwrHubsResponse") } return } -// listExadataInsights implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listExadataInsights(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAwrHubs implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAwrHubs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exadataInsights", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListExadataInsightsResponse + var response ListAwrHubsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataInsights" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListExadataInsights", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrHubs" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrHubs", apiReferenceLink) return response, err } @@ -4103,14 +4162,14 @@ func (client OperationsInsightsClient) listExadataInsights(ctx context.Context, return response, err } -// ListHostConfigurations Gets a list of host insight configurations based on the query parameters specified. Either compartmentId or hostInsightId query parameter must be specified. -// When both compartmentId and compartmentIdInSubtree are specified, a list of host insight configurations in that compartment and in all sub-compartments will be returned. +// ListAwrSnapshots Lists AWR snapshots for the specified source database in the AWR hub. The difference between the timeGreaterThanOrEqualTo and timeLessThanOrEqualTo should not exceed an elapsed range of 1 day. +// The timeGreaterThanOrEqualTo & timeLessThanOrEqualTo params are optional. If these params are not provided, by default last 1 day snapshots will be returned. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListHostConfigurations.go.html to see an example of how to use ListHostConfigurations API. -// A default retry strategy applies to this operation ListHostConfigurations() -func (client OperationsInsightsClient) ListHostConfigurations(ctx context.Context, request ListHostConfigurationsRequest) (response ListHostConfigurationsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListAwrSnapshots.go.html to see an example of how to use ListAwrSnapshots API. +// A default retry strategy applies to this operation ListAwrSnapshots() +func (client OperationsInsightsClient) ListAwrSnapshots(ctx context.Context, request ListAwrSnapshotsRequest) (response ListAwrSnapshotsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4119,42 +4178,754 @@ func (client OperationsInsightsClient) ListHostConfigurations(ctx context.Contex if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listHostConfigurations, policy) + ociResponse, err = common.Retry(ctx, request, client.listAwrSnapshots, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListHostConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAwrSnapshotsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListHostConfigurationsResponse{} + response = ListAwrSnapshotsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListHostConfigurationsResponse); ok { + if convertedResponse, ok := ociResponse.(ListAwrSnapshotsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListHostConfigurationsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAwrSnapshotsResponse") } return } -// listHostConfigurations implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listHostConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAwrSnapshots implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listAwrSnapshots(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/awrHubs/{awrHubId}/awrSnapshots", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListAwrSnapshotsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/AwrHubs/ListAwrSnapshots" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListAwrSnapshots", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDatabaseConfigurations Gets a list of database insight configurations based on the query parameters specified. Either compartmentId or databaseInsightId query parameter must be specified. +// When both compartmentId and compartmentIdInSubtree are specified, a list of database insight configurations in that compartment and in all sub-compartments will be returned. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListDatabaseConfigurations.go.html to see an example of how to use ListDatabaseConfigurations API. +// A default retry strategy applies to this operation ListDatabaseConfigurations() +func (client OperationsInsightsClient) ListDatabaseConfigurations(ctx context.Context, request ListDatabaseConfigurationsRequest) (response ListDatabaseConfigurationsResponse, 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.listDatabaseConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDatabaseConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDatabaseConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDatabaseConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDatabaseConfigurationsResponse") + } + return +} + +// listDatabaseConfigurations implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listDatabaseConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/databaseConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListDatabaseConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseConfigurations" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListDatabaseConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDatabaseInsights Gets a list of database insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. +// When both compartmentId and compartmentIdInSubtree are specified, a list of database insights in that compartment and in all sub-compartments will be returned. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListDatabaseInsights.go.html to see an example of how to use ListDatabaseInsights API. +// A default retry strategy applies to this operation ListDatabaseInsights() +func (client OperationsInsightsClient) ListDatabaseInsights(ctx context.Context, request ListDatabaseInsightsRequest) (response ListDatabaseInsightsResponse, 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.listDatabaseInsights, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDatabaseInsightsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDatabaseInsightsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDatabaseInsightsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDatabaseInsightsResponse") + } + return +} + +// listDatabaseInsights implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listDatabaseInsights(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListDatabaseInsightsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListDatabaseInsights" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListDatabaseInsights", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListEnterpriseManagerBridges Gets a list of Operations Insights Enterprise Manager bridges. Either compartmentId or id must be specified. +// When both compartmentId and compartmentIdInSubtree are specified, a list of bridges in that compartment and in all sub-compartments will be returned. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListEnterpriseManagerBridges.go.html to see an example of how to use ListEnterpriseManagerBridges API. +// A default retry strategy applies to this operation ListEnterpriseManagerBridges() +func (client OperationsInsightsClient) ListEnterpriseManagerBridges(ctx context.Context, request ListEnterpriseManagerBridgesRequest) (response ListEnterpriseManagerBridgesResponse, 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.listEnterpriseManagerBridges, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListEnterpriseManagerBridgesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListEnterpriseManagerBridgesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListEnterpriseManagerBridgesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListEnterpriseManagerBridgesResponse") + } + return +} + +// listEnterpriseManagerBridges implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listEnterpriseManagerBridges(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/enterpriseManagerBridges", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListEnterpriseManagerBridgesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListEnterpriseManagerBridges" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListEnterpriseManagerBridges", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListExadataConfigurations Gets a list of exadata insight configurations. Either compartmentId or exadataInsightsId query parameter must be specified. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListExadataConfigurations.go.html to see an example of how to use ListExadataConfigurations API. +// A default retry strategy applies to this operation ListExadataConfigurations() +func (client OperationsInsightsClient) ListExadataConfigurations(ctx context.Context, request ListExadataConfigurationsRequest) (response ListExadataConfigurationsResponse, 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.listExadataConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListExadataConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListExadataConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListExadataConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListExadataConfigurationsResponse") + } + return +} + +// listExadataConfigurations implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listExadataConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exadataInsights/exadataConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListExadataConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataConfigurations" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListExadataConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListExadataInsights Gets a list of Exadata insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. +// When both compartmentId and compartmentIdInSubtree are specified, a list of Exadata insights in that compartment and in all sub-compartments will be returned. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListExadataInsights.go.html to see an example of how to use ListExadataInsights API. +// A default retry strategy applies to this operation ListExadataInsights() +func (client OperationsInsightsClient) ListExadataInsights(ctx context.Context, request ListExadataInsightsRequest) (response ListExadataInsightsResponse, 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.listExadataInsights, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListExadataInsightsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListExadataInsightsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListExadataInsightsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListExadataInsightsResponse") + } + return +} + +// listExadataInsights implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listExadataInsights(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exadataInsights", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListExadataInsightsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/ExadataInsights/ListExadataInsights" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListExadataInsights", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListHostConfigurations Gets a list of host insight configurations based on the query parameters specified. Either compartmentId or hostInsightId query parameter must be specified. +// When both compartmentId and compartmentIdInSubtree are specified, a list of host insight configurations in that compartment and in all sub-compartments will be returned. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListHostConfigurations.go.html to see an example of how to use ListHostConfigurations API. +// A default retry strategy applies to this operation ListHostConfigurations() +func (client OperationsInsightsClient) ListHostConfigurations(ctx context.Context, request ListHostConfigurationsRequest) (response ListHostConfigurationsResponse, 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.listHostConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListHostConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListHostConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListHostConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListHostConfigurationsResponse") + } + return +} + +// listHostConfigurations implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listHostConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/hostInsights/hostConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListHostConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostConfigurations" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListHostConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListHostInsights Gets a list of host insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. +// When both compartmentId and compartmentIdInSubtree are specified, a list of host insights in that compartment and in all sub-compartments will be returned. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListHostInsights.go.html to see an example of how to use ListHostInsights API. +// A default retry strategy applies to this operation ListHostInsights() +func (client OperationsInsightsClient) ListHostInsights(ctx context.Context, request ListHostInsightsRequest) (response ListHostInsightsResponse, 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.listHostInsights, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListHostInsightsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListHostInsightsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListHostInsightsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListHostInsightsResponse") + } + return +} + +// listHostInsights implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listHostInsights(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/hostInsights", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListHostInsightsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostInsights" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListHostInsights", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListHostedEntities Get a list of hosted entities details. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListHostedEntities.go.html to see an example of how to use ListHostedEntities API. +// A default retry strategy applies to this operation ListHostedEntities() +func (client OperationsInsightsClient) ListHostedEntities(ctx context.Context, request ListHostedEntitiesRequest) (response ListHostedEntitiesResponse, 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.listHostedEntities, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListHostedEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListHostedEntitiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListHostedEntitiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListHostedEntitiesResponse") + } + return +} + +// listHostedEntities implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listHostedEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/hostInsights/hostedEntities", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListHostedEntitiesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostedEntities" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListHostedEntities", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListImportableAgentEntities Gets a list of agent entities available to add a new hostInsight. An agent entity is "available" +// and will be shown if all the following conditions are true: +// 1. The agent OCID is not already being used for an existing hostInsight. +// 2. The agent availabilityStatus = 'ACTIVE' +// 3. The agent lifecycleState = 'ACTIVE' +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListImportableAgentEntities.go.html to see an example of how to use ListImportableAgentEntities API. +// A default retry strategy applies to this operation ListImportableAgentEntities() +func (client OperationsInsightsClient) ListImportableAgentEntities(ctx context.Context, request ListImportableAgentEntitiesRequest) (response ListImportableAgentEntitiesResponse, 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.listImportableAgentEntities, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListImportableAgentEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListImportableAgentEntitiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListImportableAgentEntitiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListImportableAgentEntitiesResponse") + } + return +} + +// listImportableAgentEntities implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listImportableAgentEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/importableAgentEntities", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListImportableAgentEntitiesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableAgentEntities" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListImportableAgentEntities", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListImportableComputeEntities Gets a list of available compute intances running cloud agent to add a new hostInsight. An Compute entity is "available" +// and will be shown if all the following conditions are true: +// 1. Compute is running OCA +// 2. OCI Management Agent is not enabled or If OCI Management Agent is enabled +// 2.1 The agent OCID is not already being used for an existing hostInsight. +// 2.2 The agent availabilityStatus = 'ACTIVE' +// 2.3 The agent lifecycleState = 'ACTIVE' +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListImportableComputeEntities.go.html to see an example of how to use ListImportableComputeEntities API. +// A default retry strategy applies to this operation ListImportableComputeEntities() +func (client OperationsInsightsClient) ListImportableComputeEntities(ctx context.Context, request ListImportableComputeEntitiesRequest) (response ListImportableComputeEntitiesResponse, 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.listImportableComputeEntities, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListImportableComputeEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListImportableComputeEntitiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListImportableComputeEntitiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListImportableComputeEntitiesResponse") + } + return +} + +// listImportableComputeEntities implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listImportableComputeEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/importableComputeEntities", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListImportableComputeEntitiesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableComputeEntities" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListImportableComputeEntities", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListImportableEnterpriseManagerEntities Gets a list of importable entities for an Operations Insights Enterprise Manager bridge that have not been imported before. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListImportableEnterpriseManagerEntities.go.html to see an example of how to use ListImportableEnterpriseManagerEntities API. +// A default retry strategy applies to this operation ListImportableEnterpriseManagerEntities() +func (client OperationsInsightsClient) ListImportableEnterpriseManagerEntities(ctx context.Context, request ListImportableEnterpriseManagerEntitiesRequest) (response ListImportableEnterpriseManagerEntitiesResponse, 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.listImportableEnterpriseManagerEntities, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListImportableEnterpriseManagerEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListImportableEnterpriseManagerEntitiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListImportableEnterpriseManagerEntitiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListImportableEnterpriseManagerEntitiesResponse") + } + return +} + +// listImportableEnterpriseManagerEntities implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listImportableEnterpriseManagerEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/enterpriseManagerBridges/{enterpriseManagerBridgeId}/importableEnterpriseManagerEntities", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListImportableEnterpriseManagerEntitiesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListImportableEnterpriseManagerEntities" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListImportableEnterpriseManagerEntities", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListOperationsInsightsPrivateEndpoints Gets a list of Operation Insights private endpoints. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOperationsInsightsPrivateEndpoints.go.html to see an example of how to use ListOperationsInsightsPrivateEndpoints API. +// A default retry strategy applies to this operation ListOperationsInsightsPrivateEndpoints() +func (client OperationsInsightsClient) ListOperationsInsightsPrivateEndpoints(ctx context.Context, request ListOperationsInsightsPrivateEndpointsRequest) (response ListOperationsInsightsPrivateEndpointsResponse, 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.listOperationsInsightsPrivateEndpoints, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListOperationsInsightsPrivateEndpointsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListOperationsInsightsPrivateEndpointsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListOperationsInsightsPrivateEndpointsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListOperationsInsightsPrivateEndpointsResponse") + } + return +} - httpRequest, err := request.HTTPRequest(http.MethodGet, "/hostInsights/hostConfigurations", binaryReqBody, extraHeaders) +// listOperationsInsightsPrivateEndpoints implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listOperationsInsightsPrivateEndpoints(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/operationsInsightsPrivateEndpoints", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListHostConfigurationsResponse + var response ListOperationsInsightsPrivateEndpointsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostConfigurations" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListHostConfigurations", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/ListOperationsInsightsPrivateEndpoints" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListOperationsInsightsPrivateEndpoints", apiReferenceLink) return response, err } @@ -4162,14 +4933,13 @@ func (client OperationsInsightsClient) listHostConfigurations(ctx context.Contex return response, err } -// ListHostInsights Gets a list of host insights based on the query parameters specified. Either compartmentId or id query parameter must be specified. -// When both compartmentId and compartmentIdInSubtree are specified, a list of host insights in that compartment and in all sub-compartments will be returned. +// ListOperationsInsightsWarehouseUsers Gets a list of Operations Insights Warehouse users. Either compartmentId or id must be specified. All these resources are expected to be in root compartment. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListHostInsights.go.html to see an example of how to use ListHostInsights API. -// A default retry strategy applies to this operation ListHostInsights() -func (client OperationsInsightsClient) ListHostInsights(ctx context.Context, request ListHostInsightsRequest) (response ListHostInsightsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOperationsInsightsWarehouseUsers.go.html to see an example of how to use ListOperationsInsightsWarehouseUsers API. +// A default retry strategy applies to this operation ListOperationsInsightsWarehouseUsers() +func (client OperationsInsightsClient) ListOperationsInsightsWarehouseUsers(ctx context.Context, request ListOperationsInsightsWarehouseUsersRequest) (response ListOperationsInsightsWarehouseUsersResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4178,42 +4948,42 @@ func (client OperationsInsightsClient) ListHostInsights(ctx context.Context, req if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listHostInsights, policy) + ociResponse, err = common.Retry(ctx, request, client.listOperationsInsightsWarehouseUsers, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListHostInsightsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOperationsInsightsWarehouseUsersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListHostInsightsResponse{} + response = ListOperationsInsightsWarehouseUsersResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListHostInsightsResponse); ok { + if convertedResponse, ok := ociResponse.(ListOperationsInsightsWarehouseUsersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListHostInsightsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOperationsInsightsWarehouseUsersResponse") } return } -// listHostInsights implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listHostInsights(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOperationsInsightsWarehouseUsers implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listOperationsInsightsWarehouseUsers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/hostInsights", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/operationsInsightsWarehouseUsers", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListHostInsightsResponse + var response ListOperationsInsightsWarehouseUsersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostInsights" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListHostInsights", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/ListOperationsInsightsWarehouseUsers" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListOperationsInsightsWarehouseUsers", apiReferenceLink) return response, err } @@ -4221,13 +4991,14 @@ func (client OperationsInsightsClient) listHostInsights(ctx context.Context, req return response, err } -// ListHostedEntities Get a list of hosted entities details. +// ListOperationsInsightsWarehouses Gets a list of Operations Insights warehouses. Either compartmentId or id must be specified. +// There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListHostedEntities.go.html to see an example of how to use ListHostedEntities API. -// A default retry strategy applies to this operation ListHostedEntities() -func (client OperationsInsightsClient) ListHostedEntities(ctx context.Context, request ListHostedEntitiesRequest) (response ListHostedEntitiesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOperationsInsightsWarehouses.go.html to see an example of how to use ListOperationsInsightsWarehouses API. +// A default retry strategy applies to this operation ListOperationsInsightsWarehouses() +func (client OperationsInsightsClient) ListOperationsInsightsWarehouses(ctx context.Context, request ListOperationsInsightsWarehousesRequest) (response ListOperationsInsightsWarehousesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4236,42 +5007,42 @@ func (client OperationsInsightsClient) ListHostedEntities(ctx context.Context, r if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listHostedEntities, policy) + ociResponse, err = common.Retry(ctx, request, client.listOperationsInsightsWarehouses, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListHostedEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOperationsInsightsWarehousesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListHostedEntitiesResponse{} + response = ListOperationsInsightsWarehousesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListHostedEntitiesResponse); ok { + if convertedResponse, ok := ociResponse.(ListOperationsInsightsWarehousesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListHostedEntitiesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOperationsInsightsWarehousesResponse") } return } -// listHostedEntities implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listHostedEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOperationsInsightsWarehouses implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listOperationsInsightsWarehouses(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/hostInsights/hostedEntities", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/operationsInsightsWarehouses", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListHostedEntitiesResponse + var response ListOperationsInsightsWarehousesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListHostedEntities" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListHostedEntities", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/ListOperationsInsightsWarehouses" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListOperationsInsightsWarehouses", apiReferenceLink) return response, err } @@ -4279,17 +5050,13 @@ func (client OperationsInsightsClient) listHostedEntities(ctx context.Context, r return response, err } -// ListImportableAgentEntities Gets a list of agent entities available to add a new hostInsight. An agent entity is "available" -// and will be shown if all the following conditions are true: -// 1. The agent OCID is not already being used for an existing hostInsight. -// 2. The agent availabilityStatus = 'ACTIVE' -// 3. The agent lifecycleState = 'ACTIVE' +// ListOpsiConfigurations Gets a list of OPSI configuration resources based on the query parameters specified. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListImportableAgentEntities.go.html to see an example of how to use ListImportableAgentEntities API. -// A default retry strategy applies to this operation ListImportableAgentEntities() -func (client OperationsInsightsClient) ListImportableAgentEntities(ctx context.Context, request ListImportableAgentEntitiesRequest) (response ListImportableAgentEntitiesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOpsiConfigurations.go.html to see an example of how to use ListOpsiConfigurations API. +// A default retry strategy applies to this operation ListOpsiConfigurations() +func (client OperationsInsightsClient) ListOpsiConfigurations(ctx context.Context, request ListOpsiConfigurationsRequest) (response ListOpsiConfigurationsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4298,42 +5065,42 @@ func (client OperationsInsightsClient) ListImportableAgentEntities(ctx context.C if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listImportableAgentEntities, policy) + ociResponse, err = common.Retry(ctx, request, client.listOpsiConfigurations, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListImportableAgentEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOpsiConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListImportableAgentEntitiesResponse{} + response = ListOpsiConfigurationsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListImportableAgentEntitiesResponse); ok { + if convertedResponse, ok := ociResponse.(ListOpsiConfigurationsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListImportableAgentEntitiesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOpsiConfigurationsResponse") } return } -// listImportableAgentEntities implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listImportableAgentEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOpsiConfigurations implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listOpsiConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/importableAgentEntities", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/opsiConfigurations", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListImportableAgentEntitiesResponse + var response ListOpsiConfigurationsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableAgentEntities" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListImportableAgentEntities", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiConfigurations/ListOpsiConfigurations" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListOpsiConfigurations", apiReferenceLink) return response, err } @@ -4341,19 +5108,13 @@ func (client OperationsInsightsClient) listImportableAgentEntities(ctx context.C return response, err } -// ListImportableComputeEntities Gets a list of available compute intances running cloud agent to add a new hostInsight. An Compute entity is "available" -// and will be shown if all the following conditions are true: -// 1. Compute is running OCA -// 2. OCI Management Agent is not enabled or If OCI Management Agent is enabled -// 2.1 The agent OCID is not already being used for an existing hostInsight. -// 2.2 The agent availabilityStatus = 'ACTIVE' -// 2.3 The agent lifecycleState = 'ACTIVE' +// ListOpsiDataObjects Gets a list of OPSI data objects based on the query parameters specified. CompartmentId id query parameter must be specified. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListImportableComputeEntities.go.html to see an example of how to use ListImportableComputeEntities API. -// A default retry strategy applies to this operation ListImportableComputeEntities() -func (client OperationsInsightsClient) ListImportableComputeEntities(ctx context.Context, request ListImportableComputeEntitiesRequest) (response ListImportableComputeEntitiesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOpsiDataObjects.go.html to see an example of how to use ListOpsiDataObjects API. +// A default retry strategy applies to this operation ListOpsiDataObjects() +func (client OperationsInsightsClient) ListOpsiDataObjects(ctx context.Context, request ListOpsiDataObjectsRequest) (response ListOpsiDataObjectsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4362,42 +5123,42 @@ func (client OperationsInsightsClient) ListImportableComputeEntities(ctx context if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listImportableComputeEntities, policy) + ociResponse, err = common.Retry(ctx, request, client.listOpsiDataObjects, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListImportableComputeEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOpsiDataObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListImportableComputeEntitiesResponse{} + response = ListOpsiDataObjectsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListImportableComputeEntitiesResponse); ok { + if convertedResponse, ok := ociResponse.(ListOpsiDataObjectsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListImportableComputeEntitiesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOpsiDataObjectsResponse") } return } -// listImportableComputeEntities implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listImportableComputeEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOpsiDataObjects implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listOpsiDataObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/importableComputeEntities", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/opsiDataObjects", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListImportableComputeEntitiesResponse + var response ListOpsiDataObjectsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/ListImportableComputeEntities" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListImportableComputeEntities", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/ListOpsiDataObjects" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListOpsiDataObjects", apiReferenceLink) return response, err } @@ -4405,13 +5166,14 @@ func (client OperationsInsightsClient) listImportableComputeEntities(ctx context return response, err } -// ListImportableEnterpriseManagerEntities Gets a list of importable entities for an Operations Insights Enterprise Manager bridge that have not been imported before. +// ListSqlPlans Query SQL Warehouse to list the plan xml for a given SQL execution plan. This returns a SqlPlanCollection object, but is currently limited to a single plan. +// Either databaseId or id must be specified. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListImportableEnterpriseManagerEntities.go.html to see an example of how to use ListImportableEnterpriseManagerEntities API. -// A default retry strategy applies to this operation ListImportableEnterpriseManagerEntities() -func (client OperationsInsightsClient) ListImportableEnterpriseManagerEntities(ctx context.Context, request ListImportableEnterpriseManagerEntitiesRequest) (response ListImportableEnterpriseManagerEntitiesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListSqlPlans.go.html to see an example of how to use ListSqlPlans API. +// A default retry strategy applies to this operation ListSqlPlans() +func (client OperationsInsightsClient) ListSqlPlans(ctx context.Context, request ListSqlPlansRequest) (response ListSqlPlansResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4420,42 +5182,42 @@ func (client OperationsInsightsClient) ListImportableEnterpriseManagerEntities(c if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listImportableEnterpriseManagerEntities, policy) + ociResponse, err = common.Retry(ctx, request, client.listSqlPlans, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListImportableEnterpriseManagerEntitiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSqlPlansResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListImportableEnterpriseManagerEntitiesResponse{} + response = ListSqlPlansResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListImportableEnterpriseManagerEntitiesResponse); ok { + if convertedResponse, ok := ociResponse.(ListSqlPlansResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListImportableEnterpriseManagerEntitiesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSqlPlansResponse") } return } -// listImportableEnterpriseManagerEntities implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listImportableEnterpriseManagerEntities(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSqlPlans implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listSqlPlans(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/enterpriseManagerBridges/{enterpriseManagerBridgeId}/importableEnterpriseManagerEntities", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/sqlPlans", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListImportableEnterpriseManagerEntitiesResponse + var response ListSqlPlansResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/EnterpriseManagerBridges/ListImportableEnterpriseManagerEntities" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListImportableEnterpriseManagerEntities", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlPlans" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListSqlPlans", apiReferenceLink) return response, err } @@ -4463,13 +5225,14 @@ func (client OperationsInsightsClient) listImportableEnterpriseManagerEntities(c return response, err } -// ListOperationsInsightsPrivateEndpoints Gets a list of Operation Insights private endpoints. +// ListSqlSearches Search SQL by SQL Identifier across databases in a compartment and in all sub-compartments if specified. +// And get the SQL Text and the details of the databases executing the SQL for a given time period. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOperationsInsightsPrivateEndpoints.go.html to see an example of how to use ListOperationsInsightsPrivateEndpoints API. -// A default retry strategy applies to this operation ListOperationsInsightsPrivateEndpoints() -func (client OperationsInsightsClient) ListOperationsInsightsPrivateEndpoints(ctx context.Context, request ListOperationsInsightsPrivateEndpointsRequest) (response ListOperationsInsightsPrivateEndpointsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListSqlSearches.go.html to see an example of how to use ListSqlSearches API. +// A default retry strategy applies to this operation ListSqlSearches() +func (client OperationsInsightsClient) ListSqlSearches(ctx context.Context, request ListSqlSearchesRequest) (response ListSqlSearchesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4478,42 +5241,42 @@ func (client OperationsInsightsClient) ListOperationsInsightsPrivateEndpoints(ct if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOperationsInsightsPrivateEndpoints, policy) + ociResponse, err = common.Retry(ctx, request, client.listSqlSearches, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListOperationsInsightsPrivateEndpointsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSqlSearchesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOperationsInsightsPrivateEndpointsResponse{} + response = ListSqlSearchesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOperationsInsightsPrivateEndpointsResponse); ok { + if convertedResponse, ok := ociResponse.(ListSqlSearchesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOperationsInsightsPrivateEndpointsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSqlSearchesResponse") } return } -// listOperationsInsightsPrivateEndpoints implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listOperationsInsightsPrivateEndpoints(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSqlSearches implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listSqlSearches(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/operationsInsightsPrivateEndpoints", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/sqlSearches", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOperationsInsightsPrivateEndpointsResponse + var response ListSqlSearchesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsPrivateEndpoint/ListOperationsInsightsPrivateEndpoints" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListOperationsInsightsPrivateEndpoints", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlSearches" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListSqlSearches", apiReferenceLink) return response, err } @@ -4521,13 +5284,13 @@ func (client OperationsInsightsClient) listOperationsInsightsPrivateEndpoints(ct return response, err } -// ListOperationsInsightsWarehouseUsers Gets a list of Operations Insights Warehouse users. Either compartmentId or id must be specified. All these resources are expected to be in root compartment. +// ListSqlTexts Query SQL Warehouse to get the full SQL Text for a SQL in a compartment and in all sub-compartments if specified. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOperationsInsightsWarehouseUsers.go.html to see an example of how to use ListOperationsInsightsWarehouseUsers API. -// A default retry strategy applies to this operation ListOperationsInsightsWarehouseUsers() -func (client OperationsInsightsClient) ListOperationsInsightsWarehouseUsers(ctx context.Context, request ListOperationsInsightsWarehouseUsersRequest) (response ListOperationsInsightsWarehouseUsersResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListSqlTexts.go.html to see an example of how to use ListSqlTexts API. +// A default retry strategy applies to this operation ListSqlTexts() +func (client OperationsInsightsClient) ListSqlTexts(ctx context.Context, request ListSqlTextsRequest) (response ListSqlTextsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4536,42 +5299,42 @@ func (client OperationsInsightsClient) ListOperationsInsightsWarehouseUsers(ctx if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOperationsInsightsWarehouseUsers, policy) + ociResponse, err = common.Retry(ctx, request, client.listSqlTexts, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListOperationsInsightsWarehouseUsersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSqlTextsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOperationsInsightsWarehouseUsersResponse{} + response = ListSqlTextsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOperationsInsightsWarehouseUsersResponse); ok { + if convertedResponse, ok := ociResponse.(ListSqlTextsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOperationsInsightsWarehouseUsersResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSqlTextsResponse") } return } -// listOperationsInsightsWarehouseUsers implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listOperationsInsightsWarehouseUsers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSqlTexts implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listSqlTexts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/operationsInsightsWarehouseUsers", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/sqlTexts", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOperationsInsightsWarehouseUsersResponse + var response ListSqlTextsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouseUsers/ListOperationsInsightsWarehouseUsers" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListOperationsInsightsWarehouseUsers", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlTexts" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListSqlTexts", apiReferenceLink) return response, err } @@ -4579,14 +5342,13 @@ func (client OperationsInsightsClient) listOperationsInsightsWarehouseUsers(ctx return response, err } -// ListOperationsInsightsWarehouses Gets a list of Operations Insights warehouses. Either compartmentId or id must be specified. -// There is only expected to be 1 warehouse per tenant. The warehouse is expected to be in the root compartment. +// ListWorkRequestErrors Return a (paginated) list of errors for a given work request. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOperationsInsightsWarehouses.go.html to see an example of how to use ListOperationsInsightsWarehouses API. -// A default retry strategy applies to this operation ListOperationsInsightsWarehouses() -func (client OperationsInsightsClient) ListOperationsInsightsWarehouses(ctx context.Context, request ListOperationsInsightsWarehousesRequest) (response ListOperationsInsightsWarehousesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client OperationsInsightsClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4595,42 +5357,42 @@ func (client OperationsInsightsClient) ListOperationsInsightsWarehouses(ctx cont if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOperationsInsightsWarehouses, policy) + 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 = ListOperationsInsightsWarehousesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOperationsInsightsWarehousesResponse{} + response = ListWorkRequestErrorsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOperationsInsightsWarehousesResponse); ok { + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOperationsInsightsWarehousesResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") } return } -// listOperationsInsightsWarehouses implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listOperationsInsightsWarehouses(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/operationsInsightsWarehouses", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOperationsInsightsWarehousesResponse + 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/operations-insights/20200630/OperationsInsightsWarehouses/ListOperationsInsightsWarehouses" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListOperationsInsightsWarehouses", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestErrors" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -4638,13 +5400,13 @@ func (client OperationsInsightsClient) listOperationsInsightsWarehouses(ctx cont return response, err } -// ListOpsiConfigurations Gets a list of OPSI configuration resources based on the query parameters specified. +// ListWorkRequestLogs Return a (paginated) list of logs for a given work request. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOpsiConfigurations.go.html to see an example of how to use ListOpsiConfigurations API. -// A default retry strategy applies to this operation ListOpsiConfigurations() -func (client OperationsInsightsClient) ListOpsiConfigurations(ctx context.Context, request ListOpsiConfigurationsRequest) (response ListOpsiConfigurationsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client OperationsInsightsClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4653,42 +5415,42 @@ func (client OperationsInsightsClient) ListOpsiConfigurations(ctx context.Contex if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOpsiConfigurations, policy) + 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 = ListOpsiConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOpsiConfigurationsResponse{} + response = ListWorkRequestLogsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOpsiConfigurationsResponse); ok { + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOpsiConfigurationsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") } return } -// listOpsiConfigurations implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listOpsiConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/opsiConfigurations", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOpsiConfigurationsResponse + 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/operations-insights/20200630/OpsiConfigurations/ListOpsiConfigurations" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListOpsiConfigurations", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestLogs" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -4696,13 +5458,13 @@ func (client OperationsInsightsClient) listOpsiConfigurations(ctx context.Contex return response, err } -// ListOpsiDataObjects Gets a list of OPSI data objects based on the query parameters specified. CompartmentId id query parameter must be specified. +// ListWorkRequests Lists the work requests in a compartment. Either compartmentId or id must be specified. Only one of id, resourceId or relatedResourceId can be specified optionally. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListOpsiDataObjects.go.html to see an example of how to use ListOpsiDataObjects API. -// A default retry strategy applies to this operation ListOpsiDataObjects() -func (client OperationsInsightsClient) ListOpsiDataObjects(ctx context.Context, request ListOpsiDataObjectsRequest) (response ListOpsiDataObjectsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client OperationsInsightsClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4711,42 +5473,42 @@ func (client OperationsInsightsClient) ListOpsiDataObjects(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOpsiDataObjects, policy) + 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 = ListOpsiDataObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOpsiDataObjectsResponse{} + response = ListWorkRequestsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOpsiDataObjectsResponse); ok { + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOpsiDataObjectsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") } return } -// listOpsiDataObjects implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listOpsiDataObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/opsiDataObjects", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOpsiDataObjectsResponse + 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/operations-insights/20200630/OpsiDataObjects/ListOpsiDataObjects" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListOpsiDataObjects", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequests" + err = common.PostProcessServiceError(err, "OperationsInsights", "ListWorkRequests", apiReferenceLink) return response, err } @@ -4754,14 +5516,14 @@ func (client OperationsInsightsClient) listOpsiDataObjects(ctx context.Context, return response, err } -// ListSqlPlans Query SQL Warehouse to list the plan xml for a given SQL execution plan. This returns a SqlPlanCollection object, but is currently limited to a single plan. -// Either databaseId or id must be specified. +// QueryOpsiDataObjectData Queries an OPSI data object with the inputs provided and sends the result set back. Either analysisTimeInterval +// or timeIntervalStart and timeIntervalEnd parameters need to be passed as well. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListSqlPlans.go.html to see an example of how to use ListSqlPlans API. -// A default retry strategy applies to this operation ListSqlPlans() -func (client OperationsInsightsClient) ListSqlPlans(ctx context.Context, request ListSqlPlansRequest) (response ListSqlPlansResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/QueryOpsiDataObjectData.go.html to see an example of how to use QueryOpsiDataObjectData API. +// A default retry strategy applies to this operation QueryOpsiDataObjectData() +func (client OperationsInsightsClient) QueryOpsiDataObjectData(ctx context.Context, request QueryOpsiDataObjectDataRequest) (response QueryOpsiDataObjectDataResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4770,57 +5532,56 @@ func (client OperationsInsightsClient) ListSqlPlans(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listSqlPlans, policy) + ociResponse, err = common.Retry(ctx, request, client.queryOpsiDataObjectData, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSqlPlansResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = QueryOpsiDataObjectDataResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSqlPlansResponse{} + response = QueryOpsiDataObjectDataResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSqlPlansResponse); ok { + if convertedResponse, ok := ociResponse.(QueryOpsiDataObjectDataResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSqlPlansResponse") + err = fmt.Errorf("failed to convert OCIResponse into QueryOpsiDataObjectDataResponse") } return } -// listSqlPlans implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listSqlPlans(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// queryOpsiDataObjectData implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) queryOpsiDataObjectData(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/sqlPlans", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/opsiDataObjects/actions/queryData", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSqlPlansResponse + var response QueryOpsiDataObjectDataResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlPlans" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListSqlPlans", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/QueryOpsiDataObjectData" + err = common.PostProcessServiceError(err, "OperationsInsights", "QueryOpsiDataObjectData", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &querydataobjectresultsetrowscollection{}) return response, err } -// ListSqlSearches Search SQL by SQL Identifier across databases in a compartment and in all sub-compartments if specified. -// And get the SQL Text and the details of the databases executing the SQL for a given time period. +// RotateOperationsInsightsWarehouseWallet Rotate the ADW wallet for Operations Insights Warehouse using which the Hub data is exposed. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListSqlSearches.go.html to see an example of how to use ListSqlSearches API. -// A default retry strategy applies to this operation ListSqlSearches() -func (client OperationsInsightsClient) ListSqlSearches(ctx context.Context, request ListSqlSearchesRequest) (response ListSqlSearchesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/RotateOperationsInsightsWarehouseWallet.go.html to see an example of how to use RotateOperationsInsightsWarehouseWallet API. +// A default retry strategy applies to this operation RotateOperationsInsightsWarehouseWallet() +func (client OperationsInsightsClient) RotateOperationsInsightsWarehouseWallet(ctx context.Context, request RotateOperationsInsightsWarehouseWalletRequest) (response RotateOperationsInsightsWarehouseWalletResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4829,42 +5590,42 @@ func (client OperationsInsightsClient) ListSqlSearches(ctx context.Context, requ if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listSqlSearches, policy) + ociResponse, err = common.Retry(ctx, request, client.rotateOperationsInsightsWarehouseWallet, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSqlSearchesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RotateOperationsInsightsWarehouseWalletResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSqlSearchesResponse{} + response = RotateOperationsInsightsWarehouseWalletResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSqlSearchesResponse); ok { + if convertedResponse, ok := ociResponse.(RotateOperationsInsightsWarehouseWalletResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSqlSearchesResponse") + err = fmt.Errorf("failed to convert OCIResponse into RotateOperationsInsightsWarehouseWalletResponse") } return } -// listSqlSearches implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listSqlSearches(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// rotateOperationsInsightsWarehouseWallet implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) rotateOperationsInsightsWarehouseWallet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/sqlSearches", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/operationsInsightsWarehouses/{operationsInsightsWarehouseId}/actions/rotateWarehouseWallet", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSqlSearchesResponse + var response RotateOperationsInsightsWarehouseWalletResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlSearches" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListSqlSearches", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/RotateOperationsInsightsWarehouseWallet" + err = common.PostProcessServiceError(err, "OperationsInsights", "RotateOperationsInsightsWarehouseWallet", apiReferenceLink) return response, err } @@ -4872,13 +5633,13 @@ func (client OperationsInsightsClient) listSqlSearches(ctx context.Context, requ return response, err } -// ListSqlTexts Query SQL Warehouse to get the full SQL Text for a SQL in a compartment and in all sub-compartments if specified. +// SummarizeAddmDbFindings Summarizes ADDM findings for the specified databases. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListSqlTexts.go.html to see an example of how to use ListSqlTexts API. -// A default retry strategy applies to this operation ListSqlTexts() -func (client OperationsInsightsClient) ListSqlTexts(ctx context.Context, request ListSqlTextsRequest) (response ListSqlTextsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbFindings.go.html to see an example of how to use SummarizeAddmDbFindings API. +// A default retry strategy applies to this operation SummarizeAddmDbFindings() +func (client OperationsInsightsClient) SummarizeAddmDbFindings(ctx context.Context, request SummarizeAddmDbFindingsRequest) (response SummarizeAddmDbFindingsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4887,42 +5648,42 @@ func (client OperationsInsightsClient) ListSqlTexts(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listSqlTexts, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeAddmDbFindings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSqlTextsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SummarizeAddmDbFindingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSqlTextsResponse{} + response = SummarizeAddmDbFindingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSqlTextsResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeAddmDbFindingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSqlTextsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeAddmDbFindingsResponse") } return } -// listSqlTexts implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listSqlTexts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeAddmDbFindings implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) summarizeAddmDbFindings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/sqlTexts", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbFindings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSqlTextsResponse + var response SummarizeAddmDbFindingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/ListSqlTexts" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListSqlTexts", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbFindings" + err = common.PostProcessServiceError(err, "OperationsInsights", "SummarizeAddmDbFindings", apiReferenceLink) return response, err } @@ -4930,13 +5691,15 @@ func (client OperationsInsightsClient) listSqlTexts(ctx context.Context, request return response, err } -// ListWorkRequestErrors Return a (paginated) list of errors for a given work request. +// SummarizeAddmDbParameterChanges Summarizes the AWR database parameter change history for the specified parameter. There will +// be one element for each time that parameter changed during the specified time period. +// This API is limited to only one parameter per request. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. -// A default retry strategy applies to this operation ListWorkRequestErrors() -func (client OperationsInsightsClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbParameterChanges.go.html to see an example of how to use SummarizeAddmDbParameterChanges API. +// A default retry strategy applies to this operation SummarizeAddmDbParameterChanges() +func (client OperationsInsightsClient) SummarizeAddmDbParameterChanges(ctx context.Context, request SummarizeAddmDbParameterChangesRequest) (response SummarizeAddmDbParameterChangesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -4945,42 +5708,42 @@ func (client OperationsInsightsClient) ListWorkRequestErrors(ctx context.Context if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeAddmDbParameterChanges, 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 = SummarizeAddmDbParameterChangesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestErrorsResponse{} + response = SummarizeAddmDbParameterChangesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeAddmDbParameterChangesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeAddmDbParameterChangesResponse") } return } -// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeAddmDbParameterChanges implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) summarizeAddmDbParameterChanges(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, "/databaseInsights/addmDbParameterChanges", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestErrorsResponse + var response SummarizeAddmDbParameterChangesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestErrors" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListWorkRequestErrors", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbParameterChanges" + err = common.PostProcessServiceError(err, "OperationsInsights", "SummarizeAddmDbParameterChanges", apiReferenceLink) return response, err } @@ -4988,13 +5751,16 @@ func (client OperationsInsightsClient) listWorkRequestErrors(ctx context.Context return response, err } -// ListWorkRequestLogs Return a (paginated) list of logs for a given work request. +// SummarizeAddmDbParameters Summarizes database parameter history information for the specified databases. Return a list of parameters +// with information on whether the parameter values were changed or not within the specified +// time period. The response does not include the individual parameter changes within the time +// period. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. -// A default retry strategy applies to this operation ListWorkRequestLogs() -func (client OperationsInsightsClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbParameters.go.html to see an example of how to use SummarizeAddmDbParameters API. +// A default retry strategy applies to this operation SummarizeAddmDbParameters() +func (client OperationsInsightsClient) SummarizeAddmDbParameters(ctx context.Context, request SummarizeAddmDbParametersRequest) (response SummarizeAddmDbParametersResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5003,42 +5769,42 @@ func (client OperationsInsightsClient) ListWorkRequestLogs(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeAddmDbParameters, 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 = SummarizeAddmDbParametersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestLogsResponse{} + response = SummarizeAddmDbParametersResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeAddmDbParametersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeAddmDbParametersResponse") } return } -// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeAddmDbParameters implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) summarizeAddmDbParameters(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, "/databaseInsights/addmDbParameters", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestLogsResponse + var response SummarizeAddmDbParametersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequestLogs" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListWorkRequestLogs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbParameters" + err = common.PostProcessServiceError(err, "OperationsInsights", "SummarizeAddmDbParameters", apiReferenceLink) return response, err } @@ -5046,13 +5812,13 @@ func (client OperationsInsightsClient) listWorkRequestLogs(ctx context.Context, return response, err } -// ListWorkRequests Lists the work requests in a compartment. Either compartmentId or id must be specified. Only one of id, resourceId or relatedResourceId can be specified optionally. +// SummarizeAddmDbRecommendations Summarizes ADDM recommendations for the specified databases. // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. -// A default retry strategy applies to this operation ListWorkRequests() -func (client OperationsInsightsClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbRecommendations.go.html to see an example of how to use SummarizeAddmDbRecommendations API. +// A default retry strategy applies to this operation SummarizeAddmDbRecommendations() +func (client OperationsInsightsClient) SummarizeAddmDbRecommendations(ctx context.Context, request SummarizeAddmDbRecommendationsRequest) (response SummarizeAddmDbRecommendationsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5061,42 +5827,42 @@ func (client OperationsInsightsClient) ListWorkRequests(ctx context.Context, req if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeAddmDbRecommendations, 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 = SummarizeAddmDbRecommendationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListWorkRequestsResponse{} + response = SummarizeAddmDbRecommendationsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeAddmDbRecommendationsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeAddmDbRecommendationsResponse") } return } -// listWorkRequests implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeAddmDbRecommendations implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) summarizeAddmDbRecommendations(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, "/databaseInsights/addmDbRecommendations", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListWorkRequestsResponse + var response SummarizeAddmDbRecommendationsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/WorkRequests/ListWorkRequests" - err = common.PostProcessServiceError(err, "OperationsInsights", "ListWorkRequests", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbRecommendations" + err = common.PostProcessServiceError(err, "OperationsInsights", "SummarizeAddmDbRecommendations", apiReferenceLink) return response, err } @@ -5104,14 +5870,13 @@ func (client OperationsInsightsClient) listWorkRequests(ctx context.Context, req return response, err } -// QueryOpsiDataObjectData Queries an OPSI data object with the inputs provided and sends the result set back. Either analysisTimeInterval -// or timeIntervalStart and timeIntervalEnd parameters need to be passed as well. +// SummarizeAddmDbSchemaObjects Summarizes Schema objects for the specified databases for the specified objectIdentifiers // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/QueryOpsiDataObjectData.go.html to see an example of how to use QueryOpsiDataObjectData API. -// A default retry strategy applies to this operation QueryOpsiDataObjectData() -func (client OperationsInsightsClient) QueryOpsiDataObjectData(ctx context.Context, request QueryOpsiDataObjectDataRequest) (response QueryOpsiDataObjectDataResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbSchemaObjects.go.html to see an example of how to use SummarizeAddmDbSchemaObjects API. +// A default retry strategy applies to this operation SummarizeAddmDbSchemaObjects() +func (client OperationsInsightsClient) SummarizeAddmDbSchemaObjects(ctx context.Context, request SummarizeAddmDbSchemaObjectsRequest) (response SummarizeAddmDbSchemaObjectsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5120,56 +5885,56 @@ func (client OperationsInsightsClient) QueryOpsiDataObjectData(ctx context.Conte if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.queryOpsiDataObjectData, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeAddmDbSchemaObjects, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = QueryOpsiDataObjectDataResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SummarizeAddmDbSchemaObjectsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = QueryOpsiDataObjectDataResponse{} + response = SummarizeAddmDbSchemaObjectsResponse{} } } return } - if convertedResponse, ok := ociResponse.(QueryOpsiDataObjectDataResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeAddmDbSchemaObjectsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into QueryOpsiDataObjectDataResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeAddmDbSchemaObjectsResponse") } return } -// queryOpsiDataObjectData implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) queryOpsiDataObjectData(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeAddmDbSchemaObjects implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) summarizeAddmDbSchemaObjects(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/opsiDataObjects/actions/queryData", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbSchemaObjects", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response QueryOpsiDataObjectDataResponse + var response SummarizeAddmDbSchemaObjectsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OpsiDataObjects/QueryOpsiDataObjectData" - err = common.PostProcessServiceError(err, "OperationsInsights", "QueryOpsiDataObjectData", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbSchemaObjects" + err = common.PostProcessServiceError(err, "OperationsInsights", "SummarizeAddmDbSchemaObjects", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &querydataobjectresultsetrowscollection{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// RotateOperationsInsightsWarehouseWallet Rotate the ADW wallet for Operations Insights Warehouse using which the Hub data is exposed. +// SummarizeAddmDbSqlStatements Summarizes SQL Statements for the specified databases for the specified sqlIdentifiers // // See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/RotateOperationsInsightsWarehouseWallet.go.html to see an example of how to use RotateOperationsInsightsWarehouseWallet API. -// A default retry strategy applies to this operation RotateOperationsInsightsWarehouseWallet() -func (client OperationsInsightsClient) RotateOperationsInsightsWarehouseWallet(ctx context.Context, request RotateOperationsInsightsWarehouseWalletRequest) (response RotateOperationsInsightsWarehouseWalletResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbSqlStatements.go.html to see an example of how to use SummarizeAddmDbSqlStatements API. +// A default retry strategy applies to this operation SummarizeAddmDbSqlStatements() +func (client OperationsInsightsClient) SummarizeAddmDbSqlStatements(ctx context.Context, request SummarizeAddmDbSqlStatementsRequest) (response SummarizeAddmDbSqlStatementsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -5178,42 +5943,42 @@ func (client OperationsInsightsClient) RotateOperationsInsightsWarehouseWallet(c if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.rotateOperationsInsightsWarehouseWallet, policy) + ociResponse, err = common.Retry(ctx, request, client.summarizeAddmDbSqlStatements, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = RotateOperationsInsightsWarehouseWalletResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SummarizeAddmDbSqlStatementsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = RotateOperationsInsightsWarehouseWalletResponse{} + response = SummarizeAddmDbSqlStatementsResponse{} } } return } - if convertedResponse, ok := ociResponse.(RotateOperationsInsightsWarehouseWalletResponse); ok { + if convertedResponse, ok := ociResponse.(SummarizeAddmDbSqlStatementsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into RotateOperationsInsightsWarehouseWalletResponse") + err = fmt.Errorf("failed to convert OCIResponse into SummarizeAddmDbSqlStatementsResponse") } return } -// rotateOperationsInsightsWarehouseWallet implements the OCIOperation interface (enables retrying operations) -func (client OperationsInsightsClient) rotateOperationsInsightsWarehouseWallet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// summarizeAddmDbSqlStatements implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) summarizeAddmDbSqlStatements(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/operationsInsightsWarehouses/{operationsInsightsWarehouseId}/actions/rotateWarehouseWallet", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/databaseInsights/addmDbSqlStatements", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response RotateOperationsInsightsWarehouseWalletResponse + var response SummarizeAddmDbSqlStatementsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/OperationsInsightsWarehouses/RotateOperationsInsightsWarehouseWallet" - err = common.PostProcessServiceError(err, "OperationsInsights", "RotateOperationsInsightsWarehouseWallet", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/DatabaseInsights/SummarizeAddmDbSqlStatements" + err = common.PostProcessServiceError(err, "OperationsInsights", "SummarizeAddmDbSqlStatements", apiReferenceLink) return response, err } diff --git a/opsi/related_object_type_details.go b/opsi/related_object_type_details.go new file mode 100644 index 0000000000..496889e9cb --- /dev/null +++ b/opsi/related_object_type_details.go @@ -0,0 +1,132 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RelatedObjectTypeDetails Related object details +type RelatedObjectTypeDetails interface { +} + +type relatedobjecttypedetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *relatedobjecttypedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerrelatedobjecttypedetails relatedobjecttypedetails + s := struct { + Model Unmarshalerrelatedobjecttypedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *relatedobjecttypedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "SQL": + mm := SqlTypeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "SCHEMA_OBJECT": + mm := SchemaObjectTypeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "DATABASE_PARAMETER": + mm := DatabaseParameterTypeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return *m, nil + } +} + +func (m relatedobjecttypedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m relatedobjecttypedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RelatedObjectTypeDetailsTypeEnum Enum with underlying type: string +type RelatedObjectTypeDetailsTypeEnum string + +// Set of constants representing the allowable values for RelatedObjectTypeDetailsTypeEnum +const ( + RelatedObjectTypeDetailsTypeSchemaObject RelatedObjectTypeDetailsTypeEnum = "SCHEMA_OBJECT" + RelatedObjectTypeDetailsTypeSql RelatedObjectTypeDetailsTypeEnum = "SQL" + RelatedObjectTypeDetailsTypeDatabaseParameter RelatedObjectTypeDetailsTypeEnum = "DATABASE_PARAMETER" +) + +var mappingRelatedObjectTypeDetailsTypeEnum = map[string]RelatedObjectTypeDetailsTypeEnum{ + "SCHEMA_OBJECT": RelatedObjectTypeDetailsTypeSchemaObject, + "SQL": RelatedObjectTypeDetailsTypeSql, + "DATABASE_PARAMETER": RelatedObjectTypeDetailsTypeDatabaseParameter, +} + +var mappingRelatedObjectTypeDetailsTypeEnumLowerCase = map[string]RelatedObjectTypeDetailsTypeEnum{ + "schema_object": RelatedObjectTypeDetailsTypeSchemaObject, + "sql": RelatedObjectTypeDetailsTypeSql, + "database_parameter": RelatedObjectTypeDetailsTypeDatabaseParameter, +} + +// GetRelatedObjectTypeDetailsTypeEnumValues Enumerates the set of values for RelatedObjectTypeDetailsTypeEnum +func GetRelatedObjectTypeDetailsTypeEnumValues() []RelatedObjectTypeDetailsTypeEnum { + values := make([]RelatedObjectTypeDetailsTypeEnum, 0) + for _, v := range mappingRelatedObjectTypeDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetRelatedObjectTypeDetailsTypeEnumStringValues Enumerates the set of values in String for RelatedObjectTypeDetailsTypeEnum +func GetRelatedObjectTypeDetailsTypeEnumStringValues() []string { + return []string{ + "SCHEMA_OBJECT", + "SQL", + "DATABASE_PARAMETER", + } +} + +// GetMappingRelatedObjectTypeDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRelatedObjectTypeDetailsTypeEnum(val string) (RelatedObjectTypeDetailsTypeEnum, bool) { + enum, ok := mappingRelatedObjectTypeDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/schema_object_type_details.go b/opsi/schema_object_type_details.go new file mode 100644 index 0000000000..57ee757e32 --- /dev/null +++ b/opsi/schema_object_type_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaObjectTypeDetails Schema object details +type SchemaObjectTypeDetails struct { + + // Object id (from RDBMS) + ObjectId *int `mandatory:"true" json:"objectId"` + + // Owner of object + Owner *string `mandatory:"true" json:"owner"` + + // Name of object + ObjectName *string `mandatory:"true" json:"objectName"` + + // Type of the object (such as TABLE, INDEX) + ObjectType *string `mandatory:"true" json:"objectType"` + + // Subobject name; for example, partition name + SubObjectName *string `mandatory:"false" json:"subObjectName"` +} + +func (m SchemaObjectTypeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaObjectTypeDetails) 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 SchemaObjectTypeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeSchemaObjectTypeDetails SchemaObjectTypeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeSchemaObjectTypeDetails + }{ + "SCHEMA_OBJECT", + (MarshalTypeSchemaObjectTypeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/opsi/sql_type_details.go b/opsi/sql_type_details.go new file mode 100644 index 0000000000..7d64f8ba83 --- /dev/null +++ b/opsi/sql_type_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Operations Insights API +// +// Use the Operations Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Operations Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SqlTypeDetails SQL details +type SqlTypeDetails struct { + + // SQL identifier + SqlId *string `mandatory:"true" json:"sqlId"` + + // First 3800 characters of the SQL text + SqlText *string `mandatory:"true" json:"sqlText"` + + // SQL identifier + IsSqlTextTruncated *bool `mandatory:"true" json:"isSqlTextTruncated"` + + // SQL command name (such as SELECT, INSERT) + SqlCommand *string `mandatory:"true" json:"sqlCommand"` +} + +func (m SqlTypeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SqlTypeDetails) 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 SqlTypeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeSqlTypeDetails SqlTypeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeSqlTypeDetails + }{ + "SQL", + (MarshalTypeSqlTypeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/opsi/summarize_addm_db_findings_request_response.go b/opsi/summarize_addm_db_findings_request_response.go new file mode 100644 index 0000000000..9dc855bc14 --- /dev/null +++ b/opsi/summarize_addm_db_findings_request_response.go @@ -0,0 +1,265 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeAddmDbFindingsRequest wrapper for the SummarizeAddmDbFindings operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbFindings.go.html to see an example of how to use SummarizeAddmDbFindingsRequest. +type SummarizeAddmDbFindingsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // The optional single value query parameter to filter by database instance number. + InstanceNumber *string `mandatory:"false" contributesTo:"query" name:"instanceNumber"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // Optional value filter to match the finding category exactly. + CategoryName *string `mandatory:"false" contributesTo:"query" name:"categoryName"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder SummarizeAddmDbFindingsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the ADDM finding summary data + SortBy SummarizeAddmDbFindingsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 SummarizeAddmDbFindingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeAddmDbFindingsRequest) 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 SummarizeAddmDbFindingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeAddmDbFindingsRequest) 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 SummarizeAddmDbFindingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeAddmDbFindingsSortOrderEnum(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(GetSummarizeAddmDbFindingsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeAddmDbFindingsSortByEnum(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(GetSummarizeAddmDbFindingsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeAddmDbFindingsResponse wrapper for the SummarizeAddmDbFindings operation +type SummarizeAddmDbFindingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbFindingAggregationCollection instances + AddmDbFindingAggregationCollection `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 SummarizeAddmDbFindingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeAddmDbFindingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeAddmDbFindingsSortOrderEnum Enum with underlying type: string +type SummarizeAddmDbFindingsSortOrderEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbFindingsSortOrderEnum +const ( + SummarizeAddmDbFindingsSortOrderAsc SummarizeAddmDbFindingsSortOrderEnum = "ASC" + SummarizeAddmDbFindingsSortOrderDesc SummarizeAddmDbFindingsSortOrderEnum = "DESC" +) + +var mappingSummarizeAddmDbFindingsSortOrderEnum = map[string]SummarizeAddmDbFindingsSortOrderEnum{ + "ASC": SummarizeAddmDbFindingsSortOrderAsc, + "DESC": SummarizeAddmDbFindingsSortOrderDesc, +} + +var mappingSummarizeAddmDbFindingsSortOrderEnumLowerCase = map[string]SummarizeAddmDbFindingsSortOrderEnum{ + "asc": SummarizeAddmDbFindingsSortOrderAsc, + "desc": SummarizeAddmDbFindingsSortOrderDesc, +} + +// GetSummarizeAddmDbFindingsSortOrderEnumValues Enumerates the set of values for SummarizeAddmDbFindingsSortOrderEnum +func GetSummarizeAddmDbFindingsSortOrderEnumValues() []SummarizeAddmDbFindingsSortOrderEnum { + values := make([]SummarizeAddmDbFindingsSortOrderEnum, 0) + for _, v := range mappingSummarizeAddmDbFindingsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbFindingsSortOrderEnumStringValues Enumerates the set of values in String for SummarizeAddmDbFindingsSortOrderEnum +func GetSummarizeAddmDbFindingsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSummarizeAddmDbFindingsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbFindingsSortOrderEnum(val string) (SummarizeAddmDbFindingsSortOrderEnum, bool) { + enum, ok := mappingSummarizeAddmDbFindingsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeAddmDbFindingsSortByEnum Enum with underlying type: string +type SummarizeAddmDbFindingsSortByEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbFindingsSortByEnum +const ( + SummarizeAddmDbFindingsSortByImpactoverallpercent SummarizeAddmDbFindingsSortByEnum = "impactOverallPercent" + SummarizeAddmDbFindingsSortByImpactmaxpercent SummarizeAddmDbFindingsSortByEnum = "impactMaxPercent" + SummarizeAddmDbFindingsSortByImpactavgactivesessions SummarizeAddmDbFindingsSortByEnum = "impactAvgActiveSessions" + SummarizeAddmDbFindingsSortByFrequencycount SummarizeAddmDbFindingsSortByEnum = "frequencyCount" +) + +var mappingSummarizeAddmDbFindingsSortByEnum = map[string]SummarizeAddmDbFindingsSortByEnum{ + "impactOverallPercent": SummarizeAddmDbFindingsSortByImpactoverallpercent, + "impactMaxPercent": SummarizeAddmDbFindingsSortByImpactmaxpercent, + "impactAvgActiveSessions": SummarizeAddmDbFindingsSortByImpactavgactivesessions, + "frequencyCount": SummarizeAddmDbFindingsSortByFrequencycount, +} + +var mappingSummarizeAddmDbFindingsSortByEnumLowerCase = map[string]SummarizeAddmDbFindingsSortByEnum{ + "impactoverallpercent": SummarizeAddmDbFindingsSortByImpactoverallpercent, + "impactmaxpercent": SummarizeAddmDbFindingsSortByImpactmaxpercent, + "impactavgactivesessions": SummarizeAddmDbFindingsSortByImpactavgactivesessions, + "frequencycount": SummarizeAddmDbFindingsSortByFrequencycount, +} + +// GetSummarizeAddmDbFindingsSortByEnumValues Enumerates the set of values for SummarizeAddmDbFindingsSortByEnum +func GetSummarizeAddmDbFindingsSortByEnumValues() []SummarizeAddmDbFindingsSortByEnum { + values := make([]SummarizeAddmDbFindingsSortByEnum, 0) + for _, v := range mappingSummarizeAddmDbFindingsSortByEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbFindingsSortByEnumStringValues Enumerates the set of values in String for SummarizeAddmDbFindingsSortByEnum +func GetSummarizeAddmDbFindingsSortByEnumStringValues() []string { + return []string{ + "impactOverallPercent", + "impactMaxPercent", + "impactAvgActiveSessions", + "frequencyCount", + } +} + +// GetMappingSummarizeAddmDbFindingsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbFindingsSortByEnum(val string) (SummarizeAddmDbFindingsSortByEnum, bool) { + enum, ok := mappingSummarizeAddmDbFindingsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/summarize_addm_db_parameter_changes_request_response.go b/opsi/summarize_addm_db_parameter_changes_request_response.go new file mode 100644 index 0000000000..0213eb115c --- /dev/null +++ b/opsi/summarize_addm_db_parameter_changes_request_response.go @@ -0,0 +1,262 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeAddmDbParameterChangesRequest wrapper for the SummarizeAddmDbParameterChanges operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbParameterChanges.go.html to see an example of how to use SummarizeAddmDbParameterChangesRequest. +type SummarizeAddmDbParameterChangesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Required filter to return only changes for the specified parameter. The + // match is case sensitive. + Name *string `mandatory:"true" contributesTo:"query" name:"name"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // The optional single value query parameter to filter by database instance number. + InstanceNumber *string `mandatory:"false" contributesTo:"query" name:"instanceNumber"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // Optional filter to return only resources whose value contains the substring given. The + // match is not case sensitive. + ValueContains *string `mandatory:"false" contributesTo:"query" name:"valueContains"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder SummarizeAddmDbParameterChangesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the database parameter change data + SortBy SummarizeAddmDbParameterChangesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 SummarizeAddmDbParameterChangesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeAddmDbParameterChangesRequest) 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 SummarizeAddmDbParameterChangesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeAddmDbParameterChangesRequest) 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 SummarizeAddmDbParameterChangesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeAddmDbParameterChangesSortOrderEnum(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(GetSummarizeAddmDbParameterChangesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeAddmDbParameterChangesSortByEnum(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(GetSummarizeAddmDbParameterChangesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeAddmDbParameterChangesResponse wrapper for the SummarizeAddmDbParameterChanges operation +type SummarizeAddmDbParameterChangesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbParameterChangeAggregationCollection instances + AddmDbParameterChangeAggregationCollection `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 SummarizeAddmDbParameterChangesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeAddmDbParameterChangesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeAddmDbParameterChangesSortOrderEnum Enum with underlying type: string +type SummarizeAddmDbParameterChangesSortOrderEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbParameterChangesSortOrderEnum +const ( + SummarizeAddmDbParameterChangesSortOrderAsc SummarizeAddmDbParameterChangesSortOrderEnum = "ASC" + SummarizeAddmDbParameterChangesSortOrderDesc SummarizeAddmDbParameterChangesSortOrderEnum = "DESC" +) + +var mappingSummarizeAddmDbParameterChangesSortOrderEnum = map[string]SummarizeAddmDbParameterChangesSortOrderEnum{ + "ASC": SummarizeAddmDbParameterChangesSortOrderAsc, + "DESC": SummarizeAddmDbParameterChangesSortOrderDesc, +} + +var mappingSummarizeAddmDbParameterChangesSortOrderEnumLowerCase = map[string]SummarizeAddmDbParameterChangesSortOrderEnum{ + "asc": SummarizeAddmDbParameterChangesSortOrderAsc, + "desc": SummarizeAddmDbParameterChangesSortOrderDesc, +} + +// GetSummarizeAddmDbParameterChangesSortOrderEnumValues Enumerates the set of values for SummarizeAddmDbParameterChangesSortOrderEnum +func GetSummarizeAddmDbParameterChangesSortOrderEnumValues() []SummarizeAddmDbParameterChangesSortOrderEnum { + values := make([]SummarizeAddmDbParameterChangesSortOrderEnum, 0) + for _, v := range mappingSummarizeAddmDbParameterChangesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbParameterChangesSortOrderEnumStringValues Enumerates the set of values in String for SummarizeAddmDbParameterChangesSortOrderEnum +func GetSummarizeAddmDbParameterChangesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSummarizeAddmDbParameterChangesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbParameterChangesSortOrderEnum(val string) (SummarizeAddmDbParameterChangesSortOrderEnum, bool) { + enum, ok := mappingSummarizeAddmDbParameterChangesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeAddmDbParameterChangesSortByEnum Enum with underlying type: string +type SummarizeAddmDbParameterChangesSortByEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbParameterChangesSortByEnum +const ( + SummarizeAddmDbParameterChangesSortByIschanged SummarizeAddmDbParameterChangesSortByEnum = "isChanged" + SummarizeAddmDbParameterChangesSortByBeginsnapid SummarizeAddmDbParameterChangesSortByEnum = "beginSnapId" +) + +var mappingSummarizeAddmDbParameterChangesSortByEnum = map[string]SummarizeAddmDbParameterChangesSortByEnum{ + "isChanged": SummarizeAddmDbParameterChangesSortByIschanged, + "beginSnapId": SummarizeAddmDbParameterChangesSortByBeginsnapid, +} + +var mappingSummarizeAddmDbParameterChangesSortByEnumLowerCase = map[string]SummarizeAddmDbParameterChangesSortByEnum{ + "ischanged": SummarizeAddmDbParameterChangesSortByIschanged, + "beginsnapid": SummarizeAddmDbParameterChangesSortByBeginsnapid, +} + +// GetSummarizeAddmDbParameterChangesSortByEnumValues Enumerates the set of values for SummarizeAddmDbParameterChangesSortByEnum +func GetSummarizeAddmDbParameterChangesSortByEnumValues() []SummarizeAddmDbParameterChangesSortByEnum { + values := make([]SummarizeAddmDbParameterChangesSortByEnum, 0) + for _, v := range mappingSummarizeAddmDbParameterChangesSortByEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbParameterChangesSortByEnumStringValues Enumerates the set of values in String for SummarizeAddmDbParameterChangesSortByEnum +func GetSummarizeAddmDbParameterChangesSortByEnumStringValues() []string { + return []string{ + "isChanged", + "beginSnapId", + } +} + +// GetMappingSummarizeAddmDbParameterChangesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbParameterChangesSortByEnum(val string) (SummarizeAddmDbParameterChangesSortByEnum, bool) { + enum, ok := mappingSummarizeAddmDbParameterChangesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/summarize_addm_db_parameters_request_response.go b/opsi/summarize_addm_db_parameters_request_response.go new file mode 100644 index 0000000000..97318d5ee5 --- /dev/null +++ b/opsi/summarize_addm_db_parameters_request_response.go @@ -0,0 +1,410 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeAddmDbParametersRequest wrapper for the SummarizeAddmDbParameters operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbParameters.go.html to see an example of how to use SummarizeAddmDbParametersRequest. +type SummarizeAddmDbParametersRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // The optional single value query parameter to filter by database instance number. + InstanceNumber *string `mandatory:"false" contributesTo:"query" name:"instanceNumber"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // Optional value filter to match the parameter category exactly. Note the list of possible + // category names can be retrieved from the following endpoint: + // /databases/{databaseId}/addmDbParameterCategories. + CategoryName *string `mandatory:"false" contributesTo:"query" name:"categoryName"` + + // Optional filter to return only resources whose name or value contains the substring given. The + // match is not case sensitive. + NameOrValueContains *string `mandatory:"false" contributesTo:"query" name:"nameOrValueContains"` + + // Optional filter to return only parameters whose value changed in the specified time period. + // Valid values include: TRUE, FALSE + IsChanged SummarizeAddmDbParametersIsChangedEnum `mandatory:"false" contributesTo:"query" name:"isChanged" omitEmpty:"true"` + + // Optional filter to return only parameters whose end value was set to the default value (TRUE) + // or was specified in the parameter file (FALSE). Valid values include: TRUE, FALSE + IsDefault SummarizeAddmDbParametersIsDefaultEnum `mandatory:"false" contributesTo:"query" name:"isDefault" omitEmpty:"true"` + + // Optional filter to return only parameters which have recommendations in the specified time period. + // Valid values include: TRUE, FALSE + HasRecommendations SummarizeAddmDbParametersHasRecommendationsEnum `mandatory:"false" contributesTo:"query" name:"hasRecommendations" omitEmpty:"true"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder SummarizeAddmDbParametersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the database parameter data + SortBy SummarizeAddmDbParametersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 SummarizeAddmDbParametersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeAddmDbParametersRequest) 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 SummarizeAddmDbParametersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeAddmDbParametersRequest) 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 SummarizeAddmDbParametersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeAddmDbParametersIsChangedEnum(string(request.IsChanged)); !ok && request.IsChanged != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IsChanged: %s. Supported values are: %s.", request.IsChanged, strings.Join(GetSummarizeAddmDbParametersIsChangedEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeAddmDbParametersIsDefaultEnum(string(request.IsDefault)); !ok && request.IsDefault != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IsDefault: %s. Supported values are: %s.", request.IsDefault, strings.Join(GetSummarizeAddmDbParametersIsDefaultEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeAddmDbParametersHasRecommendationsEnum(string(request.HasRecommendations)); !ok && request.HasRecommendations != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for HasRecommendations: %s. Supported values are: %s.", request.HasRecommendations, strings.Join(GetSummarizeAddmDbParametersHasRecommendationsEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeAddmDbParametersSortOrderEnum(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(GetSummarizeAddmDbParametersSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeAddmDbParametersSortByEnum(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(GetSummarizeAddmDbParametersSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeAddmDbParametersResponse wrapper for the SummarizeAddmDbParameters operation +type SummarizeAddmDbParametersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbParameterAggregationCollection instances + AddmDbParameterAggregationCollection `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 SummarizeAddmDbParametersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeAddmDbParametersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeAddmDbParametersIsChangedEnum Enum with underlying type: string +type SummarizeAddmDbParametersIsChangedEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbParametersIsChangedEnum +const ( + SummarizeAddmDbParametersIsChangedTrue SummarizeAddmDbParametersIsChangedEnum = "true" + SummarizeAddmDbParametersIsChangedFalse SummarizeAddmDbParametersIsChangedEnum = "false" +) + +var mappingSummarizeAddmDbParametersIsChangedEnum = map[string]SummarizeAddmDbParametersIsChangedEnum{ + "true": SummarizeAddmDbParametersIsChangedTrue, + "false": SummarizeAddmDbParametersIsChangedFalse, +} + +var mappingSummarizeAddmDbParametersIsChangedEnumLowerCase = map[string]SummarizeAddmDbParametersIsChangedEnum{ + "true": SummarizeAddmDbParametersIsChangedTrue, + "false": SummarizeAddmDbParametersIsChangedFalse, +} + +// GetSummarizeAddmDbParametersIsChangedEnumValues Enumerates the set of values for SummarizeAddmDbParametersIsChangedEnum +func GetSummarizeAddmDbParametersIsChangedEnumValues() []SummarizeAddmDbParametersIsChangedEnum { + values := make([]SummarizeAddmDbParametersIsChangedEnum, 0) + for _, v := range mappingSummarizeAddmDbParametersIsChangedEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbParametersIsChangedEnumStringValues Enumerates the set of values in String for SummarizeAddmDbParametersIsChangedEnum +func GetSummarizeAddmDbParametersIsChangedEnumStringValues() []string { + return []string{ + "true", + "false", + } +} + +// GetMappingSummarizeAddmDbParametersIsChangedEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbParametersIsChangedEnum(val string) (SummarizeAddmDbParametersIsChangedEnum, bool) { + enum, ok := mappingSummarizeAddmDbParametersIsChangedEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeAddmDbParametersIsDefaultEnum Enum with underlying type: string +type SummarizeAddmDbParametersIsDefaultEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbParametersIsDefaultEnum +const ( + SummarizeAddmDbParametersIsDefaultTrue SummarizeAddmDbParametersIsDefaultEnum = "true" + SummarizeAddmDbParametersIsDefaultFalse SummarizeAddmDbParametersIsDefaultEnum = "false" +) + +var mappingSummarizeAddmDbParametersIsDefaultEnum = map[string]SummarizeAddmDbParametersIsDefaultEnum{ + "true": SummarizeAddmDbParametersIsDefaultTrue, + "false": SummarizeAddmDbParametersIsDefaultFalse, +} + +var mappingSummarizeAddmDbParametersIsDefaultEnumLowerCase = map[string]SummarizeAddmDbParametersIsDefaultEnum{ + "true": SummarizeAddmDbParametersIsDefaultTrue, + "false": SummarizeAddmDbParametersIsDefaultFalse, +} + +// GetSummarizeAddmDbParametersIsDefaultEnumValues Enumerates the set of values for SummarizeAddmDbParametersIsDefaultEnum +func GetSummarizeAddmDbParametersIsDefaultEnumValues() []SummarizeAddmDbParametersIsDefaultEnum { + values := make([]SummarizeAddmDbParametersIsDefaultEnum, 0) + for _, v := range mappingSummarizeAddmDbParametersIsDefaultEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbParametersIsDefaultEnumStringValues Enumerates the set of values in String for SummarizeAddmDbParametersIsDefaultEnum +func GetSummarizeAddmDbParametersIsDefaultEnumStringValues() []string { + return []string{ + "true", + "false", + } +} + +// GetMappingSummarizeAddmDbParametersIsDefaultEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbParametersIsDefaultEnum(val string) (SummarizeAddmDbParametersIsDefaultEnum, bool) { + enum, ok := mappingSummarizeAddmDbParametersIsDefaultEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeAddmDbParametersHasRecommendationsEnum Enum with underlying type: string +type SummarizeAddmDbParametersHasRecommendationsEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbParametersHasRecommendationsEnum +const ( + SummarizeAddmDbParametersHasRecommendationsTrue SummarizeAddmDbParametersHasRecommendationsEnum = "true" + SummarizeAddmDbParametersHasRecommendationsFalse SummarizeAddmDbParametersHasRecommendationsEnum = "false" +) + +var mappingSummarizeAddmDbParametersHasRecommendationsEnum = map[string]SummarizeAddmDbParametersHasRecommendationsEnum{ + "true": SummarizeAddmDbParametersHasRecommendationsTrue, + "false": SummarizeAddmDbParametersHasRecommendationsFalse, +} + +var mappingSummarizeAddmDbParametersHasRecommendationsEnumLowerCase = map[string]SummarizeAddmDbParametersHasRecommendationsEnum{ + "true": SummarizeAddmDbParametersHasRecommendationsTrue, + "false": SummarizeAddmDbParametersHasRecommendationsFalse, +} + +// GetSummarizeAddmDbParametersHasRecommendationsEnumValues Enumerates the set of values for SummarizeAddmDbParametersHasRecommendationsEnum +func GetSummarizeAddmDbParametersHasRecommendationsEnumValues() []SummarizeAddmDbParametersHasRecommendationsEnum { + values := make([]SummarizeAddmDbParametersHasRecommendationsEnum, 0) + for _, v := range mappingSummarizeAddmDbParametersHasRecommendationsEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbParametersHasRecommendationsEnumStringValues Enumerates the set of values in String for SummarizeAddmDbParametersHasRecommendationsEnum +func GetSummarizeAddmDbParametersHasRecommendationsEnumStringValues() []string { + return []string{ + "true", + "false", + } +} + +// GetMappingSummarizeAddmDbParametersHasRecommendationsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbParametersHasRecommendationsEnum(val string) (SummarizeAddmDbParametersHasRecommendationsEnum, bool) { + enum, ok := mappingSummarizeAddmDbParametersHasRecommendationsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeAddmDbParametersSortOrderEnum Enum with underlying type: string +type SummarizeAddmDbParametersSortOrderEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbParametersSortOrderEnum +const ( + SummarizeAddmDbParametersSortOrderAsc SummarizeAddmDbParametersSortOrderEnum = "ASC" + SummarizeAddmDbParametersSortOrderDesc SummarizeAddmDbParametersSortOrderEnum = "DESC" +) + +var mappingSummarizeAddmDbParametersSortOrderEnum = map[string]SummarizeAddmDbParametersSortOrderEnum{ + "ASC": SummarizeAddmDbParametersSortOrderAsc, + "DESC": SummarizeAddmDbParametersSortOrderDesc, +} + +var mappingSummarizeAddmDbParametersSortOrderEnumLowerCase = map[string]SummarizeAddmDbParametersSortOrderEnum{ + "asc": SummarizeAddmDbParametersSortOrderAsc, + "desc": SummarizeAddmDbParametersSortOrderDesc, +} + +// GetSummarizeAddmDbParametersSortOrderEnumValues Enumerates the set of values for SummarizeAddmDbParametersSortOrderEnum +func GetSummarizeAddmDbParametersSortOrderEnumValues() []SummarizeAddmDbParametersSortOrderEnum { + values := make([]SummarizeAddmDbParametersSortOrderEnum, 0) + for _, v := range mappingSummarizeAddmDbParametersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbParametersSortOrderEnumStringValues Enumerates the set of values in String for SummarizeAddmDbParametersSortOrderEnum +func GetSummarizeAddmDbParametersSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSummarizeAddmDbParametersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbParametersSortOrderEnum(val string) (SummarizeAddmDbParametersSortOrderEnum, bool) { + enum, ok := mappingSummarizeAddmDbParametersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeAddmDbParametersSortByEnum Enum with underlying type: string +type SummarizeAddmDbParametersSortByEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbParametersSortByEnum +const ( + SummarizeAddmDbParametersSortByIschanged SummarizeAddmDbParametersSortByEnum = "isChanged" + SummarizeAddmDbParametersSortByName SummarizeAddmDbParametersSortByEnum = "name" +) + +var mappingSummarizeAddmDbParametersSortByEnum = map[string]SummarizeAddmDbParametersSortByEnum{ + "isChanged": SummarizeAddmDbParametersSortByIschanged, + "name": SummarizeAddmDbParametersSortByName, +} + +var mappingSummarizeAddmDbParametersSortByEnumLowerCase = map[string]SummarizeAddmDbParametersSortByEnum{ + "ischanged": SummarizeAddmDbParametersSortByIschanged, + "name": SummarizeAddmDbParametersSortByName, +} + +// GetSummarizeAddmDbParametersSortByEnumValues Enumerates the set of values for SummarizeAddmDbParametersSortByEnum +func GetSummarizeAddmDbParametersSortByEnumValues() []SummarizeAddmDbParametersSortByEnum { + values := make([]SummarizeAddmDbParametersSortByEnum, 0) + for _, v := range mappingSummarizeAddmDbParametersSortByEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbParametersSortByEnumStringValues Enumerates the set of values in String for SummarizeAddmDbParametersSortByEnum +func GetSummarizeAddmDbParametersSortByEnumStringValues() []string { + return []string{ + "isChanged", + "name", + } +} + +// GetMappingSummarizeAddmDbParametersSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbParametersSortByEnum(val string) (SummarizeAddmDbParametersSortByEnum, bool) { + enum, ok := mappingSummarizeAddmDbParametersSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/summarize_addm_db_recommendations_request_response.go b/opsi/summarize_addm_db_recommendations_request_response.go new file mode 100644 index 0000000000..e17fcc069b --- /dev/null +++ b/opsi/summarize_addm_db_recommendations_request_response.go @@ -0,0 +1,280 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeAddmDbRecommendationsRequest wrapper for the SummarizeAddmDbRecommendations operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbRecommendations.go.html to see an example of how to use SummarizeAddmDbRecommendationsRequest. +type SummarizeAddmDbRecommendationsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // The optional single value query parameter to filter by database instance number. + InstanceNumber *string `mandatory:"false" contributesTo:"query" name:"instanceNumber"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // Optional value filter to match the finding category exactly. + CategoryName *string `mandatory:"false" contributesTo:"query" name:"categoryName"` + + // Unique finding ID + FindingIdentifier *string `mandatory:"false" contributesTo:"query" name:"findingIdentifier"` + + // Optional filter to return only resources whose sql id matches the value given. Only considered when + // categoryName is SQL_TUNING. + SqlIdentifier *string `mandatory:"false" contributesTo:"query" name:"sqlIdentifier"` + + // Optional filter to return only resources whose owner or name contains the substring given. The + // match is not case sensitive. Only considered when categoryName is SCHEMA_OBJECT. + OwnerOrNameContains *string `mandatory:"false" contributesTo:"query" name:"ownerOrNameContains"` + + // Optional filter to return only resources whose name contains the substring given. The + // match is not case sensitive. Only considered when categoryName is DATABASE_CONFIGURATION. + NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"` + + // Optional filter to return only resources whose name exactly matches the substring given. The + // match is case sensitive. Only considered when categoryName is DATABASE_CONFIGURATION. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). + SortOrder SummarizeAddmDbRecommendationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Field name for sorting the recommendation data + SortBy SummarizeAddmDbRecommendationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 SummarizeAddmDbRecommendationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeAddmDbRecommendationsRequest) 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 SummarizeAddmDbRecommendationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeAddmDbRecommendationsRequest) 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 SummarizeAddmDbRecommendationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeAddmDbRecommendationsSortOrderEnum(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(GetSummarizeAddmDbRecommendationsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingSummarizeAddmDbRecommendationsSortByEnum(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(GetSummarizeAddmDbRecommendationsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeAddmDbRecommendationsResponse wrapper for the SummarizeAddmDbRecommendations operation +type SummarizeAddmDbRecommendationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbRecommendationAggregationCollection instances + AddmDbRecommendationAggregationCollection `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 SummarizeAddmDbRecommendationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeAddmDbRecommendationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeAddmDbRecommendationsSortOrderEnum Enum with underlying type: string +type SummarizeAddmDbRecommendationsSortOrderEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbRecommendationsSortOrderEnum +const ( + SummarizeAddmDbRecommendationsSortOrderAsc SummarizeAddmDbRecommendationsSortOrderEnum = "ASC" + SummarizeAddmDbRecommendationsSortOrderDesc SummarizeAddmDbRecommendationsSortOrderEnum = "DESC" +) + +var mappingSummarizeAddmDbRecommendationsSortOrderEnum = map[string]SummarizeAddmDbRecommendationsSortOrderEnum{ + "ASC": SummarizeAddmDbRecommendationsSortOrderAsc, + "DESC": SummarizeAddmDbRecommendationsSortOrderDesc, +} + +var mappingSummarizeAddmDbRecommendationsSortOrderEnumLowerCase = map[string]SummarizeAddmDbRecommendationsSortOrderEnum{ + "asc": SummarizeAddmDbRecommendationsSortOrderAsc, + "desc": SummarizeAddmDbRecommendationsSortOrderDesc, +} + +// GetSummarizeAddmDbRecommendationsSortOrderEnumValues Enumerates the set of values for SummarizeAddmDbRecommendationsSortOrderEnum +func GetSummarizeAddmDbRecommendationsSortOrderEnumValues() []SummarizeAddmDbRecommendationsSortOrderEnum { + values := make([]SummarizeAddmDbRecommendationsSortOrderEnum, 0) + for _, v := range mappingSummarizeAddmDbRecommendationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbRecommendationsSortOrderEnumStringValues Enumerates the set of values in String for SummarizeAddmDbRecommendationsSortOrderEnum +func GetSummarizeAddmDbRecommendationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSummarizeAddmDbRecommendationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbRecommendationsSortOrderEnum(val string) (SummarizeAddmDbRecommendationsSortOrderEnum, bool) { + enum, ok := mappingSummarizeAddmDbRecommendationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SummarizeAddmDbRecommendationsSortByEnum Enum with underlying type: string +type SummarizeAddmDbRecommendationsSortByEnum string + +// Set of constants representing the allowable values for SummarizeAddmDbRecommendationsSortByEnum +const ( + SummarizeAddmDbRecommendationsSortByMaxbenefitpercent SummarizeAddmDbRecommendationsSortByEnum = "maxBenefitPercent" + SummarizeAddmDbRecommendationsSortByMaxbenefitavgactivesessions SummarizeAddmDbRecommendationsSortByEnum = "maxBenefitAvgActiveSessions" + SummarizeAddmDbRecommendationsSortByFrequencycount SummarizeAddmDbRecommendationsSortByEnum = "frequencyCount" +) + +var mappingSummarizeAddmDbRecommendationsSortByEnum = map[string]SummarizeAddmDbRecommendationsSortByEnum{ + "maxBenefitPercent": SummarizeAddmDbRecommendationsSortByMaxbenefitpercent, + "maxBenefitAvgActiveSessions": SummarizeAddmDbRecommendationsSortByMaxbenefitavgactivesessions, + "frequencyCount": SummarizeAddmDbRecommendationsSortByFrequencycount, +} + +var mappingSummarizeAddmDbRecommendationsSortByEnumLowerCase = map[string]SummarizeAddmDbRecommendationsSortByEnum{ + "maxbenefitpercent": SummarizeAddmDbRecommendationsSortByMaxbenefitpercent, + "maxbenefitavgactivesessions": SummarizeAddmDbRecommendationsSortByMaxbenefitavgactivesessions, + "frequencycount": SummarizeAddmDbRecommendationsSortByFrequencycount, +} + +// GetSummarizeAddmDbRecommendationsSortByEnumValues Enumerates the set of values for SummarizeAddmDbRecommendationsSortByEnum +func GetSummarizeAddmDbRecommendationsSortByEnumValues() []SummarizeAddmDbRecommendationsSortByEnum { + values := make([]SummarizeAddmDbRecommendationsSortByEnum, 0) + for _, v := range mappingSummarizeAddmDbRecommendationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeAddmDbRecommendationsSortByEnumStringValues Enumerates the set of values in String for SummarizeAddmDbRecommendationsSortByEnum +func GetSummarizeAddmDbRecommendationsSortByEnumStringValues() []string { + return []string{ + "maxBenefitPercent", + "maxBenefitAvgActiveSessions", + "frequencyCount", + } +} + +// GetMappingSummarizeAddmDbRecommendationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeAddmDbRecommendationsSortByEnum(val string) (SummarizeAddmDbRecommendationsSortByEnum, bool) { + enum, ok := mappingSummarizeAddmDbRecommendationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/opsi/summarize_addm_db_schema_objects_request_response.go b/opsi/summarize_addm_db_schema_objects_request_response.go new file mode 100644 index 0000000000..6dfdf233cf --- /dev/null +++ b/opsi/summarize_addm_db_schema_objects_request_response.go @@ -0,0 +1,158 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeAddmDbSchemaObjectsRequest wrapper for the SummarizeAddmDbSchemaObjects operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbSchemaObjects.go.html to see an example of how to use SummarizeAddmDbSchemaObjectsRequest. +type SummarizeAddmDbSchemaObjectsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // One or more unique Object id (from RDBMS) + ObjectIdentifier []int `contributesTo:"query" name:"objectIdentifier" collectionFormat:"multi"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 SummarizeAddmDbSchemaObjectsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeAddmDbSchemaObjectsRequest) 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 SummarizeAddmDbSchemaObjectsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeAddmDbSchemaObjectsRequest) 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 SummarizeAddmDbSchemaObjectsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeAddmDbSchemaObjectsResponse wrapper for the SummarizeAddmDbSchemaObjects operation +type SummarizeAddmDbSchemaObjectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbSchemaObjectCollection instances + AddmDbSchemaObjectCollection `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 SummarizeAddmDbSchemaObjectsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeAddmDbSchemaObjectsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/opsi/summarize_addm_db_sql_statements_request_response.go b/opsi/summarize_addm_db_sql_statements_request_response.go new file mode 100644 index 0000000000..6a0281afac --- /dev/null +++ b/opsi/summarize_addm_db_sql_statements_request_response.go @@ -0,0 +1,159 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeAddmDbSqlStatementsRequest wrapper for the SummarizeAddmDbSqlStatements operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeAddmDbSqlStatements.go.html to see an example of how to use SummarizeAddmDbSqlStatementsRequest. +type SummarizeAddmDbSqlStatementsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // One or more unique SQL_IDs for a SQL Statement. + // Example: `6rgjh9bjmy2s7` + SqlIdentifier []string `contributesTo:"query" name:"sqlIdentifier" collectionFormat:"multi"` + + // Optional list of database OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the associated DBaaS entity. + DatabaseId []string `contributesTo:"query" name:"databaseId" collectionFormat:"multi"` + + // Optional list of database insight resource OCIDs (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). + Id []string `contributesTo:"query" name:"id" collectionFormat:"multi"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // 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/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of tag filters to apply. Only resources with a defined tag matching the value will be returned. + // Each item in the list has the format "{namespace}.{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` + + // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. + // The key for each tag is "{tagName}.{value}". All inputs are case-insensitive. + // Multiple values for the same tag name are interpreted as "OR". Values for different tag names are interpreted as "AND". + FreeformTagEquals []string `contributesTo:"query" name:"freeformTagEquals" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified defined tags exist will be returned. + // Each item in the list has the format "{namespace}.{tagName}.true" (for checking existence of a defined tag) + // or "{namespace}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". + // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + DefinedTagExists []string `contributesTo:"query" name:"definedTagExists" collectionFormat:"multi"` + + // A list of tag existence filters to apply. Only resources for which the specified freeform tags exist the value will be returned. + // The key for each tag is "{tagName}.true". All inputs are case-insensitive. + // Currently, only existence ("true" at the end) is supported. Absence ("false" at the end) is not supported. + // Multiple values for different tag names are interpreted as "AND". + FreeformTagExists []string `contributesTo:"query" name:"freeformTagExists" collectionFormat:"multi"` + + // A flag to search all resources within a given compartment and all sub-compartments. + CompartmentIdInSubtree *bool `mandatory:"false" contributesTo:"query" name:"compartmentIdInSubtree"` + + // 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 SummarizeAddmDbSqlStatementsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeAddmDbSqlStatementsRequest) 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 SummarizeAddmDbSqlStatementsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeAddmDbSqlStatementsRequest) 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 SummarizeAddmDbSqlStatementsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeAddmDbSqlStatementsResponse wrapper for the SummarizeAddmDbSqlStatements operation +type SummarizeAddmDbSqlStatementsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of AddmDbSqlStatementCollection instances + AddmDbSqlStatementCollection `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 SummarizeAddmDbSqlStatementsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeAddmDbSqlStatementsResponse) HTTPResponse() *http.Response { + return response.RawResponse +}