From ea91470dbc3314307e2df2b2cb7546439e81596d Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 30 Jul 2024 06:16:12 +0000 Subject: [PATCH] Releasing version 2.130.0 Co-authored-by: Harsh Kumar --- CHANGELOG.rst | 21 + docs/api/ai_speech.rst | 35 + ....ChangeCustomizationCompartmentDetails.rst | 11 + ...eech.models.CreateCustomizationDetails.rst | 11 + ...dels.CreateRealtimeSessionTokenDetails.rst | 11 + .../oci.ai_speech.models.Customization.rst | 11 + ..._speech.models.CustomizationCollection.rst | 11 + ...ech.models.CustomizationDatasetDetails.rst | 11 + ...i_speech.models.CustomizationInference.rst | 11 + ...ch.models.CustomizationInferenceEntity.rst | 11 + ...peech.models.CustomizationModelDetails.rst | 11 + ...models.CustomizationReferencedEntities.rst | 11 + ....ai_speech.models.CustomizationSummary.rst | 11 + .../models/oci.ai_speech.models.Entity.rst | 11 + .../oci.ai_speech.models.EntityList.rst | 11 + ...oci.ai_speech.models.EntityListDataset.rst | 11 + .../oci.ai_speech.models.LocationDetails.rst | 11 + ...oci.ai_speech.models.ObjectListDataset.rst | 11 + ....ai_speech.models.ObjectStorageDataset.rst | 11 + .../oci.ai_speech.models.Pronunciation.rst | 11 + .../oci.ai_speech.models.RealtimeMessage.rst | 11 + ..._speech.models.RealtimeMessageAckAudio.rst | 11 + ....models.RealtimeMessageAckAudioDetails.rst | 11 + ...h.models.RealtimeMessageAuthentication.rst | 11 + ...altimeMessageAuthenticationCredentials.rst | 11 + ...els.RealtimeMessageAuthenticationToken.rst | 11 + ...i_speech.models.RealtimeMessageConnect.rst | 11 + ....ai_speech.models.RealtimeMessageError.rst | 11 + ...ci.ai_speech.models.RealtimeMessageOut.rst | 11 + ...ai_speech.models.RealtimeMessageResult.rst | 11 + ...els.RealtimeMessageResultTranscription.rst | 11 + ...ealtimeMessageResultTranscriptionToken.rst | 11 + ....models.RealtimeMessageSendFinalResult.rst | 11 + ....ai_speech.models.RealtimeModelDetails.rst | 11 + ...ci.ai_speech.models.RealtimeParameters.rst | 11 + ....ai_speech.models.RealtimeSessionToken.rst | 11 + ...eech.models.UpdateCustomizationDetails.rst | 11 + docs/api/core.rst | 3 + ...i.core.models.InstanceMaintenanceEvent.rst | 11 + ...models.InstanceMaintenanceEventSummary.rst | 11 + ....UpdateInstanceMaintenanceEventDetails.rst | 11 + docs/api/data_safe.rst | 1 + ...a_safe.models.UpdateAlertPolicyDetails.rst | 11 + docs/api/database_migration.rst | 4 + ...dels.CreateParameterFileVersionDetails.rst | 11 + ..._migration.models.ParameterFileVersion.rst | 11 + ....models.ParameterFileVersionCollection.rst | 11 + ...ion.models.ParameterFileVersionSummary.rst | 11 + docs/api/fleet_software_update.rst | 2 + ...te.models.DiagnosticsCollectionDetails.rst | 11 + ...ware_update.models.FsuCollectionTarget.rst | 11 + docs/api/identity_domains.rst | 6 + ....IdentityProviderJitProvAssignedGroups.rst | 11 + ..._domains.models.SocialIdentityProvider.rst | 11 + ...lIdentityProviderJitProvAssignedGroups.rst | 11 + ...lIdentityProviderRelayIdpParamMappings.rst | 11 + ...ls.SocialIdentityProviderSearchRequest.rst | 11 + ...domains.models.SocialIdentityProviders.rst | 11 + docs/api/network_firewall.rst | 11 + ...dels.CreateTunnelInspectionRuleDetails.rst | 11 + ...odels.CreateVxlanInspectionRuleDetails.rst | 11 + ...k_firewall.models.TunnelInspectionRule.rst | 11 + ...all.models.TunnelInspectionRuleSummary.rst | 11 + ....TunnelInspectionRuleSummaryCollection.rst | 11 + ...dels.UpdateTunnelInspectionRuleDetails.rst | 11 + ...odels.UpdateVxlanInspectionRuleDetails.rst | 11 + ...rk_firewall.models.VxlanInspectionRule.rst | 11 + ...odels.VxlanInspectionRuleMatchCriteria.rst | 11 + ...wall.models.VxlanInspectionRuleProfile.rst | 11 + ...wall.models.VxlanInspectionRuleSummary.rst | 11 + examples/showsubscription/README.md | 1 + examples/showusage/README.md | 3 +- examples/showusage/showusage.py | 660 +-- src/oci/ai_speech/ai_service_speech_client.py | 815 +++- ...vice_speech_client_composite_operations.py | 146 + src/oci/ai_speech/models/__init__.py | 70 + ...hange_customization_compartment_details.py | 78 + .../models/create_customization_details.py | 289 ++ .../create_realtime_session_token_details.py | 142 + src/oci/ai_speech/models/customization.py | 544 +++ .../models/customization_collection.py | 72 + .../models/customization_dataset_details.py | 109 + .../models/customization_inference.py | 173 + .../models/customization_inference_entity.py | 138 + .../models/customization_model_details.py | 139 + .../customization_referenced_entities.py | 134 + .../ai_speech/models/customization_summary.py | 396 ++ src/oci/ai_speech/models/entity.py | 134 + src/oci/ai_speech/models/entity_list.py | 166 + .../ai_speech/models/entity_list_dataset.py | 115 + src/oci/ai_speech/models/location_details.py | 101 + .../ai_speech/models/object_list_dataset.py | 144 + .../models/object_storage_dataset.py | 109 + src/oci/ai_speech/models/pronunciation.py | 99 + src/oci/ai_speech/models/realtime_message.py | 168 + .../models/realtime_message_ack_audio.py | 85 + .../realtime_message_ack_audio_details.py | 134 + .../models/realtime_message_authentication.py | 140 + ...time_message_authentication_credentials.py | 89 + .../realtime_message_authentication_token.py | 89 + .../models/realtime_message_connect.py | 58 + .../models/realtime_message_error.py | 120 + .../ai_speech/models/realtime_message_out.py | 103 + .../models/realtime_message_result.py | 89 + .../realtime_message_result_transcription.py | 258 ++ ...time_message_result_transcription_token.py | 212 + .../realtime_message_send_final_result.py | 51 + .../models/realtime_model_details.py | 139 + .../ai_speech/models/realtime_parameters.py | 390 ++ .../models/realtime_session_token.py | 200 + .../models/update_customization_details.py | 254 ++ ...phemeral_resource_principals_v21_signer.py | 43 +- src/oci/auth/signers/key_pair_signer.py | 4 +- .../signers/resource_principals_signer.py | 22 +- src/oci/core/compute_client.py | 409 ++ .../compute_client_composite_operations.py | 39 + src/oci/core/models/__init__.py | 6 + .../core/models/instance_maintenance_event.py | 1022 +++++ .../instance_maintenance_event_summary.py | 795 ++++ ...date_instance_maintenance_event_details.py | 281 ++ src/oci/data_safe/data_safe_client.py | 1818 ++++++--- .../data_safe_client_composite_operations.py | 307 ++ src/oci/data_safe/models/__init__.py | 2 + src/oci/data_safe/models/alert.py | 62 + src/oci/data_safe/models/alert_policy.py | 31 + src/oci/data_safe/models/alert_policy_rule.py | 129 +- .../models/alert_policy_rule_summary.py | 129 +- .../data_safe/models/alert_policy_summary.py | 31 + src/oci/data_safe/models/alert_summary.py | 62 + .../models/create_alert_policy_details.py | 31 + .../create_alert_policy_rule_details.py | 35 +- src/oci/data_safe/models/report.py | 45 +- src/oci/data_safe/models/report_definition.py | 41 +- .../models/report_definition_summary.py | 10 +- src/oci/data_safe/models/report_summary.py | 14 +- .../models/target_alert_policy_association.py | 31 + ...target_alert_policy_association_summary.py | 31 + .../models/update_alert_policy_details.py | 240 ++ .../update_alert_policy_rule_details.py | 35 +- src/oci/data_safe/models/work_request.py | 34 +- .../data_safe/models/work_request_summary.py | 34 +- .../database/models/autonomous_database.py | 39 +- .../models/autonomous_database_summary.py | 39 +- .../database_migration_client.py | 786 +++- ...e_migration_client_composite_operations.py | 179 + src/oci/database_migration/models/__init__.py | 8 + ...edicated_auto_create_tablespace_details.py | 14 +- ...edicated_auto_create_tablespace_details.py | 14 +- ..._non_adb_auto_create_tablespace_details.py | 14 +- .../create_parameter_file_version_details.py | 181 + src/oci/database_migration/models/job.py | 31 + .../non_adb_auto_create_tablespace_details.py | 14 +- .../models/parameter_file_version.py | 274 ++ .../parameter_file_version_collection.py | 72 + .../models/parameter_file_version_summary.py | 342 ++ .../database_migration/models/phase_status.py | 82 +- ...edicated_auto_create_tablespace_details.py | 14 +- ..._non_adb_auto_create_tablespace_details.py | 14 +- .../fleet_software_update_client.py | 216 +- ...ware_update_client_composite_operations.py | 53 +- .../fleet_software_update/models/__init__.py | 4 + .../models/cloud_vm_cluster_target_summary.py | 35 +- .../models/create_fsu_cycle_details.py | 27 + .../models/create_patch_fsu_cycle.py | 7 + .../models/diagnostics_collection_details.py | 94 + .../models/fsu_collection_target.py | 239 ++ .../fleet_software_update/models/fsu_cycle.py | 27 + .../models/fsu_cycle_summary.py | 27 + .../models/gi_resource_id_filter.py | 10 +- .../models/image_id_fsu_target_details.py | 5 +- .../models/patch_fsu_cycle.py | 7 + .../models/update_fsu_cycle_details.py | 27 + .../models/update_patch_fsu_cycle.py | 7 + .../models/vm_cluster_target_summary.py | 35 +- .../identity_domains_client.py | 3527 ++++++++++------- src/oci/identity_domains/models/__init__.py | 12 + .../extension_social_identity_provider.py | 220 + .../models/identity_propagation_trust.py | 49 - ...ntity_provider_jit_prov_assigned_groups.py | 214 + .../models/social_identity_provider.py | 2083 ++++++++++ ...ntity_provider_jit_prov_assigned_groups.py | 202 + ...ntity_provider_relay_idp_param_mappings.py | 147 + ...social_identity_provider_search_request.py | 364 ++ .../models/social_identity_providers.py | 196 + src/oci/network_firewall/models/__init__.py | 22 + .../create_tunnel_inspection_rule_details.py | 218 + .../create_vxlan_inspection_rule_details.py | 127 + .../models/tunnel_inspection_rule.py | 280 ++ .../models/tunnel_inspection_rule_summary.py | 253 ++ ...nnel_inspection_rule_summary_collection.py | 72 + .../update_tunnel_inspection_rule_details.py | 187 + .../update_vxlan_inspection_rule_details.py | 120 + .../models/vxlan_inspection_rule.py | 141 + .../vxlan_inspection_rule_match_criteria.py | 104 + .../models/vxlan_inspection_rule_profile.py | 72 + .../models/vxlan_inspection_rule_summary.py | 134 + .../network_firewall_client.py | 774 +++- ...rk_firewall_client_composite_operations.py | 42 + .../models/create_redis_cluster_details.py | 14 +- src/oci/redis/models/redis_cluster.py | 24 +- src/oci/redis/models/redis_cluster_summary.py | 14 +- .../models/update_redis_cluster_details.py | 14 +- .../models/baselineable_metric.py | 279 +- .../models/baselineable_metric_summary.py | 31 + .../create_baselineable_metric_details.py | 39 +- .../update_baselineable_metric_details.py | 31 + .../stack_monitoring_client.py | 10 + src/oci/version.py | 2 +- 208 files changed, 24459 insertions(+), 2390 deletions(-) create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.ChangeCustomizationCompartmentDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CreateCustomizationDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CreateRealtimeSessionTokenDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.Customization.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CustomizationCollection.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CustomizationDatasetDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInference.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInferenceEntity.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CustomizationModelDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CustomizationReferencedEntities.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.CustomizationSummary.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.Entity.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.EntityList.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.EntityListDataset.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.LocationDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.ObjectListDataset.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.ObjectStorageDataset.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.Pronunciation.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessage.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudio.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudioDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthentication.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationCredentials.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationToken.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageConnect.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageError.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageOut.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResult.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscription.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscriptionToken.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageSendFinalResult.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeModelDetails.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeParameters.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.RealtimeSessionToken.rst create mode 100644 docs/api/ai_speech/models/oci.ai_speech.models.UpdateCustomizationDetails.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceMaintenanceEvent.rst create mode 100644 docs/api/core/models/oci.core.models.InstanceMaintenanceEventSummary.rst create mode 100644 docs/api/core/models/oci.core.models.UpdateInstanceMaintenanceEventDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyDetails.rst create mode 100644 docs/api/database_migration/models/oci.database_migration.models.CreateParameterFileVersionDetails.rst create mode 100644 docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersion.rst create mode 100644 docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionCollection.rst create mode 100644 docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionSummary.rst create mode 100644 docs/api/fleet_software_update/models/oci.fleet_software_update.models.DiagnosticsCollectionDetails.rst create mode 100644 docs/api/fleet_software_update/models/oci.fleet_software_update.models.FsuCollectionTarget.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.IdentityProviderJitProvAssignedGroups.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProvider.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderSearchRequest.rst create mode 100644 docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviders.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.CreateTunnelInspectionRuleDetails.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.CreateVxlanInspectionRuleDetails.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRule.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummary.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummaryCollection.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.UpdateTunnelInspectionRuleDetails.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.UpdateVxlanInspectionRuleDetails.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRule.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleMatchCriteria.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleProfile.rst create mode 100644 docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleSummary.rst create mode 100644 src/oci/ai_speech/models/change_customization_compartment_details.py create mode 100644 src/oci/ai_speech/models/create_customization_details.py create mode 100644 src/oci/ai_speech/models/create_realtime_session_token_details.py create mode 100644 src/oci/ai_speech/models/customization.py create mode 100644 src/oci/ai_speech/models/customization_collection.py create mode 100644 src/oci/ai_speech/models/customization_dataset_details.py create mode 100644 src/oci/ai_speech/models/customization_inference.py create mode 100644 src/oci/ai_speech/models/customization_inference_entity.py create mode 100644 src/oci/ai_speech/models/customization_model_details.py create mode 100644 src/oci/ai_speech/models/customization_referenced_entities.py create mode 100644 src/oci/ai_speech/models/customization_summary.py create mode 100644 src/oci/ai_speech/models/entity.py create mode 100644 src/oci/ai_speech/models/entity_list.py create mode 100644 src/oci/ai_speech/models/entity_list_dataset.py create mode 100644 src/oci/ai_speech/models/location_details.py create mode 100644 src/oci/ai_speech/models/object_list_dataset.py create mode 100644 src/oci/ai_speech/models/object_storage_dataset.py create mode 100644 src/oci/ai_speech/models/pronunciation.py create mode 100644 src/oci/ai_speech/models/realtime_message.py create mode 100644 src/oci/ai_speech/models/realtime_message_ack_audio.py create mode 100644 src/oci/ai_speech/models/realtime_message_ack_audio_details.py create mode 100644 src/oci/ai_speech/models/realtime_message_authentication.py create mode 100644 src/oci/ai_speech/models/realtime_message_authentication_credentials.py create mode 100644 src/oci/ai_speech/models/realtime_message_authentication_token.py create mode 100644 src/oci/ai_speech/models/realtime_message_connect.py create mode 100644 src/oci/ai_speech/models/realtime_message_error.py create mode 100644 src/oci/ai_speech/models/realtime_message_out.py create mode 100644 src/oci/ai_speech/models/realtime_message_result.py create mode 100644 src/oci/ai_speech/models/realtime_message_result_transcription.py create mode 100644 src/oci/ai_speech/models/realtime_message_result_transcription_token.py create mode 100644 src/oci/ai_speech/models/realtime_message_send_final_result.py create mode 100644 src/oci/ai_speech/models/realtime_model_details.py create mode 100644 src/oci/ai_speech/models/realtime_parameters.py create mode 100644 src/oci/ai_speech/models/realtime_session_token.py create mode 100644 src/oci/ai_speech/models/update_customization_details.py create mode 100644 src/oci/core/models/instance_maintenance_event.py create mode 100644 src/oci/core/models/instance_maintenance_event_summary.py create mode 100644 src/oci/core/models/update_instance_maintenance_event_details.py create mode 100644 src/oci/data_safe/models/update_alert_policy_details.py create mode 100644 src/oci/database_migration/models/create_parameter_file_version_details.py create mode 100644 src/oci/database_migration/models/parameter_file_version.py create mode 100644 src/oci/database_migration/models/parameter_file_version_collection.py create mode 100644 src/oci/database_migration/models/parameter_file_version_summary.py create mode 100644 src/oci/fleet_software_update/models/diagnostics_collection_details.py create mode 100644 src/oci/fleet_software_update/models/fsu_collection_target.py create mode 100644 src/oci/identity_domains/models/identity_provider_jit_prov_assigned_groups.py create mode 100644 src/oci/identity_domains/models/social_identity_provider.py create mode 100644 src/oci/identity_domains/models/social_identity_provider_jit_prov_assigned_groups.py create mode 100644 src/oci/identity_domains/models/social_identity_provider_relay_idp_param_mappings.py create mode 100644 src/oci/identity_domains/models/social_identity_provider_search_request.py create mode 100644 src/oci/identity_domains/models/social_identity_providers.py create mode 100644 src/oci/network_firewall/models/create_tunnel_inspection_rule_details.py create mode 100644 src/oci/network_firewall/models/create_vxlan_inspection_rule_details.py create mode 100644 src/oci/network_firewall/models/tunnel_inspection_rule.py create mode 100644 src/oci/network_firewall/models/tunnel_inspection_rule_summary.py create mode 100644 src/oci/network_firewall/models/tunnel_inspection_rule_summary_collection.py create mode 100644 src/oci/network_firewall/models/update_tunnel_inspection_rule_details.py create mode 100644 src/oci/network_firewall/models/update_vxlan_inspection_rule_details.py create mode 100644 src/oci/network_firewall/models/vxlan_inspection_rule.py create mode 100644 src/oci/network_firewall/models/vxlan_inspection_rule_match_criteria.py create mode 100644 src/oci/network_firewall/models/vxlan_inspection_rule_profile.py create mode 100644 src/oci/network_firewall/models/vxlan_inspection_rule_summary.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index de544d6cf3..f5b49214e7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,27 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.130.0 - 2024-07-30 +==================== + +Added +----- +* Support for cluster placement groups on get operations in the Database service +* Support for baseline metric for imported resources and metric extensions in the Stack Monitoring service +* Support for implicit JIT and group membership provisioning during OpenID connect flow in the Identity Domains service +* Support for realtime speech and customizations in the AI Speech service +* Support for self-service instance maintenance API in the Compute service +* Support for GoldenGate suspend phase in the Database Migration service +* Support for creating custom alert policies in the Data Safe service +* Support for tunnel inspection in the Network firewall service +* Support for diagnostics collection preferences and custom GI images in the Exadata Fleet Update service +* Support for Resource Principals v2.1.2 + +Breaking +-------- +* Property `service_principals` was removed from model `IdentityPropagationTrust` in the Identity Domains service + ==================== 2.129.4 - 2024-07-23 ==================== diff --git a/docs/api/ai_speech.rst b/docs/api/ai_speech.rst index f23d9f1977..ef7bfdee0f 100644 --- a/docs/api/ai_speech.rst +++ b/docs/api/ai_speech.rst @@ -19,15 +19,49 @@ Ai Speech :template: autosummary/model_class.rst oci.ai_speech.models.AudioFormatDetails + oci.ai_speech.models.ChangeCustomizationCompartmentDetails oci.ai_speech.models.ChangeTranscriptionJobCompartmentDetails + oci.ai_speech.models.CreateCustomizationDetails + oci.ai_speech.models.CreateRealtimeSessionTokenDetails oci.ai_speech.models.CreateTranscriptionJobDetails + oci.ai_speech.models.Customization + oci.ai_speech.models.CustomizationCollection + oci.ai_speech.models.CustomizationDatasetDetails + oci.ai_speech.models.CustomizationInference + oci.ai_speech.models.CustomizationInferenceEntity + oci.ai_speech.models.CustomizationModelDetails + oci.ai_speech.models.CustomizationReferencedEntities + oci.ai_speech.models.CustomizationSummary oci.ai_speech.models.Diarization + oci.ai_speech.models.Entity + oci.ai_speech.models.EntityList + oci.ai_speech.models.EntityListDataset oci.ai_speech.models.InputLocation + oci.ai_speech.models.LocationDetails + oci.ai_speech.models.ObjectListDataset oci.ai_speech.models.ObjectListFileInputLocation oci.ai_speech.models.ObjectListInlineInputLocation oci.ai_speech.models.ObjectLocation + oci.ai_speech.models.ObjectStorageDataset oci.ai_speech.models.OutputLocation oci.ai_speech.models.ProfanityTranscriptionFilter + oci.ai_speech.models.Pronunciation + oci.ai_speech.models.RealtimeMessage + oci.ai_speech.models.RealtimeMessageAckAudio + oci.ai_speech.models.RealtimeMessageAckAudioDetails + oci.ai_speech.models.RealtimeMessageAuthentication + oci.ai_speech.models.RealtimeMessageAuthenticationCredentials + oci.ai_speech.models.RealtimeMessageAuthenticationToken + oci.ai_speech.models.RealtimeMessageConnect + oci.ai_speech.models.RealtimeMessageError + oci.ai_speech.models.RealtimeMessageOut + oci.ai_speech.models.RealtimeMessageResult + oci.ai_speech.models.RealtimeMessageResultTranscription + oci.ai_speech.models.RealtimeMessageResultTranscriptionToken + oci.ai_speech.models.RealtimeMessageSendFinalResult + oci.ai_speech.models.RealtimeModelDetails + oci.ai_speech.models.RealtimeParameters + oci.ai_speech.models.RealtimeSessionToken oci.ai_speech.models.TranscriptionFilter oci.ai_speech.models.TranscriptionJob oci.ai_speech.models.TranscriptionJobCollection @@ -38,4 +72,5 @@ Ai Speech oci.ai_speech.models.TranscriptionTask oci.ai_speech.models.TranscriptionTaskCollection oci.ai_speech.models.TranscriptionTaskSummary + oci.ai_speech.models.UpdateCustomizationDetails oci.ai_speech.models.UpdateTranscriptionJobDetails diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.ChangeCustomizationCompartmentDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.ChangeCustomizationCompartmentDetails.rst new file mode 100644 index 0000000000..7b0909575f --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.ChangeCustomizationCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeCustomizationCompartmentDetails +===================================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: ChangeCustomizationCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CreateCustomizationDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CreateCustomizationDetails.rst new file mode 100644 index 0000000000..d20dcc8496 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CreateCustomizationDetails.rst @@ -0,0 +1,11 @@ +CreateCustomizationDetails +========================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CreateCustomizationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CreateRealtimeSessionTokenDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CreateRealtimeSessionTokenDetails.rst new file mode 100644 index 0000000000..73146265dc --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CreateRealtimeSessionTokenDetails.rst @@ -0,0 +1,11 @@ +CreateRealtimeSessionTokenDetails +================================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CreateRealtimeSessionTokenDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.Customization.rst b/docs/api/ai_speech/models/oci.ai_speech.models.Customization.rst new file mode 100644 index 0000000000..ff86f255a2 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.Customization.rst @@ -0,0 +1,11 @@ +Customization +============= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: Customization + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationCollection.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationCollection.rst new file mode 100644 index 0000000000..c7f20cb093 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationCollection.rst @@ -0,0 +1,11 @@ +CustomizationCollection +======================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CustomizationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationDatasetDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationDatasetDetails.rst new file mode 100644 index 0000000000..ff7cbe12e9 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationDatasetDetails.rst @@ -0,0 +1,11 @@ +CustomizationDatasetDetails +=========================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CustomizationDatasetDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInference.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInference.rst new file mode 100644 index 0000000000..201989deb9 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInference.rst @@ -0,0 +1,11 @@ +CustomizationInference +====================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CustomizationInference + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInferenceEntity.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInferenceEntity.rst new file mode 100644 index 0000000000..a3842110a5 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationInferenceEntity.rst @@ -0,0 +1,11 @@ +CustomizationInferenceEntity +============================ + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CustomizationInferenceEntity + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationModelDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationModelDetails.rst new file mode 100644 index 0000000000..47911ab77c --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationModelDetails.rst @@ -0,0 +1,11 @@ +CustomizationModelDetails +========================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CustomizationModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationReferencedEntities.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationReferencedEntities.rst new file mode 100644 index 0000000000..9dcdc5ea8b --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationReferencedEntities.rst @@ -0,0 +1,11 @@ +CustomizationReferencedEntities +=============================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CustomizationReferencedEntities + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationSummary.rst b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationSummary.rst new file mode 100644 index 0000000000..1e7335bf4f --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.CustomizationSummary.rst @@ -0,0 +1,11 @@ +CustomizationSummary +==================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: CustomizationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.Entity.rst b/docs/api/ai_speech/models/oci.ai_speech.models.Entity.rst new file mode 100644 index 0000000000..6d5c92a69a --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.Entity.rst @@ -0,0 +1,11 @@ +Entity +====== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: Entity + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.EntityList.rst b/docs/api/ai_speech/models/oci.ai_speech.models.EntityList.rst new file mode 100644 index 0000000000..7bcc923fa4 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.EntityList.rst @@ -0,0 +1,11 @@ +EntityList +========== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: EntityList + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.EntityListDataset.rst b/docs/api/ai_speech/models/oci.ai_speech.models.EntityListDataset.rst new file mode 100644 index 0000000000..b1de5d41bb --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.EntityListDataset.rst @@ -0,0 +1,11 @@ +EntityListDataset +================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: EntityListDataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.LocationDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.LocationDetails.rst new file mode 100644 index 0000000000..05f4f66225 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.LocationDetails.rst @@ -0,0 +1,11 @@ +LocationDetails +=============== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: LocationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.ObjectListDataset.rst b/docs/api/ai_speech/models/oci.ai_speech.models.ObjectListDataset.rst new file mode 100644 index 0000000000..6292f5b08c --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.ObjectListDataset.rst @@ -0,0 +1,11 @@ +ObjectListDataset +================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: ObjectListDataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.ObjectStorageDataset.rst b/docs/api/ai_speech/models/oci.ai_speech.models.ObjectStorageDataset.rst new file mode 100644 index 0000000000..cef632e7a8 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.ObjectStorageDataset.rst @@ -0,0 +1,11 @@ +ObjectStorageDataset +==================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: ObjectStorageDataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.Pronunciation.rst b/docs/api/ai_speech/models/oci.ai_speech.models.Pronunciation.rst new file mode 100644 index 0000000000..2776f64fb3 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.Pronunciation.rst @@ -0,0 +1,11 @@ +Pronunciation +============= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: Pronunciation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessage.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessage.rst new file mode 100644 index 0000000000..afb178f85e --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessage.rst @@ -0,0 +1,11 @@ +RealtimeMessage +=============== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessage + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudio.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudio.rst new file mode 100644 index 0000000000..a12bb76eb4 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudio.rst @@ -0,0 +1,11 @@ +RealtimeMessageAckAudio +======================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageAckAudio + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudioDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudioDetails.rst new file mode 100644 index 0000000000..d6a76a94f5 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAckAudioDetails.rst @@ -0,0 +1,11 @@ +RealtimeMessageAckAudioDetails +============================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageAckAudioDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthentication.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthentication.rst new file mode 100644 index 0000000000..e2efacbb04 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthentication.rst @@ -0,0 +1,11 @@ +RealtimeMessageAuthentication +============================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageAuthentication + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationCredentials.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationCredentials.rst new file mode 100644 index 0000000000..0f066c5b82 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationCredentials.rst @@ -0,0 +1,11 @@ +RealtimeMessageAuthenticationCredentials +======================================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageAuthenticationCredentials + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationToken.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationToken.rst new file mode 100644 index 0000000000..d1462f8192 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageAuthenticationToken.rst @@ -0,0 +1,11 @@ +RealtimeMessageAuthenticationToken +================================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageAuthenticationToken + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageConnect.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageConnect.rst new file mode 100644 index 0000000000..861291c862 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageConnect.rst @@ -0,0 +1,11 @@ +RealtimeMessageConnect +====================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageConnect + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageError.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageError.rst new file mode 100644 index 0000000000..158905b41b --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageError.rst @@ -0,0 +1,11 @@ +RealtimeMessageError +==================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageOut.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageOut.rst new file mode 100644 index 0000000000..a14f450910 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageOut.rst @@ -0,0 +1,11 @@ +RealtimeMessageOut +================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageOut + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResult.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResult.rst new file mode 100644 index 0000000000..35eebe5679 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResult.rst @@ -0,0 +1,11 @@ +RealtimeMessageResult +===================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscription.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscription.rst new file mode 100644 index 0000000000..1e7c3827ae --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscription.rst @@ -0,0 +1,11 @@ +RealtimeMessageResultTranscription +================================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageResultTranscription + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscriptionToken.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscriptionToken.rst new file mode 100644 index 0000000000..881ed03177 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageResultTranscriptionToken.rst @@ -0,0 +1,11 @@ +RealtimeMessageResultTranscriptionToken +======================================= + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageResultTranscriptionToken + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageSendFinalResult.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageSendFinalResult.rst new file mode 100644 index 0000000000..90768d1ee6 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeMessageSendFinalResult.rst @@ -0,0 +1,11 @@ +RealtimeMessageSendFinalResult +============================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeMessageSendFinalResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeModelDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeModelDetails.rst new file mode 100644 index 0000000000..97d3add643 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeModelDetails.rst @@ -0,0 +1,11 @@ +RealtimeModelDetails +==================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeParameters.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeParameters.rst new file mode 100644 index 0000000000..d94e8cbbf2 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeParameters.rst @@ -0,0 +1,11 @@ +RealtimeParameters +================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeParameters + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeSessionToken.rst b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeSessionToken.rst new file mode 100644 index 0000000000..32e5bbd4f1 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.RealtimeSessionToken.rst @@ -0,0 +1,11 @@ +RealtimeSessionToken +==================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: RealtimeSessionToken + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_speech/models/oci.ai_speech.models.UpdateCustomizationDetails.rst b/docs/api/ai_speech/models/oci.ai_speech.models.UpdateCustomizationDetails.rst new file mode 100644 index 0000000000..cc0b9810b3 --- /dev/null +++ b/docs/api/ai_speech/models/oci.ai_speech.models.UpdateCustomizationDetails.rst @@ -0,0 +1,11 @@ +UpdateCustomizationDetails +========================== + +.. currentmodule:: oci.ai_speech.models + +.. autoclass:: UpdateCustomizationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core.rst b/docs/api/core.rst index 39cfc598a4..7b8bd278c1 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -365,6 +365,8 @@ Core Services oci.core.models.InstanceConfigurationVolumeSourceFromVolumeDetails oci.core.models.InstanceConsoleConnection oci.core.models.InstanceCredentials + oci.core.models.InstanceMaintenanceEvent + oci.core.models.InstanceMaintenanceEventSummary oci.core.models.InstanceMaintenanceReboot oci.core.models.InstanceOptions oci.core.models.InstancePool @@ -546,6 +548,7 @@ Core Services oci.core.models.UpdateInstanceConfigurationDetails oci.core.models.UpdateInstanceConsoleConnectionDetails oci.core.models.UpdateInstanceDetails + oci.core.models.UpdateInstanceMaintenanceEventDetails oci.core.models.UpdateInstancePlatformConfig oci.core.models.UpdateInstancePoolDetails oci.core.models.UpdateInstancePoolPlacementConfigurationDetails diff --git a/docs/api/core/models/oci.core.models.InstanceMaintenanceEvent.rst b/docs/api/core/models/oci.core.models.InstanceMaintenanceEvent.rst new file mode 100644 index 0000000000..44ba759ebe --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceMaintenanceEvent.rst @@ -0,0 +1,11 @@ +InstanceMaintenanceEvent +======================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceMaintenanceEvent + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.InstanceMaintenanceEventSummary.rst b/docs/api/core/models/oci.core.models.InstanceMaintenanceEventSummary.rst new file mode 100644 index 0000000000..73b0aab100 --- /dev/null +++ b/docs/api/core/models/oci.core.models.InstanceMaintenanceEventSummary.rst @@ -0,0 +1,11 @@ +InstanceMaintenanceEventSummary +=============================== + +.. currentmodule:: oci.core.models + +.. autoclass:: InstanceMaintenanceEventSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.UpdateInstanceMaintenanceEventDetails.rst b/docs/api/core/models/oci.core.models.UpdateInstanceMaintenanceEventDetails.rst new file mode 100644 index 0000000000..ffe24aa510 --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdateInstanceMaintenanceEventDetails.rst @@ -0,0 +1,11 @@ +UpdateInstanceMaintenanceEventDetails +===================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdateInstanceMaintenanceEventDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe.rst b/docs/api/data_safe.rst index daf33686fd..ff9dc608c2 100644 --- a/docs/api/data_safe.rst +++ b/docs/api/data_safe.rst @@ -375,6 +375,7 @@ Data Safe oci.data_safe.models.UnsetSecurityAssessmentBaselineDetails oci.data_safe.models.UnsetUserAssessmentBaselineDetails oci.data_safe.models.UpdateAlertDetails + oci.data_safe.models.UpdateAlertPolicyDetails oci.data_safe.models.UpdateAlertPolicyRuleDetails oci.data_safe.models.UpdateAuditArchiveRetrievalDetails oci.data_safe.models.UpdateAuditPolicyDetails diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyDetails.rst new file mode 100644 index 0000000000..5a4077bb50 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyDetails.rst @@ -0,0 +1,11 @@ +UpdateAlertPolicyDetails +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateAlertPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database_migration.rst b/docs/api/database_migration.rst index d993256f03..0a40469cab 100644 --- a/docs/api/database_migration.rst +++ b/docs/api/database_migration.rst @@ -64,6 +64,7 @@ Database Migration oci.database_migration.models.CreateOracleMigrationDetails oci.database_migration.models.CreateOracleNfsDataTransferMediumDetails oci.database_migration.models.CreateOracleObjectStorageDataTransferMediumDetails + oci.database_migration.models.CreateParameterFileVersionDetails oci.database_migration.models.CreateReplicat oci.database_migration.models.CreateTargetTypeTablespaceDetails oci.database_migration.models.CurlTransferDetails @@ -132,6 +133,9 @@ Database Migration oci.database_migration.models.OracleMigrationSummary oci.database_migration.models.OracleNfsDataTransferMediumDetails oci.database_migration.models.OracleObjectStorageDataTransferMediumDetails + oci.database_migration.models.ParameterFileVersion + oci.database_migration.models.ParameterFileVersionCollection + oci.database_migration.models.ParameterFileVersionSummary oci.database_migration.models.PhaseExtractEntry oci.database_migration.models.PhaseStatus oci.database_migration.models.Replicat diff --git a/docs/api/database_migration/models/oci.database_migration.models.CreateParameterFileVersionDetails.rst b/docs/api/database_migration/models/oci.database_migration.models.CreateParameterFileVersionDetails.rst new file mode 100644 index 0000000000..522a05b980 --- /dev/null +++ b/docs/api/database_migration/models/oci.database_migration.models.CreateParameterFileVersionDetails.rst @@ -0,0 +1,11 @@ +CreateParameterFileVersionDetails +================================= + +.. currentmodule:: oci.database_migration.models + +.. autoclass:: CreateParameterFileVersionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersion.rst b/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersion.rst new file mode 100644 index 0000000000..df26e826d1 --- /dev/null +++ b/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersion.rst @@ -0,0 +1,11 @@ +ParameterFileVersion +==================== + +.. currentmodule:: oci.database_migration.models + +.. autoclass:: ParameterFileVersion + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionCollection.rst b/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionCollection.rst new file mode 100644 index 0000000000..853d2d307d --- /dev/null +++ b/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionCollection.rst @@ -0,0 +1,11 @@ +ParameterFileVersionCollection +============================== + +.. currentmodule:: oci.database_migration.models + +.. autoclass:: ParameterFileVersionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionSummary.rst b/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionSummary.rst new file mode 100644 index 0000000000..48bff6da8d --- /dev/null +++ b/docs/api/database_migration/models/oci.database_migration.models.ParameterFileVersionSummary.rst @@ -0,0 +1,11 @@ +ParameterFileVersionSummary +=========================== + +.. currentmodule:: oci.database_migration.models + +.. autoclass:: ParameterFileVersionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/fleet_software_update.rst b/docs/api/fleet_software_update.rst index b4891f0771..da7c26a803 100644 --- a/docs/api/fleet_software_update.rst +++ b/docs/api/fleet_software_update.rst @@ -73,6 +73,7 @@ Fleet Software Update oci.fleet_software_update.models.DbUniqueNameFilter oci.fleet_software_update.models.DbVersionFilter oci.fleet_software_update.models.DefinedTagFilterEntry + oci.fleet_software_update.models.DiagnosticsCollectionDetails oci.fleet_software_update.models.DiscoveryDetails oci.fleet_software_update.models.DiscoveryDetailsSummary oci.fleet_software_update.models.FailedJobsRollbackDetails @@ -85,6 +86,7 @@ Fleet Software Update oci.fleet_software_update.models.FsuCollection oci.fleet_software_update.models.FsuCollectionSummary oci.fleet_software_update.models.FsuCollectionSummaryCollection + oci.fleet_software_update.models.FsuCollectionTarget oci.fleet_software_update.models.FsuCycle oci.fleet_software_update.models.FsuCycleSummary oci.fleet_software_update.models.FsuCycleSummaryCollection diff --git a/docs/api/fleet_software_update/models/oci.fleet_software_update.models.DiagnosticsCollectionDetails.rst b/docs/api/fleet_software_update/models/oci.fleet_software_update.models.DiagnosticsCollectionDetails.rst new file mode 100644 index 0000000000..4fbdedbbcd --- /dev/null +++ b/docs/api/fleet_software_update/models/oci.fleet_software_update.models.DiagnosticsCollectionDetails.rst @@ -0,0 +1,11 @@ +DiagnosticsCollectionDetails +============================ + +.. currentmodule:: oci.fleet_software_update.models + +.. autoclass:: DiagnosticsCollectionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/fleet_software_update/models/oci.fleet_software_update.models.FsuCollectionTarget.rst b/docs/api/fleet_software_update/models/oci.fleet_software_update.models.FsuCollectionTarget.rst new file mode 100644 index 0000000000..2e6301c1e8 --- /dev/null +++ b/docs/api/fleet_software_update/models/oci.fleet_software_update.models.FsuCollectionTarget.rst @@ -0,0 +1,11 @@ +FsuCollectionTarget +=================== + +.. currentmodule:: oci.fleet_software_update.models + +.. autoclass:: FsuCollectionTarget + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains.rst b/docs/api/identity_domains.rst index 367281279c..3dec9e618a 100644 --- a/docs/api/identity_domains.rst +++ b/docs/api/identity_domains.rst @@ -227,6 +227,7 @@ Identity Domains oci.identity_domains.models.IdentityPropagationTrusts oci.identity_domains.models.IdentityProvider oci.identity_domains.models.IdentityProviderCorrelationPolicy + oci.identity_domains.models.IdentityProviderJitProvAssignedGroups oci.identity_domains.models.IdentityProviderJitUserProvAssignedGroups oci.identity_domains.models.IdentityProviderJitUserProvAttributes oci.identity_domains.models.IdentityProviderJitUserProvGroupMappings @@ -409,6 +410,11 @@ Identity Domains oci.identity_domains.models.SmtpCredentialSearchRequest oci.identity_domains.models.SmtpCredentialUser oci.identity_domains.models.SmtpCredentials + oci.identity_domains.models.SocialIdentityProvider + oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups + oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings + oci.identity_domains.models.SocialIdentityProviderSearchRequest + oci.identity_domains.models.SocialIdentityProviders oci.identity_domains.models.Tags oci.identity_domains.models.User oci.identity_domains.models.UserAttributesSetting diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.IdentityProviderJitProvAssignedGroups.rst b/docs/api/identity_domains/models/oci.identity_domains.models.IdentityProviderJitProvAssignedGroups.rst new file mode 100644 index 0000000000..2c70749618 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.IdentityProviderJitProvAssignedGroups.rst @@ -0,0 +1,11 @@ +IdentityProviderJitProvAssignedGroups +===================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: IdentityProviderJitProvAssignedGroups + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProvider.rst b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProvider.rst new file mode 100644 index 0000000000..299798f3d1 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProvider.rst @@ -0,0 +1,11 @@ +SocialIdentityProvider +====================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: SocialIdentityProvider + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups.rst b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups.rst new file mode 100644 index 0000000000..49282c90e5 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups.rst @@ -0,0 +1,11 @@ +SocialIdentityProviderJitProvAssignedGroups +=========================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: SocialIdentityProviderJitProvAssignedGroups + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings.rst b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings.rst new file mode 100644 index 0000000000..ba90af78b8 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings.rst @@ -0,0 +1,11 @@ +SocialIdentityProviderRelayIdpParamMappings +=========================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: SocialIdentityProviderRelayIdpParamMappings + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderSearchRequest.rst b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderSearchRequest.rst new file mode 100644 index 0000000000..5c12c69095 --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviderSearchRequest.rst @@ -0,0 +1,11 @@ +SocialIdentityProviderSearchRequest +=================================== + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: SocialIdentityProviderSearchRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviders.rst b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviders.rst new file mode 100644 index 0000000000..4dff670cda --- /dev/null +++ b/docs/api/identity_domains/models/oci.identity_domains.models.SocialIdentityProviders.rst @@ -0,0 +1,11 @@ +SocialIdentityProviders +======================= + +.. currentmodule:: oci.identity_domains.models + +.. autoclass:: SocialIdentityProviders + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall.rst b/docs/api/network_firewall.rst index ed136ebe41..c95dc7c3e0 100644 --- a/docs/api/network_firewall.rst +++ b/docs/api/network_firewall.rst @@ -47,9 +47,11 @@ Network Firewall oci.network_firewall.models.CreateSslForwardProxyProfileDetails oci.network_firewall.models.CreateSslInboundInspectionProfileDetails oci.network_firewall.models.CreateTcpServiceDetails + oci.network_firewall.models.CreateTunnelInspectionRuleDetails oci.network_firewall.models.CreateUdpServiceDetails oci.network_firewall.models.CreateUrlListDetails oci.network_firewall.models.CreateVaultMappedSecretDetails + oci.network_firewall.models.CreateVxlanInspectionRuleDetails oci.network_firewall.models.DecryptionProfile oci.network_firewall.models.DecryptionProfileSummary oci.network_firewall.models.DecryptionProfileSummaryCollection @@ -86,6 +88,9 @@ Network Firewall oci.network_firewall.models.SslForwardProxyProfile oci.network_firewall.models.SslInboundInspectionProfile oci.network_firewall.models.TcpService + oci.network_firewall.models.TunnelInspectionRule + oci.network_firewall.models.TunnelInspectionRuleSummary + oci.network_firewall.models.TunnelInspectionRuleSummaryCollection oci.network_firewall.models.UdpService oci.network_firewall.models.UpdateAddressListDetails oci.network_firewall.models.UpdateApplicationDetails @@ -105,14 +110,20 @@ Network Firewall oci.network_firewall.models.UpdateSslForwardProxyProfileDetails oci.network_firewall.models.UpdateSslInboundInspectionProfileDetails oci.network_firewall.models.UpdateTcpServiceDetails + oci.network_firewall.models.UpdateTunnelInspectionRuleDetails oci.network_firewall.models.UpdateUdpServiceDetails oci.network_firewall.models.UpdateUrlListDetails oci.network_firewall.models.UpdateVaultMappedSecretDetails + oci.network_firewall.models.UpdateVxlanInspectionRuleDetails oci.network_firewall.models.UrlList oci.network_firewall.models.UrlListSummary oci.network_firewall.models.UrlListSummaryCollection oci.network_firewall.models.UrlPattern oci.network_firewall.models.VaultMappedSecret + oci.network_firewall.models.VxlanInspectionRule + oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + oci.network_firewall.models.VxlanInspectionRuleProfile + oci.network_firewall.models.VxlanInspectionRuleSummary oci.network_firewall.models.WorkRequest oci.network_firewall.models.WorkRequestError oci.network_firewall.models.WorkRequestErrorCollection diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.CreateTunnelInspectionRuleDetails.rst b/docs/api/network_firewall/models/oci.network_firewall.models.CreateTunnelInspectionRuleDetails.rst new file mode 100644 index 0000000000..7e153ad177 --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.CreateTunnelInspectionRuleDetails.rst @@ -0,0 +1,11 @@ +CreateTunnelInspectionRuleDetails +================================= + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: CreateTunnelInspectionRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.CreateVxlanInspectionRuleDetails.rst b/docs/api/network_firewall/models/oci.network_firewall.models.CreateVxlanInspectionRuleDetails.rst new file mode 100644 index 0000000000..cf19920b91 --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.CreateVxlanInspectionRuleDetails.rst @@ -0,0 +1,11 @@ +CreateVxlanInspectionRuleDetails +================================ + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: CreateVxlanInspectionRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRule.rst b/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRule.rst new file mode 100644 index 0000000000..840bba48b5 --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRule.rst @@ -0,0 +1,11 @@ +TunnelInspectionRule +==================== + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: TunnelInspectionRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummary.rst b/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummary.rst new file mode 100644 index 0000000000..3e655917dd --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummary.rst @@ -0,0 +1,11 @@ +TunnelInspectionRuleSummary +=========================== + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: TunnelInspectionRuleSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummaryCollection.rst b/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummaryCollection.rst new file mode 100644 index 0000000000..b1bdcbc1e4 --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.TunnelInspectionRuleSummaryCollection.rst @@ -0,0 +1,11 @@ +TunnelInspectionRuleSummaryCollection +===================================== + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: TunnelInspectionRuleSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.UpdateTunnelInspectionRuleDetails.rst b/docs/api/network_firewall/models/oci.network_firewall.models.UpdateTunnelInspectionRuleDetails.rst new file mode 100644 index 0000000000..e5f9a7a1e2 --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.UpdateTunnelInspectionRuleDetails.rst @@ -0,0 +1,11 @@ +UpdateTunnelInspectionRuleDetails +================================= + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: UpdateTunnelInspectionRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.UpdateVxlanInspectionRuleDetails.rst b/docs/api/network_firewall/models/oci.network_firewall.models.UpdateVxlanInspectionRuleDetails.rst new file mode 100644 index 0000000000..03198d89df --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.UpdateVxlanInspectionRuleDetails.rst @@ -0,0 +1,11 @@ +UpdateVxlanInspectionRuleDetails +================================ + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: UpdateVxlanInspectionRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRule.rst b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRule.rst new file mode 100644 index 0000000000..56598508ff --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRule.rst @@ -0,0 +1,11 @@ +VxlanInspectionRule +=================== + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: VxlanInspectionRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleMatchCriteria.rst b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleMatchCriteria.rst new file mode 100644 index 0000000000..87633b0aa2 --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleMatchCriteria.rst @@ -0,0 +1,11 @@ +VxlanInspectionRuleMatchCriteria +================================ + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: VxlanInspectionRuleMatchCriteria + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleProfile.rst b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleProfile.rst new file mode 100644 index 0000000000..69e90c56dc --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleProfile.rst @@ -0,0 +1,11 @@ +VxlanInspectionRuleProfile +========================== + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: VxlanInspectionRuleProfile + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleSummary.rst b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleSummary.rst new file mode 100644 index 0000000000..6afb86517d --- /dev/null +++ b/docs/api/network_firewall/models/oci.network_firewall.models.VxlanInspectionRuleSummary.rst @@ -0,0 +1,11 @@ +VxlanInspectionRuleSummary +========================== + +.. currentmodule:: oci.network_firewall.models + +.. autoclass:: VxlanInspectionRuleSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/examples/showsubscription/README.md b/examples/showsubscription/README.md index 3865e7f1c5..75396d4367 100644 --- a/examples/showsubscription/README.md +++ b/examples/showsubscription/README.md @@ -101,6 +101,7 @@ optional arguments: ## Below example of reports from demo tenancy (random info generated) +``` ######################################################################################################################## # Running Show Subscription # ######################################################################################################################## diff --git a/examples/showusage/README.md b/examples/showusage/README.md index b919edb394..138b9ae637 100644 --- a/examples/showusage/README.md +++ b/examples/showusage/README.md @@ -85,7 +85,8 @@ optional arguments: -ds DATE_START Start Date - format YYYY-MM-DD -de DATE_END End Date - format YYYY-MM-DD, (Not Inclusive) -days DAYS Add Days Combined with Start Date (de is ignored if specified) - -report REPORT Report Type = PRODUCT / DAILY / REGION / SERVICE / RESOURCE / TENANT / SPECIAL / COMPARTMENT / ALL ( Default = ALL ) + -g GRANULARITY Granularity DAILY or MONTHLY (Default DAILY) + -report REPORT Report Type = ALL / DATE / SERVICE / PRODUCT / REGION / RESOURCE / SPECIAL / TENANT / COMPARTMENT ( Default = ALL ) -csv Write to CSV files instead of output to the screen - usage_*.csv ``` diff --git a/examples/showusage/showusage.py b/examples/showusage/showusage.py index 0c442bb94e..4bbc0e785b 100644 --- a/examples/showusage/showusage.py +++ b/examples/showusage/showusage.py @@ -5,9 +5,10 @@ ########################################################################## # showusage.py # -# @author: Adi Zohar, Oct 07 2021, Updated May 3nd, 2024 +# @author: Adi Zohar, Oct 07 2021, Updated July 19th, 2024 # Added OSR Eligible for tenant grouping and CSV files # Added new reports - Special and Compartment +# Added Monthly Reports - use -g MONTH # # Supports Python 3 ########################################################################## @@ -17,13 +18,15 @@ # -t profile - profile inside the config file # -p proxy - Set Proxy (i.e. www-proxy-server.com:80) # -ip - Use Instance Principals for Authentication +# -g grn - Granularity DAILY / MONTHLY (Default DAILY) # -dt - Use Instance Principals with delegation token for cloud shell # -ds date - Start Date in YYYY-MM-DD format # -de date - End Date in YYYY-MM-DD format (Not Inclusive) # -ld days - Add Days Combined with Start Date (de is ignored if specified) -# -report type - Report Type = PRODUCT, DAILY, REGION, SERVICE, RESOURCE, TENANT, SPECIAL, COMPARTMENT +# -ld days - Add Days Combined with Start Date (de is ignored if specified) +# -report type - Report Type = PRODUCT, DATE, REGION, SERVICE, RESOURCE, TENANT, SPECIAL, COMPARTMENT # SPECIAL is group by Service, Region, Product Description -# -csv - Write to CSV files - usage_products.csv, usage_daily.csv, usage_region.csvs, +# -csv - Write to CSV files - usage_products.csv, usage_by_date.csv, usage_region.csvs, # usage_resources.csv, usage_tenants.csv, usage_special.csv, usage_compartments.csv # ########################################################################## @@ -65,10 +68,10 @@ import platform import csv -version = "2024.06.11" +version = "2024.07.19" csv_file_products = "usage_products.csv" -csv_file_daily = "usage_daily.csv" +csv_file_by_date = "usage_by_date.csv" csv_file_regions = "usage_regions.csv" csv_file_resources = "usage_resources.csv" csv_file_tenants = "usage_tenants.csv" @@ -114,6 +117,21 @@ def check_service_error(code): ) +########################################################################## +# Duration / days or months +########################################################################## +def duration(min_date, max_date, granularity): + + if granularity == 'DAILY': + days = (max_date - min_date).days + 1 + # print("Duration = " + str(days) + " days") + return days + else: + months = max_date.month - min_date.month + 12 * (max_date.year - min_date.year) + 1 + # print("Duration = " + str(months) + " Months") + return months + + ########################################################################## # Create signer for Authentication # Input - config_profile and is_instance_principals and is_delegation_token @@ -256,15 +274,15 @@ def osr_eligible_cost(sku_part_number, sku_name, cost): ########################################################################## -# Usage Daily by Product +# Usage Product by Date ########################################################################## -def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_product(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', group_by=['skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), @@ -283,6 +301,7 @@ def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_e data = [] min_date = None max_date = None + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' currency = "" for item in request_summarized_usages.data.items: data.append({ @@ -304,7 +323,7 @@ def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_e if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started - days = (max_date - min_date).days + 1 + days = duration(min_date, max_date, granularity) ################################ # Group Dictionaries by PK @@ -321,19 +340,34 @@ def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_e item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Product SKU': item['sku_part_number'], - 'Product Name': item['sku_name'], - 'Start Date': min_date.strftime('%m/%d/%Y'), - 'End Date': max_date.strftime('%m/%d/%Y'), - 'Days': days, - 'Currency': item['currency'], - 'Quantity': "{:8.1f}".format(item['quantity']), - 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), - 'Cost': "{:8.1f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), - 'Year': "{:9.0f}".format(item['cost'] / days * 365), - }) + + if granularity == 'DAILY': + csv_output.append({ + 'Product SKU': item['sku_part_number'], + 'Product Name': item['sku_name'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + else: + csv_output.append({ + 'Product SKU': item['sku_part_number'], + 'Product Name': item['sku_name'], + 'Granularity': 'Monthly', + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Months': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']) + }) export_to_csv_file(csv_file_products, csv_output) @@ -353,27 +387,28 @@ def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_e } currency_print = (" in " + currency) if currency else "" - product_header = "Product Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " Product Summary for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") + print( "Product".ljust(col['product']) + - " Days".rjust(col['days']) + " Quantity".rjust(col['quantity']) + + " Duration".rjust(col['days']) + " OSR Eligible".rjust(col['osr_eligible']) + " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) + (" Month-31".rjust(col['month']) if granularity == 'DAILY' else "") + + (" Year".rjust(col['year']) if granularity == 'DAILY' else "") ) print( "".ljust(col['product'], '=') + - " ".ljust(col['days'], '=') + " ".ljust(col['quantity'], '=') + + " ".ljust(col['days'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) total = 0 @@ -385,49 +420,51 @@ def usage_daily_product(usageClient, tenant_id, time_usage_started, time_usage_e total += item['cost'] osr_total += item['osr_eligible'] line = item['sku_name'].ljust(col['product'])[0:col['product']] - line += "{:8,.0f}".format(days).rjust(col['days']) line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) + line += "{:8,.0f}".format(days).rjust(col['days']) line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + if granularity == 'DAILY': + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) print(line) # Total print( "".ljust(col['product'], '=') + - " ".ljust(col['days'], '=') + " ".ljust(col['quantity'], '=') + + " ".ljust(col['days'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") + ) print( - "Total ".ljust(col['product'] + col['days'] + col['quantity']) + + "Total ".ljust(col['product'] + col['quantity'] + col['days']) + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) + (" {:9,.0f}".format(total / days * 31).rjust(col['month']) if granularity == 'DAILY' else "") + + (" {:9,.0f}".format(total / days * 31 * 12).rjust(col['year']) if granularity == 'DAILY' else "") ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_product' - " + str(e)) + print("\nService Error at 'usage_product' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_product' - " + str(e)) + print("\nException Error at 'usage_product' - " + str(e)) ########################################################################## # Usage Daily by Region ########################################################################## -def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_region(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', group_by=['region'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), @@ -446,6 +483,7 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en data = [] min_date = None max_date = None + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' currency = "" for item in request_summarized_usages.data.items: data.append({ @@ -464,7 +502,7 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started - days = (max_date - min_date).days + 1 + days = duration(min_date, max_date, granularity) ################################ # Group Dictionaries by PK @@ -481,16 +519,27 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Region': item_key, - 'Start Date': min_date.strftime('%m/%d/%Y'), - 'End Date': max_date.strftime('%m/%d/%Y'), - 'Days': days, - 'Currency': item['currency'], - 'Cost': "{:8.1f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), - 'Year': "{:9.0f}".format(item['cost'] / days * 365), - }) + + if granularity == 'DAILY': + csv_output.append({ + 'Region': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365) + }) + else: + csv_output.append({ + 'Region': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Months': days, + 'Currency': item['currency'], + 'Cost': "{:8.1f}".format(item['cost']) + }) export_to_csv_file(csv_file_regions, csv_output) @@ -507,23 +556,23 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en } currency_print = (" in " + currency) if currency else "" - product_header = "Region Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " Region Summary for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") print( "Region".ljust(col['region']) + - " Days".rjust(col['days']) + + " Duration".rjust(col['days']) + " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) + (" Month-31".rjust(col['month']) if granularity == 'DAILY' else "") + + (" Year".rjust(col['year']) if granularity == 'DAILY' else "") ) print( "".ljust(col['region'], '=') + " ".ljust(col['days'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) total = 0 @@ -535,8 +584,9 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en line = item_key.ljust(col['region']) line += "{:8,.0f}".format(days).rjust(col['days']) line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + if granularity == 'DAILY': + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) print(line) # Total @@ -544,33 +594,33 @@ def usage_daily_region(usageClient, tenant_id, time_usage_started, time_usage_en "".ljust(col['region'], '=') + " ".ljust(col['days'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) print( "Total ".ljust(col['region'] + col['days']) + " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) + (" {:9,.0f}".format(total / days * 31).rjust(col['month']) if granularity == 'DAILY' else "") + + (" {:9,.0f}".format(total / days * 31 * 12).rjust(col['year']) if granularity == 'DAILY' else "") ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_region' - " + str(e)) + print("\nService Error at 'usage_region' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_region' - " + str(e)) + print("\nException Error at 'usage_region' - " + str(e)) ########################################################################## # Usage Daily by Tenant ########################################################################## -def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_tenant(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', group_by=['tenantName', 'skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), @@ -589,6 +639,7 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en data = [] min_date = None max_date = None + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' currency = "" for item in request_summarized_usages.data.items: data.append({ @@ -610,7 +661,7 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started - days = (max_date - min_date).days + 1 + days = duration(min_date, max_date, granularity) ################################ # Group Dictionaries by PK @@ -627,17 +678,29 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Tenant': item_key, - 'Start Date': min_date.strftime('%m/%d/%Y'), - 'End Date': max_date.strftime('%m/%d/%Y'), - 'Days': days, - 'Currency': item['currency'], - 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), - 'Cost': "{:8.1f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), - 'Year': "{:9.0f}".format(item['cost'] / days * 365), - }) + + if granularity == 'DAILY': + csv_output.append({ + 'Tenant': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + else: + csv_output.append({ + 'Tenant': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Months': days, + 'Currency': item['currency'], + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']) + }) export_to_csv_file(csv_file_tenants, csv_output) @@ -656,16 +719,16 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en } currency_print = (" in " + currency) if currency else "" - product_header = "Tenant Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " Tenant Summary for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") print( "Tenant".ljust(col['tenant']) + - " Days".rjust(col['days']) + + " Duration".rjust(col['days']) + " OSR Eligible".rjust(col['osr_eligible']) + " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) + (" Month-31".rjust(col['month']) if granularity == 'DAILY' else "") + + (" Year".rjust(col['year']) if granularity == 'DAILY' else "") ) print( @@ -673,8 +736,8 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en " ".ljust(col['days'], '=') + " ".ljust(col['cost'], '=') + " ".ljust(col['osr_eligible'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) total = 0 @@ -689,8 +752,9 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en line += "{:8,.0f}".format(days).rjust(col['days']) line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + if granularity == 'DAILY': + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) print(line) # Total @@ -699,34 +763,34 @@ def usage_daily_tenant(usageClient, tenant_id, time_usage_started, time_usage_en " ".ljust(col['days'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) print( "Total ".ljust(col['tenant'] + col['days']) + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) + (" {:9,.0f}".format(total / days * 31).rjust(col['month']) if granularity == 'DAILY' else "") + + (" {:9,.0f}".format(total / days * 31 * 12).rjust(col['year']) if granularity == 'DAILY' else "") ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_tenant' - " + str(e)) + print("\nService Error at 'usage_tenant' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_tenant' - " + str(e)) + print("\nException Error at 'usage_tenant' - " + str(e)) ########################################################################## # Usage Daily by Service ########################################################################## -def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_service(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', group_by=['service', 'skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), @@ -745,6 +809,7 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e data = [] min_date = None max_date = None + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' currency = "" for item in request_summarized_usages.data.items: data.append({ @@ -766,7 +831,7 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started - days = (max_date - min_date).days + 1 + days = duration(min_date, max_date, granularity) ################################ # Group Dictionaries by PK @@ -783,18 +848,31 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Service': item_key, - 'Start Date': min_date.strftime('%m/%d/%Y'), - 'End Date': max_date.strftime('%m/%d/%Y'), - 'Days': days, - 'Currency': item['currency'], - 'Quantity': "{:8.1f}".format(item['quantity']), - 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), - 'Cost': "{:8.1f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), - 'Year': "{:9.0f}".format(item['cost'] / days * 365), - }) + + if granularity == 'DAILY': + csv_output.append({ + 'Service': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + else: + csv_output.append({ + 'Service': item_key, + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Months': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']) + }) export_to_csv_file(csv_file_service, csv_output) @@ -814,17 +892,17 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e } currency_print = (" in " + currency) if currency else "" - product_header = "Service Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " Service Summary for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") print( "Service".ljust(col['service']) + - " Days".rjust(col['days']) + + " Duration".rjust(col['days']) + " Quantity".rjust(col['quantity']) + " OSR Eligible".rjust(col['osr_eligible']) + " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) + (" Month-31".rjust(col['month']) if granularity == 'DAILY' else "") + + (" Year".rjust(col['year']) if granularity == 'DAILY' else "") ) print( @@ -833,8 +911,8 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e " ".ljust(col['quantity'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) total = 0 @@ -850,8 +928,9 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + if granularity == 'DAILY': + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) print(line) # Total @@ -861,34 +940,34 @@ def usage_daily_service(usageClient, tenant_id, time_usage_started, time_usage_e " ".ljust(col['quantity'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) print( - "Total ".ljust(col['service'] + col['days'] + col['quantity']) + + "Total ".ljust(col['service'] + col['quantity'] + col['days']) + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) + (" {:9,.0f}".format(total / days * 31).rjust(col['month']) if granularity == 'DAILY' else "") + + (" {:9,.0f}".format(total / days * 31 * 12).rjust(col['year']) if granularity == 'DAILY' else "") ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_service' - " + str(e)) + print("\nService Error at 'usage_service' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_service' - " + str(e)) + print("\nException Error at 'usage_service' - " + str(e)) ########################################################################## # Usage Daily by Compartment and Service ########################################################################## -def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_compartment(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', compartment_depth=5, group_by=['compartmentPath', 'service', 'skuPartNumber', 'skuName'], @@ -908,6 +987,7 @@ def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usa data = [] min_date = None max_date = None + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' currency = "" for item in request_summarized_usages.data.items: data.append({ @@ -930,7 +1010,7 @@ def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usa if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started - days = (max_date - min_date).days + 1 + days = duration(min_date, max_date, granularity) ################################ # Group Dictionaries by PK @@ -947,19 +1027,33 @@ def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usa item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Compartment Path': item['compartment'], - 'Service': item['service'], - 'Start Date': min_date.strftime('%m/%d/%Y'), - 'End Date': max_date.strftime('%m/%d/%Y'), - 'Days': days, - 'Currency': item['currency'], - 'Quantity': "{:8.1f}".format(item['quantity']), - 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), - 'Cost': "{:8.1f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), - 'Year': "{:9.0f}".format(item['cost'] / days * 365), - }) + + if granularity == 'DAILY': + csv_output.append({ + 'Compartment Path': item['compartment'], + 'Service': item['service'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + else: + csv_output.append({ + 'Compartment Path': item['compartment'], + 'Service': item['service'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Months': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']) + }) export_to_csv_file(csv_file_compartment, csv_output) @@ -980,18 +1074,18 @@ def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usa } currency_print = (" in " + currency) if currency else "" - product_header = "Compartment Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " Compartment Summary for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") print( "Compartment".ljust(col['compartment']) + " Service".ljust(col['service']) + - " Days".rjust(col['days']) + + " Duration".rjust(col['days']) + " Quantity".rjust(col['quantity']) + " OSR Eligible".rjust(col['osr_eligible']) + " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) + (" Month-31".rjust(col['month']) if granularity == 'DAILY' else "") + + (" Year".rjust(col['year']) if granularity == 'DAILY' else "") ) print( @@ -1001,8 +1095,8 @@ def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usa " ".ljust(col['quantity'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) total = 0 @@ -1020,8 +1114,9 @@ def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usa line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + if granularity == 'DAILY': + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) print(line) # Total @@ -1032,34 +1127,34 @@ def usage_daily_compartment(usageClient, tenant_id, time_usage_started, time_usa " ".ljust(col['quantity'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) print( - "Total ".ljust(col['compartment'] + col['service'] + col['days'] + col['quantity']) + + "Total ".ljust(col['compartment'] + col['service'] + + col['days'] + col['quantity']) + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) + (" {:9,.0f}".format(total / days * 31).rjust(col['month']) if granularity == 'DAILY' else "") + + (" {:9,.0f}".format(total / days * 31 * 12).rjust(col['year']) if granularity == 'DAILY' else "") ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_compartment' - " + str(e)) + print("\nService Error at 'usage_compartment' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_compartment' - " + str(e)) + print("\nException Error at 'usage_compartment' - " + str(e)) ########################################################################## # Usage Daily by Speical Grouping = Service, Region, Product Description ########################################################################## -def usage_daily_special(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_special(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', group_by=['service', 'region', 'skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), @@ -1078,6 +1173,7 @@ def usage_daily_special(usageClient, tenant_id, time_usage_started, time_usage_e data = [] min_date = None max_date = None + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' currency = "" for item in request_summarized_usages.data.items: data.append({ @@ -1100,7 +1196,7 @@ def usage_daily_special(usageClient, tenant_id, time_usage_started, time_usage_e if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started - days = (max_date - min_date).days + 1 + days = duration(min_date, max_date, granularity) ################################ # Group Dictionaries by PK @@ -1117,21 +1213,36 @@ def usage_daily_special(usageClient, tenant_id, time_usage_started, time_usage_e item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Service': item['service'], - 'Region': item['region'], - 'Product SKU': item['sku_part_number'], - 'Product Name': item['sku_name'], - 'Start Date': min_date.strftime('%m/%d/%Y'), - 'End Date': max_date.strftime('%m/%d/%Y'), - 'Days': days, - 'Currency': item['currency'], - 'Quantity': "{:8.1f}".format(item['quantity']), - 'OSR Eligible Cost': "{:8.1f}".format(item['osr_eligible']), - 'Cost': "{:8.1f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), - 'Year': "{:9.0f}".format(item['cost'] / days * 365), - }) + if granularity == 'DAILY': + csv_output.append({ + 'Service': item['service'], + 'Region': item['region'], + 'Product SKU': item['sku_part_number'], + 'Product Name': item['sku_name'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'OSR Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + else: + csv_output.append({ + 'Service': item['service'], + 'Region': item['region'], + 'Product SKU': item['sku_part_number'], + 'Product Name': item['sku_name'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Months': days, + 'Currency': item['currency'], + 'Quantity': "{:8.1f}".format(item['quantity']), + 'OSR Eligible Cost': "{:8.1f}".format(item['osr_eligible']), + 'Cost': "{:8.1f}".format(item['cost']) + }) export_to_csv_file(csv_file_special, csv_output) @@ -1149,12 +1260,12 @@ def usage_daily_special(usageClient, tenant_id, time_usage_started, time_usage_e } currency_print = (" in " + currency) if currency else "" - product_header = "Service, Region and Product for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " Service, Region and Product for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") print( "Service,Region and Product".ljust(col['pk']) + - " Days".rjust(col['days']) + + " Duration".rjust(col['days']) + " Quantity".rjust(col['quantity']) + " OSR Eligible".rjust(col['osr_eligible']) + " Cost".rjust(col['cost']) @@ -1198,22 +1309,22 @@ def usage_daily_special(usageClient, tenant_id, time_usage_started, time_usage_e ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_special' - " + str(e)) + print("\nService Error at 'usage_special' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_special' - " + str(e)) + print("\nException Error at 'usage_special' - " + str(e)) ########################################################################## # Usage Daily by Resource ########################################################################## -def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_resource(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', group_by=['resourceId', 'region', 'skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), @@ -1232,6 +1343,7 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ data = [] min_date = None max_date = None + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' currency = "" for item in request_summarized_usages.data.items: data.append({ @@ -1254,7 +1366,7 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ if not max_date or item.time_usage_started > max_date: max_date = item.time_usage_started - days = (max_date - min_date).days + 1 + days = duration(min_date, max_date, granularity) ################################ # Group Dictionaries by PK @@ -1271,19 +1383,33 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Resource': item_key, - 'Region': item['region'], - 'Start Date': min_date.strftime('%m/%d/%Y'), - 'End Date': max_date.strftime('%m/%d/%Y'), - 'Days': days, - 'Currency': item['currency'], - 'Quantity': "{:8.4f}".format(item['quantity']), - 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), - 'Cost': "{:8.4f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), - 'Year': "{:9.0f}".format(item['cost'] / days * 365), - }) + + if granularity == 'DAILY': + csv_output.append({ + 'Resource': item_key, + 'Region': item['region'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Days': days, + 'Currency': item['currency'], + 'Quantity': "{:8.4f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), + 'Cost': "{:8.4f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] / days * 31), + 'Year': "{:9.0f}".format(item['cost'] / days * 365), + }) + else: + csv_output.append({ + 'Resource': item_key, + 'Region': item['region'], + 'Start Date': min_date.strftime('%m/%d/%Y'), + 'End Date': max_date.strftime('%m/%d/%Y'), + 'Months': days, + 'Currency': item['currency'], + 'Quantity': "{:8.4f}".format(item['quantity']), + 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), + 'Cost': "{:8.4f}".format(item['cost']) + }) export_to_csv_file(csv_file_resources, csv_output) @@ -1303,17 +1429,17 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ } currency_print = (" in " + currency) if currency else "" - product_header = "ResourceId Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " ResourceId Summary for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") print( "Resource".ljust(col['resourceid']) + - " Days".rjust(col['days']) + + " Duration".rjust(col['days']) + " Quantity".rjust(col['quantity']) + " OSR Eligible".rjust(col['osr_eligible']) + " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) + (" Month-31".rjust(col['month']) if granularity == 'DAILY' else "") + + (" Year".rjust(col['year']) if granularity == 'DAILY' else "") ) print( @@ -1322,8 +1448,8 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ " ".ljust(col['quantity'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) total = 0 @@ -1339,8 +1465,9 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ line += "{:8,.1f}".format(item['quantity']).rjust(col['quantity']) line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) + if granularity == 'DAILY': + line += "{:9,.0f}".format(item['cost'] / days * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] / days * 365).rjust(col['year']) print(line) # Total @@ -1350,35 +1477,35 @@ def usage_daily_resource(usageClient, tenant_id, time_usage_started, time_usage_ " ".ljust(col['quantity'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) print( "Total ".ljust(col['resourceid'] + col['days'] + col['quantity']) + " {:8,.1f}".format(osr_total).rjust(col['osr_eligible']) + " {:8,.1f}".format(total).rjust(col['cost']) + - " {:9,.0f}".format(total / days * 31).rjust(col['month']) + - " {:9,.0f}".format(total / days * 365).rjust(col['year']) + (" {:9,.0f}".format(total / days * 31).rjust(col['month']) if granularity == 'DAILY' else "") + + (" {:9,.0f}".format(total / days * 31 * 12).rjust(col['year']) if granularity == 'DAILY' else "") ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_resource' - " + str(e)) + print("\nService Error at 'usage_resource' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_resource' - " + str(e)) + print("\nException Error at 'usage_resource' - " + str(e)) ########################################################################## # Usage Daily Summary ########################################################################## -def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv): +def usage_summary(usageClient, tenant_id, time_usage_started, time_usage_ended, is_csv, granularity): try: # oci.usage_api.models.RequestSummarizedUsagesDetails requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails( tenant_id=tenant_id, - granularity='DAILY', + granularity=granularity, query_type='COST', group_by=['skuPartNumber', 'skuName'], time_usage_started=time_usage_started.strftime('%Y-%m-%dT%H:%M:%SZ'), @@ -1398,10 +1525,11 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e min_date = None max_date = None currency = "" + date_format = '%Y-%m-%d' if granularity == 'DAILY' else '%Y-%m' for item in request_summarized_usages.data.items: data.append({ - 'pk': item.time_usage_started.strftime('%Y-%m-%d'), - 'day': item.time_usage_started.strftime('%Y-%m-%d'), + 'pk': item.time_usage_started.strftime(date_format), + 'day': item.time_usage_started.strftime(date_format), 'sku_part_number': item.sku_part_number, 'sku_name': item.sku_name, 'osr_eligible': osr_eligible_cost(item.sku_part_number, item.sku_name, item.computed_amount if item.computed_amount else 0), @@ -1433,16 +1561,25 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e item = gdata[item_key] if item['cost'] == 0: continue - csv_output.append({ - 'Day': item['day'], - 'Currency': item['currency'], - 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), - 'Cost': "{:8.3f}".format(item['cost']), - 'Month-31': "{:9.0f}".format(item['cost'] * 31), - 'Year': "{:9.0f}".format(item['cost'] * 365), - }) - export_to_csv_file(csv_file_daily, csv_output) + if granularity == 'DAILY': + csv_output.append({ + 'Day': item['day'], + 'Currency': item['currency'], + 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), + 'Cost': "{:8.3f}".format(item['cost']), + 'Month-31': "{:9.0f}".format(item['cost'] * 31), + 'Year': "{:9.0f}".format(item['cost'] * 365), + }) + else: + csv_output.append({ + 'Day': item['day'], + 'Currency': item['currency'], + 'Osr Eligible Cost': "{:8.4f}".format(item['osr_eligible']), + 'Cost': "{:8.3f}".format(item['cost']) + }) + + export_to_csv_file(csv_file_by_date, csv_output) else: @@ -1458,23 +1595,23 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e } currency_print = (" in " + currency) if currency else "" - product_header = "Daily Summary for " + min_date.strftime('%m/%d/%Y') + " - " + max_date.strftime('%m/%d/%Y') + currency_print + product_header = granularity + " Summary for " + min_date.strftime(date_format) + " - " + max_date.strftime(date_format) + currency_print print_header(product_header, 3) print("") print( - "Day".ljust(col['day']) + + "Date".ljust(col['day']) + " OSR Eligible".rjust(col['osr_eligible']) + " Cost".rjust(col['cost']) + - " Month-31".rjust(col['month']) + - " Year".rjust(col['year']) + (" Month-31".rjust(col['month']) if granularity == 'DAILY' else "") + + (" Year".rjust(col['year']) if granularity == 'DAILY' else "") ) print( "".ljust(col['day'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) total = 0 @@ -1488,8 +1625,9 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e line = item_key.ljust(col['day'])[0:col['day']] line += "{:8,.1f}".format(item['osr_eligible']).rjust(col['osr_eligible']) line += "{:8,.1f}".format(item['cost']).rjust(col['cost']) - line += "{:9,.0f}".format(item['cost'] * 31).rjust(col['month']) - line += "{:9,.0f}".format(item['cost'] * 365).rjust(col['year']) + if granularity == 'DAILY': + line += "{:9,.0f}".format(item['cost'] * 31).rjust(col['month']) + line += "{:9,.0f}".format(item['cost'] * 365).rjust(col['year']) print(line) # Total @@ -1497,8 +1635,8 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e "".ljust(col['day'], '=') + " ".ljust(col['osr_eligible'], '=') + " ".ljust(col['cost'], '=') + - " ".ljust(col['month'], '=') + - " ".ljust(col['year'], '=') + (" ".ljust(col['month'], '=') if granularity == 'DAILY' else "") + + (" ".ljust(col['year'], '=') if granularity == 'DAILY' else "") ) print( "Total ".ljust(col['day']) + @@ -1507,10 +1645,10 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e ) except oci.exceptions.ServiceError as e: - print("\nService Error at 'usage_daily_summary' - " + str(e)) + print("\nService Error at 'usage_summary' - " + str(e)) except Exception as e: - print("\nException Error at 'usage_daily_summary' - " + str(e)) + print("\nException Error at 'usage_summary' - " + str(e)) ########################################################################## @@ -1518,7 +1656,7 @@ def usage_daily_summary(usageClient, tenant_id, time_usage_started, time_usage_e ########################################################################## def main(): - report_type_array = ['ALL', 'DAILY', 'SERVICE', 'PRODUCT', 'REGION', 'RESOURCE', 'SPECIAL', 'TENANT', 'COMPARTMENT'] + report_type_array = ['ALL', 'DATE', 'SERVICE', 'PRODUCT', 'REGION', 'RESOURCE', 'SPECIAL', 'TENANT', 'COMPARTMENT'] # Get Command Line Parser # parser = argparse.ArgumentParser() @@ -1531,6 +1669,7 @@ def main(): parser.add_argument("-ds", default=None, dest='date_start', help="Start Date - format YYYY-MM-DD", type=valid_date_type) parser.add_argument("-de", default=None, dest='date_end', help="End Date - format YYYY-MM-DD, (Not Inclusive)", type=valid_date_type) parser.add_argument("-days", default=None, dest='days', help="Add Days Combined with Start Date (de is ignored if specified)", type=int) + parser.add_argument("-g", default="DAILY", dest='granularity', help="Granularity DAILY or MONTHLY (Default DAILY)") parser.add_argument("-report", default="ALL", dest='report', help="Report Type = " + ' / '.join(x for x in report_type_array) + " ( Default = ALL )") parser.add_argument('-csv', action='store_true', default=False, dest='csv', help='Write to CSV files instead of output to the screen - usage_*.csv') cmd = parser.parse_args() @@ -1543,18 +1682,18 @@ def main(): parser.print_help() print("") - print("**********************************************************") - print("*** You must specify report type ! ***") - print("*** DAILY = Daily cost ***") - print("*** PRODUCT = Product Summary Cost ***") - print("*** SERVICE = Service Summary Cost ***") - print("*** REGION = Region Summary Cost ***") - print("*** RESOURCE = Resource Summary Cost ***") - print("*** SPECIAL = Service, Region and Product ***") - print("*** COMPARTMENT = Compartment Path, Service ***") - print("*** ***") - print("*** ALL = All Reports ***") - print("**********************************************************") + print("***************************************************************") + print("*** You must specify report type ! ***") + print("*** DATE = Date cost ***") + print("*** PRODUCT = Product Summary Cost ***") + print("*** SERVICE = Service Summary Cost ***") + print("*** REGION = Region Summary Cost ***") + print("*** RESOURCE = Resource Summary Cost ***") + print("*** SPECIAL = Service, Region and Product ***") + print("*** COMPARTMENT = Compartment Path, Service ***") + print("*** ***") + print("*** ALL = All Reports ***") + print("***************************************************************") return None if not (cmd.date_start): @@ -1571,7 +1710,8 @@ def main(): print_header("Running Show Usage", 0) print("Author : Adi Zohar") - print("Disclaimer : This is not an official Oracle application, It does not supported by Oracle, It should NOT be used for utilization calculation purposes !") + print("Disclaimer : This is not an official Oracle application,") + print(" : It does not supported by Oracle, It should NOT be used for utilization calculation purposes !") print(" : Last 2 days may not be filled and should not be used") print("Machine : " + platform.node() + " (" + platform.machine() + ")") print("App Version : " + version) @@ -1619,8 +1759,12 @@ def main(): ############################################ days = (time_usage_ended - time_usage_started).days - if days > 93: - print("\n!!! Error, Max 93 days period allowed, input is " + str(days) + " days, !!!") + if days > 93 and cmd.granularity == 'DAILY': + print("\n!!! Error, Max 93 days period allowed for DAILY, input is " + str(days) + " days, !!!") + sys.exit() + + if days > 366 and cmd.granularity == 'MONTHLY': + print("\n!!! Error, Max 366 days period allowed for MONTHLY, input is " + str(days) + " days, !!!") sys.exit() ############################################ @@ -1664,29 +1808,29 @@ def main(): if cmd.proxy: usage_client.base_client.session.proxies = {'https': cmd.proxy} - if report_type == 'DAILY' or report_type == 'ALL': - usage_daily_summary(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + if report_type == 'DATE' or report_type == 'ALL': + usage_summary(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) if report_type == 'PRODUCT' or report_type == 'ALL': - usage_daily_product(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + usage_product(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) if report_type == 'REGION' or report_type == 'ALL': - usage_daily_region(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + usage_region(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) if report_type == 'SERVICE' or report_type == 'ALL': - usage_daily_service(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + usage_service(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) if report_type == 'RESOURCE' or report_type == 'ALL': - usage_daily_resource(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + usage_resource(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) if report_type == 'TENANT' or report_type == 'ALL': - usage_daily_tenant(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + usage_tenant(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) if report_type == 'SPECIAL' or report_type == 'ALL': - usage_daily_special(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + usage_special(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) if report_type == 'COMPARTMENT' or report_type == 'ALL': - usage_daily_compartment(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv) + usage_compartment(usage_client, tenant_id, time_usage_started, time_usage_ended, cmd.csv, cmd.granularity) except Exception as e: raise RuntimeError("\nError at main function - " + str(e)) diff --git a/src/oci/ai_speech/ai_service_speech_client.py b/src/oci/ai_speech/ai_service_speech_client.py index 2d07f3b9dd..5b6aac55a4 100644 --- a/src/oci/ai_speech/ai_service_speech_client.py +++ b/src/oci/ai_speech/ai_service_speech_client.py @@ -346,6 +346,124 @@ def cancel_transcription_task(self, transcription_job_id, transcription_task_id, api_reference_link=api_reference_link, required_arguments=required_arguments) + def change_customization_compartment(self, customization_id, change_customization_compartment_details, **kwargs): + """ + Moves a Customization resource into a different compartment. + + + :param str customization_id: (required) + Unique Customization training Job identifier. + + :param oci.ai_speech.models.ChangeCustomizationCompartmentDetails change_customization_compartment_details: (required) + Details for changing the compartment of a Customization. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str opc_retry_token: (optional) + 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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_customization_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['customizationId'] + resource_path = "/customizations/{customizationId}/actions/changeCompartment" + method = "POST" + operation_name = "change_customization_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/ChangeCustomizationCompartment" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"change_customization_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "customizationId": customization_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_customization_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_customization_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_transcription_job_compartment(self, transcription_job_id, change_transcription_job_compartment_details, **kwargs): """ Moves a transcription Job resource into a different compartment. @@ -464,6 +582,198 @@ def change_transcription_job_compartment(self, transcription_job_id, change_tran api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_customization(self, create_customization_details, **kwargs): + """ + Creates a new Customization. + + + :param oci.ai_speech.models.CreateCustomizationDetails create_customization_details: (required) + Details for the new Customization. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_speech.models.Customization` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_customization API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/customizations" + method = "POST" + operation_name = "create_customization" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/CreateCustomization" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_customization got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_customization_details, + response_type="Customization", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_customization_details, + response_type="Customization", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def create_realtime_session_token(self, create_realtime_session_token_details, **kwargs): + """ + Returns an authentication token to the user. + + + :param oci.ai_speech.models.CreateRealtimeSessionTokenDetails create_realtime_session_token_details: (required) + An object containing the compartment ID for authorization purposes. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_speech.models.RealtimeSessionToken` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_realtime_session_token API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/actions/realtimeSessionToken" + method = "POST" + operation_name = "create_realtime_session_token" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/RealtimeSessionToken/CreateRealtimeSessionToken" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_realtime_session_token got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_realtime_session_token_details, + response_type="RealtimeSessionToken", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_realtime_session_token_details, + response_type="RealtimeSessionToken", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def create_transcription_job(self, create_transcription_job_details, **kwargs): """ Creates a new Transcription Job. @@ -560,6 +870,119 @@ def create_transcription_job(self, create_transcription_job_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def delete_customization(self, customization_id, **kwargs): + """ + Delete Customization and its metadata from tenancy. + + + :param str customization_id: (required) + Unique Customization training Job identifier. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str opc_retry_token: (optional) + 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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_customization API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['customizationId'] + resource_path = "/customizations/{customizationId}" + method = "DELETE" + operation_name = "delete_customization" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/DeleteCustomization" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_customization got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "customizationId": customization_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def delete_transcription_job(self, transcription_job_id, **kwargs): """ Delete API cleans job, tasks and the related metadata. However the generated transcriptions in customer tenancy will not be deleted. @@ -597,34 +1020,131 @@ def delete_transcription_job(self, transcription_job_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_transcription_job API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['transcriptionJobId'] + resource_path = "/transcriptionJobs/{transcriptionJobId}" + method = "DELETE" + operation_name = "delete_transcription_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/TranscriptionJob/DeleteTranscriptionJob" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_transcription_job got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "transcriptionJobId": transcription_job_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_customization(self, customization_id, **kwargs): + """ + Gets a Customization by identifier + + + :param str customization_id: (required) + Unique Customization training Job identifier. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_speech.models.Customization` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_transcription_job API. + Click `here `__ to see an example of how to use get_customization API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['transcriptionJobId'] - resource_path = "/transcriptionJobs/{transcriptionJobId}" - method = "DELETE" - operation_name = "delete_transcription_job" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/TranscriptionJob/DeleteTranscriptionJob" + required_arguments = ['customizationId'] + resource_path = "/customizations/{customizationId}" + method = "GET" + operation_name = "get_customization" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/GetCustomization" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_transcription_job got unknown kwargs: {extra_kwargs!r}") + f"get_customization got unknown kwargs: {extra_kwargs!r}") path_params = { - "transcriptionJobId": transcription_job_id + "customizationId": customization_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -636,9 +1156,7 @@ def delete_transcription_job(self, transcription_job_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -649,7 +1167,6 @@ def delete_transcription_job(self, transcription_job_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -658,6 +1175,7 @@ def delete_transcription_job(self, transcription_job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="Customization", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -668,6 +1186,7 @@ def delete_transcription_job(self, transcription_job_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + response_type="Customization", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -869,6 +1388,160 @@ def get_transcription_task(self, transcription_job_id, transcription_task_id, ** api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_customizations(self, **kwargs): + """ + Returns a list of Customizations. + + + :param str compartment_id: (optional) + The ID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + A filter to return only resources whose lifecycleState matches the given lifecycleState. + + Allowed values are: "DELETING", "DELETED", "FAILED", "UPDATING", "ACTIVE", "CREATING" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str id: (optional) + Unique identifier(OCID). + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :param str sort_order: (optional) + The sort order to use, either 'ASC' or 'DESC'. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_speech.models.CustomizationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_customizations API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/customizations" + method = "GET" + operation_name = "list_customizations" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/ListCustomizations" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "lifecycle_state", + "display_name", + "id", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_customizations got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["DELETING", "DELETED", "FAILED", "UPDATING", "ACTIVE", "CREATING"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", missing), + "id": kwargs.get("id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CustomizationCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CustomizationCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def list_transcription_jobs(self, **kwargs): """ Returns a list of Transcription Jobs. @@ -1187,6 +1860,116 @@ def list_transcription_tasks(self, transcription_job_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def update_customization(self, customization_id, update_customization_details, **kwargs): + """ + Updates a Customization by identifier + + + :param str customization_id: (required) + Unique Customization training Job identifier. + + :param oci.ai_speech.models.UpdateCustomizationDetails update_customization_details: (required) + The information to be updated. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ai_speech.models.Customization` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_customization API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['customizationId'] + resource_path = "/customizations/{customizationId}" + method = "PUT" + operation_name = "update_customization" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/speech/20220101/Customization/UpdateCustomization" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"update_customization got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "customizationId": customization_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_customization_details, + response_type="Customization", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_customization_details, + response_type="Customization", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_transcription_job(self, transcription_job_id, update_transcription_job_details, **kwargs): """ Updates the Transcription Job diff --git a/src/oci/ai_speech/ai_service_speech_client_composite_operations.py b/src/oci/ai_speech/ai_service_speech_client_composite_operations.py index 74e559e474..c6879d950e 100644 --- a/src/oci/ai_speech/ai_service_speech_client_composite_operations.py +++ b/src/oci/ai_speech/ai_service_speech_client_composite_operations.py @@ -25,6 +25,48 @@ def __init__(self, client, **kwargs): """ self.client = client + def create_customization_and_wait_for_state(self, create_customization_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_speech.AIServiceSpeechClient.create_customization` and waits for the :py:class:`~oci.ai_speech.models.Customization` acted upon + to enter the given state(s). + + :param oci.ai_speech.models.CreateCustomizationDetails create_customization_details: (required) + Details for the new Customization. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_speech.models.Customization.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_speech.AIServiceSpeechClient.create_customization` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_customization(create_customization_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + customization_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_customization(customization_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_transcription_job_and_wait_for_state(self, create_transcription_job_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.ai_speech.AIServiceSpeechClient.create_transcription_job` and waits for the :py:class:`~oci.ai_speech.models.TranscriptionJob` acted upon @@ -67,6 +109,65 @@ def create_transcription_job_and_wait_for_state(self, create_transcription_job_d except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_customization_and_wait_for_state(self, customization_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_speech.AIServiceSpeechClient.delete_customization` and waits for the :py:class:`~oci.ai_speech.models.Customization` acted upon + to enter the given state(s). + + :param str customization_id: (required) + Unique Customization training Job identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_speech.models.Customization.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_speech.AIServiceSpeechClient.delete_customization` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_customization(customization_id) + operation_result = None + try: + operation_result = self.client.delete_customization(customization_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False): + self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_customization, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended") + else: + """ + If the user does not send in this value, we set it to True by default. + We are doing this because during a delete resource scenario and waiting on its state, the service can + return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail + """ + waiter_kwargs["succeed_on_not_found"] = True + waiter_result = oci.wait_until( + self.client, + initial_get_result, # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_transcription_job_and_wait_for_state(self, transcription_job_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.ai_speech.AIServiceSpeechClient.delete_transcription_job` and waits for the :py:class:`~oci.ai_speech.models.TranscriptionJob` acted upon @@ -126,6 +227,51 @@ def delete_transcription_job_and_wait_for_state(self, transcription_job_id, wait except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_customization_and_wait_for_state(self, customization_id, update_customization_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_speech.AIServiceSpeechClient.update_customization` and waits for the :py:class:`~oci.ai_speech.models.Customization` acted upon + to enter the given state(s). + + :param str customization_id: (required) + Unique Customization training Job identifier. + + :param oci.ai_speech.models.UpdateCustomizationDetails update_customization_details: (required) + The information to be updated. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_speech.models.Customization.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_speech.AIServiceSpeechClient.update_customization` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_customization(customization_id, update_customization_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + customization_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_customization(customization_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_transcription_job_and_wait_for_state(self, transcription_job_id, update_transcription_job_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.ai_speech.AIServiceSpeechClient.update_transcription_job` and waits for the :py:class:`~oci.ai_speech.models.TranscriptionJob` acted upon diff --git a/src/oci/ai_speech/models/__init__.py b/src/oci/ai_speech/models/__init__.py index 4748c70dfa..8294d8bf1d 100644 --- a/src/oci/ai_speech/models/__init__.py +++ b/src/oci/ai_speech/models/__init__.py @@ -7,15 +7,49 @@ from __future__ import absolute_import from .audio_format_details import AudioFormatDetails +from .change_customization_compartment_details import ChangeCustomizationCompartmentDetails from .change_transcription_job_compartment_details import ChangeTranscriptionJobCompartmentDetails +from .create_customization_details import CreateCustomizationDetails +from .create_realtime_session_token_details import CreateRealtimeSessionTokenDetails from .create_transcription_job_details import CreateTranscriptionJobDetails +from .customization import Customization +from .customization_collection import CustomizationCollection +from .customization_dataset_details import CustomizationDatasetDetails +from .customization_inference import CustomizationInference +from .customization_inference_entity import CustomizationInferenceEntity +from .customization_model_details import CustomizationModelDetails +from .customization_referenced_entities import CustomizationReferencedEntities +from .customization_summary import CustomizationSummary from .diarization import Diarization +from .entity import Entity +from .entity_list import EntityList +from .entity_list_dataset import EntityListDataset from .input_location import InputLocation +from .location_details import LocationDetails +from .object_list_dataset import ObjectListDataset from .object_list_file_input_location import ObjectListFileInputLocation from .object_list_inline_input_location import ObjectListInlineInputLocation from .object_location import ObjectLocation +from .object_storage_dataset import ObjectStorageDataset from .output_location import OutputLocation from .profanity_transcription_filter import ProfanityTranscriptionFilter +from .pronunciation import Pronunciation +from .realtime_message import RealtimeMessage +from .realtime_message_ack_audio import RealtimeMessageAckAudio +from .realtime_message_ack_audio_details import RealtimeMessageAckAudioDetails +from .realtime_message_authentication import RealtimeMessageAuthentication +from .realtime_message_authentication_credentials import RealtimeMessageAuthenticationCredentials +from .realtime_message_authentication_token import RealtimeMessageAuthenticationToken +from .realtime_message_connect import RealtimeMessageConnect +from .realtime_message_error import RealtimeMessageError +from .realtime_message_out import RealtimeMessageOut +from .realtime_message_result import RealtimeMessageResult +from .realtime_message_result_transcription import RealtimeMessageResultTranscription +from .realtime_message_result_transcription_token import RealtimeMessageResultTranscriptionToken +from .realtime_message_send_final_result import RealtimeMessageSendFinalResult +from .realtime_model_details import RealtimeModelDetails +from .realtime_parameters import RealtimeParameters +from .realtime_session_token import RealtimeSessionToken from .transcription_filter import TranscriptionFilter from .transcription_job import TranscriptionJob from .transcription_job_collection import TranscriptionJobCollection @@ -26,20 +60,55 @@ from .transcription_task import TranscriptionTask from .transcription_task_collection import TranscriptionTaskCollection from .transcription_task_summary import TranscriptionTaskSummary +from .update_customization_details import UpdateCustomizationDetails from .update_transcription_job_details import UpdateTranscriptionJobDetails # Maps type names to classes for ai_speech services. ai_speech_type_mapping = { "AudioFormatDetails": AudioFormatDetails, + "ChangeCustomizationCompartmentDetails": ChangeCustomizationCompartmentDetails, "ChangeTranscriptionJobCompartmentDetails": ChangeTranscriptionJobCompartmentDetails, + "CreateCustomizationDetails": CreateCustomizationDetails, + "CreateRealtimeSessionTokenDetails": CreateRealtimeSessionTokenDetails, "CreateTranscriptionJobDetails": CreateTranscriptionJobDetails, + "Customization": Customization, + "CustomizationCollection": CustomizationCollection, + "CustomizationDatasetDetails": CustomizationDatasetDetails, + "CustomizationInference": CustomizationInference, + "CustomizationInferenceEntity": CustomizationInferenceEntity, + "CustomizationModelDetails": CustomizationModelDetails, + "CustomizationReferencedEntities": CustomizationReferencedEntities, + "CustomizationSummary": CustomizationSummary, "Diarization": Diarization, + "Entity": Entity, + "EntityList": EntityList, + "EntityListDataset": EntityListDataset, "InputLocation": InputLocation, + "LocationDetails": LocationDetails, + "ObjectListDataset": ObjectListDataset, "ObjectListFileInputLocation": ObjectListFileInputLocation, "ObjectListInlineInputLocation": ObjectListInlineInputLocation, "ObjectLocation": ObjectLocation, + "ObjectStorageDataset": ObjectStorageDataset, "OutputLocation": OutputLocation, "ProfanityTranscriptionFilter": ProfanityTranscriptionFilter, + "Pronunciation": Pronunciation, + "RealtimeMessage": RealtimeMessage, + "RealtimeMessageAckAudio": RealtimeMessageAckAudio, + "RealtimeMessageAckAudioDetails": RealtimeMessageAckAudioDetails, + "RealtimeMessageAuthentication": RealtimeMessageAuthentication, + "RealtimeMessageAuthenticationCredentials": RealtimeMessageAuthenticationCredentials, + "RealtimeMessageAuthenticationToken": RealtimeMessageAuthenticationToken, + "RealtimeMessageConnect": RealtimeMessageConnect, + "RealtimeMessageError": RealtimeMessageError, + "RealtimeMessageOut": RealtimeMessageOut, + "RealtimeMessageResult": RealtimeMessageResult, + "RealtimeMessageResultTranscription": RealtimeMessageResultTranscription, + "RealtimeMessageResultTranscriptionToken": RealtimeMessageResultTranscriptionToken, + "RealtimeMessageSendFinalResult": RealtimeMessageSendFinalResult, + "RealtimeModelDetails": RealtimeModelDetails, + "RealtimeParameters": RealtimeParameters, + "RealtimeSessionToken": RealtimeSessionToken, "TranscriptionFilter": TranscriptionFilter, "TranscriptionJob": TranscriptionJob, "TranscriptionJobCollection": TranscriptionJobCollection, @@ -50,5 +119,6 @@ "TranscriptionTask": TranscriptionTask, "TranscriptionTaskCollection": TranscriptionTaskCollection, "TranscriptionTaskSummary": TranscriptionTaskSummary, + "UpdateCustomizationDetails": UpdateCustomizationDetails, "UpdateTranscriptionJobDetails": UpdateTranscriptionJobDetails } diff --git a/src/oci/ai_speech/models/change_customization_compartment_details.py b/src/oci/ai_speech/models/change_customization_compartment_details.py new file mode 100644 index 0000000000..de42f957a0 --- /dev/null +++ b/src/oci/ai_speech/models/change_customization_compartment_details.py @@ -0,0 +1,78 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeCustomizationCompartmentDetails(object): + """ + Details for changing the compartment of a Customization. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeCustomizationCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeCustomizationCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeCustomizationCompartmentDetails. + The `OCID`__ of the compartment + where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeCustomizationCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeCustomizationCompartmentDetails. + The `OCID`__ of the compartment + where the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeCustomizationCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/create_customization_details.py b/src/oci/ai_speech/models/create_customization_details.py new file mode 100644 index 0000000000..31d9f1314c --- /dev/null +++ b/src/oci/ai_speech/models/create_customization_details.py @@ -0,0 +1,289 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateCustomizationDetails(object): + """ + The information about the new Customization. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateCustomizationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this CreateCustomizationDetails. + :type compartment_id: str + + :param alias: + The value to assign to the alias property of this CreateCustomizationDetails. + :type alias: str + + :param display_name: + The value to assign to the display_name property of this CreateCustomizationDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateCustomizationDetails. + :type description: str + + :param model_details: + The value to assign to the model_details property of this CreateCustomizationDetails. + :type model_details: oci.ai_speech.models.CustomizationModelDetails + + :param training_dataset: + The value to assign to the training_dataset property of this CreateCustomizationDetails. + :type training_dataset: oci.ai_speech.models.CustomizationDatasetDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateCustomizationDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateCustomizationDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'alias': 'str', + 'display_name': 'str', + 'description': 'str', + 'model_details': 'CustomizationModelDetails', + 'training_dataset': 'CustomizationDatasetDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'alias': 'alias', + 'display_name': 'displayName', + 'description': 'description', + 'model_details': 'modelDetails', + 'training_dataset': 'trainingDataset', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._alias = None + self._display_name = None + self._description = None + self._model_details = None + self._training_dataset = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateCustomizationDetails. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateCustomizationDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateCustomizationDetails. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateCustomizationDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def alias(self): + """ + Gets the alias of this CreateCustomizationDetails. + Customization Details Alias + + + :return: The alias of this CreateCustomizationDetails. + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """ + Sets the alias of this CreateCustomizationDetails. + Customization Details Alias + + + :param alias: The alias of this CreateCustomizationDetails. + :type: str + """ + self._alias = alias + + @property + def display_name(self): + """ + Gets the display_name of this CreateCustomizationDetails. + A user-friendly display name for the job. + + + :return: The display_name of this CreateCustomizationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateCustomizationDetails. + A user-friendly display name for the job. + + + :param display_name: The display_name of this CreateCustomizationDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateCustomizationDetails. + A short description of the job. + + + :return: The description of this CreateCustomizationDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateCustomizationDetails. + A short description of the job. + + + :param description: The description of this CreateCustomizationDetails. + :type: str + """ + self._description = description + + @property + def model_details(self): + """ + **[Required]** Gets the model_details of this CreateCustomizationDetails. + + :return: The model_details of this CreateCustomizationDetails. + :rtype: oci.ai_speech.models.CustomizationModelDetails + """ + return self._model_details + + @model_details.setter + def model_details(self, model_details): + """ + Sets the model_details of this CreateCustomizationDetails. + + :param model_details: The model_details of this CreateCustomizationDetails. + :type: oci.ai_speech.models.CustomizationModelDetails + """ + self._model_details = model_details + + @property + def training_dataset(self): + """ + **[Required]** Gets the training_dataset of this CreateCustomizationDetails. + + :return: The training_dataset of this CreateCustomizationDetails. + :rtype: oci.ai_speech.models.CustomizationDatasetDetails + """ + return self._training_dataset + + @training_dataset.setter + def training_dataset(self, training_dataset): + """ + Sets the training_dataset of this CreateCustomizationDetails. + + :param training_dataset: The training_dataset of this CreateCustomizationDetails. + :type: oci.ai_speech.models.CustomizationDatasetDetails + """ + self._training_dataset = training_dataset + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateCustomizationDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :return: The freeform_tags of this CreateCustomizationDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateCustomizationDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :param freeform_tags: The freeform_tags of this CreateCustomizationDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateCustomizationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :return: The defined_tags of this CreateCustomizationDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateCustomizationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :param defined_tags: The defined_tags of this CreateCustomizationDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/create_realtime_session_token_details.py b/src/oci/ai_speech/models/create_realtime_session_token_details.py new file mode 100644 index 0000000000..1214f1b8de --- /dev/null +++ b/src/oci/ai_speech/models/create_realtime_session_token_details.py @@ -0,0 +1,142 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateRealtimeSessionTokenDetails(object): + """ + Request sent to the realtime authentication endpoint in order to obtain the auth token. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateRealtimeSessionTokenDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this CreateRealtimeSessionTokenDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateRealtimeSessionTokenDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateRealtimeSessionTokenDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateRealtimeSessionTokenDetails. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateRealtimeSessionTokenDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateRealtimeSessionTokenDetails. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateRealtimeSessionTokenDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateRealtimeSessionTokenDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :return: The freeform_tags of this CreateRealtimeSessionTokenDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateRealtimeSessionTokenDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :param freeform_tags: The freeform_tags of this CreateRealtimeSessionTokenDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateRealtimeSessionTokenDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :return: The defined_tags of this CreateRealtimeSessionTokenDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateRealtimeSessionTokenDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :param defined_tags: The defined_tags of this CreateRealtimeSessionTokenDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization.py b/src/oci/ai_speech/models/customization.py new file mode 100644 index 0000000000..8303281c02 --- /dev/null +++ b/src/oci/ai_speech/models/customization.py @@ -0,0 +1,544 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Customization(object): + """ + Description of a Customization. + """ + + #: A constant which can be used with the lifecycle_state property of a Customization. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Customization. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Customization. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a Customization. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Customization. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Customization. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + def __init__(self, **kwargs): + """ + Initializes a new Customization object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this Customization. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Customization. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this Customization. + :type compartment_id: str + + :param alias: + The value to assign to the alias property of this Customization. + :type alias: str + + :param description: + The value to assign to the description property of this Customization. + :type description: str + + :param model_details: + The value to assign to the model_details property of this Customization. + :type model_details: oci.ai_speech.models.CustomizationModelDetails + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Customization. + Allowed values for this property are: "DELETING", "DELETED", "FAILED", "UPDATING", "ACTIVE", "CREATING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Customization. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this Customization. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Customization. + :type time_updated: datetime + + :param training_dataset: + The value to assign to the training_dataset property of this Customization. + :type training_dataset: oci.ai_speech.models.CustomizationDatasetDetails + + :param entities: + The value to assign to the entities property of this Customization. + :type entities: list[oci.ai_speech.models.CustomizationReferencedEntities] + + :param freeform_tags: + The value to assign to the freeform_tags property of this Customization. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Customization. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Customization. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'alias': 'str', + 'description': 'str', + 'model_details': 'CustomizationModelDetails', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'training_dataset': 'CustomizationDatasetDetails', + 'entities': 'list[CustomizationReferencedEntities]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'alias': 'alias', + 'description': 'description', + 'model_details': 'modelDetails', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'training_dataset': 'trainingDataset', + 'entities': 'entities', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._alias = None + self._description = None + self._model_details = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + self._time_updated = None + self._training_dataset = None + self._entities = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Customization. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this Customization. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Customization. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this Customization. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this Customization. + A user-friendly display name for the job. + + + :return: The display_name of this Customization. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Customization. + A user-friendly display name for the job. + + + :param display_name: The display_name of this Customization. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Customization. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this Customization. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Customization. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this Customization. + :type: str + """ + self._compartment_id = compartment_id + + @property + def alias(self): + """ + Gets the alias of this Customization. + Customization Details Alias + + + :return: The alias of this Customization. + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """ + Sets the alias of this Customization. + Customization Details Alias + + + :param alias: The alias of this Customization. + :type: str + """ + self._alias = alias + + @property + def description(self): + """ + Gets the description of this Customization. + A short description of the job. + + + :return: The description of this Customization. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Customization. + A short description of the job. + + + :param description: The description of this Customization. + :type: str + """ + self._description = description + + @property + def model_details(self): + """ + **[Required]** Gets the model_details of this Customization. + + :return: The model_details of this Customization. + :rtype: oci.ai_speech.models.CustomizationModelDetails + """ + return self._model_details + + @model_details.setter + def model_details(self, model_details): + """ + Sets the model_details of this Customization. + + :param model_details: The model_details of this Customization. + :type: oci.ai_speech.models.CustomizationModelDetails + """ + self._model_details = model_details + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Customization. + The current state of the Job. + + Allowed values for this property are: "DELETING", "DELETED", "FAILED", "UPDATING", "ACTIVE", "CREATING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Customization. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Customization. + The current state of the Job. + + + :param lifecycle_state: The lifecycle_state of this Customization. + :type: str + """ + allowed_values = ["DELETING", "DELETED", "FAILED", "UPDATING", "ACTIVE", "CREATING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Customization. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this Customization. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Customization. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this Customization. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + Gets the time_created of this Customization. + Customization Created time. An RFC3339 formatted datetime string. + + + :return: The time_created of this Customization. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Customization. + Customization Created time. An RFC3339 formatted datetime string. + + + :param time_created: The time_created of this Customization. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Customization. + Customization Updated time. An RFC3339 formatted datetime string. + + + :return: The time_updated of this Customization. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Customization. + Customization Updated time. An RFC3339 formatted datetime string. + + + :param time_updated: The time_updated of this Customization. + :type: datetime + """ + self._time_updated = time_updated + + @property + def training_dataset(self): + """ + Gets the training_dataset of this Customization. + + :return: The training_dataset of this Customization. + :rtype: oci.ai_speech.models.CustomizationDatasetDetails + """ + return self._training_dataset + + @training_dataset.setter + def training_dataset(self, training_dataset): + """ + Sets the training_dataset of this Customization. + + :param training_dataset: The training_dataset of this Customization. + :type: oci.ai_speech.models.CustomizationDatasetDetails + """ + self._training_dataset = training_dataset + + @property + def entities(self): + """ + Gets the entities of this Customization. + array of referenced entities + + + :return: The entities of this Customization. + :rtype: list[oci.ai_speech.models.CustomizationReferencedEntities] + """ + return self._entities + + @entities.setter + def entities(self, entities): + """ + Sets the entities of this Customization. + array of referenced entities + + + :param entities: The entities of this Customization. + :type: list[oci.ai_speech.models.CustomizationReferencedEntities] + """ + self._entities = entities + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Customization. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :return: The freeform_tags of this Customization. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Customization. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :param freeform_tags: The freeform_tags of this Customization. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Customization. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :return: The defined_tags of this Customization. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Customization. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :param defined_tags: The defined_tags of this Customization. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Customization. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`. + + + :return: The system_tags of this Customization. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Customization. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`. + + + :param system_tags: The system_tags of this Customization. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization_collection.py b/src/oci/ai_speech/models/customization_collection.py new file mode 100644 index 0000000000..e9c3314f3c --- /dev/null +++ b/src/oci/ai_speech/models/customization_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CustomizationCollection(object): + """ + Results of a Customization search. Contains both CustomizationSummary items and other information, such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomizationCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this CustomizationCollection. + :type items: list[oci.ai_speech.models.CustomizationSummary] + + """ + self.swagger_types = { + 'items': 'list[CustomizationSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CustomizationCollection. + List of Customization training jobs. + + + :return: The items of this CustomizationCollection. + :rtype: list[oci.ai_speech.models.CustomizationSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CustomizationCollection. + List of Customization training jobs. + + + :param items: The items of this CustomizationCollection. + :type: list[oci.ai_speech.models.CustomizationSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization_dataset_details.py b/src/oci/ai_speech/models/customization_dataset_details.py new file mode 100644 index 0000000000..78d05db77b --- /dev/null +++ b/src/oci/ai_speech/models/customization_dataset_details.py @@ -0,0 +1,109 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CustomizationDatasetDetails(object): + """ + Customization Training Dataset + """ + + #: A constant which can be used with the dataset_type property of a CustomizationDatasetDetails. + #: This constant has a value of "OBJECT_STORAGE" + DATASET_TYPE_OBJECT_STORAGE = "OBJECT_STORAGE" + + #: A constant which can be used with the dataset_type property of a CustomizationDatasetDetails. + #: This constant has a value of "ENTITY_LIST" + DATASET_TYPE_ENTITY_LIST = "ENTITY_LIST" + + def __init__(self, **kwargs): + """ + Initializes a new CustomizationDatasetDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.ai_speech.models.ObjectStorageDataset` + * :class:`~oci.ai_speech.models.EntityListDataset` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dataset_type: + The value to assign to the dataset_type property of this CustomizationDatasetDetails. + Allowed values for this property are: "OBJECT_STORAGE", "ENTITY_LIST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type dataset_type: str + + """ + self.swagger_types = { + 'dataset_type': 'str' + } + + self.attribute_map = { + 'dataset_type': 'datasetType' + } + + self._dataset_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['datasetType'] + + if type == 'OBJECT_STORAGE': + return 'ObjectStorageDataset' + + if type == 'ENTITY_LIST': + return 'EntityListDataset' + else: + return 'CustomizationDatasetDetails' + + @property + def dataset_type(self): + """ + **[Required]** Gets the dataset_type of this CustomizationDatasetDetails. + Possible data sets + + Allowed values for this property are: "OBJECT_STORAGE", "ENTITY_LIST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The dataset_type of this CustomizationDatasetDetails. + :rtype: str + """ + return self._dataset_type + + @dataset_type.setter + def dataset_type(self, dataset_type): + """ + Sets the dataset_type of this CustomizationDatasetDetails. + Possible data sets + + + :param dataset_type: The dataset_type of this CustomizationDatasetDetails. + :type: str + """ + allowed_values = ["OBJECT_STORAGE", "ENTITY_LIST"] + if not value_allowed_none_or_none_sentinel(dataset_type, allowed_values): + dataset_type = 'UNKNOWN_ENUM_VALUE' + self._dataset_type = dataset_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization_inference.py b/src/oci/ai_speech/models/customization_inference.py new file mode 100644 index 0000000000..914568a84c --- /dev/null +++ b/src/oci/ai_speech/models/customization_inference.py @@ -0,0 +1,173 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CustomizationInference(object): + """ + Inference payload for using Customization in Realtime Speech or Async Speech + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomizationInference object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param customization_id: + The value to assign to the customization_id property of this CustomizationInference. + :type customization_id: str + + :param customization_alias: + The value to assign to the customization_alias property of this CustomizationInference. + :type customization_alias: str + + :param compartment_id: + The value to assign to the compartment_id property of this CustomizationInference. + :type compartment_id: str + + :param entities: + The value to assign to the entities property of this CustomizationInference. + :type entities: list[oci.ai_speech.models.CustomizationInferenceEntity] + + """ + self.swagger_types = { + 'customization_id': 'str', + 'customization_alias': 'str', + 'compartment_id': 'str', + 'entities': 'list[CustomizationInferenceEntity]' + } + + self.attribute_map = { + 'customization_id': 'customizationId', + 'customization_alias': 'customizationAlias', + 'compartment_id': 'compartmentId', + 'entities': 'entities' + } + + self._customization_id = None + self._customization_alias = None + self._compartment_id = None + self._entities = None + + @property + def customization_id(self): + """ + Gets the customization_id of this CustomizationInference. + The `OCID`__ of the customization to use. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The customization_id of this CustomizationInference. + :rtype: str + """ + return self._customization_id + + @customization_id.setter + def customization_id(self, customization_id): + """ + Sets the customization_id of this CustomizationInference. + The `OCID`__ of the customization to use. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param customization_id: The customization_id of this CustomizationInference. + :type: str + """ + self._customization_id = customization_id + + @property + def customization_alias(self): + """ + Gets the customization_alias of this CustomizationInference. + Alias of the customization + + + :return: The customization_alias of this CustomizationInference. + :rtype: str + """ + return self._customization_alias + + @customization_alias.setter + def customization_alias(self, customization_alias): + """ + Sets the customization_alias of this CustomizationInference. + Alias of the customization + + + :param customization_alias: The customization_alias of this CustomizationInference. + :type: str + """ + self._customization_alias = customization_alias + + @property + def compartment_id(self): + """ + Gets the compartment_id of this CustomizationInference. + The `OCID`__ of the compartment where customization is present + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CustomizationInference. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CustomizationInference. + The `OCID`__ of the compartment where customization is present + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CustomizationInference. + :type: str + """ + self._compartment_id = compartment_id + + @property + def entities(self): + """ + Gets the entities of this CustomizationInference. + Entities present in the customization + + + :return: The entities of this CustomizationInference. + :rtype: list[oci.ai_speech.models.CustomizationInferenceEntity] + """ + return self._entities + + @entities.setter + def entities(self, entities): + """ + Sets the entities of this CustomizationInference. + Entities present in the customization + + + :param entities: The entities of this CustomizationInference. + :type: list[oci.ai_speech.models.CustomizationInferenceEntity] + """ + self._entities = entities + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization_inference_entity.py b/src/oci/ai_speech/models/customization_inference_entity.py new file mode 100644 index 0000000000..4fd36c78b2 --- /dev/null +++ b/src/oci/ai_speech/models/customization_inference_entity.py @@ -0,0 +1,138 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CustomizationInferenceEntity(object): + """ + Entity Object for customization inference payload + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomizationInferenceEntity object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this CustomizationInferenceEntity. + :type entity_type: str + + :param customization_id: + The value to assign to the customization_id property of this CustomizationInferenceEntity. + :type customization_id: str + + :param customization_alias: + The value to assign to the customization_alias property of this CustomizationInferenceEntity. + :type customization_alias: str + + """ + self.swagger_types = { + 'entity_type': 'str', + 'customization_id': 'str', + 'customization_alias': 'str' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'customization_id': 'customizationId', + 'customization_alias': 'customizationAlias' + } + + self._entity_type = None + self._customization_id = None + self._customization_alias = None + + @property + def entity_type(self): + """ + Gets the entity_type of this CustomizationInferenceEntity. + Entity type + + + :return: The entity_type of this CustomizationInferenceEntity. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this CustomizationInferenceEntity. + Entity type + + + :param entity_type: The entity_type of this CustomizationInferenceEntity. + :type: str + """ + self._entity_type = entity_type + + @property + def customization_id(self): + """ + Gets the customization_id of this CustomizationInferenceEntity. + The `OCID`__ of the customization to use. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The customization_id of this CustomizationInferenceEntity. + :rtype: str + """ + return self._customization_id + + @customization_id.setter + def customization_id(self, customization_id): + """ + Sets the customization_id of this CustomizationInferenceEntity. + The `OCID`__ of the customization to use. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param customization_id: The customization_id of this CustomizationInferenceEntity. + :type: str + """ + self._customization_id = customization_id + + @property + def customization_alias(self): + """ + Gets the customization_alias of this CustomizationInferenceEntity. + Alias of the customization + + + :return: The customization_alias of this CustomizationInferenceEntity. + :rtype: str + """ + return self._customization_alias + + @customization_alias.setter + def customization_alias(self, customization_alias): + """ + Sets the customization_alias of this CustomizationInferenceEntity. + Alias of the customization + + + :param customization_alias: The customization_alias of this CustomizationInferenceEntity. + :type: str + """ + self._customization_alias = customization_alias + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization_model_details.py b/src/oci/ai_speech/models/customization_model_details.py new file mode 100644 index 0000000000..89c136924b --- /dev/null +++ b/src/oci/ai_speech/models/customization_model_details.py @@ -0,0 +1,139 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CustomizationModelDetails(object): + """ + Customization details. + """ + + #: A constant which can be used with the domain property of a CustomizationModelDetails. + #: This constant has a value of "GENERIC" + DOMAIN_GENERIC = "GENERIC" + + #: A constant which can be used with the domain property of a CustomizationModelDetails. + #: This constant has a value of "MEDICAL" + DOMAIN_MEDICAL = "MEDICAL" + + def __init__(self, **kwargs): + """ + Initializes a new CustomizationModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param domain: + The value to assign to the domain property of this CustomizationModelDetails. + Allowed values for this property are: "GENERIC", "MEDICAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type domain: str + + :param language_code: + The value to assign to the language_code property of this CustomizationModelDetails. + :type language_code: str + + """ + self.swagger_types = { + 'domain': 'str', + 'language_code': 'str' + } + + self.attribute_map = { + 'domain': 'domain', + 'language_code': 'languageCode' + } + + self._domain = None + self._language_code = None + + @property + def domain(self): + """ + Gets the domain of this CustomizationModelDetails. + Customization Domain + + Allowed values for this property are: "GENERIC", "MEDICAL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The domain of this CustomizationModelDetails. + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """ + Sets the domain of this CustomizationModelDetails. + Customization Domain + + + :param domain: The domain of this CustomizationModelDetails. + :type: str + """ + allowed_values = ["GENERIC", "MEDICAL"] + if not value_allowed_none_or_none_sentinel(domain, allowed_values): + domain = 'UNKNOWN_ENUM_VALUE' + self._domain = domain + + @property + def language_code(self): + """ + Gets the language_code of this CustomizationModelDetails. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + - en-US: English - United States + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - en-GB: English - Great Britain + - en-AU: English - Australia + - en-IN: English - India + - hi-IN: Hindi - India + - fr-FR: French - France + - de-DE: German - Germany + - it-IT: Italian - Italy + + + :return: The language_code of this CustomizationModelDetails. + :rtype: str + """ + return self._language_code + + @language_code.setter + def language_code(self, language_code): + """ + Sets the language_code of this CustomizationModelDetails. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + - en-US: English - United States + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - en-GB: English - Great Britain + - en-AU: English - Australia + - en-IN: English - India + - hi-IN: Hindi - India + - fr-FR: French - France + - de-DE: German - Germany + - it-IT: Italian - Italy + + + :param language_code: The language_code of this CustomizationModelDetails. + :type: str + """ + self._language_code = language_code + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization_referenced_entities.py b/src/oci/ai_speech/models/customization_referenced_entities.py new file mode 100644 index 0000000000..3acf5f8780 --- /dev/null +++ b/src/oci/ai_speech/models/customization_referenced_entities.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CustomizationReferencedEntities(object): + """ + Entities referenced by top level customization. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomizationReferencedEntities object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param alias: + The value to assign to the alias property of this CustomizationReferencedEntities. + :type alias: str + + :param id: + The value to assign to the id property of this CustomizationReferencedEntities. + :type id: str + + :param entity_type: + The value to assign to the entity_type property of this CustomizationReferencedEntities. + :type entity_type: str + + """ + self.swagger_types = { + 'alias': 'str', + 'id': 'str', + 'entity_type': 'str' + } + + self.attribute_map = { + 'alias': 'alias', + 'id': 'id', + 'entity_type': 'entityType' + } + + self._alias = None + self._id = None + self._entity_type = None + + @property + def alias(self): + """ + Gets the alias of this CustomizationReferencedEntities. + Alias of default referenced Customization for given entityType + + + :return: The alias of this CustomizationReferencedEntities. + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """ + Sets the alias of this CustomizationReferencedEntities. + Alias of default referenced Customization for given entityType + + + :param alias: The alias of this CustomizationReferencedEntities. + :type: str + """ + self._alias = alias + + @property + def id(self): + """ + Gets the id of this CustomizationReferencedEntities. + Customization Id of default referenced Customization for given entityType + + + :return: The id of this CustomizationReferencedEntities. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CustomizationReferencedEntities. + Customization Id of default referenced Customization for given entityType + + + :param id: The id of this CustomizationReferencedEntities. + :type: str + """ + self._id = id + + @property + def entity_type(self): + """ + Gets the entity_type of this CustomizationReferencedEntities. + Customization Entity Type + + + :return: The entity_type of this CustomizationReferencedEntities. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this CustomizationReferencedEntities. + Customization Entity Type + + + :param entity_type: The entity_type of this CustomizationReferencedEntities. + :type: str + """ + self._entity_type = entity_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/customization_summary.py b/src/oci/ai_speech/models/customization_summary.py new file mode 100644 index 0000000000..05ea2de817 --- /dev/null +++ b/src/oci/ai_speech/models/customization_summary.py @@ -0,0 +1,396 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CustomizationSummary(object): + """ + Summary of the Customization. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CustomizationSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this CustomizationSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this CustomizationSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CustomizationSummary. + :type compartment_id: str + + :param alias: + The value to assign to the alias property of this CustomizationSummary. + :type alias: str + + :param time_created: + The value to assign to the time_created property of this CustomizationSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this CustomizationSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this CustomizationSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this CustomizationSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CustomizationSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CustomizationSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this CustomizationSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'alias': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'alias': 'alias', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._alias = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this CustomizationSummary. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this CustomizationSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this CustomizationSummary. + The `OCID`__ of the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this CustomizationSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CustomizationSummary. + A user-friendly display name for the job. + + + :return: The display_name of this CustomizationSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CustomizationSummary. + A user-friendly display name for the job. + + + :param display_name: The display_name of this CustomizationSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CustomizationSummary. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CustomizationSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CustomizationSummary. + The `OCID`__ of the compartment where you want to create the job. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CustomizationSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def alias(self): + """ + Gets the alias of this CustomizationSummary. + Customization Summary Alias + + + :return: The alias of this CustomizationSummary. + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """ + Sets the alias of this CustomizationSummary. + Customization Summary Alias + + + :param alias: The alias of this CustomizationSummary. + :type: str + """ + self._alias = alias + + @property + def time_created(self): + """ + Gets the time_created of this CustomizationSummary. + Customization Created time. An RFC3339 formatted datetime string. + + + :return: The time_created of this CustomizationSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CustomizationSummary. + Customization Created time. An RFC3339 formatted datetime string. + + + :param time_created: The time_created of this CustomizationSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this CustomizationSummary. + Customization Updated time. An RFC3339 formatted datetime string. + + + :return: The time_updated of this CustomizationSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this CustomizationSummary. + Customization Updated time. An RFC3339 formatted datetime string. + + + :param time_updated: The time_updated of this CustomizationSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this CustomizationSummary. + The current state of the Speech Job. + + + :return: The lifecycle_state of this CustomizationSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this CustomizationSummary. + The current state of the Speech Job. + + + :param lifecycle_state: The lifecycle_state of this CustomizationSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this CustomizationSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :return: The lifecycle_details of this CustomizationSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this CustomizationSummary. + A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + + + :param lifecycle_details: The lifecycle_details of this CustomizationSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CustomizationSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :return: The freeform_tags of this CustomizationSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CustomizationSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :param freeform_tags: The freeform_tags of this CustomizationSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CustomizationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :return: The defined_tags of this CustomizationSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CustomizationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :param defined_tags: The defined_tags of this CustomizationSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this CustomizationSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`. + + + :return: The system_tags of this CustomizationSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this CustomizationSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`. + + + :param system_tags: The system_tags of this CustomizationSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/entity.py b/src/oci/ai_speech/models/entity.py new file mode 100644 index 0000000000..8bcf43dddd --- /dev/null +++ b/src/oci/ai_speech/models/entity.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Entity(object): + """ + Entity Object Reference + """ + + def __init__(self, **kwargs): + """ + Initializes a new Entity object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_value: + The value to assign to the entity_value property of this Entity. + :type entity_value: str + + :param pronunciations: + The value to assign to the pronunciations property of this Entity. + :type pronunciations: list[oci.ai_speech.models.Pronunciation] + + :param weight: + The value to assign to the weight property of this Entity. + :type weight: float + + """ + self.swagger_types = { + 'entity_value': 'str', + 'pronunciations': 'list[Pronunciation]', + 'weight': 'float' + } + + self.attribute_map = { + 'entity_value': 'entityValue', + 'pronunciations': 'pronunciations', + 'weight': 'weight' + } + + self._entity_value = None + self._pronunciations = None + self._weight = None + + @property + def entity_value(self): + """ + **[Required]** Gets the entity_value of this Entity. + Entity value + + + :return: The entity_value of this Entity. + :rtype: str + """ + return self._entity_value + + @entity_value.setter + def entity_value(self, entity_value): + """ + Sets the entity_value of this Entity. + Entity value + + + :param entity_value: The entity_value of this Entity. + :type: str + """ + self._entity_value = entity_value + + @property + def pronunciations(self): + """ + Gets the pronunciations of this Entity. + List of pronunciations (minimum 1, maximum 255) + + + :return: The pronunciations of this Entity. + :rtype: list[oci.ai_speech.models.Pronunciation] + """ + return self._pronunciations + + @pronunciations.setter + def pronunciations(self, pronunciations): + """ + Sets the pronunciations of this Entity. + List of pronunciations (minimum 1, maximum 255) + + + :param pronunciations: The pronunciations of this Entity. + :type: list[oci.ai_speech.models.Pronunciation] + """ + self._pronunciations = pronunciations + + @property + def weight(self): + """ + Gets the weight of this Entity. + Entity weight + + + :return: The weight of this Entity. + :rtype: float + """ + return self._weight + + @weight.setter + def weight(self, weight): + """ + Sets the weight of this Entity. + Entity weight + + + :param weight: The weight of this Entity. + :type: float + """ + self._weight = weight + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/entity_list.py b/src/oci/ai_speech/models/entity_list.py new file mode 100644 index 0000000000..8f00c25e84 --- /dev/null +++ b/src/oci/ai_speech/models/entity_list.py @@ -0,0 +1,166 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class EntityList(object): + """ + List of entities of a given type, to be used to train a customization. + Note: If multiple EntityLists are provided, a separate Customization resource will be created for each EntityList. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EntityList object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param alias: + The value to assign to the alias property of this EntityList. + :type alias: str + + :param id: + The value to assign to the id property of this EntityList. + :type id: str + + :param entity_type: + The value to assign to the entity_type property of this EntityList. + :type entity_type: str + + :param entities: + The value to assign to the entities property of this EntityList. + :type entities: list[oci.ai_speech.models.Entity] + + """ + self.swagger_types = { + 'alias': 'str', + 'id': 'str', + 'entity_type': 'str', + 'entities': 'list[Entity]' + } + + self.attribute_map = { + 'alias': 'alias', + 'id': 'id', + 'entity_type': 'entityType', + 'entities': 'entities' + } + + self._alias = None + self._id = None + self._entity_type = None + self._entities = None + + @property + def alias(self): + """ + Gets the alias of this EntityList. + Alias of existing customization or to associate with new customization created from entityList. + + + :return: The alias of this EntityList. + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """ + Sets the alias of this EntityList. + Alias of existing customization or to associate with new customization created from entityList. + + + :param alias: The alias of this EntityList. + :type: str + """ + self._alias = alias + + @property + def id(self): + """ + Gets the id of this EntityList. + Entity type OCID + + + :return: The id of this EntityList. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this EntityList. + Entity type OCID + + + :param id: The id of this EntityList. + :type: str + """ + self._id = id + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this EntityList. + Entity Type + + + :return: The entity_type of this EntityList. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this EntityList. + Entity Type + + + :param entity_type: The entity_type of this EntityList. + :type: str + """ + self._entity_type = entity_type + + @property + def entities(self): + """ + Gets the entities of this EntityList. + List of entities such as names, words or phrases matching the given entityType to add recognition support for + + + :return: The entities of this EntityList. + :rtype: list[oci.ai_speech.models.Entity] + """ + return self._entities + + @entities.setter + def entities(self, entities): + """ + Sets the entities of this EntityList. + List of entities such as names, words or phrases matching the given entityType to add recognition support for + + + :param entities: The entities of this EntityList. + :type: list[oci.ai_speech.models.Entity] + """ + self._entities = entities + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/entity_list_dataset.py b/src/oci/ai_speech/models/entity_list_dataset.py new file mode 100644 index 0000000000..6925ea2edd --- /dev/null +++ b/src/oci/ai_speech/models/entity_list_dataset.py @@ -0,0 +1,115 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .customization_dataset_details import CustomizationDatasetDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class EntityListDataset(CustomizationDatasetDetails): + """ + Entity List Dataset + """ + + def __init__(self, **kwargs): + """ + Initializes a new EntityListDataset object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.EntityListDataset.dataset_type` attribute + of this class is ``ENTITY_LIST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dataset_type: + The value to assign to the dataset_type property of this EntityListDataset. + Allowed values for this property are: "OBJECT_STORAGE", "ENTITY_LIST" + :type dataset_type: str + + :param reference_examples: + The value to assign to the reference_examples property of this EntityListDataset. + :type reference_examples: list[str] + + :param entity_list: + The value to assign to the entity_list property of this EntityListDataset. + :type entity_list: list[oci.ai_speech.models.EntityList] + + """ + self.swagger_types = { + 'dataset_type': 'str', + 'reference_examples': 'list[str]', + 'entity_list': 'list[EntityList]' + } + + self.attribute_map = { + 'dataset_type': 'datasetType', + 'reference_examples': 'referenceExamples', + 'entity_list': 'entityList' + } + + self._dataset_type = None + self._reference_examples = None + self._entity_list = None + self._dataset_type = 'ENTITY_LIST' + + @property + def reference_examples(self): + """ + Gets the reference_examples of this EntityListDataset. + List of sentences referencing 1 or more entityType matching those defined in the linked entityLists, used to improve accuracy by providing model training context of where/how an entity may appear in a sentence. + EntityTypes referenced in sentences should be written in all caps surrounded by angled braces (i.e \"\" if entityType=patient) + + + :return: The reference_examples of this EntityListDataset. + :rtype: list[str] + """ + return self._reference_examples + + @reference_examples.setter + def reference_examples(self, reference_examples): + """ + Sets the reference_examples of this EntityListDataset. + List of sentences referencing 1 or more entityType matching those defined in the linked entityLists, used to improve accuracy by providing model training context of where/how an entity may appear in a sentence. + EntityTypes referenced in sentences should be written in all caps surrounded by angled braces (i.e \"\" if entityType=patient) + + + :param reference_examples: The reference_examples of this EntityListDataset. + :type: list[str] + """ + self._reference_examples = reference_examples + + @property + def entity_list(self): + """ + Gets the entity_list of this EntityListDataset. + Array of entityLists + + + :return: The entity_list of this EntityListDataset. + :rtype: list[oci.ai_speech.models.EntityList] + """ + return self._entity_list + + @entity_list.setter + def entity_list(self, entity_list): + """ + Sets the entity_list of this EntityListDataset. + Array of entityLists + + + :param entity_list: The entity_list of this EntityListDataset. + :type: list[oci.ai_speech.models.EntityList] + """ + self._entity_list = entity_list + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/location_details.py b/src/oci/ai_speech/models/location_details.py new file mode 100644 index 0000000000..b7d7d52bc4 --- /dev/null +++ b/src/oci/ai_speech/models/location_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class LocationDetails(object): + """ + Possible object storage location types + """ + + #: A constant which can be used with the location_type property of a LocationDetails. + #: This constant has a value of "OBJECT_LIST" + LOCATION_TYPE_OBJECT_LIST = "OBJECT_LIST" + + def __init__(self, **kwargs): + """ + Initializes a new LocationDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.ai_speech.models.ObjectListDataset` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param location_type: + The value to assign to the location_type property of this LocationDetails. + Allowed values for this property are: "OBJECT_LIST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type location_type: str + + """ + self.swagger_types = { + 'location_type': 'str' + } + + self.attribute_map = { + 'location_type': 'locationType' + } + + self._location_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['locationType'] + + if type == 'OBJECT_LIST': + return 'ObjectListDataset' + else: + return 'LocationDetails' + + @property + def location_type(self): + """ + **[Required]** Gets the location_type of this LocationDetails. + Possible object storage location types + + Allowed values for this property are: "OBJECT_LIST", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The location_type of this LocationDetails. + :rtype: str + """ + return self._location_type + + @location_type.setter + def location_type(self, location_type): + """ + Sets the location_type of this LocationDetails. + Possible object storage location types + + + :param location_type: The location_type of this LocationDetails. + :type: str + """ + allowed_values = ["OBJECT_LIST"] + if not value_allowed_none_or_none_sentinel(location_type, allowed_values): + location_type = 'UNKNOWN_ENUM_VALUE' + self._location_type = location_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/object_list_dataset.py b/src/oci/ai_speech/models/object_list_dataset.py new file mode 100644 index 0000000000..b30e0169b1 --- /dev/null +++ b/src/oci/ai_speech/models/object_list_dataset.py @@ -0,0 +1,144 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .location_details import LocationDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectListDataset(LocationDetails): + """ + Data source details for object storage + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectListDataset object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.ObjectListDataset.location_type` attribute + of this class is ``OBJECT_LIST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param location_type: + The value to assign to the location_type property of this ObjectListDataset. + Allowed values for this property are: "OBJECT_LIST" + :type location_type: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectListDataset. + :type bucket_name: str + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectListDataset. + :type namespace_name: str + + :param object_names: + The value to assign to the object_names property of this ObjectListDataset. + :type object_names: list[str] + + """ + self.swagger_types = { + 'location_type': 'str', + 'bucket_name': 'str', + 'namespace_name': 'str', + 'object_names': 'list[str]' + } + + self.attribute_map = { + 'location_type': 'locationType', + 'bucket_name': 'bucketName', + 'namespace_name': 'namespaceName', + 'object_names': 'objectNames' + } + + self._location_type = None + self._bucket_name = None + self._namespace_name = None + self._object_names = None + self._location_type = 'OBJECT_LIST' + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectListDataset. + Object storage bucket name + + + :return: The bucket_name of this ObjectListDataset. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectListDataset. + Object storage bucket name + + + :param bucket_name: The bucket_name of this ObjectListDataset. + :type: str + """ + self._bucket_name = bucket_name + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectListDataset. + Object storage namespace + + + :return: The namespace_name of this ObjectListDataset. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectListDataset. + Object storage namespace + + + :param namespace_name: The namespace_name of this ObjectListDataset. + :type: str + """ + self._namespace_name = namespace_name + + @property + def object_names(self): + """ + **[Required]** Gets the object_names of this ObjectListDataset. + Array of files (minimum 1, maximum 1024) which need to be processed in the bucket + + + :return: The object_names of this ObjectListDataset. + :rtype: list[str] + """ + return self._object_names + + @object_names.setter + def object_names(self, object_names): + """ + Sets the object_names of this ObjectListDataset. + Array of files (minimum 1, maximum 1024) which need to be processed in the bucket + + + :param object_names: The object_names of this ObjectListDataset. + :type: list[str] + """ + self._object_names = object_names + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/object_storage_dataset.py b/src/oci/ai_speech/models/object_storage_dataset.py new file mode 100644 index 0000000000..929c2d0063 --- /dev/null +++ b/src/oci/ai_speech/models/object_storage_dataset.py @@ -0,0 +1,109 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .customization_dataset_details import CustomizationDatasetDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectStorageDataset(CustomizationDatasetDetails): + """ + Object Storage Dataset + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStorageDataset object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.ObjectStorageDataset.dataset_type` attribute + of this class is ``OBJECT_STORAGE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dataset_type: + The value to assign to the dataset_type property of this ObjectStorageDataset. + Allowed values for this property are: "OBJECT_STORAGE", "ENTITY_LIST" + :type dataset_type: str + + :param entity_type: + The value to assign to the entity_type property of this ObjectStorageDataset. + :type entity_type: str + + :param location_details: + The value to assign to the location_details property of this ObjectStorageDataset. + :type location_details: oci.ai_speech.models.LocationDetails + + """ + self.swagger_types = { + 'dataset_type': 'str', + 'entity_type': 'str', + 'location_details': 'LocationDetails' + } + + self.attribute_map = { + 'dataset_type': 'datasetType', + 'entity_type': 'entityType', + 'location_details': 'locationDetails' + } + + self._dataset_type = None + self._entity_type = None + self._location_details = None + self._dataset_type = 'OBJECT_STORAGE' + + @property + def entity_type(self): + """ + Gets the entity_type of this ObjectStorageDataset. + Entity Type categorizing the following list of words. + + + :return: The entity_type of this ObjectStorageDataset. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this ObjectStorageDataset. + Entity Type categorizing the following list of words. + + + :param entity_type: The entity_type of this ObjectStorageDataset. + :type: str + """ + self._entity_type = entity_type + + @property + def location_details(self): + """ + **[Required]** Gets the location_details of this ObjectStorageDataset. + + :return: The location_details of this ObjectStorageDataset. + :rtype: oci.ai_speech.models.LocationDetails + """ + return self._location_details + + @location_details.setter + def location_details(self, location_details): + """ + Sets the location_details of this ObjectStorageDataset. + + :param location_details: The location_details of this ObjectStorageDataset. + :type: oci.ai_speech.models.LocationDetails + """ + self._location_details = location_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/pronunciation.py b/src/oci/ai_speech/models/pronunciation.py new file mode 100644 index 0000000000..b957879b09 --- /dev/null +++ b/src/oci/ai_speech/models/pronunciation.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Pronunciation(object): + """ + Pronunciation Object Reference + """ + + def __init__(self, **kwargs): + """ + Initializes a new Pronunciation object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param sounds_like: + The value to assign to the sounds_like property of this Pronunciation. + :type sounds_like: str + + :param audio: + The value to assign to the audio property of this Pronunciation. + :type audio: oci.ai_speech.models.LocationDetails + + """ + self.swagger_types = { + 'sounds_like': 'str', + 'audio': 'LocationDetails' + } + + self.attribute_map = { + 'sounds_like': 'soundsLike', + 'audio': 'audio' + } + + self._sounds_like = None + self._audio = None + + @property + def sounds_like(self): + """ + Gets the sounds_like of this Pronunciation. + Written phonetic representation of entity value + + + :return: The sounds_like of this Pronunciation. + :rtype: str + """ + return self._sounds_like + + @sounds_like.setter + def sounds_like(self, sounds_like): + """ + Sets the sounds_like of this Pronunciation. + Written phonetic representation of entity value + + + :param sounds_like: The sounds_like of this Pronunciation. + :type: str + """ + self._sounds_like = sounds_like + + @property + def audio(self): + """ + Gets the audio of this Pronunciation. + + :return: The audio of this Pronunciation. + :rtype: oci.ai_speech.models.LocationDetails + """ + return self._audio + + @audio.setter + def audio(self, audio): + """ + Sets the audio of this Pronunciation. + + :param audio: The audio of this Pronunciation. + :type: oci.ai_speech.models.LocationDetails + """ + self._audio = audio + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message.py b/src/oci/ai_speech/models/realtime_message.py new file mode 100644 index 0000000000..2666554a4f --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message.py @@ -0,0 +1,168 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessage(object): + """ + Websocket messages sent between client and service. + """ + + #: A constant which can be used with the event property of a RealtimeMessage. + #: This constant has a value of "RESULT" + EVENT_RESULT = "RESULT" + + #: A constant which can be used with the event property of a RealtimeMessage. + #: This constant has a value of "ACKAUDIO" + EVENT_ACKAUDIO = "ACKAUDIO" + + #: A constant which can be used with the event property of a RealtimeMessage. + #: This constant has a value of "ERROR" + EVENT_ERROR = "ERROR" + + #: A constant which can be used with the event property of a RealtimeMessage. + #: This constant has a value of "CONNECT" + EVENT_CONNECT = "CONNECT" + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessage object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.ai_speech.models.RealtimeMessageError` + * :class:`~oci.ai_speech.models.RealtimeMessageAckAudio` + * :class:`~oci.ai_speech.models.RealtimeMessageConnect` + * :class:`~oci.ai_speech.models.RealtimeMessageResult` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param event: + The value to assign to the event property of this RealtimeMessage. + Allowed values for this property are: "RESULT", "ACKAUDIO", "ERROR", "CONNECT" + :type event: str + + :param session_id: + The value to assign to the session_id property of this RealtimeMessage. + :type session_id: str + + """ + self.swagger_types = { + 'event': 'str', + 'session_id': 'str' + } + + self.attribute_map = { + 'event': 'event', + 'session_id': 'sessionId' + } + + self._event = None + self._session_id = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['event'] + + if type == 'ERROR': + return 'RealtimeMessageError' + + if type == 'ACKAUDIO': + return 'RealtimeMessageAckAudio' + + if type == 'CONNECT': + return 'RealtimeMessageConnect' + + if type == 'RESULT': + return 'RealtimeMessageResult' + else: + return 'RealtimeMessage' + + @property + def event(self): + """ + **[Required]** Gets the event of this RealtimeMessage. + Incoming Types of message event sent from Service -> Client + - RESULT - result + - ACKAUDIO - ackAudio + - ERROR - error + - CONNECT - connect + Outgoing Types of message event sent from Client -> Service + - SEND_FINAL_RESULT - sendFinalResult + + Allowed values for this property are: "RESULT", "ACKAUDIO", "ERROR", "CONNECT" + + + :return: The event of this RealtimeMessage. + :rtype: str + """ + return self._event + + @event.setter + def event(self, event): + """ + Sets the event of this RealtimeMessage. + Incoming Types of message event sent from Service -> Client + - RESULT - result + - ACKAUDIO - ackAudio + - ERROR - error + - CONNECT - connect + Outgoing Types of message event sent from Client -> Service + - SEND_FINAL_RESULT - sendFinalResult + + + :param event: The event of this RealtimeMessage. + :type: str + """ + allowed_values = ["RESULT", "ACKAUDIO", "ERROR", "CONNECT"] + if not value_allowed_none_or_none_sentinel(event, allowed_values): + raise ValueError( + f"Invalid value for `event`, must be None or one of {allowed_values}" + ) + self._event = event + + @property + def session_id(self): + """ + Gets the session_id of this RealtimeMessage. + Session ID for the connected session. + + + :return: The session_id of this RealtimeMessage. + :rtype: str + """ + return self._session_id + + @session_id.setter + def session_id(self, session_id): + """ + Sets the session_id of this RealtimeMessage. + Session ID for the connected session. + + + :param session_id: The session_id of this RealtimeMessage. + :type: str + """ + self._session_id = session_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_ack_audio.py b/src/oci/ai_speech/models/realtime_message_ack_audio.py new file mode 100644 index 0000000000..3813c0819a --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_ack_audio.py @@ -0,0 +1,85 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .realtime_message import RealtimeMessage +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageAckAudio(RealtimeMessage): + """ + The websocket ack message received from service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageAckAudio object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.RealtimeMessageAckAudio.event` attribute + of this class is ``ACKAUDIO`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param event: + The value to assign to the event property of this RealtimeMessageAckAudio. + Allowed values for this property are: "RESULT", "ACKAUDIO", "ERROR", "CONNECT" + :type event: str + + :param session_id: + The value to assign to the session_id property of this RealtimeMessageAckAudio. + :type session_id: str + + :param details: + The value to assign to the details property of this RealtimeMessageAckAudio. + :type details: oci.ai_speech.models.RealtimeMessageAckAudioDetails + + """ + self.swagger_types = { + 'event': 'str', + 'session_id': 'str', + 'details': 'RealtimeMessageAckAudioDetails' + } + + self.attribute_map = { + 'event': 'event', + 'session_id': 'sessionId', + 'details': 'details' + } + + self._event = None + self._session_id = None + self._details = None + self._event = 'ACKAUDIO' + + @property + def details(self): + """ + **[Required]** Gets the details of this RealtimeMessageAckAudio. + + :return: The details of this RealtimeMessageAckAudio. + :rtype: oci.ai_speech.models.RealtimeMessageAckAudioDetails + """ + return self._details + + @details.setter + def details(self, details): + """ + Sets the details of this RealtimeMessageAckAudio. + + :param details: The details of this RealtimeMessageAckAudio. + :type: oci.ai_speech.models.RealtimeMessageAckAudioDetails + """ + self._details = details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_ack_audio_details.py b/src/oci/ai_speech/models/realtime_message_ack_audio_details.py new file mode 100644 index 0000000000..4210d14e69 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_ack_audio_details.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageAckAudioDetails(object): + """ + Details object for the websocket ack message received from service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageAckAudioDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param number: + The value to assign to the number property of this RealtimeMessageAckAudioDetails. + :type number: int + + :param offset: + The value to assign to the offset property of this RealtimeMessageAckAudioDetails. + :type offset: int + + :param length: + The value to assign to the length property of this RealtimeMessageAckAudioDetails. + :type length: int + + """ + self.swagger_types = { + 'number': 'int', + 'offset': 'int', + 'length': 'int' + } + + self.attribute_map = { + 'number': 'number', + 'offset': 'offset', + 'length': 'length' + } + + self._number = None + self._offset = None + self._length = None + + @property + def number(self): + """ + **[Required]** Gets the number of this RealtimeMessageAckAudioDetails. + Sequence number of the acknowledged packet. + + + :return: The number of this RealtimeMessageAckAudioDetails. + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """ + Sets the number of this RealtimeMessageAckAudioDetails. + Sequence number of the acknowledged packet. + + + :param number: The number of this RealtimeMessageAckAudioDetails. + :type: int + """ + self._number = number + + @property + def offset(self): + """ + **[Required]** Gets the offset of this RealtimeMessageAckAudioDetails. + Offset of the acknowledged packet. + + + :return: The offset of this RealtimeMessageAckAudioDetails. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """ + Sets the offset of this RealtimeMessageAckAudioDetails. + Offset of the acknowledged packet. + + + :param offset: The offset of this RealtimeMessageAckAudioDetails. + :type: int + """ + self._offset = offset + + @property + def length(self): + """ + **[Required]** Gets the length of this RealtimeMessageAckAudioDetails. + Length in bytes of the acknowledged packet. + + + :return: The length of this RealtimeMessageAckAudioDetails. + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """ + Sets the length of this RealtimeMessageAckAudioDetails. + Length in bytes of the acknowledged packet. + + + :param length: The length of this RealtimeMessageAckAudioDetails. + :type: int + """ + self._length = length + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_authentication.py b/src/oci/ai_speech/models/realtime_message_authentication.py new file mode 100644 index 0000000000..a5d0bf8539 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_authentication.py @@ -0,0 +1,140 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageAuthentication(object): + """ + The payload for authentication. + """ + + #: A constant which can be used with the authentication_type property of a RealtimeMessageAuthentication. + #: This constant has a value of "CREDENTIALS" + AUTHENTICATION_TYPE_CREDENTIALS = "CREDENTIALS" + + #: A constant which can be used with the authentication_type property of a RealtimeMessageAuthentication. + #: This constant has a value of "TOKEN" + AUTHENTICATION_TYPE_TOKEN = "TOKEN" + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageAuthentication object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.ai_speech.models.RealtimeMessageAuthenticationToken` + * :class:`~oci.ai_speech.models.RealtimeMessageAuthenticationCredentials` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param authentication_type: + The value to assign to the authentication_type property of this RealtimeMessageAuthentication. + Allowed values for this property are: "CREDENTIALS", "TOKEN" + :type authentication_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this RealtimeMessageAuthentication. + :type compartment_id: str + + """ + self.swagger_types = { + 'authentication_type': 'str', + 'compartment_id': 'str' + } + + self.attribute_map = { + 'authentication_type': 'authenticationType', + 'compartment_id': 'compartmentId' + } + + self._authentication_type = None + self._compartment_id = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['authenticationType'] + + if type == 'TOKEN': + return 'RealtimeMessageAuthenticationToken' + + if type == 'CREDENTIALS': + return 'RealtimeMessageAuthenticationCredentials' + else: + return 'RealtimeMessageAuthentication' + + @property + def authentication_type(self): + """ + **[Required]** Gets the authentication_type of this RealtimeMessageAuthentication. + Type of authentication method to be used. + + Allowed values for this property are: "CREDENTIALS", "TOKEN" + + + :return: The authentication_type of this RealtimeMessageAuthentication. + :rtype: str + """ + return self._authentication_type + + @authentication_type.setter + def authentication_type(self, authentication_type): + """ + Sets the authentication_type of this RealtimeMessageAuthentication. + Type of authentication method to be used. + + + :param authentication_type: The authentication_type of this RealtimeMessageAuthentication. + :type: str + """ + allowed_values = ["CREDENTIALS", "TOKEN"] + if not value_allowed_none_or_none_sentinel(authentication_type, allowed_values): + raise ValueError( + f"Invalid value for `authentication_type`, must be None or one of {allowed_values}" + ) + self._authentication_type = authentication_type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this RealtimeMessageAuthentication. + Compartment ID to be used for authentication/authorization. + + + :return: The compartment_id of this RealtimeMessageAuthentication. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this RealtimeMessageAuthentication. + Compartment ID to be used for authentication/authorization. + + + :param compartment_id: The compartment_id of this RealtimeMessageAuthentication. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_authentication_credentials.py b/src/oci/ai_speech/models/realtime_message_authentication_credentials.py new file mode 100644 index 0000000000..2b37ef86b5 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_authentication_credentials.py @@ -0,0 +1,89 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .realtime_message_authentication import RealtimeMessageAuthentication +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageAuthenticationCredentials(RealtimeMessageAuthentication): + """ + The payload for credential-based authentication. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageAuthenticationCredentials object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.RealtimeMessageAuthenticationCredentials.authentication_type` attribute + of this class is ``CREDENTIALS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param authentication_type: + The value to assign to the authentication_type property of this RealtimeMessageAuthenticationCredentials. + Allowed values for this property are: "CREDENTIALS", "TOKEN" + :type authentication_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this RealtimeMessageAuthenticationCredentials. + :type compartment_id: str + + :param headers: + The value to assign to the headers property of this RealtimeMessageAuthenticationCredentials. + :type headers: dict(str, str) + + """ + self.swagger_types = { + 'authentication_type': 'str', + 'compartment_id': 'str', + 'headers': 'dict(str, str)' + } + + self.attribute_map = { + 'authentication_type': 'authenticationType', + 'compartment_id': 'compartmentId', + 'headers': 'headers' + } + + self._authentication_type = None + self._compartment_id = None + self._headers = None + self._authentication_type = 'CREDENTIALS' + + @property + def headers(self): + """ + **[Required]** Gets the headers of this RealtimeMessageAuthenticationCredentials. + The signed request header object. + + + :return: The headers of this RealtimeMessageAuthenticationCredentials. + :rtype: dict(str, str) + """ + return self._headers + + @headers.setter + def headers(self, headers): + """ + Sets the headers of this RealtimeMessageAuthenticationCredentials. + The signed request header object. + + + :param headers: The headers of this RealtimeMessageAuthenticationCredentials. + :type: dict(str, str) + """ + self._headers = headers + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_authentication_token.py b/src/oci/ai_speech/models/realtime_message_authentication_token.py new file mode 100644 index 0000000000..f84191cbc5 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_authentication_token.py @@ -0,0 +1,89 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .realtime_message_authentication import RealtimeMessageAuthentication +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageAuthenticationToken(RealtimeMessageAuthentication): + """ + The payload for JWT based authentication. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageAuthenticationToken object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.RealtimeMessageAuthenticationToken.authentication_type` attribute + of this class is ``TOKEN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param authentication_type: + The value to assign to the authentication_type property of this RealtimeMessageAuthenticationToken. + Allowed values for this property are: "CREDENTIALS", "TOKEN" + :type authentication_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this RealtimeMessageAuthenticationToken. + :type compartment_id: str + + :param token: + The value to assign to the token property of this RealtimeMessageAuthenticationToken. + :type token: str + + """ + self.swagger_types = { + 'authentication_type': 'str', + 'compartment_id': 'str', + 'token': 'str' + } + + self.attribute_map = { + 'authentication_type': 'authenticationType', + 'compartment_id': 'compartmentId', + 'token': 'token' + } + + self._authentication_type = None + self._compartment_id = None + self._token = None + self._authentication_type = 'TOKEN' + + @property + def token(self): + """ + **[Required]** Gets the token of this RealtimeMessageAuthenticationToken. + The token (JWT) obtained from the realtime transcription session endpoint. + + + :return: The token of this RealtimeMessageAuthenticationToken. + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """ + Sets the token of this RealtimeMessageAuthenticationToken. + The token (JWT) obtained from the realtime transcription session endpoint. + + + :param token: The token of this RealtimeMessageAuthenticationToken. + :type: str + """ + self._token = token + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_connect.py b/src/oci/ai_speech/models/realtime_message_connect.py new file mode 100644 index 0000000000..7271f47edb --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_connect.py @@ -0,0 +1,58 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .realtime_message import RealtimeMessage +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageConnect(RealtimeMessage): + """ + The websocket connection message received from service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageConnect object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.RealtimeMessageConnect.event` attribute + of this class is ``CONNECT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param event: + The value to assign to the event property of this RealtimeMessageConnect. + Allowed values for this property are: "RESULT", "ACKAUDIO", "ERROR", "CONNECT" + :type event: str + + :param session_id: + The value to assign to the session_id property of this RealtimeMessageConnect. + :type session_id: str + + """ + self.swagger_types = { + 'event': 'str', + 'session_id': 'str' + } + + self.attribute_map = { + 'event': 'event', + 'session_id': 'sessionId' + } + + self._event = None + self._session_id = None + self._event = 'CONNECT' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_error.py b/src/oci/ai_speech/models/realtime_message_error.py new file mode 100644 index 0000000000..8522013cd3 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_error.py @@ -0,0 +1,120 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .realtime_message import RealtimeMessage +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageError(RealtimeMessage): + """ + The websocket error message received from service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageError object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.RealtimeMessageError.event` attribute + of this class is ``ERROR`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param event: + The value to assign to the event property of this RealtimeMessageError. + Allowed values for this property are: "RESULT", "ACKAUDIO", "ERROR", "CONNECT" + :type event: str + + :param session_id: + The value to assign to the session_id property of this RealtimeMessageError. + :type session_id: str + + :param code: + The value to assign to the code property of this RealtimeMessageError. + :type code: int + + :param message: + The value to assign to the message property of this RealtimeMessageError. + :type message: str + + """ + self.swagger_types = { + 'event': 'str', + 'session_id': 'str', + 'code': 'int', + 'message': 'str' + } + + self.attribute_map = { + 'event': 'event', + 'session_id': 'sessionId', + 'code': 'code', + 'message': 'message' + } + + self._event = None + self._session_id = None + self._code = None + self._message = None + self._event = 'ERROR' + + @property + def code(self): + """ + **[Required]** Gets the code of this RealtimeMessageError. + Error code. + + + :return: The code of this RealtimeMessageError. + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this RealtimeMessageError. + Error code. + + + :param code: The code of this RealtimeMessageError. + :type: int + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this RealtimeMessageError. + Error message. + + + :return: The message of this RealtimeMessageError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this RealtimeMessageError. + Error message. + + + :param message: The message of this RealtimeMessageError. + :type: str + """ + self._message = message + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_out.py b/src/oci/ai_speech/models/realtime_message_out.py new file mode 100644 index 0000000000..b751d06549 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_out.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageOut(object): + """ + Websocket messages sent by client to the service. + """ + + #: A constant which can be used with the event property of a RealtimeMessageOut. + #: This constant has a value of "SEND_FINAL_RESULT" + EVENT_SEND_FINAL_RESULT = "SEND_FINAL_RESULT" + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageOut object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.ai_speech.models.RealtimeMessageSendFinalResult` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param event: + The value to assign to the event property of this RealtimeMessageOut. + Allowed values for this property are: "SEND_FINAL_RESULT" + :type event: str + + """ + self.swagger_types = { + 'event': 'str' + } + + self.attribute_map = { + 'event': 'event' + } + + self._event = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['event'] + + if type == 'SEND_FINAL_RESULT': + return 'RealtimeMessageSendFinalResult' + else: + return 'RealtimeMessageOut' + + @property + def event(self): + """ + **[Required]** Gets the event of this RealtimeMessageOut. + Outgoing Types of message event sent from Client -> Service + - SEND_FINAL_RESULT - sendFinalResult + + Allowed values for this property are: "SEND_FINAL_RESULT" + + + :return: The event of this RealtimeMessageOut. + :rtype: str + """ + return self._event + + @event.setter + def event(self, event): + """ + Sets the event of this RealtimeMessageOut. + Outgoing Types of message event sent from Client -> Service + - SEND_FINAL_RESULT - sendFinalResult + + + :param event: The event of this RealtimeMessageOut. + :type: str + """ + allowed_values = ["SEND_FINAL_RESULT"] + if not value_allowed_none_or_none_sentinel(event, allowed_values): + raise ValueError( + f"Invalid value for `event`, must be None or one of {allowed_values}" + ) + self._event = event + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_result.py b/src/oci/ai_speech/models/realtime_message_result.py new file mode 100644 index 0000000000..e1a755b5ae --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_result.py @@ -0,0 +1,89 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .realtime_message import RealtimeMessage +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageResult(RealtimeMessage): + """ + The websocket result message received from service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageResult object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.RealtimeMessageResult.event` attribute + of this class is ``RESULT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param event: + The value to assign to the event property of this RealtimeMessageResult. + Allowed values for this property are: "RESULT", "ACKAUDIO", "ERROR", "CONNECT" + :type event: str + + :param session_id: + The value to assign to the session_id property of this RealtimeMessageResult. + :type session_id: str + + :param transcriptions: + The value to assign to the transcriptions property of this RealtimeMessageResult. + :type transcriptions: list[oci.ai_speech.models.RealtimeMessageResultTranscription] + + """ + self.swagger_types = { + 'event': 'str', + 'session_id': 'str', + 'transcriptions': 'list[RealtimeMessageResultTranscription]' + } + + self.attribute_map = { + 'event': 'event', + 'session_id': 'sessionId', + 'transcriptions': 'transcriptions' + } + + self._event = None + self._session_id = None + self._transcriptions = None + self._event = 'RESULT' + + @property + def transcriptions(self): + """ + **[Required]** Gets the transcriptions of this RealtimeMessageResult. + List of transcription objects. + + + :return: The transcriptions of this RealtimeMessageResult. + :rtype: list[oci.ai_speech.models.RealtimeMessageResultTranscription] + """ + return self._transcriptions + + @transcriptions.setter + def transcriptions(self, transcriptions): + """ + Sets the transcriptions of this RealtimeMessageResult. + List of transcription objects. + + + :param transcriptions: The transcriptions of this RealtimeMessageResult. + :type: list[oci.ai_speech.models.RealtimeMessageResultTranscription] + """ + self._transcriptions = transcriptions + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_result_transcription.py b/src/oci/ai_speech/models/realtime_message_result_transcription.py new file mode 100644 index 0000000000..01b7f97355 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_result_transcription.py @@ -0,0 +1,258 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageResultTranscription(object): + """ + Transcription object. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageResultTranscription object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param transcription: + The value to assign to the transcription property of this RealtimeMessageResultTranscription. + :type transcription: str + + :param is_final: + The value to assign to the is_final property of this RealtimeMessageResultTranscription. + :type is_final: bool + + :param start_time_in_ms: + The value to assign to the start_time_in_ms property of this RealtimeMessageResultTranscription. + :type start_time_in_ms: int + + :param end_time_in_ms: + The value to assign to the end_time_in_ms property of this RealtimeMessageResultTranscription. + :type end_time_in_ms: int + + :param confidence: + The value to assign to the confidence property of this RealtimeMessageResultTranscription. + :type confidence: float + + :param trailing_silence: + The value to assign to the trailing_silence property of this RealtimeMessageResultTranscription. + :type trailing_silence: int + + :param tokens: + The value to assign to the tokens property of this RealtimeMessageResultTranscription. + :type tokens: list[oci.ai_speech.models.RealtimeMessageResultTranscriptionToken] + + """ + self.swagger_types = { + 'transcription': 'str', + 'is_final': 'bool', + 'start_time_in_ms': 'int', + 'end_time_in_ms': 'int', + 'confidence': 'float', + 'trailing_silence': 'int', + 'tokens': 'list[RealtimeMessageResultTranscriptionToken]' + } + + self.attribute_map = { + 'transcription': 'transcription', + 'is_final': 'isFinal', + 'start_time_in_ms': 'startTimeInMs', + 'end_time_in_ms': 'endTimeInMs', + 'confidence': 'confidence', + 'trailing_silence': 'trailingSilence', + 'tokens': 'tokens' + } + + self._transcription = None + self._is_final = None + self._start_time_in_ms = None + self._end_time_in_ms = None + self._confidence = None + self._trailing_silence = None + self._tokens = None + + @property + def transcription(self): + """ + **[Required]** Gets the transcription of this RealtimeMessageResultTranscription. + Transcription text. + + + :return: The transcription of this RealtimeMessageResultTranscription. + :rtype: str + """ + return self._transcription + + @transcription.setter + def transcription(self, transcription): + """ + Sets the transcription of this RealtimeMessageResultTranscription. + Transcription text. + + + :param transcription: The transcription of this RealtimeMessageResultTranscription. + :type: str + """ + self._transcription = transcription + + @property + def is_final(self): + """ + **[Required]** Gets the is_final of this RealtimeMessageResultTranscription. + Whether the transcription is final or partial. + + + :return: The is_final of this RealtimeMessageResultTranscription. + :rtype: bool + """ + return self._is_final + + @is_final.setter + def is_final(self, is_final): + """ + Sets the is_final of this RealtimeMessageResultTranscription. + Whether the transcription is final or partial. + + + :param is_final: The is_final of this RealtimeMessageResultTranscription. + :type: bool + """ + self._is_final = is_final + + @property + def start_time_in_ms(self): + """ + **[Required]** Gets the start_time_in_ms of this RealtimeMessageResultTranscription. + Start time in milliseconds for the transcription text. + + + :return: The start_time_in_ms of this RealtimeMessageResultTranscription. + :rtype: int + """ + return self._start_time_in_ms + + @start_time_in_ms.setter + def start_time_in_ms(self, start_time_in_ms): + """ + Sets the start_time_in_ms of this RealtimeMessageResultTranscription. + Start time in milliseconds for the transcription text. + + + :param start_time_in_ms: The start_time_in_ms of this RealtimeMessageResultTranscription. + :type: int + """ + self._start_time_in_ms = start_time_in_ms + + @property + def end_time_in_ms(self): + """ + **[Required]** Gets the end_time_in_ms of this RealtimeMessageResultTranscription. + End time in milliseconds for the transcription text. + + + :return: The end_time_in_ms of this RealtimeMessageResultTranscription. + :rtype: int + """ + return self._end_time_in_ms + + @end_time_in_ms.setter + def end_time_in_ms(self, end_time_in_ms): + """ + Sets the end_time_in_ms of this RealtimeMessageResultTranscription. + End time in milliseconds for the transcription text. + + + :param end_time_in_ms: The end_time_in_ms of this RealtimeMessageResultTranscription. + :type: int + """ + self._end_time_in_ms = end_time_in_ms + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this RealtimeMessageResultTranscription. + Confidence for the transcription text. + + + :return: The confidence of this RealtimeMessageResultTranscription. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this RealtimeMessageResultTranscription. + Confidence for the transcription text. + + + :param confidence: The confidence of this RealtimeMessageResultTranscription. + :type: float + """ + self._confidence = confidence + + @property + def trailing_silence(self): + """ + **[Required]** Gets the trailing_silence of this RealtimeMessageResultTranscription. + Trailing silence after the transcription text. + + + :return: The trailing_silence of this RealtimeMessageResultTranscription. + :rtype: int + """ + return self._trailing_silence + + @trailing_silence.setter + def trailing_silence(self, trailing_silence): + """ + Sets the trailing_silence of this RealtimeMessageResultTranscription. + Trailing silence after the transcription text. + + + :param trailing_silence: The trailing_silence of this RealtimeMessageResultTranscription. + :type: int + """ + self._trailing_silence = trailing_silence + + @property + def tokens(self): + """ + **[Required]** Gets the tokens of this RealtimeMessageResultTranscription. + Array of individual transcription tokens. + + + :return: The tokens of this RealtimeMessageResultTranscription. + :rtype: list[oci.ai_speech.models.RealtimeMessageResultTranscriptionToken] + """ + return self._tokens + + @tokens.setter + def tokens(self, tokens): + """ + Sets the tokens of this RealtimeMessageResultTranscription. + Array of individual transcription tokens. + + + :param tokens: The tokens of this RealtimeMessageResultTranscription. + :type: list[oci.ai_speech.models.RealtimeMessageResultTranscriptionToken] + """ + self._tokens = tokens + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_result_transcription_token.py b/src/oci/ai_speech/models/realtime_message_result_transcription_token.py new file mode 100644 index 0000000000..620891dcf5 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_result_transcription_token.py @@ -0,0 +1,212 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageResultTranscriptionToken(object): + """ + Individual transcription tokens. + """ + + #: A constant which can be used with the type property of a RealtimeMessageResultTranscriptionToken. + #: This constant has a value of "WORD" + TYPE_WORD = "WORD" + + #: A constant which can be used with the type property of a RealtimeMessageResultTranscriptionToken. + #: This constant has a value of "PUNCTUATION" + TYPE_PUNCTUATION = "PUNCTUATION" + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageResultTranscriptionToken object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param token: + The value to assign to the token property of this RealtimeMessageResultTranscriptionToken. + :type token: str + + :param start_time_in_ms: + The value to assign to the start_time_in_ms property of this RealtimeMessageResultTranscriptionToken. + :type start_time_in_ms: int + + :param end_time_in_ms: + The value to assign to the end_time_in_ms property of this RealtimeMessageResultTranscriptionToken. + :type end_time_in_ms: int + + :param confidence: + The value to assign to the confidence property of this RealtimeMessageResultTranscriptionToken. + :type confidence: float + + :param type: + The value to assign to the type property of this RealtimeMessageResultTranscriptionToken. + Allowed values for this property are: "WORD", "PUNCTUATION" + :type type: str + + """ + self.swagger_types = { + 'token': 'str', + 'start_time_in_ms': 'int', + 'end_time_in_ms': 'int', + 'confidence': 'float', + 'type': 'str' + } + + self.attribute_map = { + 'token': 'token', + 'start_time_in_ms': 'startTimeInMs', + 'end_time_in_ms': 'endTimeInMs', + 'confidence': 'confidence', + 'type': 'type' + } + + self._token = None + self._start_time_in_ms = None + self._end_time_in_ms = None + self._confidence = None + self._type = None + + @property + def token(self): + """ + **[Required]** Gets the token of this RealtimeMessageResultTranscriptionToken. + Transcription token. + + + :return: The token of this RealtimeMessageResultTranscriptionToken. + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """ + Sets the token of this RealtimeMessageResultTranscriptionToken. + Transcription token. + + + :param token: The token of this RealtimeMessageResultTranscriptionToken. + :type: str + """ + self._token = token + + @property + def start_time_in_ms(self): + """ + **[Required]** Gets the start_time_in_ms of this RealtimeMessageResultTranscriptionToken. + Start time in milliseconds for the transcription token. + + + :return: The start_time_in_ms of this RealtimeMessageResultTranscriptionToken. + :rtype: int + """ + return self._start_time_in_ms + + @start_time_in_ms.setter + def start_time_in_ms(self, start_time_in_ms): + """ + Sets the start_time_in_ms of this RealtimeMessageResultTranscriptionToken. + Start time in milliseconds for the transcription token. + + + :param start_time_in_ms: The start_time_in_ms of this RealtimeMessageResultTranscriptionToken. + :type: int + """ + self._start_time_in_ms = start_time_in_ms + + @property + def end_time_in_ms(self): + """ + **[Required]** Gets the end_time_in_ms of this RealtimeMessageResultTranscriptionToken. + End time in milliseconds for the transcription token. + + + :return: The end_time_in_ms of this RealtimeMessageResultTranscriptionToken. + :rtype: int + """ + return self._end_time_in_ms + + @end_time_in_ms.setter + def end_time_in_ms(self, end_time_in_ms): + """ + Sets the end_time_in_ms of this RealtimeMessageResultTranscriptionToken. + End time in milliseconds for the transcription token. + + + :param end_time_in_ms: The end_time_in_ms of this RealtimeMessageResultTranscriptionToken. + :type: int + """ + self._end_time_in_ms = end_time_in_ms + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this RealtimeMessageResultTranscriptionToken. + Confidence score for the transcription token. + + + :return: The confidence of this RealtimeMessageResultTranscriptionToken. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this RealtimeMessageResultTranscriptionToken. + Confidence score for the transcription token. + + + :param confidence: The confidence of this RealtimeMessageResultTranscriptionToken. + :type: float + """ + self._confidence = confidence + + @property + def type(self): + """ + **[Required]** Gets the type of this RealtimeMessageResultTranscriptionToken. + Type of the transcription token. + + Allowed values for this property are: "WORD", "PUNCTUATION" + + + :return: The type of this RealtimeMessageResultTranscriptionToken. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this RealtimeMessageResultTranscriptionToken. + Type of the transcription token. + + + :param type: The type of this RealtimeMessageResultTranscriptionToken. + :type: str + """ + allowed_values = ["WORD", "PUNCTUATION"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + raise ValueError( + f"Invalid value for `type`, must be None or one of {allowed_values}" + ) + self._type = type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_message_send_final_result.py b/src/oci/ai_speech/models/realtime_message_send_final_result.py new file mode 100644 index 0000000000..b29feb8e37 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_message_send_final_result.py @@ -0,0 +1,51 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + +from .realtime_message_out import RealtimeMessageOut +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeMessageSendFinalResult(RealtimeMessageOut): + """ + Tell service to send final result + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeMessageSendFinalResult object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_speech.models.RealtimeMessageSendFinalResult.event` attribute + of this class is ``SEND_FINAL_RESULT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param event: + The value to assign to the event property of this RealtimeMessageSendFinalResult. + Allowed values for this property are: "SEND_FINAL_RESULT" + :type event: str + + """ + self.swagger_types = { + 'event': 'str' + } + + self.attribute_map = { + 'event': 'event' + } + + self._event = None + self._event = 'SEND_FINAL_RESULT' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_model_details.py b/src/oci/ai_speech/models/realtime_model_details.py new file mode 100644 index 0000000000..21e77ea1b2 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_model_details.py @@ -0,0 +1,139 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeModelDetails(object): + """ + Details of the ASR model used by the realtime speech service. + """ + + #: A constant which can be used with the domain property of a RealtimeModelDetails. + #: This constant has a value of "GENERIC" + DOMAIN_GENERIC = "GENERIC" + + #: A constant which can be used with the domain property of a RealtimeModelDetails. + #: This constant has a value of "MEDICAL" + DOMAIN_MEDICAL = "MEDICAL" + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param domain: + The value to assign to the domain property of this RealtimeModelDetails. + Allowed values for this property are: "GENERIC", "MEDICAL" + :type domain: str + + :param language_code: + The value to assign to the language_code property of this RealtimeModelDetails. + :type language_code: str + + """ + self.swagger_types = { + 'domain': 'str', + 'language_code': 'str' + } + + self.attribute_map = { + 'domain': 'domain', + 'language_code': 'languageCode' + } + + self._domain = None + self._language_code = None + + @property + def domain(self): + """ + Gets the domain of this RealtimeModelDetails. + Model Domain. + + Allowed values for this property are: "GENERIC", "MEDICAL" + + + :return: The domain of this RealtimeModelDetails. + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """ + Sets the domain of this RealtimeModelDetails. + Model Domain. + + + :param domain: The domain of this RealtimeModelDetails. + :type: str + """ + allowed_values = ["GENERIC", "MEDICAL"] + if not value_allowed_none_or_none_sentinel(domain, allowed_values): + raise ValueError( + f"Invalid value for `domain`, must be None or one of {allowed_values}" + ) + self._domain = domain + + @property + def language_code(self): + """ + Gets the language_code of this RealtimeModelDetails. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + - en-US: English - United States + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - en-GB: English - Great Britain + - en-AU: English - Australia + - en-IN: English - India + - hi-IN: Hindi - India + - fr-FR: French - France + - de-DE: German - Germany + - it-IT: Italian - Italy + + + :return: The language_code of this RealtimeModelDetails. + :rtype: str + """ + return self._language_code + + @language_code.setter + def language_code(self, language_code): + """ + Sets the language_code of this RealtimeModelDetails. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + - en-US: English - United States + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - en-GB: English - Great Britain + - en-AU: English - Australia + - en-IN: English - India + - hi-IN: Hindi - India + - fr-FR: French - France + - de-DE: German - Germany + - it-IT: Italian - Italy + + + :param language_code: The language_code of this RealtimeModelDetails. + :type: str + """ + self._language_code = language_code + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_parameters.py b/src/oci/ai_speech/models/realtime_parameters.py new file mode 100644 index 0000000000..a6d4d4d738 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_parameters.py @@ -0,0 +1,390 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeParameters(object): + """ + Parameters to be sent to the realtime speech service over a websocket connection. + """ + + #: A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. + #: This constant has a value of "NONE" + STABILIZE_PARTIAL_RESULTS_NONE = "NONE" + + #: A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. + #: This constant has a value of "LOW" + STABILIZE_PARTIAL_RESULTS_LOW = "LOW" + + #: A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. + #: This constant has a value of "MEDIUM" + STABILIZE_PARTIAL_RESULTS_MEDIUM = "MEDIUM" + + #: A constant which can be used with the stabilize_partial_results property of a RealtimeParameters. + #: This constant has a value of "HIGH" + STABILIZE_PARTIAL_RESULTS_HIGH = "HIGH" + + #: A constant which can be used with the model_domain property of a RealtimeParameters. + #: This constant has a value of "GENERIC" + MODEL_DOMAIN_GENERIC = "GENERIC" + + #: A constant which can be used with the model_domain property of a RealtimeParameters. + #: This constant has a value of "MEDICAL" + MODEL_DOMAIN_MEDICAL = "MEDICAL" + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeParameters object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param encoding: + The value to assign to the encoding property of this RealtimeParameters. + :type encoding: str + + :param is_ack_enabled: + The value to assign to the is_ack_enabled property of this RealtimeParameters. + :type is_ack_enabled: bool + + :param partial_silence_threshold_in_ms: + The value to assign to the partial_silence_threshold_in_ms property of this RealtimeParameters. + :type partial_silence_threshold_in_ms: int + + :param final_silence_threshold_in_ms: + The value to assign to the final_silence_threshold_in_ms property of this RealtimeParameters. + :type final_silence_threshold_in_ms: int + + :param stabilize_partial_results: + The value to assign to the stabilize_partial_results property of this RealtimeParameters. + Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH" + :type stabilize_partial_results: str + + :param model_domain: + The value to assign to the model_domain property of this RealtimeParameters. + Allowed values for this property are: "GENERIC", "MEDICAL" + :type model_domain: str + + :param language_code: + The value to assign to the language_code property of this RealtimeParameters. + :type language_code: str + + :param should_ignore_invalid_customizations: + The value to assign to the should_ignore_invalid_customizations property of this RealtimeParameters. + :type should_ignore_invalid_customizations: bool + + :param customizations: + The value to assign to the customizations property of this RealtimeParameters. + :type customizations: list[oci.ai_speech.models.CustomizationInference] + + """ + self.swagger_types = { + 'encoding': 'str', + 'is_ack_enabled': 'bool', + 'partial_silence_threshold_in_ms': 'int', + 'final_silence_threshold_in_ms': 'int', + 'stabilize_partial_results': 'str', + 'model_domain': 'str', + 'language_code': 'str', + 'should_ignore_invalid_customizations': 'bool', + 'customizations': 'list[CustomizationInference]' + } + + self.attribute_map = { + 'encoding': 'encoding', + 'is_ack_enabled': 'isAckEnabled', + 'partial_silence_threshold_in_ms': 'partialSilenceThresholdInMs', + 'final_silence_threshold_in_ms': 'finalSilenceThresholdInMs', + 'stabilize_partial_results': 'stabilizePartialResults', + 'model_domain': 'modelDomain', + 'language_code': 'languageCode', + 'should_ignore_invalid_customizations': 'shouldIgnoreInvalidCustomizations', + 'customizations': 'customizations' + } + + self._encoding = None + self._is_ack_enabled = None + self._partial_silence_threshold_in_ms = None + self._final_silence_threshold_in_ms = None + self._stabilize_partial_results = None + self._model_domain = None + self._language_code = None + self._should_ignore_invalid_customizations = None + self._customizations = None + + @property + def encoding(self): + """ + Gets the encoding of this RealtimeParameters. + Audio encoding to use + - audio/raw;rate=16000 + - audio/raw;rate=8000 + - audio/raw;rate=8000;codec=mulaw + - audio/raw;rate=8000;codec=alaw + + + :return: The encoding of this RealtimeParameters. + :rtype: str + """ + return self._encoding + + @encoding.setter + def encoding(self, encoding): + """ + Sets the encoding of this RealtimeParameters. + Audio encoding to use + - audio/raw;rate=16000 + - audio/raw;rate=8000 + - audio/raw;rate=8000;codec=mulaw + - audio/raw;rate=8000;codec=alaw + + + :param encoding: The encoding of this RealtimeParameters. + :type: str + """ + self._encoding = encoding + + @property + def is_ack_enabled(self): + """ + Gets the is_ack_enabled of this RealtimeParameters. + Toggle for ack messages. + + + :return: The is_ack_enabled of this RealtimeParameters. + :rtype: bool + """ + return self._is_ack_enabled + + @is_ack_enabled.setter + def is_ack_enabled(self, is_ack_enabled): + """ + Sets the is_ack_enabled of this RealtimeParameters. + Toggle for ack messages. + + + :param is_ack_enabled: The is_ack_enabled of this RealtimeParameters. + :type: bool + """ + self._is_ack_enabled = is_ack_enabled + + @property + def partial_silence_threshold_in_ms(self): + """ + Gets the partial_silence_threshold_in_ms of this RealtimeParameters. + Silence threshold for Realtime Speech partial results in milliseconds. + + + :return: The partial_silence_threshold_in_ms of this RealtimeParameters. + :rtype: int + """ + return self._partial_silence_threshold_in_ms + + @partial_silence_threshold_in_ms.setter + def partial_silence_threshold_in_ms(self, partial_silence_threshold_in_ms): + """ + Sets the partial_silence_threshold_in_ms of this RealtimeParameters. + Silence threshold for Realtime Speech partial results in milliseconds. + + + :param partial_silence_threshold_in_ms: The partial_silence_threshold_in_ms of this RealtimeParameters. + :type: int + """ + self._partial_silence_threshold_in_ms = partial_silence_threshold_in_ms + + @property + def final_silence_threshold_in_ms(self): + """ + Gets the final_silence_threshold_in_ms of this RealtimeParameters. + Silence threshold for Realtime Speech final results in milliseconds. + + + :return: The final_silence_threshold_in_ms of this RealtimeParameters. + :rtype: int + """ + return self._final_silence_threshold_in_ms + + @final_silence_threshold_in_ms.setter + def final_silence_threshold_in_ms(self, final_silence_threshold_in_ms): + """ + Sets the final_silence_threshold_in_ms of this RealtimeParameters. + Silence threshold for Realtime Speech final results in milliseconds. + + + :param final_silence_threshold_in_ms: The final_silence_threshold_in_ms of this RealtimeParameters. + :type: int + """ + self._final_silence_threshold_in_ms = final_silence_threshold_in_ms + + @property + def stabilize_partial_results(self): + """ + Gets the stabilize_partial_results of this RealtimeParameters. + When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result + + Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH" + + + :return: The stabilize_partial_results of this RealtimeParameters. + :rtype: str + """ + return self._stabilize_partial_results + + @stabilize_partial_results.setter + def stabilize_partial_results(self, stabilize_partial_results): + """ + Sets the stabilize_partial_results of this RealtimeParameters. + When enabled sets the amount of confidence required for latest tokens before returning them as part of a new partial result + + + :param stabilize_partial_results: The stabilize_partial_results of this RealtimeParameters. + :type: str + """ + allowed_values = ["NONE", "LOW", "MEDIUM", "HIGH"] + if not value_allowed_none_or_none_sentinel(stabilize_partial_results, allowed_values): + raise ValueError( + f"Invalid value for `stabilize_partial_results`, must be None or one of {allowed_values}" + ) + self._stabilize_partial_results = stabilize_partial_results + + @property + def model_domain(self): + """ + Gets the model_domain of this RealtimeParameters. + Model Domain. + + Allowed values for this property are: "GENERIC", "MEDICAL" + + + :return: The model_domain of this RealtimeParameters. + :rtype: str + """ + return self._model_domain + + @model_domain.setter + def model_domain(self, model_domain): + """ + Sets the model_domain of this RealtimeParameters. + Model Domain. + + + :param model_domain: The model_domain of this RealtimeParameters. + :type: str + """ + allowed_values = ["GENERIC", "MEDICAL"] + if not value_allowed_none_or_none_sentinel(model_domain, allowed_values): + raise ValueError( + f"Invalid value for `model_domain`, must be None or one of {allowed_values}" + ) + self._model_domain = model_domain + + @property + def language_code(self): + """ + Gets the language_code of this RealtimeParameters. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + - en-US: English - United States + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - en-GB: English - Great Britain + - en-AU: English - Australia + - en-IN: English - India + - hi-IN: Hindi - India + - fr-FR: French - France + - de-DE: German - Germany + - it-IT: Italian - Italy + + + :return: The language_code of this RealtimeParameters. + :rtype: str + """ + return self._language_code + + @language_code.setter + def language_code(self, language_code): + """ + Sets the language_code of this RealtimeParameters. + Locale value as per given in [https://datatracker.ietf.org/doc/html/rfc5646]. + - en-US: English - United States + - es-ES: Spanish - Spain + - pt-BR: Portuguese - Brazil + - en-GB: English - Great Britain + - en-AU: English - Australia + - en-IN: English - India + - hi-IN: Hindi - India + - fr-FR: French - France + - de-DE: German - Germany + - it-IT: Italian - Italy + + + :param language_code: The language_code of this RealtimeParameters. + :type: str + """ + self._language_code = language_code + + @property + def should_ignore_invalid_customizations(self): + """ + Gets the should_ignore_invalid_customizations of this RealtimeParameters. + If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations. Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. + If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end. + + + :return: The should_ignore_invalid_customizations of this RealtimeParameters. + :rtype: bool + """ + return self._should_ignore_invalid_customizations + + @should_ignore_invalid_customizations.setter + def should_ignore_invalid_customizations(self, should_ignore_invalid_customizations): + """ + Sets the should_ignore_invalid_customizations of this RealtimeParameters. + If set to true, the service will not fail connection attempt if it encounters any issues that prevent the loading of all specified user customizations. Any invalid customizations will simply be ignored and connection will continue being established with the default base model and any remaining valid customizations. + If set to false, if the service is unable to load any of the specified customizations, an error detailing why will be returned and the session will end. + + + :param should_ignore_invalid_customizations: The should_ignore_invalid_customizations of this RealtimeParameters. + :type: bool + """ + self._should_ignore_invalid_customizations = should_ignore_invalid_customizations + + @property + def customizations(self): + """ + Gets the customizations of this RealtimeParameters. + Array of customization objects. + + + :return: The customizations of this RealtimeParameters. + :rtype: list[oci.ai_speech.models.CustomizationInference] + """ + return self._customizations + + @customizations.setter + def customizations(self, customizations): + """ + Sets the customizations of this RealtimeParameters. + Array of customization objects. + + + :param customizations: The customizations of this RealtimeParameters. + :type: list[oci.ai_speech.models.CustomizationInference] + """ + self._customizations = customizations + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/realtime_session_token.py b/src/oci/ai_speech/models/realtime_session_token.py new file mode 100644 index 0000000000..9940e822f8 --- /dev/null +++ b/src/oci/ai_speech/models/realtime_session_token.py @@ -0,0 +1,200 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RealtimeSessionToken(object): + """ + The response from the realtime session token endpoint that creates the auth token to be used with the realtime speech service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RealtimeSessionToken object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param token: + The value to assign to the token property of this RealtimeSessionToken. + :type token: str + + :param session_id: + The value to assign to the session_id property of this RealtimeSessionToken. + :type session_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this RealtimeSessionToken. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this RealtimeSessionToken. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this RealtimeSessionToken. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'token': 'str', + 'session_id': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'token': 'token', + 'session_id': 'sessionId', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._token = None + self._session_id = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def token(self): + """ + **[Required]** Gets the token of this RealtimeSessionToken. + The session token (JWT) to be consumed by the websocket server. The token contains the session/tenant ID, as well as the expiry time. + + + :return: The token of this RealtimeSessionToken. + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """ + Sets the token of this RealtimeSessionToken. + The session token (JWT) to be consumed by the websocket server. The token contains the session/tenant ID, as well as the expiry time. + + + :param token: The token of this RealtimeSessionToken. + :type: str + """ + self._token = token + + @property + def session_id(self): + """ + **[Required]** Gets the session_id of this RealtimeSessionToken. + The session ID this token corresponds to. Provided for convenience, the session ID is already present in the JWT token. + + + :return: The session_id of this RealtimeSessionToken. + :rtype: str + """ + return self._session_id + + @session_id.setter + def session_id(self, session_id): + """ + Sets the session_id of this RealtimeSessionToken. + The session ID this token corresponds to. Provided for convenience, the session ID is already present in the JWT token. + + + :param session_id: The session_id of this RealtimeSessionToken. + :type: str + """ + self._session_id = session_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this RealtimeSessionToken. + Compartment ID that was used to create the token. + + + :return: The compartment_id of this RealtimeSessionToken. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this RealtimeSessionToken. + Compartment ID that was used to create the token. + + + :param compartment_id: The compartment_id of this RealtimeSessionToken. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this RealtimeSessionToken. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :return: The freeform_tags of this RealtimeSessionToken. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this RealtimeSessionToken. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :param freeform_tags: The freeform_tags of this RealtimeSessionToken. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this RealtimeSessionToken. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :return: The defined_tags of this RealtimeSessionToken. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this RealtimeSessionToken. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :param defined_tags: The defined_tags of this RealtimeSessionToken. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_speech/models/update_customization_details.py b/src/oci/ai_speech/models/update_customization_details.py new file mode 100644 index 0000000000..9423d1484e --- /dev/null +++ b/src/oci/ai_speech/models/update_customization_details.py @@ -0,0 +1,254 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220101 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateCustomizationDetails(object): + """ + The information to be updated. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateCustomizationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param alias: + The value to assign to the alias property of this UpdateCustomizationDetails. + :type alias: str + + :param display_name: + The value to assign to the display_name property of this UpdateCustomizationDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateCustomizationDetails. + :type description: str + + :param model_details: + The value to assign to the model_details property of this UpdateCustomizationDetails. + :type model_details: oci.ai_speech.models.CustomizationModelDetails + + :param training_dataset: + The value to assign to the training_dataset property of this UpdateCustomizationDetails. + :type training_dataset: oci.ai_speech.models.CustomizationDatasetDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateCustomizationDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateCustomizationDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'alias': 'str', + 'display_name': 'str', + 'description': 'str', + 'model_details': 'CustomizationModelDetails', + 'training_dataset': 'CustomizationDatasetDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'alias': 'alias', + 'display_name': 'displayName', + 'description': 'description', + 'model_details': 'modelDetails', + 'training_dataset': 'trainingDataset', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._alias = None + self._display_name = None + self._description = None + self._model_details = None + self._training_dataset = None + self._freeform_tags = None + self._defined_tags = None + + @property + def alias(self): + """ + Gets the alias of this UpdateCustomizationDetails. + Customization Details Alias + + + :return: The alias of this UpdateCustomizationDetails. + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """ + Sets the alias of this UpdateCustomizationDetails. + Customization Details Alias + + + :param alias: The alias of this UpdateCustomizationDetails. + :type: str + """ + self._alias = alias + + @property + def display_name(self): + """ + Gets the display_name of this UpdateCustomizationDetails. + A user-friendly display name for the customization. + + + :return: The display_name of this UpdateCustomizationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateCustomizationDetails. + A user-friendly display name for the customization. + + + :param display_name: The display_name of this UpdateCustomizationDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateCustomizationDetails. + A short description of the customization. + + + :return: The description of this UpdateCustomizationDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateCustomizationDetails. + A short description of the customization. + + + :param description: The description of this UpdateCustomizationDetails. + :type: str + """ + self._description = description + + @property + def model_details(self): + """ + Gets the model_details of this UpdateCustomizationDetails. + + :return: The model_details of this UpdateCustomizationDetails. + :rtype: oci.ai_speech.models.CustomizationModelDetails + """ + return self._model_details + + @model_details.setter + def model_details(self, model_details): + """ + Sets the model_details of this UpdateCustomizationDetails. + + :param model_details: The model_details of this UpdateCustomizationDetails. + :type: oci.ai_speech.models.CustomizationModelDetails + """ + self._model_details = model_details + + @property + def training_dataset(self): + """ + Gets the training_dataset of this UpdateCustomizationDetails. + + :return: The training_dataset of this UpdateCustomizationDetails. + :rtype: oci.ai_speech.models.CustomizationDatasetDetails + """ + return self._training_dataset + + @training_dataset.setter + def training_dataset(self, training_dataset): + """ + Sets the training_dataset of this UpdateCustomizationDetails. + + :param training_dataset: The training_dataset of this UpdateCustomizationDetails. + :type: oci.ai_speech.models.CustomizationDatasetDetails + """ + self._training_dataset = training_dataset + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateCustomizationDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :return: The freeform_tags of this UpdateCustomizationDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateCustomizationDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}`. + + + :param freeform_tags: The freeform_tags of this UpdateCustomizationDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateCustomizationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :return: The defined_tags of this UpdateCustomizationDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateCustomizationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace-1\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}, \"foo-namespace-2\": {\"bar-key-1\": \"value-1\", \"bar-key-2\": \"value-2\"}}`. + + + :param defined_tags: The defined_tags of this UpdateCustomizationDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/auth/signers/ephemeral_resource_principals_v21_signer.py b/src/oci/auth/signers/ephemeral_resource_principals_v21_signer.py index 3bfdcf38f8..b6344112b5 100644 --- a/src/oci/auth/signers/ephemeral_resource_principals_v21_signer.py +++ b/src/oci/auth/signers/ephemeral_resource_principals_v21_signer.py @@ -41,7 +41,9 @@ def __init__(self, resource_principal_token_endpoint=None, resource_principal_se if private_key is None: raise ValueError("private_key should be provided") - if kwargs.get("rp_version") == "2.1.1" and tenancy_id is None: + self.rp_version = rp_version + + if self.rp_version in ["2.1.1", "2.1.2"] and tenancy_id is None: raise ValueError("tenancy_id should be provided") self._reset_signers_lock = threading.Lock() @@ -52,8 +54,13 @@ def __init__(self, resource_principal_token_endpoint=None, resource_principal_se else: self.retry_strategy = oci.retry.DEFAULT_RETRY_STRATEGY - # Hard coded Path for RPT - self.resource_principal_token_path = f"/20180711/resourcePrincipalTokenV2/{resource_id}" + if kwargs.get("security_context"): + self.security_context = kwargs.get("security_context") + + if self.rp_version == "2.1.2": + self.resource_principal_token_path = self.build_rpt_path_for_rpv212(resource_principal_token_path=kwargs.get("resource_principal_token_path"), resource_id=resource_id) + else: + self.resource_principal_token_path = f"/20180711/resourcePrincipalTokenV2/{resource_id}" # Holders for the tokens needed. self.rpt = None @@ -84,7 +91,8 @@ def __init__(self, resource_principal_token_endpoint=None, resource_principal_se super(EphemeralResourcePrincipalV21Signer, self).__init__(self.security_token.security_token, self.session_key_supplier.get_key_pair()['private']) - def construct_session_key_supplier(self, private_key=None, private_key_passphrase=None): + @staticmethod + def construct_session_key_supplier(private_key=None, private_key_passphrase=None): if private_key is None: raise ValueError("private_key must be provided") passphrase = private_key_passphrase @@ -93,6 +101,23 @@ def construct_session_key_supplier(self, private_key=None, private_key_passphras else: return FixedSessionKeySupplier(oci.signer.load_private_key(private_key, passphrase)) + @staticmethod + def build_rpt_path_for_rpv212(resource_principal_token_path, resource_id): + # For RPv2.1.2 if the resource_principal_token_path is set then use that path else use default hard coded path + if resource_principal_token_path: + if resource_principal_token_path.endswith("{}"): + # if build RPT has a {} in it replace it with resource_id + resource_principal_token_path = resource_principal_token_path.replace("{}", resource_id) + else: + # Append resource id at the end + if resource_principal_token_path[-1] != '/': + resource_principal_token_path = f"{resource_principal_token_path}/" + resource_principal_token_path = f"{resource_principal_token_path}{resource_id}" + else: + # Hard coded path for RPv2.1.2 + resource_principal_token_path = f"/20180711/resourcePrincipalTokenV212/{resource_id}" + return resource_principal_token_path + def get_security_token(self): """ Returns the security token. If it is expired, refresh the token. @@ -145,7 +170,15 @@ def _get_resource_principal_token_and_service_principal_session_token(self): method = "get" self.base_client.endpoint = self.resource_principal_token_endpoint - response = self.make_call(method, self.resource_principal_token_path) + if self.rp_version == "2.1.2" and self.security_context: + # For RPv2.1.2 with security context, pass security context in request header + # else just do a Get similar to 2.1/2.1.1 + header_params = {'security-context': self.security_context} + response = self.make_call(method, self.resource_principal_token_path, header_params=header_params) + + else: + response = self.make_call(method, self.resource_principal_token_path) + parsed_response = json.loads(response.data.decode('UTF-8')) return parsed_response['resourcePrincipalToken'], parsed_response['servicePrincipalSessionToken'] diff --git a/src/oci/auth/signers/key_pair_signer.py b/src/oci/auth/signers/key_pair_signer.py index c549f1bc96..6c977a1fac 100644 --- a/src/oci/auth/signers/key_pair_signer.py +++ b/src/oci/auth/signers/key_pair_signer.py @@ -17,8 +17,8 @@ class KeyPairSigner(oci.signer.AbstractBaseSigner): def __init__(self, rp_version, resource_id, tenancy_id, private_key_content, pass_phrase=None, generic_headers=["date", "(request-target)", "host"], body_headers=["content-length", "content-type", "x-content-sha256"]): - if rp_version == "2.1.1" and tenancy_id and resource_id: - self.api_key = "resource/v2.1.1/" + tenancy_id + "/" + resource_id + if (rp_version == "2.1.1" or rp_version == "2.1.2") and tenancy_id and resource_id: + self.api_key = f"resource/v{rp_version}/{tenancy_id}/{resource_id}" elif rp_version == "2.1" and resource_id: self.api_key = "resource/v2.1/" + resource_id else: diff --git a/src/oci/auth/signers/resource_principals_signer.py b/src/oci/auth/signers/resource_principals_signer.py index 9385240627..fdc6f7cc9c 100644 --- a/src/oci/auth/signers/resource_principals_signer.py +++ b/src/oci/auth/signers/resource_principals_signer.py @@ -21,6 +21,8 @@ OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT" OCI_RESOURCE_PRINCIPAL_RESOURCE_ID = "OCI_RESOURCE_PRINCIPAL_RESOURCE_ID" OCI_RESOURCE_PRINCIPAL_TENANCY_ID = "OCI_RESOURCE_PRINCIPAL_TENANCY_ID" +OCI_RESOURCE_PRINCIPAL_SECURITY_CONTEXT = "OCI_RESOURCE_PRINCIPAL_SECURITY_CONTEXT" +OCI_RESOURCE_PRINCIPAL_RPT_PATH = "OCI_RESOURCE_PRINCIPAL_RPT_PATH" # Resource Principal v3.0 OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE" @@ -32,9 +34,11 @@ OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE" OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE" OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE" -# For 2.1/2.1.1 LEAF-resource +# For 2.1/2.1.1/2.1.2 LEAF-resource OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE" OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE" +OCI_RESOURCE_PRINCIPAL_SECURITY_CONTEXT_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_SECURITY_CONTEXT_FOR_LEAF_RESOURCE" +OCI_RESOURCE_PRINCIPAL_RPT_PATH_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_PATH_FOR_LEAF_RESOURCE" # For Parent Resource OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE" OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_PARENT_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_PARENT_RESOURCE" @@ -100,7 +104,7 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None): private_key=private_key_for_leaf_resource, private_key_passphrase=private_key_passphrase_for_leaf_resource, region=region_for_leaf_resource) - elif resource_principal_version_for_leaf_resource in ["2.1", "2.1.1"]: + elif resource_principal_version_for_leaf_resource in ["2.1", "2.1.1", "2.1.2"]: resource_principal_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE) resource_principal_session_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE) resource_id_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE) @@ -108,6 +112,8 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None): private_key_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE) private_key_passphrase_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE) region_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE) + security_context = os.environ.get(OCI_RESOURCE_PRINCIPAL_SECURITY_CONTEXT_FOR_LEAF_RESOURCE) + resource_principal_token_path = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_PATH_FOR_LEAF_RESOURCE) leaf_resource_rp_signer = EphemeralResourcePrincipalV21Signer(resource_principal_token_endpoint=resource_principal_token_endpoint_for_leaf_resource, resource_principal_session_token_endpoint=resource_principal_session_token_endpoint_for_leaf_resource, @@ -116,7 +122,9 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None): private_key=private_key_for_leaf_resource, private_key_passphrase=private_key_passphrase_for_leaf_resource, rp_version=rp_version, - region=region_for_leaf_resource) + region=region_for_leaf_resource, + security_context=security_context, + resource_principal_token_path=resource_principal_token_path) elif resource_principal_version_for_leaf_resource == "1.1": resource_principal_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE) resource_principal_session_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE) @@ -180,7 +188,7 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None): private_key_passphrase=private_key_passphrase, region=region) - elif rp_version in ["2.1", "2.1.1"]: + elif rp_version in ["2.1", "2.1.1", "2.1.2"]: """ This signer takes its configuration from the following environment variables. - OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT: The endpoint for retrieving the Resource Principal Token @@ -198,6 +206,8 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None): private_key = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM) private_key_passphrase = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE) region = os.environ.get(OCI_RESOURCE_PRINCIPAL_REGION) + security_context = os.environ.get(OCI_RESOURCE_PRINCIPAL_SECURITY_CONTEXT) + resource_principal_token_path = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_PATH) return EphemeralResourcePrincipalV21Signer(resource_principal_token_endpoint=resource_principal_token_endpoint, resource_principal_session_token_endpoint=resource_principal_session_token_endpoint, @@ -206,7 +216,9 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None): private_key=private_key, private_key_passphrase=private_key_passphrase, rp_version=rp_version, - region=region) + region=region, + security_context=security_context, + resource_principal_token_path=resource_principal_token_path) elif rp_version == "1.1": """ diff --git a/src/oci/core/compute_client.py b/src/oci/core/compute_client.py index 62b6cbddd3..d29d75147c 100644 --- a/src/oci/core/compute_client.py +++ b/src/oci/core/compute_client.py @@ -5470,6 +5470,103 @@ def get_instance_console_connection(self, instance_console_connection_id, **kwar api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_instance_maintenance_event(self, instance_maintenance_event_id, **kwargs): + """ + Gets the maintenance event for the given instance. + + + :param str instance_maintenance_event_id: (required) + The OCID of the instance maintenance event. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.InstanceMaintenanceEvent` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_instance_maintenance_event API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['instanceMaintenanceEventId'] + resource_path = "/instanceMaintenanceEvents/{instanceMaintenanceEventId}" + method = "GET" + operation_name = "get_instance_maintenance_event" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/GetInstanceMaintenanceEvent" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_instance_maintenance_event got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "instanceMaintenanceEventId": instance_maintenance_event_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstanceMaintenanceEvent", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="InstanceMaintenanceEvent", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_instance_maintenance_reboot(self, instance_id, **kwargs): """ Gets the maximum possible date that a maintenance reboot can be extended. For more information, see @@ -10053,6 +10150,199 @@ def list_instance_devices(self, instance_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_instance_maintenance_events(self, compartment_id, **kwargs): + """ + Gets a list of all the maintenance events for the given instance. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str instance_id: (optional) + The OCID of the instance. + + :param str lifecycle_state: (optional) + A filter to only return resources that match the given lifecycle state. + + Allowed values are: "SCHEDULED", "STARTED", "PROCESSING", "SUCCEEDED", "FAILED", "CANCELED" + + :param str correlation_token: (optional) + A filter to only return resources that have a matching correlationToken. + + :param str instance_action: (optional) + A filter to only return resources that match the given instance action. + + :param datetime time_window_start_greater_than_or_equal_to: (optional) + Starting range to return the maintenances which are not completed (date-time is in `RFC3339`__ format). + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_window_start_less_than_or_equal_to: (optional) + Ending range to return the maintenances which are not completed (date-time is in `RFC3339`__ format). + + __ https://tools.ietf.org/html/rfc3339 + + :param int limit: (optional) + 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`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + 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/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_by: (optional) + 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. + + **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + optionally filter by availability domain if the scope of the resource type is within a + single availability domain. If you call one of these \"List\" operations without specifying + an availability domain, the resources are grouped by availability domain, then sorted. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + is case sensitive. + + Allowed values are: "ASC", "DESC" + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.core.models.InstanceMaintenanceEventSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_instance_maintenance_events API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/instanceMaintenanceEvents" + method = "GET" + operation_name = "list_instance_maintenance_events" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEventSummary/ListInstanceMaintenanceEvents" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "instance_id", + "lifecycle_state", + "correlation_token", + "instance_action", + "time_window_start_greater_than_or_equal_to", + "time_window_start_less_than_or_equal_to", + "limit", + "page", + "sort_by", + "sort_order", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_instance_maintenance_events got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["SCHEDULED", "STARTED", "PROCESSING", "SUCCEEDED", "FAILED", "CANCELED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + query_params = { + "compartmentId": compartment_id, + "instanceId": kwargs.get("instance_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "correlationToken": kwargs.get("correlation_token", missing), + "instanceAction": kwargs.get("instance_action", missing), + "timeWindowStartGreaterThanOrEqualTo": kwargs.get("time_window_start_greater_than_or_equal_to", missing), + "timeWindowStartLessThanOrEqualTo": kwargs.get("time_window_start_less_than_or_equal_to", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[InstanceMaintenanceEventSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[InstanceMaintenanceEventSummary]", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def list_instances(self, compartment_id, **kwargs): """ Lists the instances in the specified compartment and the specified availability domain. @@ -11861,6 +12151,125 @@ def update_instance_console_connection(self, instance_console_connection_id, upd api_reference_link=api_reference_link, required_arguments=required_arguments) + def update_instance_maintenance_event(self, instance_maintenance_event_id, update_instance_maintenance_event_details, **kwargs): + """ + Updates the maintenance event for the given instance. + + + :param str instance_maintenance_event_id: (required) + The OCID of the instance maintenance event. + + :param oci.core.models.UpdateInstanceMaintenanceEventDetails update_instance_maintenance_event_details: (required) + Update instance maintenance event due date. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + 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. + + :param str opc_retry_token: (optional) + 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). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_instance_maintenance_event API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['instanceMaintenanceEventId'] + resource_path = "/instanceMaintenanceEvents/{instanceMaintenanceEventId}" + method = "PUT" + operation_name = "update_instance_maintenance_event" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/InstanceMaintenanceEvent/UpdateInstanceMaintenanceEvent" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"update_instance_maintenance_event got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "instanceMaintenanceEventId": instance_maintenance_event_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_instance_maintenance_event_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_instance_maintenance_event_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_volume_attachment(self, volume_attachment_id, update_volume_attachment_details, **kwargs): """ Updates information about the specified volume attachment. diff --git a/src/oci/core/compute_client_composite_operations.py b/src/oci/core/compute_client_composite_operations.py index 5e65c14040..a41a0ab019 100644 --- a/src/oci/core/compute_client_composite_operations.py +++ b/src/oci/core/compute_client_composite_operations.py @@ -1975,6 +1975,45 @@ def update_instance_console_connection_and_wait_for_state(self, instance_console except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_instance_maintenance_event_and_wait_for_work_request(self, instance_maintenance_event_id, update_instance_maintenance_event_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeClient.update_instance_maintenance_event` and waits for the oci.work_requests.models.WorkRequest + to enter the given state(s). + + :param str instance_maintenance_event_id: (required) + The OCID of the instance maintenance event. + + :param oci.core.models.UpdateInstanceMaintenanceEventDetails update_instance_maintenance_event_details: (required) + Update instance maintenance event due date. + + :param list[str] work_request_states: (optional) + An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status` + Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED] + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeClient.update_instance_maintenance_event` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_instance_maintenance_event(instance_maintenance_event_id, update_instance_maintenance_event_details, **operation_kwargs) + work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES + lowered_work_request_states = [w.lower() for w in work_request_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + work_request_id = operation_result.headers['opc-work-request-id'] + try: + waiter_result = oci.wait_until( + self._work_request_client, + self._work_request_client.get_work_request(work_request_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states, + **waiter_kwargs + ) + return waiter_result + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_volume_attachment_and_wait_for_state(self, volume_attachment_id, update_volume_attachment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.ComputeClient.update_volume_attachment` and waits for the :py:class:`~oci.core.models.VolumeAttachment` acted upon diff --git a/src/oci/core/models/__init__.py b/src/oci/core/models/__init__.py index e5e96caa65..e26b5350a0 100644 --- a/src/oci/core/models/__init__.py +++ b/src/oci/core/models/__init__.py @@ -347,6 +347,8 @@ from .instance_configuration_volume_source_from_volume_details import InstanceConfigurationVolumeSourceFromVolumeDetails from .instance_console_connection import InstanceConsoleConnection from .instance_credentials import InstanceCredentials +from .instance_maintenance_event import InstanceMaintenanceEvent +from .instance_maintenance_event_summary import InstanceMaintenanceEventSummary from .instance_maintenance_reboot import InstanceMaintenanceReboot from .instance_options import InstanceOptions from .instance_pool import InstancePool @@ -528,6 +530,7 @@ from .update_instance_configuration_details import UpdateInstanceConfigurationDetails from .update_instance_console_connection_details import UpdateInstanceConsoleConnectionDetails from .update_instance_details import UpdateInstanceDetails +from .update_instance_maintenance_event_details import UpdateInstanceMaintenanceEventDetails from .update_instance_platform_config import UpdateInstancePlatformConfig from .update_instance_pool_details import UpdateInstancePoolDetails from .update_instance_pool_placement_configuration_details import UpdateInstancePoolPlacementConfigurationDetails @@ -949,6 +952,8 @@ "InstanceConfigurationVolumeSourceFromVolumeDetails": InstanceConfigurationVolumeSourceFromVolumeDetails, "InstanceConsoleConnection": InstanceConsoleConnection, "InstanceCredentials": InstanceCredentials, + "InstanceMaintenanceEvent": InstanceMaintenanceEvent, + "InstanceMaintenanceEventSummary": InstanceMaintenanceEventSummary, "InstanceMaintenanceReboot": InstanceMaintenanceReboot, "InstanceOptions": InstanceOptions, "InstancePool": InstancePool, @@ -1130,6 +1135,7 @@ "UpdateInstanceConfigurationDetails": UpdateInstanceConfigurationDetails, "UpdateInstanceConsoleConnectionDetails": UpdateInstanceConsoleConnectionDetails, "UpdateInstanceDetails": UpdateInstanceDetails, + "UpdateInstanceMaintenanceEventDetails": UpdateInstanceMaintenanceEventDetails, "UpdateInstancePlatformConfig": UpdateInstancePlatformConfig, "UpdateInstancePoolDetails": UpdateInstancePoolDetails, "UpdateInstancePoolPlacementConfigurationDetails": UpdateInstancePoolPlacementConfigurationDetails, diff --git a/src/oci/core/models/instance_maintenance_event.py b/src/oci/core/models/instance_maintenance_event.py new file mode 100644 index 0000000000..e895a2d859 --- /dev/null +++ b/src/oci/core/models/instance_maintenance_event.py @@ -0,0 +1,1022 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InstanceMaintenanceEvent(object): + """ + It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time. + """ + + #: A constant which can be used with the maintenance_category property of a InstanceMaintenanceEvent. + #: This constant has a value of "EMERGENCY" + MAINTENANCE_CATEGORY_EMERGENCY = "EMERGENCY" + + #: A constant which can be used with the maintenance_category property of a InstanceMaintenanceEvent. + #: This constant has a value of "MANDATORY" + MAINTENANCE_CATEGORY_MANDATORY = "MANDATORY" + + #: A constant which can be used with the maintenance_category property of a InstanceMaintenanceEvent. + #: This constant has a value of "FLEXIBLE" + MAINTENANCE_CATEGORY_FLEXIBLE = "FLEXIBLE" + + #: A constant which can be used with the maintenance_category property of a InstanceMaintenanceEvent. + #: This constant has a value of "OPTIONAL" + MAINTENANCE_CATEGORY_OPTIONAL = "OPTIONAL" + + #: A constant which can be used with the maintenance_category property of a InstanceMaintenanceEvent. + #: This constant has a value of "NOTIFICATION" + MAINTENANCE_CATEGORY_NOTIFICATION = "NOTIFICATION" + + #: A constant which can be used with the maintenance_reason property of a InstanceMaintenanceEvent. + #: This constant has a value of "EVACUATION" + MAINTENANCE_REASON_EVACUATION = "EVACUATION" + + #: A constant which can be used with the maintenance_reason property of a InstanceMaintenanceEvent. + #: This constant has a value of "ENVIRONMENTAL_FACTORS" + MAINTENANCE_REASON_ENVIRONMENTAL_FACTORS = "ENVIRONMENTAL_FACTORS" + + #: A constant which can be used with the maintenance_reason property of a InstanceMaintenanceEvent. + #: This constant has a value of "DECOMMISSION" + MAINTENANCE_REASON_DECOMMISSION = "DECOMMISSION" + + #: A constant which can be used with the maintenance_reason property of a InstanceMaintenanceEvent. + #: This constant has a value of "HARDWARE_REPLACEMENT" + MAINTENANCE_REASON_HARDWARE_REPLACEMENT = "HARDWARE_REPLACEMENT" + + #: A constant which can be used with the maintenance_reason property of a InstanceMaintenanceEvent. + #: This constant has a value of "FIRMWARE_UPDATE" + MAINTENANCE_REASON_FIRMWARE_UPDATE = "FIRMWARE_UPDATE" + + #: A constant which can be used with the maintenance_reason property of a InstanceMaintenanceEvent. + #: This constant has a value of "SECURITY_UPDATE" + MAINTENANCE_REASON_SECURITY_UPDATE = "SECURITY_UPDATE" + + #: A constant which can be used with the instance_action property of a InstanceMaintenanceEvent. + #: This constant has a value of "REBOOT_MIGRATION" + INSTANCE_ACTION_REBOOT_MIGRATION = "REBOOT_MIGRATION" + + #: A constant which can be used with the instance_action property of a InstanceMaintenanceEvent. + #: This constant has a value of "TERMINATE" + INSTANCE_ACTION_TERMINATE = "TERMINATE" + + #: A constant which can be used with the instance_action property of a InstanceMaintenanceEvent. + #: This constant has a value of "STOP" + INSTANCE_ACTION_STOP = "STOP" + + #: A constant which can be used with the instance_action property of a InstanceMaintenanceEvent. + #: This constant has a value of "NONE" + INSTANCE_ACTION_NONE = "NONE" + + #: A constant which can be used with the alternative_resolution_actions property of a InstanceMaintenanceEvent. + #: This constant has a value of "REBOOT_MIGRATION" + ALTERNATIVE_RESOLUTION_ACTIONS_REBOOT_MIGRATION = "REBOOT_MIGRATION" + + #: A constant which can be used with the alternative_resolution_actions property of a InstanceMaintenanceEvent. + #: This constant has a value of "TERMINATE" + ALTERNATIVE_RESOLUTION_ACTIONS_TERMINATE = "TERMINATE" + + #: A constant which can be used with the lifecycle_state property of a InstanceMaintenanceEvent. + #: This constant has a value of "SCHEDULED" + LIFECYCLE_STATE_SCHEDULED = "SCHEDULED" + + #: A constant which can be used with the lifecycle_state property of a InstanceMaintenanceEvent. + #: This constant has a value of "STARTED" + LIFECYCLE_STATE_STARTED = "STARTED" + + #: A constant which can be used with the lifecycle_state property of a InstanceMaintenanceEvent. + #: This constant has a value of "PROCESSING" + LIFECYCLE_STATE_PROCESSING = "PROCESSING" + + #: A constant which can be used with the lifecycle_state property of a InstanceMaintenanceEvent. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a InstanceMaintenanceEvent. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a InstanceMaintenanceEvent. + #: This constant has a value of "CANCELED" + LIFECYCLE_STATE_CANCELED = "CANCELED" + + #: A constant which can be used with the created_by property of a InstanceMaintenanceEvent. + #: This constant has a value of "CUSTOMER" + CREATED_BY_CUSTOMER = "CUSTOMER" + + #: A constant which can be used with the created_by property of a InstanceMaintenanceEvent. + #: This constant has a value of "SYSTEM" + CREATED_BY_SYSTEM = "SYSTEM" + + def __init__(self, **kwargs): + """ + Initializes a new InstanceMaintenanceEvent object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this InstanceMaintenanceEvent. + :type display_name: str + + :param defined_tags: + The value to assign to the defined_tags property of this InstanceMaintenanceEvent. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this InstanceMaintenanceEvent. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this InstanceMaintenanceEvent. + :type id: str + + :param instance_id: + The value to assign to the instance_id property of this InstanceMaintenanceEvent. + :type instance_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this InstanceMaintenanceEvent. + :type compartment_id: str + + :param maintenance_category: + The value to assign to the maintenance_category property of this InstanceMaintenanceEvent. + Allowed values for this property are: "EMERGENCY", "MANDATORY", "FLEXIBLE", "OPTIONAL", "NOTIFICATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type maintenance_category: str + + :param maintenance_reason: + The value to assign to the maintenance_reason property of this InstanceMaintenanceEvent. + Allowed values for this property are: "EVACUATION", "ENVIRONMENTAL_FACTORS", "DECOMMISSION", "HARDWARE_REPLACEMENT", "FIRMWARE_UPDATE", "SECURITY_UPDATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type maintenance_reason: str + + :param instance_action: + The value to assign to the instance_action property of this InstanceMaintenanceEvent. + Allowed values for this property are: "REBOOT_MIGRATION", "TERMINATE", "STOP", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type instance_action: str + + :param alternative_resolution_actions: + The value to assign to the alternative_resolution_actions property of this InstanceMaintenanceEvent. + Allowed values for items in this list are: "REBOOT_MIGRATION", "TERMINATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type alternative_resolution_actions: list[str] + + :param time_started: + The value to assign to the time_started property of this InstanceMaintenanceEvent. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this InstanceMaintenanceEvent. + :type time_finished: datetime + + :param time_window_start: + The value to assign to the time_window_start property of this InstanceMaintenanceEvent. + :type time_window_start: datetime + + :param start_window_duration: + The value to assign to the start_window_duration property of this InstanceMaintenanceEvent. + :type start_window_duration: str + + :param estimated_duration: + The value to assign to the estimated_duration property of this InstanceMaintenanceEvent. + :type estimated_duration: str + + :param time_hard_due_date: + The value to assign to the time_hard_due_date property of this InstanceMaintenanceEvent. + :type time_hard_due_date: datetime + + :param can_reschedule: + The value to assign to the can_reschedule property of this InstanceMaintenanceEvent. + :type can_reschedule: bool + + :param time_created: + The value to assign to the time_created property of this InstanceMaintenanceEvent. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this InstanceMaintenanceEvent. + Allowed values for this property are: "SCHEDULED", "STARTED", "PROCESSING", "SUCCEEDED", "FAILED", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this InstanceMaintenanceEvent. + :type lifecycle_details: str + + :param created_by: + The value to assign to the created_by property of this InstanceMaintenanceEvent. + Allowed values for this property are: "CUSTOMER", "SYSTEM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type created_by: str + + :param description: + The value to assign to the description property of this InstanceMaintenanceEvent. + :type description: str + + :param correlation_token: + The value to assign to the correlation_token property of this InstanceMaintenanceEvent. + :type correlation_token: str + + :param can_delete_local_storage: + The value to assign to the can_delete_local_storage property of this InstanceMaintenanceEvent. + :type can_delete_local_storage: bool + + :param additional_details: + The value to assign to the additional_details property of this InstanceMaintenanceEvent. + :type additional_details: dict(str, str) + + """ + self.swagger_types = { + 'display_name': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'instance_id': 'str', + 'compartment_id': 'str', + 'maintenance_category': 'str', + 'maintenance_reason': 'str', + 'instance_action': 'str', + 'alternative_resolution_actions': 'list[str]', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'time_window_start': 'datetime', + 'start_window_duration': 'str', + 'estimated_duration': 'str', + 'time_hard_due_date': 'datetime', + 'can_reschedule': 'bool', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'created_by': 'str', + 'description': 'str', + 'correlation_token': 'str', + 'can_delete_local_storage': 'bool', + 'additional_details': 'dict(str, str)' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'instance_id': 'instanceId', + 'compartment_id': 'compartmentId', + 'maintenance_category': 'maintenanceCategory', + 'maintenance_reason': 'maintenanceReason', + 'instance_action': 'instanceAction', + 'alternative_resolution_actions': 'alternativeResolutionActions', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'time_window_start': 'timeWindowStart', + 'start_window_duration': 'startWindowDuration', + 'estimated_duration': 'estimatedDuration', + 'time_hard_due_date': 'timeHardDueDate', + 'can_reschedule': 'canReschedule', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'created_by': 'createdBy', + 'description': 'description', + 'correlation_token': 'correlationToken', + 'can_delete_local_storage': 'canDeleteLocalStorage', + 'additional_details': 'additionalDetails' + } + + self._display_name = None + self._defined_tags = None + self._freeform_tags = None + self._id = None + self._instance_id = None + self._compartment_id = None + self._maintenance_category = None + self._maintenance_reason = None + self._instance_action = None + self._alternative_resolution_actions = None + self._time_started = None + self._time_finished = None + self._time_window_start = None + self._start_window_duration = None + self._estimated_duration = None + self._time_hard_due_date = None + self._can_reschedule = None + self._time_created = None + self._lifecycle_state = None + self._lifecycle_details = None + self._created_by = None + self._description = None + self._correlation_token = None + self._can_delete_local_storage = None + self._additional_details = None + + @property + def display_name(self): + """ + Gets the display_name of this InstanceMaintenanceEvent. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceMaintenanceEvent. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this InstanceMaintenanceEvent. + :type: str + """ + self._display_name = display_name + + @property + def defined_tags(self): + """ + Gets the defined_tags of this InstanceMaintenanceEvent. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this InstanceMaintenanceEvent. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this InstanceMaintenanceEvent. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this InstanceMaintenanceEvent. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this InstanceMaintenanceEvent. + 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`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this InstanceMaintenanceEvent. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this InstanceMaintenanceEvent. + 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`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this InstanceMaintenanceEvent. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + **[Required]** Gets the id of this InstanceMaintenanceEvent. + The `OCID`__ of the maintenance event. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstanceMaintenanceEvent. + The `OCID`__ of the maintenance event. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this InstanceMaintenanceEvent. + :type: str + """ + self._id = id + + @property + def instance_id(self): + """ + **[Required]** Gets the instance_id of this InstanceMaintenanceEvent. + The OCID of the instance. + + + :return: The instance_id of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """ + Sets the instance_id of this InstanceMaintenanceEvent. + The OCID of the instance. + + + :param instance_id: The instance_id of this InstanceMaintenanceEvent. + :type: str + """ + self._instance_id = instance_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this InstanceMaintenanceEvent. + The OCID of the compartment that contains the instance. + + + :return: The compartment_id of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstanceMaintenanceEvent. + The OCID of the compartment that contains the instance. + + + :param compartment_id: The compartment_id of this InstanceMaintenanceEvent. + :type: str + """ + self._compartment_id = compartment_id + + @property + def maintenance_category(self): + """ + **[Required]** Gets the maintenance_category of this InstanceMaintenanceEvent. + This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + deferred, or even cancelled. Please see the + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + Allowed values for this property are: "EMERGENCY", "MANDATORY", "FLEXIBLE", "OPTIONAL", "NOTIFICATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The maintenance_category of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._maintenance_category + + @maintenance_category.setter + def maintenance_category(self, maintenance_category): + """ + Sets the maintenance_category of this InstanceMaintenanceEvent. + This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + deferred, or even cancelled. Please see the + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + + :param maintenance_category: The maintenance_category of this InstanceMaintenanceEvent. + :type: str + """ + allowed_values = ["EMERGENCY", "MANDATORY", "FLEXIBLE", "OPTIONAL", "NOTIFICATION"] + if not value_allowed_none_or_none_sentinel(maintenance_category, allowed_values): + maintenance_category = 'UNKNOWN_ENUM_VALUE' + self._maintenance_category = maintenance_category + + @property + def maintenance_reason(self): + """ + **[Required]** Gets the maintenance_reason of this InstanceMaintenanceEvent. + This is the reason that Maintenance is being performed. See + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + Allowed values for this property are: "EVACUATION", "ENVIRONMENTAL_FACTORS", "DECOMMISSION", "HARDWARE_REPLACEMENT", "FIRMWARE_UPDATE", "SECURITY_UPDATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The maintenance_reason of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._maintenance_reason + + @maintenance_reason.setter + def maintenance_reason(self, maintenance_reason): + """ + Sets the maintenance_reason of this InstanceMaintenanceEvent. + This is the reason that Maintenance is being performed. See + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + + :param maintenance_reason: The maintenance_reason of this InstanceMaintenanceEvent. + :type: str + """ + allowed_values = ["EVACUATION", "ENVIRONMENTAL_FACTORS", "DECOMMISSION", "HARDWARE_REPLACEMENT", "FIRMWARE_UPDATE", "SECURITY_UPDATE"] + if not value_allowed_none_or_none_sentinel(maintenance_reason, allowed_values): + maintenance_reason = 'UNKNOWN_ENUM_VALUE' + self._maintenance_reason = maintenance_reason + + @property + def instance_action(self): + """ + **[Required]** Gets the instance_action of this InstanceMaintenanceEvent. + This is the action that will be performed on the Instance by OCI when the Maintenance begins. + + Allowed values for this property are: "REBOOT_MIGRATION", "TERMINATE", "STOP", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The instance_action of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._instance_action + + @instance_action.setter + def instance_action(self, instance_action): + """ + Sets the instance_action of this InstanceMaintenanceEvent. + This is the action that will be performed on the Instance by OCI when the Maintenance begins. + + + :param instance_action: The instance_action of this InstanceMaintenanceEvent. + :type: str + """ + allowed_values = ["REBOOT_MIGRATION", "TERMINATE", "STOP", "NONE"] + if not value_allowed_none_or_none_sentinel(instance_action, allowed_values): + instance_action = 'UNKNOWN_ENUM_VALUE' + self._instance_action = instance_action + + @property + def alternative_resolution_actions(self): + """ + **[Required]** Gets the alternative_resolution_actions of this InstanceMaintenanceEvent. + These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + + Allowed values for items in this list are: "REBOOT_MIGRATION", "TERMINATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The alternative_resolution_actions of this InstanceMaintenanceEvent. + :rtype: list[str] + """ + return self._alternative_resolution_actions + + @alternative_resolution_actions.setter + def alternative_resolution_actions(self, alternative_resolution_actions): + """ + Sets the alternative_resolution_actions of this InstanceMaintenanceEvent. + These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + + + :param alternative_resolution_actions: The alternative_resolution_actions of this InstanceMaintenanceEvent. + :type: list[str] + """ + allowed_values = ["REBOOT_MIGRATION", "TERMINATE"] + if alternative_resolution_actions: + alternative_resolution_actions[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in alternative_resolution_actions] + self._alternative_resolution_actions = alternative_resolution_actions + + @property + def time_started(self): + """ + Gets the time_started of this InstanceMaintenanceEvent. + The time at which the Maintenance actually started. + + + :return: The time_started of this InstanceMaintenanceEvent. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this InstanceMaintenanceEvent. + The time at which the Maintenance actually started. + + + :param time_started: The time_started of this InstanceMaintenanceEvent. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this InstanceMaintenanceEvent. + The time at which the Maintenance actually finished. + + + :return: The time_finished of this InstanceMaintenanceEvent. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this InstanceMaintenanceEvent. + The time at which the Maintenance actually finished. + + + :param time_finished: The time_finished of this InstanceMaintenanceEvent. + :type: datetime + """ + self._time_finished = time_finished + + @property + def time_window_start(self): + """ + **[Required]** Gets the time_window_start of this InstanceMaintenanceEvent. + The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + this time. + + + :return: The time_window_start of this InstanceMaintenanceEvent. + :rtype: datetime + """ + return self._time_window_start + + @time_window_start.setter + def time_window_start(self, time_window_start): + """ + Sets the time_window_start of this InstanceMaintenanceEvent. + The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + this time. + + + :param time_window_start: The time_window_start of this InstanceMaintenanceEvent. + :type: datetime + """ + self._time_window_start = time_window_start + + @property + def start_window_duration(self): + """ + Gets the start_window_duration of this InstanceMaintenanceEvent. + The duration of the time window Maintenance is scheduled to begin within. + + + :return: The start_window_duration of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._start_window_duration + + @start_window_duration.setter + def start_window_duration(self, start_window_duration): + """ + Sets the start_window_duration of this InstanceMaintenanceEvent. + The duration of the time window Maintenance is scheduled to begin within. + + + :param start_window_duration: The start_window_duration of this InstanceMaintenanceEvent. + :type: str + """ + self._start_window_duration = start_window_duration + + @property + def estimated_duration(self): + """ + Gets the estimated_duration of this InstanceMaintenanceEvent. + This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + + + :return: The estimated_duration of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._estimated_duration + + @estimated_duration.setter + def estimated_duration(self, estimated_duration): + """ + Sets the estimated_duration of this InstanceMaintenanceEvent. + This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + + + :param estimated_duration: The estimated_duration of this InstanceMaintenanceEvent. + :type: str + """ + self._estimated_duration = estimated_duration + + @property + def time_hard_due_date(self): + """ + Gets the time_hard_due_date of this InstanceMaintenanceEvent. + It is the scheduled hard due date and time of the maintenance event. + The maintenance event will happen at this time and the due date will not be extended. + + + :return: The time_hard_due_date of this InstanceMaintenanceEvent. + :rtype: datetime + """ + return self._time_hard_due_date + + @time_hard_due_date.setter + def time_hard_due_date(self, time_hard_due_date): + """ + Sets the time_hard_due_date of this InstanceMaintenanceEvent. + It is the scheduled hard due date and time of the maintenance event. + The maintenance event will happen at this time and the due date will not be extended. + + + :param time_hard_due_date: The time_hard_due_date of this InstanceMaintenanceEvent. + :type: datetime + """ + self._time_hard_due_date = time_hard_due_date + + @property + def can_reschedule(self): + """ + **[Required]** Gets the can_reschedule of this InstanceMaintenanceEvent. + Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + + + :return: The can_reschedule of this InstanceMaintenanceEvent. + :rtype: bool + """ + return self._can_reschedule + + @can_reschedule.setter + def can_reschedule(self, can_reschedule): + """ + Sets the can_reschedule of this InstanceMaintenanceEvent. + Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + + + :param can_reschedule: The can_reschedule of this InstanceMaintenanceEvent. + :type: bool + """ + self._can_reschedule = can_reschedule + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this InstanceMaintenanceEvent. + The date and time the maintenance event was created, in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this InstanceMaintenanceEvent. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this InstanceMaintenanceEvent. + The date and time the maintenance event was created, in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this InstanceMaintenanceEvent. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this InstanceMaintenanceEvent. + The current state of the maintenance event. + + Allowed values for this property are: "SCHEDULED", "STARTED", "PROCESSING", "SUCCEEDED", "FAILED", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this InstanceMaintenanceEvent. + The current state of the maintenance event. + + + :param lifecycle_state: The lifecycle_state of this InstanceMaintenanceEvent. + :type: str + """ + allowed_values = ["SCHEDULED", "STARTED", "PROCESSING", "SUCCEEDED", "FAILED", "CANCELED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this InstanceMaintenanceEvent. + Provides more details about the state of the maintenance event. + + + :return: The lifecycle_details of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this InstanceMaintenanceEvent. + Provides more details about the state of the maintenance event. + + + :param lifecycle_details: The lifecycle_details of this InstanceMaintenanceEvent. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this InstanceMaintenanceEvent. + The creator of the maintenance event. + + Allowed values for this property are: "CUSTOMER", "SYSTEM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The created_by of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this InstanceMaintenanceEvent. + The creator of the maintenance event. + + + :param created_by: The created_by of this InstanceMaintenanceEvent. + :type: str + """ + allowed_values = ["CUSTOMER", "SYSTEM"] + if not value_allowed_none_or_none_sentinel(created_by, allowed_values): + created_by = 'UNKNOWN_ENUM_VALUE' + self._created_by = created_by + + @property + def description(self): + """ + Gets the description of this InstanceMaintenanceEvent. + It is the descriptive information about the maintenance taking place on the customer instance. + + + :return: The description of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this InstanceMaintenanceEvent. + It is the descriptive information about the maintenance taking place on the customer instance. + + + :param description: The description of this InstanceMaintenanceEvent. + :type: str + """ + self._description = description + + @property + def correlation_token(self): + """ + Gets the correlation_token of this InstanceMaintenanceEvent. + A unique identifier that will group Instances that have a relationship with one another and must be scheduled + together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + perspective will have a matching correlationToken. + + + :return: The correlation_token of this InstanceMaintenanceEvent. + :rtype: str + """ + return self._correlation_token + + @correlation_token.setter + def correlation_token(self, correlation_token): + """ + Sets the correlation_token of this InstanceMaintenanceEvent. + A unique identifier that will group Instances that have a relationship with one another and must be scheduled + together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + perspective will have a matching correlationToken. + + + :param correlation_token: The correlation_token of this InstanceMaintenanceEvent. + :type: str + """ + self._correlation_token = correlation_token + + @property + def can_delete_local_storage(self): + """ + Gets the can_delete_local_storage of this InstanceMaintenanceEvent. + For Instances that have local storage, this field is set to true when local storage + will be deleted as a result of the Maintenance. + + + :return: The can_delete_local_storage of this InstanceMaintenanceEvent. + :rtype: bool + """ + return self._can_delete_local_storage + + @can_delete_local_storage.setter + def can_delete_local_storage(self, can_delete_local_storage): + """ + Sets the can_delete_local_storage of this InstanceMaintenanceEvent. + For Instances that have local storage, this field is set to true when local storage + will be deleted as a result of the Maintenance. + + + :param can_delete_local_storage: The can_delete_local_storage of this InstanceMaintenanceEvent. + :type: bool + """ + self._can_delete_local_storage = can_delete_local_storage + + @property + def additional_details(self): + """ + Gets the additional_details of this InstanceMaintenanceEvent. + Additional details of the maintenance in the form of json. + + + :return: The additional_details of this InstanceMaintenanceEvent. + :rtype: dict(str, str) + """ + return self._additional_details + + @additional_details.setter + def additional_details(self, additional_details): + """ + Sets the additional_details of this InstanceMaintenanceEvent. + Additional details of the maintenance in the form of json. + + + :param additional_details: The additional_details of this InstanceMaintenanceEvent. + :type: dict(str, str) + """ + self._additional_details = additional_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/instance_maintenance_event_summary.py b/src/oci/core/models/instance_maintenance_event_summary.py new file mode 100644 index 0000000000..2067c29e18 --- /dev/null +++ b/src/oci/core/models/instance_maintenance_event_summary.py @@ -0,0 +1,795 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InstanceMaintenanceEventSummary(object): + """ + It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time. + """ + + #: A constant which can be used with the alternative_resolution_actions property of a InstanceMaintenanceEventSummary. + #: This constant has a value of "REBOOT_MIGRATION" + ALTERNATIVE_RESOLUTION_ACTIONS_REBOOT_MIGRATION = "REBOOT_MIGRATION" + + #: A constant which can be used with the alternative_resolution_actions property of a InstanceMaintenanceEventSummary. + #: This constant has a value of "TERMINATE" + ALTERNATIVE_RESOLUTION_ACTIONS_TERMINATE = "TERMINATE" + + def __init__(self, **kwargs): + """ + Initializes a new InstanceMaintenanceEventSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param defined_tags: + The value to assign to the defined_tags property of this InstanceMaintenanceEventSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param display_name: + The value to assign to the display_name property of this InstanceMaintenanceEventSummary. + :type display_name: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this InstanceMaintenanceEventSummary. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this InstanceMaintenanceEventSummary. + :type id: str + + :param instance_id: + The value to assign to the instance_id property of this InstanceMaintenanceEventSummary. + :type instance_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this InstanceMaintenanceEventSummary. + :type compartment_id: str + + :param maintenance_category: + The value to assign to the maintenance_category property of this InstanceMaintenanceEventSummary. + :type maintenance_category: str + + :param maintenance_reason: + The value to assign to the maintenance_reason property of this InstanceMaintenanceEventSummary. + :type maintenance_reason: str + + :param instance_action: + The value to assign to the instance_action property of this InstanceMaintenanceEventSummary. + :type instance_action: str + + :param alternative_resolution_actions: + The value to assign to the alternative_resolution_actions property of this InstanceMaintenanceEventSummary. + Allowed values for items in this list are: "REBOOT_MIGRATION", "TERMINATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type alternative_resolution_actions: list[str] + + :param time_started: + The value to assign to the time_started property of this InstanceMaintenanceEventSummary. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this InstanceMaintenanceEventSummary. + :type time_finished: datetime + + :param time_window_start: + The value to assign to the time_window_start property of this InstanceMaintenanceEventSummary. + :type time_window_start: datetime + + :param start_window_duration: + The value to assign to the start_window_duration property of this InstanceMaintenanceEventSummary. + :type start_window_duration: str + + :param estimated_duration: + The value to assign to the estimated_duration property of this InstanceMaintenanceEventSummary. + :type estimated_duration: str + + :param time_hard_due_date: + The value to assign to the time_hard_due_date property of this InstanceMaintenanceEventSummary. + :type time_hard_due_date: datetime + + :param can_reschedule: + The value to assign to the can_reschedule property of this InstanceMaintenanceEventSummary. + :type can_reschedule: bool + + :param time_created: + The value to assign to the time_created property of this InstanceMaintenanceEventSummary. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this InstanceMaintenanceEventSummary. + :type lifecycle_state: str + + :param created_by: + The value to assign to the created_by property of this InstanceMaintenanceEventSummary. + :type created_by: str + + :param description: + The value to assign to the description property of this InstanceMaintenanceEventSummary. + :type description: str + + :param correlation_token: + The value to assign to the correlation_token property of this InstanceMaintenanceEventSummary. + :type correlation_token: str + + """ + self.swagger_types = { + 'defined_tags': 'dict(str, dict(str, object))', + 'display_name': 'str', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'instance_id': 'str', + 'compartment_id': 'str', + 'maintenance_category': 'str', + 'maintenance_reason': 'str', + 'instance_action': 'str', + 'alternative_resolution_actions': 'list[str]', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'time_window_start': 'datetime', + 'start_window_duration': 'str', + 'estimated_duration': 'str', + 'time_hard_due_date': 'datetime', + 'can_reschedule': 'bool', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'created_by': 'str', + 'description': 'str', + 'correlation_token': 'str' + } + + self.attribute_map = { + 'defined_tags': 'definedTags', + 'display_name': 'displayName', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'instance_id': 'instanceId', + 'compartment_id': 'compartmentId', + 'maintenance_category': 'maintenanceCategory', + 'maintenance_reason': 'maintenanceReason', + 'instance_action': 'instanceAction', + 'alternative_resolution_actions': 'alternativeResolutionActions', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'time_window_start': 'timeWindowStart', + 'start_window_duration': 'startWindowDuration', + 'estimated_duration': 'estimatedDuration', + 'time_hard_due_date': 'timeHardDueDate', + 'can_reschedule': 'canReschedule', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'created_by': 'createdBy', + 'description': 'description', + 'correlation_token': 'correlationToken' + } + + self._defined_tags = None + self._display_name = None + self._freeform_tags = None + self._id = None + self._instance_id = None + self._compartment_id = None + self._maintenance_category = None + self._maintenance_reason = None + self._instance_action = None + self._alternative_resolution_actions = None + self._time_started = None + self._time_finished = None + self._time_window_start = None + self._start_window_duration = None + self._estimated_duration = None + self._time_hard_due_date = None + self._can_reschedule = None + self._time_created = None + self._lifecycle_state = None + self._created_by = None + self._description = None + self._correlation_token = None + + @property + def defined_tags(self): + """ + Gets the defined_tags of this InstanceMaintenanceEventSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this InstanceMaintenanceEventSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this InstanceMaintenanceEventSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this InstanceMaintenanceEventSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def display_name(self): + """ + Gets the display_name of this InstanceMaintenanceEventSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this InstanceMaintenanceEventSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this InstanceMaintenanceEventSummary. + :type: str + """ + self._display_name = display_name + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this InstanceMaintenanceEventSummary. + 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`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this InstanceMaintenanceEventSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this InstanceMaintenanceEventSummary. + 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`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this InstanceMaintenanceEventSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + **[Required]** Gets the id of this InstanceMaintenanceEventSummary. + The `OCID`__ of the maintenance event. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this InstanceMaintenanceEventSummary. + The `OCID`__ of the maintenance event. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this InstanceMaintenanceEventSummary. + :type: str + """ + self._id = id + + @property + def instance_id(self): + """ + **[Required]** Gets the instance_id of this InstanceMaintenanceEventSummary. + The OCID of the instance. + + + :return: The instance_id of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """ + Sets the instance_id of this InstanceMaintenanceEventSummary. + The OCID of the instance. + + + :param instance_id: The instance_id of this InstanceMaintenanceEventSummary. + :type: str + """ + self._instance_id = instance_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this InstanceMaintenanceEventSummary. + The OCID of the compartment that contains the instance. + + + :return: The compartment_id of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this InstanceMaintenanceEventSummary. + The OCID of the compartment that contains the instance. + + + :param compartment_id: The compartment_id of this InstanceMaintenanceEventSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def maintenance_category(self): + """ + **[Required]** Gets the maintenance_category of this InstanceMaintenanceEventSummary. + This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + deferred, or even cancelled. Please see the + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + + :return: The maintenance_category of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._maintenance_category + + @maintenance_category.setter + def maintenance_category(self, maintenance_category): + """ + Sets the maintenance_category of this InstanceMaintenanceEventSummary. + This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have + tighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled, + deferred, or even cancelled. Please see the + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + + :param maintenance_category: The maintenance_category of this InstanceMaintenanceEventSummary. + :type: str + """ + self._maintenance_category = maintenance_category + + @property + def maintenance_reason(self): + """ + **[Required]** Gets the maintenance_reason of this InstanceMaintenanceEventSummary. + This is the reason that Maintenance is being performed. See + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + + :return: The maintenance_reason of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._maintenance_reason + + @maintenance_reason.setter + def maintenance_reason(self, maintenance_reason): + """ + Sets the maintenance_reason of this InstanceMaintenanceEventSummary. + This is the reason that Maintenance is being performed. See + `Instance Maintenance`__ documentation for details. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/placeholder.htm + + + :param maintenance_reason: The maintenance_reason of this InstanceMaintenanceEventSummary. + :type: str + """ + self._maintenance_reason = maintenance_reason + + @property + def instance_action(self): + """ + **[Required]** Gets the instance_action of this InstanceMaintenanceEventSummary. + This is the action that will be performed on the Instance by OCI when the Maintenance begins. + + + :return: The instance_action of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._instance_action + + @instance_action.setter + def instance_action(self, instance_action): + """ + Sets the instance_action of this InstanceMaintenanceEventSummary. + This is the action that will be performed on the Instance by OCI when the Maintenance begins. + + + :param instance_action: The instance_action of this InstanceMaintenanceEventSummary. + :type: str + """ + self._instance_action = instance_action + + @property + def alternative_resolution_actions(self): + """ + **[Required]** Gets the alternative_resolution_actions of this InstanceMaintenanceEventSummary. + These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + + Allowed values for items in this list are: "REBOOT_MIGRATION", "TERMINATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The alternative_resolution_actions of this InstanceMaintenanceEventSummary. + :rtype: list[str] + """ + return self._alternative_resolution_actions + + @alternative_resolution_actions.setter + def alternative_resolution_actions(self, alternative_resolution_actions): + """ + Sets the alternative_resolution_actions of this InstanceMaintenanceEventSummary. + These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance. + + + :param alternative_resolution_actions: The alternative_resolution_actions of this InstanceMaintenanceEventSummary. + :type: list[str] + """ + allowed_values = ["REBOOT_MIGRATION", "TERMINATE"] + if alternative_resolution_actions: + alternative_resolution_actions[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in alternative_resolution_actions] + self._alternative_resolution_actions = alternative_resolution_actions + + @property + def time_started(self): + """ + Gets the time_started of this InstanceMaintenanceEventSummary. + The time at which the Maintenance actually started. + + + :return: The time_started of this InstanceMaintenanceEventSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this InstanceMaintenanceEventSummary. + The time at which the Maintenance actually started. + + + :param time_started: The time_started of this InstanceMaintenanceEventSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this InstanceMaintenanceEventSummary. + The time at which the Maintenance actually finished. + + + :return: The time_finished of this InstanceMaintenanceEventSummary. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this InstanceMaintenanceEventSummary. + The time at which the Maintenance actually finished. + + + :param time_finished: The time_finished of this InstanceMaintenanceEventSummary. + :type: datetime + """ + self._time_finished = time_finished + + @property + def time_window_start(self): + """ + **[Required]** Gets the time_window_start of this InstanceMaintenanceEventSummary. + The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + this time. + + + :return: The time_window_start of this InstanceMaintenanceEventSummary. + :rtype: datetime + """ + return self._time_window_start + + @time_window_start.setter + def time_window_start(self, time_window_start): + """ + Sets the time_window_start of this InstanceMaintenanceEventSummary. + The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + this time. + + + :param time_window_start: The time_window_start of this InstanceMaintenanceEventSummary. + :type: datetime + """ + self._time_window_start = time_window_start + + @property + def start_window_duration(self): + """ + Gets the start_window_duration of this InstanceMaintenanceEventSummary. + The duration of the time window Maintenance is scheduled to begin within. + + + :return: The start_window_duration of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._start_window_duration + + @start_window_duration.setter + def start_window_duration(self, start_window_duration): + """ + Sets the start_window_duration of this InstanceMaintenanceEventSummary. + The duration of the time window Maintenance is scheduled to begin within. + + + :param start_window_duration: The start_window_duration of this InstanceMaintenanceEventSummary. + :type: str + """ + self._start_window_duration = start_window_duration + + @property + def estimated_duration(self): + """ + Gets the estimated_duration of this InstanceMaintenanceEventSummary. + This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + + + :return: The estimated_duration of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._estimated_duration + + @estimated_duration.setter + def estimated_duration(self, estimated_duration): + """ + Sets the estimated_duration of this InstanceMaintenanceEventSummary. + This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state. + + + :param estimated_duration: The estimated_duration of this InstanceMaintenanceEventSummary. + :type: str + """ + self._estimated_duration = estimated_duration + + @property + def time_hard_due_date(self): + """ + Gets the time_hard_due_date of this InstanceMaintenanceEventSummary. + It is the scheduled hard due date and time of the maintenance event. + The maintenance event will happen at this time and the due date will not be extended. + + + :return: The time_hard_due_date of this InstanceMaintenanceEventSummary. + :rtype: datetime + """ + return self._time_hard_due_date + + @time_hard_due_date.setter + def time_hard_due_date(self, time_hard_due_date): + """ + Sets the time_hard_due_date of this InstanceMaintenanceEventSummary. + It is the scheduled hard due date and time of the maintenance event. + The maintenance event will happen at this time and the due date will not be extended. + + + :param time_hard_due_date: The time_hard_due_date of this InstanceMaintenanceEventSummary. + :type: datetime + """ + self._time_hard_due_date = time_hard_due_date + + @property + def can_reschedule(self): + """ + **[Required]** Gets the can_reschedule of this InstanceMaintenanceEventSummary. + Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + + + :return: The can_reschedule of this InstanceMaintenanceEventSummary. + :rtype: bool + """ + return self._can_reschedule + + @can_reschedule.setter + def can_reschedule(self, can_reschedule): + """ + Sets the can_reschedule of this InstanceMaintenanceEventSummary. + Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate. + + + :param can_reschedule: The can_reschedule of this InstanceMaintenanceEventSummary. + :type: bool + """ + self._can_reschedule = can_reschedule + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this InstanceMaintenanceEventSummary. + The date and time the maintenance event was created, in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this InstanceMaintenanceEventSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this InstanceMaintenanceEventSummary. + The date and time the maintenance event was created, in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this InstanceMaintenanceEventSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this InstanceMaintenanceEventSummary. + The current state of the maintenance event. + + + :return: The lifecycle_state of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this InstanceMaintenanceEventSummary. + The current state of the maintenance event. + + + :param lifecycle_state: The lifecycle_state of this InstanceMaintenanceEventSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def created_by(self): + """ + **[Required]** Gets the created_by of this InstanceMaintenanceEventSummary. + The creator of the maintenance event. + + + :return: The created_by of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this InstanceMaintenanceEventSummary. + The creator of the maintenance event. + + + :param created_by: The created_by of this InstanceMaintenanceEventSummary. + :type: str + """ + self._created_by = created_by + + @property + def description(self): + """ + Gets the description of this InstanceMaintenanceEventSummary. + It is the descriptive information about the maintenance taking place on the customer instance. + + + :return: The description of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this InstanceMaintenanceEventSummary. + It is the descriptive information about the maintenance taking place on the customer instance. + + + :param description: The description of this InstanceMaintenanceEventSummary. + :type: str + """ + self._description = description + + @property + def correlation_token(self): + """ + Gets the correlation_token of this InstanceMaintenanceEventSummary. + A unique identifier that will group Instances that have a relationship with one another and must be scheduled + together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + perspective will have a matching correlationToken. + + + :return: The correlation_token of this InstanceMaintenanceEventSummary. + :rtype: str + """ + return self._correlation_token + + @correlation_token.setter + def correlation_token(self, correlation_token): + """ + Sets the correlation_token of this InstanceMaintenanceEventSummary. + A unique identifier that will group Instances that have a relationship with one another and must be scheduled + together for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance + perspective will have a matching correlationToken. + + + :param correlation_token: The correlation_token of this InstanceMaintenanceEventSummary. + :type: str + """ + self._correlation_token = correlation_token + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/core/models/update_instance_maintenance_event_details.py b/src/oci/core/models/update_instance_maintenance_event_details.py new file mode 100644 index 0000000000..31e6ac0154 --- /dev/null +++ b/src/oci/core/models/update_instance_maintenance_event_details.py @@ -0,0 +1,281 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20160918 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateInstanceMaintenanceEventDetails(object): + """ + Specifies the properties for updating maintenance due date. + """ + + #: A constant which can be used with the alternative_resolution_action property of a UpdateInstanceMaintenanceEventDetails. + #: This constant has a value of "REBOOT_MIGRATION" + ALTERNATIVE_RESOLUTION_ACTION_REBOOT_MIGRATION = "REBOOT_MIGRATION" + + #: A constant which can be used with the alternative_resolution_action property of a UpdateInstanceMaintenanceEventDetails. + #: This constant has a value of "TERMINATE" + ALTERNATIVE_RESOLUTION_ACTION_TERMINATE = "TERMINATE" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateInstanceMaintenanceEventDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_window_start: + The value to assign to the time_window_start property of this UpdateInstanceMaintenanceEventDetails. + :type time_window_start: datetime + + :param alternative_resolution_action: + The value to assign to the alternative_resolution_action property of this UpdateInstanceMaintenanceEventDetails. + Allowed values for this property are: "REBOOT_MIGRATION", "TERMINATE" + :type alternative_resolution_action: str + + :param can_delete_local_storage: + The value to assign to the can_delete_local_storage property of this UpdateInstanceMaintenanceEventDetails. + :type can_delete_local_storage: bool + + :param display_name: + The value to assign to the display_name property of this UpdateInstanceMaintenanceEventDetails. + :type display_name: str + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateInstanceMaintenanceEventDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateInstanceMaintenanceEventDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'time_window_start': 'datetime', + 'alternative_resolution_action': 'str', + 'can_delete_local_storage': 'bool', + 'display_name': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'time_window_start': 'timeWindowStart', + 'alternative_resolution_action': 'alternativeResolutionAction', + 'can_delete_local_storage': 'canDeleteLocalStorage', + 'display_name': 'displayName', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags' + } + + self._time_window_start = None + self._alternative_resolution_action = None + self._can_delete_local_storage = None + self._display_name = None + self._defined_tags = None + self._freeform_tags = None + + @property + def time_window_start(self): + """ + Gets the time_window_start of this UpdateInstanceMaintenanceEventDetails. + The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + this time. + + The timeWindowEnd is automatically calculated based on the maintenanceReason and the instanceAction. + + + :return: The time_window_start of this UpdateInstanceMaintenanceEventDetails. + :rtype: datetime + """ + return self._time_window_start + + @time_window_start.setter + def time_window_start(self, time_window_start): + """ + Sets the time_window_start of this UpdateInstanceMaintenanceEventDetails. + The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before + this time. + + The timeWindowEnd is automatically calculated based on the maintenanceReason and the instanceAction. + + + :param time_window_start: The time_window_start of this UpdateInstanceMaintenanceEventDetails. + :type: datetime + """ + self._time_window_start = time_window_start + + @property + def alternative_resolution_action(self): + """ + Gets the alternative_resolution_action of this UpdateInstanceMaintenanceEventDetails. + One of the alternativeResolutionActions that was provided in the InstanceMaintenanceEvent. + + Allowed values for this property are: "REBOOT_MIGRATION", "TERMINATE" + + + :return: The alternative_resolution_action of this UpdateInstanceMaintenanceEventDetails. + :rtype: str + """ + return self._alternative_resolution_action + + @alternative_resolution_action.setter + def alternative_resolution_action(self, alternative_resolution_action): + """ + Sets the alternative_resolution_action of this UpdateInstanceMaintenanceEventDetails. + One of the alternativeResolutionActions that was provided in the InstanceMaintenanceEvent. + + + :param alternative_resolution_action: The alternative_resolution_action of this UpdateInstanceMaintenanceEventDetails. + :type: str + """ + allowed_values = ["REBOOT_MIGRATION", "TERMINATE"] + if not value_allowed_none_or_none_sentinel(alternative_resolution_action, allowed_values): + raise ValueError( + f"Invalid value for `alternative_resolution_action`, must be None or one of {allowed_values}" + ) + self._alternative_resolution_action = alternative_resolution_action + + @property + def can_delete_local_storage(self): + """ + Gets the can_delete_local_storage of this UpdateInstanceMaintenanceEventDetails. + This field is only applicable when setting the alternativeResolutionAction. + + For Instances that have local storage, this must be set to true to verify that the local storage + will be deleted during the migration. For instances without, this parameter has no effect. + + In cases where the local storage will be lost, this parameter must be set or the request will fail. + + + :return: The can_delete_local_storage of this UpdateInstanceMaintenanceEventDetails. + :rtype: bool + """ + return self._can_delete_local_storage + + @can_delete_local_storage.setter + def can_delete_local_storage(self, can_delete_local_storage): + """ + Sets the can_delete_local_storage of this UpdateInstanceMaintenanceEventDetails. + This field is only applicable when setting the alternativeResolutionAction. + + For Instances that have local storage, this must be set to true to verify that the local storage + will be deleted during the migration. For instances without, this parameter has no effect. + + In cases where the local storage will be lost, this parameter must be set or the request will fail. + + + :param can_delete_local_storage: The can_delete_local_storage of this UpdateInstanceMaintenanceEventDetails. + :type: bool + """ + self._can_delete_local_storage = can_delete_local_storage + + @property + def display_name(self): + """ + Gets the display_name of this UpdateInstanceMaintenanceEventDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this UpdateInstanceMaintenanceEventDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateInstanceMaintenanceEventDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this UpdateInstanceMaintenanceEventDetails. + :type: str + """ + self._display_name = display_name + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateInstanceMaintenanceEventDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateInstanceMaintenanceEventDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateInstanceMaintenanceEventDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateInstanceMaintenanceEventDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateInstanceMaintenanceEventDetails. + 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`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateInstanceMaintenanceEventDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateInstanceMaintenanceEventDetails. + 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`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateInstanceMaintenanceEventDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/data_safe_client.py b/src/oci/data_safe/data_safe_client.py index 5ed5f2dcd1..619edfd4cf 100644 --- a/src/oci/data_safe/data_safe_client.py +++ b/src/oci/data_safe/data_safe_client.py @@ -1185,6 +1185,125 @@ def change_alert_compartment(self, alert_id, change_alert_compartment_details, * api_reference_link=api_reference_link, required_arguments=required_arguments) + def change_alert_policy_compartment(self, alert_policy_id, change_alert_policy_compartment_details, **kwargs): + """ + Moves the specified alert policy into a different compartment. + + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param oci.data_safe.models.ChangeAlertPolicyCompartmentDetails change_alert_policy_compartment_details: (required) + The details used to change the compartment of an alert policy. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + 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. + + :param str opc_retry_token: (optional) + 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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_alert_policy_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['alertPolicyId'] + resource_path = "/alertPolicies/{alertPolicyId}/actions/changeCompartment" + method = "POST" + operation_name = "change_alert_policy_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/ChangeAlertPolicyCompartment" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"change_alert_policy_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "alertPolicyId": alert_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_alert_policy_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_alert_policy_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def change_audit_archive_retrieval_compartment(self, audit_archive_retrieval_id, change_audit_archive_retrieval_compartment_details, **kwargs): """ Moves the archive retreival to the specified compartment. When provided, if-Match is checked against ETag value of the resource. @@ -4280,15 +4399,13 @@ def compare_user_assessment(self, user_assessment_id, compare_user_assessment_de api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_audit_archive_retrieval(self, create_audit_archive_retrieval_details, **kwargs): + def create_alert_policy(self, create_alert_policy_details, **kwargs): """ - Creates a work request to retrieve archived audit data. This asynchronous process will usually take over an hour to complete. - Save the id from the response of this operation. Call GetAuditArchiveRetrieval operation after an hour, passing the id to know the status of - this operation. + Creates a new user-defined alert policy. - :param oci.data_safe.models.CreateAuditArchiveRetrievalDetails create_audit_archive_retrieval_details: (required) - Details for creating retrieving archived audit data. + :param oci.data_safe.models.CreateAlertPolicyDetails create_alert_policy_details: (required) + The details used to create a new alert policy. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -4311,18 +4428,18 @@ def create_audit_archive_retrieval(self, create_audit_archive_retrieval_details, allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditArchiveRetrieval` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertPolicy` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_audit_archive_retrieval API. + Click `here `__ to see an example of how to use create_alert_policy API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/auditArchiveRetrievals" + resource_path = "/alertPolicies" method = "POST" - operation_name = "create_audit_archive_retrieval" - api_reference_link = "" + operation_name = "create_alert_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/CreateAlertPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -4334,7 +4451,7 @@ def create_audit_archive_retrieval(self, create_audit_archive_retrieval_details, extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_audit_archive_retrieval got unknown kwargs: {extra_kwargs!r}") + f"create_alert_policy got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", @@ -4361,8 +4478,8 @@ def create_audit_archive_retrieval(self, create_audit_archive_retrieval_details, resource_path=resource_path, method=method, header_params=header_params, - body=create_audit_archive_retrieval_details, - response_type="AuditArchiveRetrieval", + body=create_alert_policy_details, + response_type="AlertPolicy", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4372,20 +4489,23 @@ def create_audit_archive_retrieval(self, create_audit_archive_retrieval_details, resource_path=resource_path, method=method, header_params=header_params, - body=create_audit_archive_retrieval_details, - response_type="AuditArchiveRetrieval", + body=create_alert_policy_details, + response_type="AlertPolicy", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_details, **kwargs): + def create_alert_policy_rule(self, create_alert_policy_rule_details, alert_policy_id, **kwargs): """ - Creates a new Data Safe private endpoint. + Creates a new rule for the alert policy. - :param oci.data_safe.models.CreateDataSafePrivateEndpointDetails create_data_safe_private_endpoint_details: (required) - Details to create a new private endpoint. + :param oci.data_safe.models.CreateAlertPolicyRuleDetails create_alert_policy_rule_details: (required) + The details used to create a new alert policy rule. + + :param str alert_policy_id: (required) + The OCID of the alert policy. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -4408,18 +4528,18 @@ def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_de allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DataSafePrivateEndpoint` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertPolicyRule` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_data_safe_private_endpoint API. + Click `here `__ to see an example of how to use create_alert_policy_rule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/dataSafePrivateEndpoints" + required_arguments = ['alertPolicyId'] + resource_path = "/alertPolicies/{alertPolicyId}/rules" method = "POST" - operation_name = "create_data_safe_private_endpoint" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpoint/CreateDataSafePrivateEndpoint" + operation_name = "create_alert_policy_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/CreateAlertPolicyRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -4431,7 +4551,17 @@ def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_de extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_data_safe_private_endpoint got unknown kwargs: {extra_kwargs!r}") + f"create_alert_policy_rule got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "alertPolicyId": alert_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { "accept": "application/json", @@ -4457,9 +4587,10 @@ def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_de self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_data_safe_private_endpoint_details, - response_type="DataSafePrivateEndpoint", + body=create_alert_policy_rule_details, + response_type="AlertPolicyRule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4468,25 +4599,24 @@ def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_de return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_data_safe_private_endpoint_details, - response_type="DataSafePrivateEndpoint", + body=create_alert_policy_rule_details, + response_type="AlertPolicyRule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_discovery_job(self, create_discovery_job_details, **kwargs): + def create_audit_archive_retrieval(self, create_audit_archive_retrieval_details, **kwargs): """ - Performs incremental data discovery for the specified sensitive data model. It uses the target database associated - with the sensitive data model. - After performing data discovery, you can use ListDiscoveryJobResults to view the discovery results, PatchDiscoveryJobResults - to specify the action you want perform on these results, and then ApplyDiscoveryJobResults to process the results - and apply them to the sensitive data model. + Creates a work request to retrieve archived audit data. This asynchronous process will usually take over an hour to complete. + Save the id from the response of this operation. Call GetAuditArchiveRetrieval operation after an hour, passing the id to know the status of + this operation. - :param oci.data_safe.models.CreateDiscoveryJobDetails create_discovery_job_details: (required) - The details used to run an incremental data discovery job + :param oci.data_safe.models.CreateAuditArchiveRetrievalDetails create_audit_archive_retrieval_details: (required) + Details for creating retrieving archived audit data. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -4509,17 +4639,17 @@ def create_discovery_job(self, create_discovery_job_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJob` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditArchiveRetrieval` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_discovery_job API. + Click `here `__ to see an example of how to use create_audit_archive_retrieval API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/discoveryJobs" + resource_path = "/auditArchiveRetrievals" method = "POST" - operation_name = "create_discovery_job" + operation_name = "create_audit_archive_retrieval" api_reference_link = "" # Don't accept unknown kwargs @@ -4532,7 +4662,7 @@ def create_discovery_job(self, create_discovery_job_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_discovery_job got unknown kwargs: {extra_kwargs!r}") + f"create_audit_archive_retrieval got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", @@ -4559,8 +4689,8 @@ def create_discovery_job(self, create_discovery_job_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_discovery_job_details, - response_type="DiscoveryJob", + body=create_audit_archive_retrieval_details, + response_type="AuditArchiveRetrieval", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4570,24 +4700,20 @@ def create_discovery_job(self, create_discovery_job_details, **kwargs): resource_path=resource_path, method=method, header_params=header_params, - body=create_discovery_job_details, - response_type="DiscoveryJob", + body=create_audit_archive_retrieval_details, + response_type="AuditArchiveRetrieval", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_library_masking_format(self, create_library_masking_format_details, **kwargs): + def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_details, **kwargs): """ - Creates a new library masking format. A masking format can have one or more - format entries. The combined output of all the format entries is used for masking. - It provides the flexibility to define a masking format that can generate different - parts of a data value separately and then combine them to get the final data value - for masking. Note that you cannot define masking condition in a library masking format. + Creates a new Data Safe private endpoint. - :param oci.data_safe.models.CreateLibraryMaskingFormatDetails create_library_masking_format_details: (required) - Details to create a new library masking format. + :param oci.data_safe.models.CreateDataSafePrivateEndpointDetails create_data_safe_private_endpoint_details: (required) + Details to create a new private endpoint. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -4610,18 +4736,18 @@ def create_library_masking_format(self, create_library_masking_format_details, * allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.LibraryMaskingFormat` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DataSafePrivateEndpoint` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_library_masking_format API. + Click `here `__ to see an example of how to use create_data_safe_private_endpoint API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/libraryMaskingFormats" + resource_path = "/dataSafePrivateEndpoints" method = "POST" - operation_name = "create_library_masking_format" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/CreateLibraryMaskingFormat" + operation_name = "create_data_safe_private_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpoint/CreateDataSafePrivateEndpoint" # Don't accept unknown kwargs expected_kwargs = [ @@ -4633,7 +4759,7 @@ def create_library_masking_format(self, create_library_masking_format_details, * extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"create_library_masking_format got unknown kwargs: {extra_kwargs!r}") + f"create_data_safe_private_endpoint got unknown kwargs: {extra_kwargs!r}") header_params = { "accept": "application/json", @@ -4660,8 +4786,8 @@ def create_library_masking_format(self, create_library_masking_format_details, * resource_path=resource_path, method=method, header_params=header_params, - body=create_library_masking_format_details, - response_type="LibraryMaskingFormat", + body=create_data_safe_private_endpoint_details, + response_type="DataSafePrivateEndpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4671,42 +4797,244 @@ def create_library_masking_format(self, create_library_masking_format_details, * resource_path=resource_path, method=method, header_params=header_params, - body=create_library_masking_format_details, - response_type="LibraryMaskingFormat", + body=create_data_safe_private_endpoint_details, + response_type="DataSafePrivateEndpoint", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def create_masking_column(self, create_masking_column_details, masking_policy_id, **kwargs): + def create_discovery_job(self, create_discovery_job_details, **kwargs): """ - Creates a new masking column in the specified masking policy. Use this operation - to add parent columns only. It automatically adds the child columns from the - associated sensitive data model or target database. If you provide the - sensitiveTypeId attribute but not the maskingFormats attribute, it automatically - assigns the default masking format associated with the specified sensitive type. - Alternatively, if you provide the maskingFormats attribute, the specified masking - formats are assigned to the column. - - Using the maskingFormats attribute, you can assign one or more masking formats - to a column. You need to specify a condition as part of each masking format. It - enables you to do conditional masking - so that you can mask the column data values differently using different - masking conditions. A masking format can have one or more format entries. The - combined output of all the format entries is used for masking. It provides the - flexibility to define a masking format that can generate different parts of a data - value separately and then combine them to get the final data value for masking. - - You can use the maskingColumnGroup attribute to group the columns that you would - like to mask together. It enables you to do group or compound masking that ensures that the - masked data across the columns in a group continue to retain the same logical relationship. - + Performs incremental data discovery for the specified sensitive data model. It uses the target database associated + with the sensitive data model. + After performing data discovery, you can use ListDiscoveryJobResults to view the discovery results, PatchDiscoveryJobResults + to specify the action you want perform on these results, and then ApplyDiscoveryJobResults to process the results + and apply them to the sensitive data model. - :param oci.data_safe.models.CreateMaskingColumnDetails create_masking_column_details: (required) - Details to create a new masking column. - :param str masking_policy_id: (required) - The OCID of the masking policy. + :param oci.data_safe.models.CreateDiscoveryJobDetails create_discovery_job_details: (required) + The details used to run an incremental data discovery job + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJob` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_discovery_job API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/discoveryJobs" + method = "POST" + operation_name = "create_discovery_job" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_discovery_job got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_discovery_job_details, + response_type="DiscoveryJob", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_discovery_job_details, + response_type="DiscoveryJob", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def create_library_masking_format(self, create_library_masking_format_details, **kwargs): + """ + Creates a new library masking format. A masking format can have one or more + format entries. The combined output of all the format entries is used for masking. + It provides the flexibility to define a masking format that can generate different + parts of a data value separately and then combine them to get the final data value + for masking. Note that you cannot define masking condition in a library masking format. + + + :param oci.data_safe.models.CreateLibraryMaskingFormatDetails create_library_masking_format_details: (required) + Details to create a new library masking format. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.LibraryMaskingFormat` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_library_masking_format API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/libraryMaskingFormats" + method = "POST" + operation_name = "create_library_masking_format" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/CreateLibraryMaskingFormat" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_library_masking_format got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_library_masking_format_details, + response_type="LibraryMaskingFormat", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_library_masking_format_details, + response_type="LibraryMaskingFormat", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def create_masking_column(self, create_masking_column_details, masking_policy_id, **kwargs): + """ + Creates a new masking column in the specified masking policy. Use this operation + to add parent columns only. It automatically adds the child columns from the + associated sensitive data model or target database. If you provide the + sensitiveTypeId attribute but not the maskingFormats attribute, it automatically + assigns the default masking format associated with the specified sensitive type. + Alternatively, if you provide the maskingFormats attribute, the specified masking + formats are assigned to the column. + + Using the maskingFormats attribute, you can assign one or more masking formats + to a column. You need to specify a condition as part of each masking format. It + enables you to do conditional masking + so that you can mask the column data values differently using different + masking conditions. A masking format can have one or more format entries. The + combined output of all the format entries is used for masking. It provides the + flexibility to define a masking format that can generate different parts of a data + value separately and then combine them to get the final data value for masking. + + You can use the maskingColumnGroup attribute to group the columns that you would + like to mask together. It enables you to do group or compound masking that ensures that the + masked data across the columns in a group continue to retain the same logical relationship. + + + :param oci.data_safe.models.CreateMaskingColumnDetails create_masking_column_details: (required) + Details to create a new masking column. + + :param str masking_policy_id: (required) + The OCID of the masking policy. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -6251,14 +6579,13 @@ def deactivate_target_database(self, target_database_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): + def delete_alert_policy(self, alert_policy_id, **kwargs): """ - To unload retrieved archive data, call the operation ListAuditArchiveRetrieval first. - This will return the auditArchiveRetrievalId. Then call this operation with auditArchiveRetrievalId. + Deletes the specified user-defined alert policy. - :param str audit_archive_retrieval_id: (required) - OCID of the archive retrieval. + :param str alert_policy_id: (required) + The OCID of the alert policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6286,14 +6613,14 @@ def delete_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_audit_archive_retrieval API. + Click `here `__ to see an example of how to use delete_alert_policy API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditArchiveRetrievalId'] - resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}" + required_arguments = ['alertPolicyId'] + resource_path = "/alertPolicies/{alertPolicyId}" method = "DELETE" - operation_name = "delete_audit_archive_retrieval" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditArchiveRetrieval/DeleteAuditArchiveRetrieval" + operation_name = "delete_alert_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/DeleteAlertPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -6305,10 +6632,10 @@ def delete_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_audit_archive_retrieval got unknown kwargs: {extra_kwargs!r}") + f"delete_alert_policy got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditArchiveRetrievalId": audit_archive_retrieval_id + "alertPolicyId": alert_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6357,13 +6684,16 @@ def delete_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_audit_trail(self, audit_trail_id, **kwargs): + def delete_alert_policy_rule(self, alert_policy_id, rule_key, **kwargs): """ - Deletes the specified audit trail. + Deletes the specified user-defined alert policy rule. - :param str audit_trail_id: (required) - The OCID of the audit trail. + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param str rule_key: (required) + The key of the alert policy rule. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6391,14 +6721,14 @@ def delete_audit_trail(self, audit_trail_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_audit_trail API. + Click `here `__ to see an example of how to use delete_alert_policy_rule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditTrailId'] - resource_path = "/auditTrails/{auditTrailId}" + required_arguments = ['alertPolicyId', 'ruleKey'] + resource_path = "/alertPolicies/{alertPolicyId}/rules/{ruleKey}" method = "DELETE" - operation_name = "delete_audit_trail" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/DeleteAuditTrail" + operation_name = "delete_alert_policy_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/DeleteAlertPolicyRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -6410,10 +6740,11 @@ def delete_audit_trail(self, audit_trail_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_audit_trail got unknown kwargs: {extra_kwargs!r}") + f"delete_alert_policy_rule got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditTrailId": audit_trail_id + "alertPolicyId": alert_policy_id, + "ruleKey": rule_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6462,13 +6793,14 @@ def delete_audit_trail(self, audit_trail_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs): + def delete_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): """ - Deletes the specified Data Safe private endpoint. + To unload retrieved archive data, call the operation ListAuditArchiveRetrieval first. + This will return the auditArchiveRetrievalId. Then call this operation with auditArchiveRetrievalId. - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6496,14 +6828,14 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_data_safe_private_endpoint API. + Click `here `__ to see an example of how to use delete_audit_archive_retrieval API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['dataSafePrivateEndpointId'] - resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" + required_arguments = ['auditArchiveRetrievalId'] + resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}" method = "DELETE" - operation_name = "delete_data_safe_private_endpoint" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpoint/DeleteDataSafePrivateEndpoint" + operation_name = "delete_audit_archive_retrieval" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditArchiveRetrieval/DeleteAuditArchiveRetrieval" # Don't accept unknown kwargs expected_kwargs = [ @@ -6515,10 +6847,10 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_data_safe_private_endpoint got unknown kwargs: {extra_kwargs!r}") + f"delete_audit_archive_retrieval got unknown kwargs: {extra_kwargs!r}") path_params = { - "dataSafePrivateEndpointId": data_safe_private_endpoint_id + "auditArchiveRetrievalId": audit_archive_retrieval_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6567,13 +6899,13 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_discovery_job(self, discovery_job_id, **kwargs): + def delete_audit_trail(self, audit_trail_id, **kwargs): """ - Deletes the specified discovery job. + Deletes the specified audit trail. - :param str discovery_job_id: (required) - The OCID of the discovery job. + :param str audit_trail_id: (required) + The OCID of the audit trail. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6601,14 +6933,14 @@ def delete_discovery_job(self, discovery_job_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_discovery_job API. + Click `here `__ to see an example of how to use delete_audit_trail API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['discoveryJobId'] - resource_path = "/discoveryJobs/{discoveryJobId}" + required_arguments = ['auditTrailId'] + resource_path = "/auditTrails/{auditTrailId}" method = "DELETE" - operation_name = "delete_discovery_job" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/DeleteDiscoveryJob" + operation_name = "delete_audit_trail" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/DeleteAuditTrail" # Don't accept unknown kwargs expected_kwargs = [ @@ -6620,10 +6952,10 @@ def delete_discovery_job(self, discovery_job_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_discovery_job got unknown kwargs: {extra_kwargs!r}") + f"delete_audit_trail got unknown kwargs: {extra_kwargs!r}") path_params = { - "discoveryJobId": discovery_job_id + "auditTrailId": audit_trail_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6672,17 +7004,119 @@ def delete_discovery_job(self, discovery_job_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_discovery_job_result(self, discovery_job_id, result_key, **kwargs): + def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs): """ - Deletes the specified discovery result. + Deletes the specified Data Safe private endpoint. + + + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_data_safe_private_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['dataSafePrivateEndpointId'] + resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" + method = "DELETE" + operation_name = "delete_data_safe_private_endpoint" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DataSafePrivateEndpoint/DeleteDataSafePrivateEndpoint" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_data_safe_private_endpoint got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "dataSafePrivateEndpointId": data_safe_private_endpoint_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def delete_discovery_job(self, discovery_job_id, **kwargs): + """ + Deletes the specified discovery job. :param str discovery_job_id: (required) The OCID of the discovery job. - :param str result_key: (required) - The unique key that identifies the discovery result. - :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the @@ -6709,14 +7143,14 @@ def delete_discovery_job_result(self, discovery_job_id, result_key, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_discovery_job_result API. + Click `here `__ to see an example of how to use delete_discovery_job API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['discoveryJobId', 'resultKey'] - resource_path = "/discoveryJobs/{discoveryJobId}/results/{resultKey}" + required_arguments = ['discoveryJobId'] + resource_path = "/discoveryJobs/{discoveryJobId}" method = "DELETE" - operation_name = "delete_discovery_job_result" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJobResult/DeleteDiscoveryJobResult" + operation_name = "delete_discovery_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJob/DeleteDiscoveryJob" # Don't accept unknown kwargs expected_kwargs = [ @@ -6728,11 +7162,10 @@ def delete_discovery_job_result(self, discovery_job_id, result_key, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_discovery_job_result got unknown kwargs: {extra_kwargs!r}") + f"delete_discovery_job got unknown kwargs: {extra_kwargs!r}") path_params = { - "discoveryJobId": discovery_job_id, - "resultKey": result_key + "discoveryJobId": discovery_job_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6781,13 +7214,16 @@ def delete_discovery_job_result(self, discovery_job_id, result_key, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_library_masking_format(self, library_masking_format_id, **kwargs): + def delete_discovery_job_result(self, discovery_job_id, result_key, **kwargs): """ - Deletes the specified library masking format. + Deletes the specified discovery result. - :param str library_masking_format_id: (required) - The OCID of the library masking format. + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param str result_key: (required) + The unique key that identifies the discovery result. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6815,14 +7251,14 @@ def delete_library_masking_format(self, library_masking_format_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_library_masking_format API. + Click `here `__ to see an example of how to use delete_discovery_job_result API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['libraryMaskingFormatId'] - resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}" + required_arguments = ['discoveryJobId', 'resultKey'] + resource_path = "/discoveryJobs/{discoveryJobId}/results/{resultKey}" method = "DELETE" - operation_name = "delete_library_masking_format" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/DeleteLibraryMaskingFormat" + operation_name = "delete_discovery_job_result" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/DiscoveryJobResult/DeleteDiscoveryJobResult" # Don't accept unknown kwargs expected_kwargs = [ @@ -6834,10 +7270,11 @@ def delete_library_masking_format(self, library_masking_format_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_library_masking_format got unknown kwargs: {extra_kwargs!r}") + f"delete_discovery_job_result got unknown kwargs: {extra_kwargs!r}") path_params = { - "libraryMaskingFormatId": library_masking_format_id + "discoveryJobId": discovery_job_id, + "resultKey": result_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6886,16 +7323,13 @@ def delete_library_masking_format(self, library_masking_format_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_masking_column(self, masking_column_key, masking_policy_id, **kwargs): + def delete_library_masking_format(self, library_masking_format_id, **kwargs): """ - Deletes the specified masking column. - + Deletes the specified library masking format. - :param str masking_column_key: (required) - The unique key that identifies the masking column. It's numeric and unique within a masking policy. - :param str masking_policy_id: (required) - The OCID of the masking policy. + :param str library_masking_format_id: (required) + The OCID of the library masking format. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6923,14 +7357,14 @@ def delete_masking_column(self, masking_column_key, masking_policy_id, **kwargs) :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_masking_column API. + Click `here `__ to see an example of how to use delete_library_masking_format API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['maskingColumnKey', 'maskingPolicyId'] - resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}" + required_arguments = ['libraryMaskingFormatId'] + resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}" method = "DELETE" - operation_name = "delete_masking_column" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/DeleteMaskingColumn" + operation_name = "delete_library_masking_format" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/LibraryMaskingFormat/DeleteLibraryMaskingFormat" # Don't accept unknown kwargs expected_kwargs = [ @@ -6942,11 +7376,10 @@ def delete_masking_column(self, masking_column_key, masking_policy_id, **kwargs) extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_masking_column got unknown kwargs: {extra_kwargs!r}") + f"delete_library_masking_format got unknown kwargs: {extra_kwargs!r}") path_params = { - "maskingColumnKey": masking_column_key, - "maskingPolicyId": masking_policy_id + "libraryMaskingFormatId": library_masking_format_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6995,11 +7428,14 @@ def delete_masking_column(self, masking_column_key, masking_policy_id, **kwargs) api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_masking_policy(self, masking_policy_id, **kwargs): + def delete_masking_column(self, masking_column_key, masking_policy_id, **kwargs): """ - Deletes the specified masking policy. + Deletes the specified masking column. + :param str masking_column_key: (required) + The unique key that identifies the masking column. It's numeric and unique within a masking policy. + :param str masking_policy_id: (required) The OCID of the masking policy. @@ -7029,14 +7465,14 @@ def delete_masking_policy(self, masking_policy_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_masking_policy API. + Click `here `__ to see an example of how to use delete_masking_column API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['maskingPolicyId'] - resource_path = "/maskingPolicies/{maskingPolicyId}" + required_arguments = ['maskingColumnKey', 'maskingPolicyId'] + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}" method = "DELETE" - operation_name = "delete_masking_policy" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/DeleteMaskingPolicy" + operation_name = "delete_masking_column" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingColumn/DeleteMaskingColumn" # Don't accept unknown kwargs expected_kwargs = [ @@ -7048,9 +7484,10 @@ def delete_masking_policy(self, masking_policy_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_masking_policy got unknown kwargs: {extra_kwargs!r}") + f"delete_masking_column got unknown kwargs: {extra_kwargs!r}") path_params = { + "maskingColumnKey": masking_column_key, "maskingPolicyId": masking_policy_id } @@ -7100,13 +7537,13 @@ def delete_masking_policy(self, masking_policy_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_masking_policy_health_report(self, masking_policy_health_report_id, **kwargs): + def delete_masking_policy(self, masking_policy_id, **kwargs): """ - Deletes the specified masking policy health report. + Deletes the specified masking policy. - :param str masking_policy_health_report_id: (required) - The OCID of the masking health report. + :param str masking_policy_id: (required) + The OCID of the masking policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -7134,14 +7571,14 @@ def delete_masking_policy_health_report(self, masking_policy_health_report_id, * :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_masking_policy_health_report API. + Click `here `__ to see an example of how to use delete_masking_policy API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['maskingPolicyHealthReportId'] - resource_path = "/maskingPolicyHealthReports/{maskingPolicyHealthReportId}" + required_arguments = ['maskingPolicyId'] + resource_path = "/maskingPolicies/{maskingPolicyId}" method = "DELETE" - operation_name = "delete_masking_policy_health_report" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicyHealthReport/DeleteMaskingPolicyHealthReport" + operation_name = "delete_masking_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicy/DeleteMaskingPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -7153,10 +7590,115 @@ def delete_masking_policy_health_report(self, masking_policy_health_report_id, * extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_masking_policy_health_report got unknown kwargs: {extra_kwargs!r}") + f"delete_masking_policy got unknown kwargs: {extra_kwargs!r}") path_params = { - "maskingPolicyHealthReportId": masking_policy_health_report_id + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def delete_masking_policy_health_report(self, masking_policy_health_report_id, **kwargs): + """ + Deletes the specified masking policy health report. + + + :param str masking_policy_health_report_id: (required) + The OCID of the masking health report. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_masking_policy_health_report API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['maskingPolicyHealthReportId'] + resource_path = "/maskingPolicyHealthReports/{maskingPolicyHealthReportId}" + method = "DELETE" + operation_name = "delete_masking_policy_health_report" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/MaskingPolicyHealthReport/DeleteMaskingPolicyHealthReport" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_masking_policy_health_report got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "maskingPolicyHealthReportId": masking_policy_health_report_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11014,6 +11556,108 @@ def get_alert_policy(self, alert_policy_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_alert_policy_rule(self, alert_policy_id, rule_key, **kwargs): + """ + Gets the details of a policy rule by its key. + + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param str rule_key: (required) + The key of the alert policy rule. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AlertPolicyRule` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_alert_policy_rule API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['alertPolicyId', 'ruleKey'] + resource_path = "/alertPolicies/{alertPolicyId}/rules/{ruleKey}" + method = "GET" + operation_name = "get_alert_policy_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/GetAlertPolicyRule" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_alert_policy_rule got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "alertPolicyId": alert_policy_id, + "ruleKey": rule_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AlertPolicyRule", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AlertPolicyRule", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): """ Gets the details of the specified archive retreival. @@ -15325,13 +15969,13 @@ def list_alert_analytics(self, compartment_id, **kwargs): :param list[str] summary_field: (optional) Specifies a subset of summarized fields to be returned in the response. - Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount" + Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount", "alertPolicyRuleKey", "alertPolicyRuleName", "throttled" :param list[str] group_by: (optional) A groupBy can only be used in combination with summaryField parameter. A groupBy value has to be a subset of the values mentioned in summaryField parameter. - Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId" + Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "alertPolicyRuleKey", "alertPolicyRuleName" :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -15411,7 +16055,7 @@ def list_alert_analytics(self, compartment_id, **kwargs): ) if 'summary_field' in kwargs: - summary_field_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount"] + summary_field_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount", "alertPolicyRuleKey", "alertPolicyRuleName", "throttled"] for summary_field_item in kwargs['summary_field']: if summary_field_item not in summary_field_allowed_values: raise ValueError( @@ -15419,7 +16063,7 @@ def list_alert_analytics(self, compartment_id, **kwargs): ) if 'group_by' in kwargs: - group_by_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId"] + group_by_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "alertPolicyRuleKey", "alertPolicyRuleName"] for group_by_item in kwargs['group_by']: if group_by_item not in group_by_allowed_values: raise ValueError( @@ -23350,7 +23994,7 @@ def list_report_definitions(self, compartment_id, **kwargs): :param str lifecycle_state: (optional) An optional filter to return only resources that match the specified lifecycle state. - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED" + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" :param str category: (optional) An optional filter to return only resources that match the specified category. @@ -23433,7 +24077,7 @@ def list_report_definitions(self, compartment_id, **kwargs): ) if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" @@ -23572,7 +24216,7 @@ def list_reports(self, compartment_id, **kwargs): :param str lifecycle_state: (optional) An optional filter to return only resources that match the specified lifecycle state. - Allowed values are: "UPDATING", "ACTIVE" + Allowed values are: "UPDATING", "ACTIVE", "CREATING", "FAILED" :param str type: (optional) An optional filter to return only resources that match the specified type. @@ -23649,7 +24293,7 @@ def list_reports(self, compartment_id, **kwargs): ) if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["UPDATING", "ACTIVE"] + lifecycle_state_allowed_values = ["UPDATING", "ACTIVE", "CREATING", "FAILED"] if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: raise ValueError( f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }" @@ -32640,22 +33284,244 @@ def resume_audit_trail(self, audit_trail_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def resume_work_request(self, work_request_id, **kwargs): + def resume_work_request(self, work_request_id, **kwargs): + """ + Resume the given work request. Issuing a resume does not guarantee of immediate resume of the work request. + + + :param str work_request_id: (required) + The OCID of the work request. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + 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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use resume_work_request API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['workRequestId'] + resource_path = "/workRequests/{workRequestId}/actions/resume" + method = "POST" + operation_name = "resume_work_request" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/ResumeWorkRequest" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"resume_work_request got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def retrieve_audit_policies(self, audit_policy_id, **kwargs): + """ + Retrieves the audit policy details from the source target database. + + + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str opc_retry_token: (optional) + 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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use retrieve_audit_policies API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['auditPolicyId'] + resource_path = "/auditPolicies/{auditPolicyId}/actions/retrieveFromTarget" + method = "POST" + operation_name = "retrieve_audit_policies" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/RetrieveAuditPolicies" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"retrieve_audit_policies got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "auditPolicyId": audit_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def schedule_report(self, report_definition_id, schedule_report_details, **kwargs): """ - Resume the given work request. Issuing a resume does not guarantee of immediate resume of the work request. + Schedules a .xls or .pdf report based on parameters and report definition. - :param str work_request_id: (required) - The OCID of the work request. - - :param str opc_retry_token: (optional) - 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. + :param str report_definition_id: (required) + Unique report definition identifier - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.ScheduleReportDetails schedule_report_details: (required) + The details for the audit report schedule. It contains details such as schedule, MIME type .xls/.pdf and number of rows. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -32664,6 +33530,15 @@ def resume_work_request(self, work_request_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str opc_retry_token: (optional) + 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. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -32680,30 +33555,30 @@ def resume_work_request(self, work_request_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use resume_work_request API. + Click `here `__ to see an example of how to use schedule_report API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['workRequestId'] - resource_path = "/workRequests/{workRequestId}/actions/resume" + required_arguments = ['reportDefinitionId'] + resource_path = "/reportDefinitions/{reportDefinitionId}/actions/scheduleReport" method = "POST" - operation_name = "resume_work_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/ResumeWorkRequest" + operation_name = "schedule_report" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/ScheduleReport" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", + "if_match", "opc_request_id", - "if_match" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"resume_work_request got unknown kwargs: {extra_kwargs!r}") + f"schedule_report got unknown kwargs: {extra_kwargs!r}") path_params = { - "workRequestId": work_request_id + "reportDefinitionId": report_definition_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -32715,9 +33590,9 @@ def resume_work_request(self, work_request_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -32739,6 +33614,7 @@ def resume_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=schedule_report_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -32749,18 +33625,19 @@ def resume_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=schedule_report_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def retrieve_audit_policies(self, audit_policy_id, **kwargs): + def set_security_assessment_baseline(self, security_assessment_id, **kwargs): """ - Retrieves the audit policy details from the source target database. + Sets the saved security assessment as the baseline in the compartment where the the specified assessment resides. The security assessment needs to be of type 'SAVED'. - :param str audit_policy_id: (required) - Unique audit policy identifier. + :param str security_assessment_id: (required) + The OCID of the security assessment. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -32769,15 +33646,18 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. - :param str opc_retry_token: (optional) 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. + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param oci.data_safe.models.SecurityAssessmentBaseLineDetails base_line_details: (optional) + Details of security assessment that need to be updated while setting the baseline. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -32794,30 +33674,31 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use retrieve_audit_policies API. + Click `here `__ to see an example of how to use set_security_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditPolicyId'] - resource_path = "/auditPolicies/{auditPolicyId}/actions/retrieveFromTarget" + required_arguments = ['securityAssessmentId'] + resource_path = "/securityAssessments/{securityAssessmentId}/actions/setBaseline" method = "POST" - operation_name = "retrieve_audit_policies" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditPolicy/RetrieveAuditPolicies" + operation_name = "set_security_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/SetSecurityAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", + "opc_retry_token", "opc_request_id", - "opc_retry_token" + "base_line_details" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"retrieve_audit_policies got unknown kwargs: {extra_kwargs!r}") + f"set_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditPolicyId": audit_policy_id + "securityAssessmentId": security_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -32830,8 +33711,8 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -32853,6 +33734,7 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -32863,21 +33745,19 @@ def retrieve_audit_policies(self, audit_policy_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def schedule_report(self, report_definition_id, schedule_report_details, **kwargs): + def set_user_assessment_baseline(self, user_assessment_id, **kwargs): """ - Schedules a .xls or .pdf report based on parameters and report definition. - + Sets the saved user assessment as the baseline in the compartment where the specified assessment resides. The user assessment needs to be of type 'SAVED'. - :param str report_definition_id: (required) - Unique report definition identifier - :param oci.data_safe.models.ScheduleReportDetails schedule_report_details: (required) - The details for the audit report schedule. It contains details such as schedule, MIME type .xls/.pdf and number of rows. + :param str user_assessment_id: (required) + The OCID of the user assessment. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -32886,15 +33766,18 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. - :param str opc_retry_token: (optional) 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. + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param oci.data_safe.models.UserAssessmentBaseLineDetails base_line_details: (optional) + Details of user assessment that need to be updated while setting the baseline. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -32911,30 +33794,31 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use schedule_report API. + Click `here `__ to see an example of how to use set_user_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['reportDefinitionId'] - resource_path = "/reportDefinitions/{reportDefinitionId}/actions/scheduleReport" + required_arguments = ['userAssessmentId'] + resource_path = "/userAssessments/{userAssessmentId}/actions/setBaseline" method = "POST" - operation_name = "schedule_report" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/ReportDefinition/ScheduleReport" + operation_name = "set_user_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/SetUserAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", + "opc_retry_token", "opc_request_id", - "opc_retry_token" + "base_line_details" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"schedule_report got unknown kwargs: {extra_kwargs!r}") + f"set_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "reportDefinitionId": report_definition_id + "userAssessmentId": user_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -32947,8 +33831,8 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -32970,7 +33854,7 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=schedule_report_details, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -32981,19 +33865,22 @@ def schedule_report(self, report_definition_id, schedule_report_details, **kwarg method=method, path_params=path_params, header_params=header_params, - body=schedule_report_details, + body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def set_security_assessment_baseline(self, security_assessment_id, **kwargs): + def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs): """ - Sets the saved security assessment as the baseline in the compartment where the the specified assessment resides. The security assessment needs to be of type 'SAVED'. + Starts collection of audit records on the specified audit trail. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param oci.data_safe.models.StartAuditTrailDetails start_audit_trail_details: (required) + Details for the starting audit. + + :param str audit_trail_id: (required) + The OCID of the audit trail. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -33002,18 +33889,15 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :param str opc_retry_token: (optional) 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. - :param str opc_request_id: (optional) - Unique identifier for the request. - - :param oci.data_safe.models.SecurityAssessmentBaseLineDetails base_line_details: (optional) - Details of security assessment that need to be updated while setting the baseline. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33030,31 +33914,30 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use set_security_assessment_baseline API. + Click `here `__ to see an example of how to use start_audit_trail API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['securityAssessmentId'] - resource_path = "/securityAssessments/{securityAssessmentId}/actions/setBaseline" + required_arguments = ['auditTrailId'] + resource_path = "/auditTrails/{auditTrailId}/actions/start" method = "POST" - operation_name = "set_security_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/SetSecurityAssessmentBaseline" + operation_name = "start_audit_trail" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StartAuditTrail" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id", - "base_line_details" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"set_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"start_audit_trail got unknown kwargs: {extra_kwargs!r}") path_params = { - "securityAssessmentId": security_assessment_id + "auditTrailId": audit_trail_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -33067,8 +33950,8 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -33090,7 +33973,7 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), + body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -33101,19 +33984,19 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), + body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def set_user_assessment_baseline(self, user_assessment_id, **kwargs): + def start_sql_collection(self, sql_collection_id, **kwargs): """ - Sets the saved user assessment as the baseline in the compartment where the specified assessment resides. The user assessment needs to be of type 'SAVED'. + Start the specified SQL collection. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str sql_collection_id: (required) + The OCID of the SQL collection resource. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -33122,18 +34005,15 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :param str opc_retry_token: (optional) 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. - :param str opc_request_id: (optional) - Unique identifier for the request. - - :param oci.data_safe.models.UserAssessmentBaseLineDetails base_line_details: (optional) - Details of user assessment that need to be updated while setting the baseline. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33150,31 +34030,30 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use set_user_assessment_baseline API. + Click `here `__ to see an example of how to use start_sql_collection API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['userAssessmentId'] - resource_path = "/userAssessments/{userAssessmentId}/actions/setBaseline" + required_arguments = ['sqlCollectionId'] + resource_path = "/sqlCollections/{sqlCollectionId}/actions/start" method = "POST" - operation_name = "set_user_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/SetUserAssessmentBaseline" + operation_name = "start_sql_collection" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/sqlCollection/StartSqlCollection" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id", - "base_line_details" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"set_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"start_sql_collection got unknown kwargs: {extra_kwargs!r}") path_params = { - "userAssessmentId": user_assessment_id + "sqlCollectionId": sql_collection_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -33187,8 +34066,8 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -33210,7 +34089,6 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -33221,19 +34099,15 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs): + def stop_audit_trail(self, audit_trail_id, **kwargs): """ - Starts collection of audit records on the specified audit trail. - + Stops the specified audit trail. - :param oci.data_safe.models.StartAuditTrailDetails start_audit_trail_details: (required) - Details for the starting audit. :param str audit_trail_id: (required) The OCID of the audit trail. @@ -33248,12 +34122,6 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) :param str opc_request_id: (optional) Unique identifier for the request. - :param str opc_retry_token: (optional) - 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. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33270,27 +34138,26 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use start_audit_trail API. + Click `here `__ to see an example of how to use stop_audit_trail API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['auditTrailId'] - resource_path = "/auditTrails/{auditTrailId}/actions/start" + resource_path = "/auditTrails/{auditTrailId}/actions/stop" method = "POST" - operation_name = "start_audit_trail" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StartAuditTrail" + operation_name = "stop_audit_trail" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StopAuditTrail" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"start_audit_trail got unknown kwargs: {extra_kwargs!r}") + f"stop_audit_trail got unknown kwargs: {extra_kwargs!r}") path_params = { "auditTrailId": audit_trail_id @@ -33306,8 +34173,7 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -33320,7 +34186,6 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -33329,7 +34194,6 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) method=method, path_params=path_params, header_params=header_params, - body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -33340,15 +34204,14 @@ def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs) method=method, path_params=path_params, header_params=header_params, - body=start_audit_trail_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def start_sql_collection(self, sql_collection_id, **kwargs): + def stop_sql_collection(self, sql_collection_id, **kwargs): """ - Start the specified SQL collection. + Stops the specified SQL collection. :param str sql_collection_id: (required) @@ -33386,14 +34249,14 @@ def start_sql_collection(self, sql_collection_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use start_sql_collection API. + Click `here `__ to see an example of how to use stop_sql_collection API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = ['sqlCollectionId'] - resource_path = "/sqlCollections/{sqlCollectionId}/actions/start" + resource_path = "/sqlCollections/{sqlCollectionId}/actions/stop" method = "POST" - operation_name = "start_sql_collection" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/sqlCollection/StartSqlCollection" + operation_name = "stop_sql_collection" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/StopSqlCollection" # Don't accept unknown kwargs expected_kwargs = [ @@ -33406,7 +34269,7 @@ def start_sql_collection(self, sql_collection_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"start_sql_collection got unknown kwargs: {extra_kwargs!r}") + f"stop_sql_collection got unknown kwargs: {extra_kwargs!r}") path_params = { "sqlCollectionId": sql_collection_id @@ -33460,13 +34323,22 @@ def start_sql_collection(self, sql_collection_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def stop_audit_trail(self, audit_trail_id, **kwargs): + def suspend_work_request(self, work_request_id, **kwargs): """ - Stops the specified audit trail. + Suspend the given work request. Issuing a suspend does not guarantee of a immediate suspend of the work request. - :param str audit_trail_id: (required) - The OCID of the audit trail. + :param str work_request_id: (required) + The OCID of the work request. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + Unique identifier for the request. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -33475,9 +34347,6 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33494,29 +34363,30 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use stop_audit_trail API. + Click `here `__ to see an example of how to use suspend_work_request API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['auditTrailId'] - resource_path = "/auditTrails/{auditTrailId}/actions/stop" + required_arguments = ['workRequestId'] + resource_path = "/workRequests/{workRequestId}/actions/suspend" method = "POST" - operation_name = "stop_audit_trail" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AuditTrail/StopAuditTrail" + operation_name = "suspend_work_request" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/SuspendWorkRequest" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_request_id" + "opc_retry_token", + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"stop_audit_trail got unknown kwargs: {extra_kwargs!r}") + f"suspend_work_request got unknown kwargs: {extra_kwargs!r}") path_params = { - "auditTrailId": audit_trail_id + "workRequestId": work_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -33528,8 +34398,9 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -33542,6 +34413,7 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -33565,13 +34437,15 @@ def stop_audit_trail(self, audit_trail_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def stop_sql_collection(self, sql_collection_id, **kwargs): + def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): """ - Stops the specified SQL collection. + Removes the baseline setting for the saved security assessment associated with the targetId passed via body. + If no body or empty body is passed then the baseline settings of all the saved security assessments pertaining to the baseline assessment OCID provided in the path will be removed. + Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. - :param str sql_collection_id: (required) - The OCID of the SQL collection resource. + :param str security_assessment_id: (required) + The OCID of the security assessment. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -33580,15 +34454,18 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. - :param str opc_retry_token: (optional) 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. + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param oci.data_safe.models.UnsetSecurityAssessmentBaselineDetails unset_security_assessment_baseline_details: (optional) + Details of the target associated with the security assessment for which the user intents to unset the baseline. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33605,30 +34482,31 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use stop_sql_collection API. + Click `here `__ to see an example of how to use unset_security_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['sqlCollectionId'] - resource_path = "/sqlCollections/{sqlCollectionId}/actions/stop" + required_arguments = ['securityAssessmentId'] + resource_path = "/securityAssessments/{securityAssessmentId}/actions/unsetBaseline" method = "POST" - operation_name = "stop_sql_collection" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SqlCollection/StopSqlCollection" + operation_name = "unset_security_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/UnsetSecurityAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", + "opc_retry_token", "opc_request_id", - "opc_retry_token" + "unset_security_assessment_baseline_details" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"stop_sql_collection got unknown kwargs: {extra_kwargs!r}") + f"unset_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "sqlCollectionId": sql_collection_id + "securityAssessmentId": security_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -33641,8 +34519,8 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -33664,6 +34542,7 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('unset_security_assessment_baseline_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -33674,18 +34553,28 @@ def stop_sql_collection(self, sql_collection_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('unset_security_assessment_baseline_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def suspend_work_request(self, work_request_id, **kwargs): + def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): """ - Suspend the given work request. Issuing a suspend does not guarantee of a immediate suspend of the work request. + Removes the baseline setting for the saved user assessment associated with the targetId passed via body. + If no body or empty body is passed then the baseline settings of all the saved user assessments pertaining to the baseline assessment OCID provided in the path will be removed. + Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. - :param str work_request_id: (required) - The OCID of the work request. + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param str if_match: (optional) + 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. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -33696,12 +34585,8 @@ def suspend_work_request(self, work_request_id, **kwargs): :param str opc_request_id: (optional) Unique identifier for the request. - :param str if_match: (optional) - 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. + :param oci.data_safe.models.UnsetUserAssessmentBaselineDetails unset_user_assessment_baseline_details: (optional) + Details of the target associated with the user assessment for which the user intents to unset the baseline. :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33719,30 +34604,31 @@ def suspend_work_request(self, work_request_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use suspend_work_request API. + Click `here `__ to see an example of how to use unset_user_assessment_baseline API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['workRequestId'] - resource_path = "/workRequests/{workRequestId}/actions/suspend" + required_arguments = ['userAssessmentId'] + resource_path = "/userAssessments/{userAssessmentId}/actions/unsetBaseline" method = "POST" - operation_name = "suspend_work_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/WorkRequest/SuspendWorkRequest" + operation_name = "unset_user_assessment_baseline" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/UnsetUserAssessmentBaseline" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "opc_retry_token", "opc_request_id", - "if_match" + "unset_user_assessment_baseline_details" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"suspend_work_request got unknown kwargs: {extra_kwargs!r}") + f"unset_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") path_params = { - "workRequestId": work_request_id + "userAssessmentId": user_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -33754,9 +34640,9 @@ def suspend_work_request(self, work_request_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -33778,6 +34664,7 @@ def suspend_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('unset_user_assessment_baseline_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -33788,20 +34675,22 @@ def suspend_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, + body=kwargs.get('unset_user_assessment_baseline_details'), allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): + def update_alert(self, alert_id, update_alert_details, **kwargs): """ - Removes the baseline setting for the saved security assessment associated with the targetId passed via body. - If no body or empty body is passed then the baseline settings of all the saved security assessments pertaining to the baseline assessment OCID provided in the path will be removed. - Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. + Updates the status of the specified alert. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str alert_id: (required) + The OCID of alert. + + :param oci.data_safe.models.UpdateAlertDetails update_alert_details: (required) + The details used to update alert status. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -33810,18 +34699,9 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - 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. - :param str opc_request_id: (optional) Unique identifier for the request. - :param oci.data_safe.models.UnsetSecurityAssessmentBaselineDetails unset_security_assessment_baseline_details: (optional) - Details of the target associated with the security assessment for which the user intents to unset the baseline. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33834,35 +34714,33 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type None + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.Alert` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use unset_security_assessment_baseline API. + Click `here `__ to see an example of how to use update_alert API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['securityAssessmentId'] - resource_path = "/securityAssessments/{securityAssessmentId}/actions/unsetBaseline" - method = "POST" - operation_name = "unset_security_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/SecurityAssessment/UnsetSecurityAssessmentBaseline" + required_arguments = ['alertId'] + resource_path = "/alerts/{alertId}" + method = "PUT" + operation_name = "update_alert" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Alert/UpdateAlert" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", - "opc_request_id", - "unset_security_assessment_baseline_details" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"unset_security_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"update_alert got unknown kwargs: {extra_kwargs!r}") path_params = { - "securityAssessmentId": security_assessment_id + "alertId": alert_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -33875,7 +34753,6 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -33889,7 +34766,6 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -33898,7 +34774,8 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('unset_security_assessment_baseline_details'), + body=update_alert_details, + response_type="Alert", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -33909,21 +34786,23 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('unset_security_assessment_baseline_details'), + body=update_alert_details, + response_type="Alert", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): + def update_alert_policy(self, alert_policy_id, update_alert_policy_details, **kwargs): """ - Removes the baseline setting for the saved user assessment associated with the targetId passed via body. - If no body or empty body is passed then the baseline settings of all the saved user assessments pertaining to the baseline assessment OCID provided in the path will be removed. - Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. + Updates the specified alert policy . - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param oci.data_safe.models.UpdateAlertPolicyDetails update_alert_policy_details: (required) + The details used to update the alert policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -33932,18 +34811,9 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - 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. - :param str opc_request_id: (optional) Unique identifier for the request. - :param oci.data_safe.models.UnsetUserAssessmentBaselineDetails unset_user_assessment_baseline_details: (optional) - Details of the target associated with the user assessment for which the user intents to unset the baseline. - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -33960,31 +34830,29 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use unset_user_assessment_baseline API. + Click `here `__ to see an example of how to use update_alert_policy API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['userAssessmentId'] - resource_path = "/userAssessments/{userAssessmentId}/actions/unsetBaseline" - method = "POST" - operation_name = "unset_user_assessment_baseline" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/UserAssessment/UnsetUserAssessmentBaseline" + required_arguments = ['alertPolicyId'] + resource_path = "/alertPolicies/{alertPolicyId}" + method = "PUT" + operation_name = "update_alert_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicy/UpdateAlertPolicy" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", - "opc_request_id", - "unset_user_assessment_baseline_details" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"unset_user_assessment_baseline got unknown kwargs: {extra_kwargs!r}") + f"update_alert_policy got unknown kwargs: {extra_kwargs!r}") path_params = { - "userAssessmentId": user_assessment_id + "alertPolicyId": alert_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -33997,7 +34865,6 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -34011,7 +34878,6 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -34020,7 +34886,7 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('unset_user_assessment_baseline_details'), + body=update_alert_policy_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -34031,22 +34897,25 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('unset_user_assessment_baseline_details'), + body=update_alert_policy_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def update_alert(self, alert_id, update_alert_details, **kwargs): + def update_alert_policy_rule(self, alert_policy_id, rule_key, update_alert_policy_rule_details, **kwargs): """ - Updates the status of the specified alert. + Updates the specified alert policy rule. - :param str alert_id: (required) - The OCID of alert. + :param str alert_policy_id: (required) + The OCID of the alert policy. - :param oci.data_safe.models.UpdateAlertDetails update_alert_details: (required) - The details used to update alert status. + :param str rule_key: (required) + The key of the alert policy rule. + + :param oci.data_safe.models.UpdateAlertPolicyRuleDetails update_alert_policy_rule_details: (required) + The details used to update the alert policy rule. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -34070,18 +34939,18 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.Alert` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_alert API. + Click `here `__ to see an example of how to use update_alert_policy_rule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['alertId'] - resource_path = "/alerts/{alertId}" + required_arguments = ['alertPolicyId', 'ruleKey'] + resource_path = "/alertPolicies/{alertPolicyId}/rules/{ruleKey}" method = "PUT" - operation_name = "update_alert" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/Alert/UpdateAlert" + operation_name = "update_alert_policy_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/data-safe/20181201/AlertPolicyRule/UpdateAlertPolicyRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -34093,10 +34962,11 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"update_alert got unknown kwargs: {extra_kwargs!r}") + f"update_alert_policy_rule got unknown kwargs: {extra_kwargs!r}") path_params = { - "alertId": alert_id + "alertPolicyId": alert_policy_id, + "ruleKey": rule_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -34130,8 +35000,7 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=update_alert_details, - response_type="Alert", + body=update_alert_policy_rule_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -34142,8 +35011,7 @@ def update_alert(self, alert_id, update_alert_details, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=update_alert_details, - response_type="Alert", + body=update_alert_policy_rule_details, allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, diff --git a/src/oci/data_safe/data_safe_client_composite_operations.py b/src/oci/data_safe/data_safe_client_composite_operations.py index e595a8ac9f..a1cd221aa8 100644 --- a/src/oci/data_safe/data_safe_client_composite_operations.py +++ b/src/oci/data_safe/data_safe_client_composite_operations.py @@ -313,6 +313,48 @@ def calculate_audit_volume_collected_and_wait_for_state(self, audit_profile_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def change_alert_policy_compartment_and_wait_for_state(self, alert_policy_id, change_alert_policy_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.change_alert_policy_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param oci.data_safe.models.ChangeAlertPolicyCompartmentDetails change_alert_policy_compartment_details: (required) + The details used to change the compartment of an alert policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_alert_policy_compartment` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.change_alert_policy_compartment(alert_policy_id, change_alert_policy_compartment_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def change_audit_archive_retrieval_compartment_and_wait_for_state(self, audit_archive_retrieval_id, change_audit_archive_retrieval_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.change_audit_archive_retrieval_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -901,6 +943,87 @@ def compare_user_assessment_and_wait_for_state(self, user_assessment_id, compare except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_alert_policy_and_wait_for_state(self, create_alert_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.create_alert_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.CreateAlertPolicyDetails create_alert_policy_details: (required) + The details used to create a new alert policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_alert_policy` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_alert_policy(create_alert_policy_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_alert_policy_rule_and_wait_for_state(self, create_alert_policy_rule_details, alert_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.create_alert_policy_rule` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.CreateAlertPolicyRuleDetails create_alert_policy_rule_details: (required) + The details used to create a new alert policy rule. + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_alert_policy_rule` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_alert_policy_rule(create_alert_policy_rule_details, alert_policy_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_audit_archive_retrieval_and_wait_for_state(self, create_audit_archive_retrieval_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.create_audit_archive_retrieval` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -1651,6 +1774,103 @@ def deactivate_target_database_and_wait_for_state(self, target_database_id, wait except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_alert_policy_and_wait_for_state(self, alert_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_alert_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_alert_policy` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_alert_policy(alert_policy_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_alert_policy_rule_and_wait_for_state(self, alert_policy_id, rule_key, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_alert_policy_rule` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param str rule_key: (required) + The key of the alert policy rule. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_alert_policy_rule` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_alert_policy_rule(alert_policy_id, rule_key, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_audit_archive_retrieval_and_wait_for_state(self, audit_archive_retrieval_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.delete_audit_archive_retrieval` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -4155,6 +4375,93 @@ def update_alert_and_wait_for_state(self, alert_id, update_alert_details, wait_f except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_alert_policy_and_wait_for_state(self, alert_policy_id, update_alert_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_alert_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param oci.data_safe.models.UpdateAlertPolicyDetails update_alert_policy_details: (required) + The details used to update the alert policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_alert_policy` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_alert_policy(alert_policy_id, update_alert_policy_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_alert_policy_rule_and_wait_for_state(self, alert_policy_id, rule_key, update_alert_policy_rule_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_alert_policy_rule` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param str rule_key: (required) + The key of the alert policy rule. + + :param oci.data_safe.models.UpdateAlertPolicyRuleDetails update_alert_policy_rule_details: (required) + The details used to update the alert policy rule. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_alert_policy_rule` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_alert_policy_rule(alert_policy_id, rule_key, update_alert_policy_rule_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_audit_archive_retrieval_and_wait_for_state(self, audit_archive_retrieval_id, update_audit_archive_retrieval_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.update_audit_archive_retrieval` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` diff --git a/src/oci/data_safe/models/__init__.py b/src/oci/data_safe/models/__init__.py index 4185f47773..93f58b66a6 100644 --- a/src/oci/data_safe/models/__init__.py +++ b/src/oci/data_safe/models/__init__.py @@ -363,6 +363,7 @@ from .unset_security_assessment_baseline_details import UnsetSecurityAssessmentBaselineDetails from .unset_user_assessment_baseline_details import UnsetUserAssessmentBaselineDetails from .update_alert_details import UpdateAlertDetails +from .update_alert_policy_details import UpdateAlertPolicyDetails from .update_alert_policy_rule_details import UpdateAlertPolicyRuleDetails from .update_audit_archive_retrieval_details import UpdateAuditArchiveRetrievalDetails from .update_audit_policy_details import UpdateAuditPolicyDetails @@ -771,6 +772,7 @@ "UnsetSecurityAssessmentBaselineDetails": UnsetSecurityAssessmentBaselineDetails, "UnsetUserAssessmentBaselineDetails": UnsetUserAssessmentBaselineDetails, "UpdateAlertDetails": UpdateAlertDetails, + "UpdateAlertPolicyDetails": UpdateAlertPolicyDetails, "UpdateAlertPolicyRuleDetails": UpdateAlertPolicyRuleDetails, "UpdateAuditArchiveRetrievalDetails": UpdateAuditArchiveRetrievalDetails, "UpdateAuditPolicyDetails": UpdateAuditPolicyDetails, diff --git a/src/oci/data_safe/models/alert.py b/src/oci/data_safe/models/alert.py index 3f2f80d7a9..cb40eba876 100644 --- a/src/oci/data_safe/models/alert.py +++ b/src/oci/data_safe/models/alert.py @@ -166,6 +166,14 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this Alert. :type time_updated: datetime + :param alert_policy_rule_key: + The value to assign to the alert_policy_rule_key property of this Alert. + :type alert_policy_rule_key: str + + :param alert_policy_rule_name: + The value to assign to the alert_policy_rule_name property of this Alert. + :type alert_policy_rule_name: str + :param freeform_tags: The value to assign to the freeform_tags property of this Alert. :type freeform_tags: dict(str, str) @@ -199,6 +207,8 @@ def __init__(self, **kwargs): 'lifecycle_state': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'alert_policy_rule_key': 'str', + 'alert_policy_rule_name': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -224,6 +234,8 @@ def __init__(self, **kwargs): 'lifecycle_state': 'lifecycleState', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'alert_policy_rule_key': 'alertPolicyRuleKey', + 'alert_policy_rule_name': 'alertPolicyRuleName', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -248,6 +260,8 @@ def __init__(self, **kwargs): self._lifecycle_state = None self._time_created = None self._time_updated = None + self._alert_policy_rule_key = None + self._alert_policy_rule_name = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -752,6 +766,54 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def alert_policy_rule_key(self): + """ + Gets the alert_policy_rule_key of this Alert. + The key of the rule of alert policy that triggered alert. + + + :return: The alert_policy_rule_key of this Alert. + :rtype: str + """ + return self._alert_policy_rule_key + + @alert_policy_rule_key.setter + def alert_policy_rule_key(self, alert_policy_rule_key): + """ + Sets the alert_policy_rule_key of this Alert. + The key of the rule of alert policy that triggered alert. + + + :param alert_policy_rule_key: The alert_policy_rule_key of this Alert. + :type: str + """ + self._alert_policy_rule_key = alert_policy_rule_key + + @property + def alert_policy_rule_name(self): + """ + Gets the alert_policy_rule_name of this Alert. + The display name of the rule of alert policy that triggered alert. + + + :return: The alert_policy_rule_name of this Alert. + :rtype: str + """ + return self._alert_policy_rule_name + + @alert_policy_rule_name.setter + def alert_policy_rule_name(self, alert_policy_rule_name): + """ + Sets the alert_policy_rule_name of this Alert. + The display name of the rule of alert policy that triggered alert. + + + :param alert_policy_rule_name: The alert_policy_rule_name of this Alert. + :type: str + """ + self._alert_policy_rule_name = alert_policy_rule_name + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/alert_policy.py b/src/oci/data_safe/models/alert_policy.py index 1b1e8141d8..7cd24e6d11 100644 --- a/src/oci/data_safe/models/alert_policy.py +++ b/src/oci/data_safe/models/alert_policy.py @@ -124,6 +124,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str + :param lifecycle_details: + The value to assign to the lifecycle_details property of this AlertPolicy. + :type lifecycle_details: str + :param freeform_tags: The value to assign to the freeform_tags property of this AlertPolicy. :type freeform_tags: dict(str, str) @@ -148,6 +152,7 @@ def __init__(self, **kwargs): 'time_created': 'datetime', 'time_updated': 'datetime', 'lifecycle_state': 'str', + 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -164,6 +169,7 @@ def __init__(self, **kwargs): 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -179,6 +185,7 @@ def __init__(self, **kwargs): self._time_created = None self._time_updated = None self._lifecycle_state = None + self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -449,6 +456,30 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this AlertPolicy. + Details about the current state of the alert policy. + + + :return: The lifecycle_details of this AlertPolicy. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AlertPolicy. + Details about the current state of the alert policy. + + + :param lifecycle_details: The lifecycle_details of this AlertPolicy. + :type: str + """ + self._lifecycle_details = lifecycle_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/alert_policy_rule.py b/src/oci/data_safe/models/alert_policy_rule.py index 1676a409f7..4bdf5f2634 100644 --- a/src/oci/data_safe/models/alert_policy_rule.py +++ b/src/oci/data_safe/models/alert_policy_rule.py @@ -15,6 +15,26 @@ class AlertPolicyRule(object): A rule associated with a alert policy. """ + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRule. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRule. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRule. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRule. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRule. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + def __init__(self, **kwargs): """ Initializes a new AlertPolicyRule object with values from keyword arguments. @@ -32,22 +52,45 @@ def __init__(self, **kwargs): The value to assign to the expression property of this AlertPolicyRule. :type expression: str + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AlertPolicyRule. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param display_name: + The value to assign to the display_name property of this AlertPolicyRule. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this AlertPolicyRule. + :type time_created: datetime + """ self.swagger_types = { 'key': 'str', 'description': 'str', - 'expression': 'str' + 'expression': 'str', + 'lifecycle_state': 'str', + 'display_name': 'str', + 'time_created': 'datetime' } self.attribute_map = { 'key': 'key', 'description': 'description', - 'expression': 'expression' + 'expression': 'expression', + 'lifecycle_state': 'lifecycleState', + 'display_name': 'displayName', + 'time_created': 'timeCreated' } self._key = None self._description = None self._expression = None + self._lifecycle_state = None + self._display_name = None + self._time_created = None @property def key(self): @@ -121,6 +164,88 @@ def expression(self, expression): """ self._expression = expression + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this AlertPolicyRule. + The current state of the alert policy rule. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AlertPolicyRule. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AlertPolicyRule. + The current state of the alert policy rule. + + + :param lifecycle_state: The lifecycle_state of this AlertPolicyRule. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def display_name(self): + """ + Gets the display_name of this AlertPolicyRule. + The display name of the alert policy rule. + + + :return: The display_name of this AlertPolicyRule. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlertPolicyRule. + The display name of the alert policy rule. + + + :param display_name: The display_name of this AlertPolicyRule. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + Gets the time_created of this AlertPolicyRule. + Creation date and time of the alert policy rule, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AlertPolicyRule. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AlertPolicyRule. + Creation date and time of the alert policy rule, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AlertPolicyRule. + :type: datetime + """ + self._time_created = time_created + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/alert_policy_rule_summary.py b/src/oci/data_safe/models/alert_policy_rule_summary.py index 423bbd9129..050e19d007 100644 --- a/src/oci/data_safe/models/alert_policy_rule_summary.py +++ b/src/oci/data_safe/models/alert_policy_rule_summary.py @@ -15,6 +15,26 @@ class AlertPolicyRuleSummary(object): A rule associated with an alert policy. """ + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRuleSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRuleSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRuleSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRuleSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicyRuleSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + def __init__(self, **kwargs): """ Initializes a new AlertPolicyRuleSummary object with values from keyword arguments. @@ -32,22 +52,45 @@ def __init__(self, **kwargs): The value to assign to the expression property of this AlertPolicyRuleSummary. :type expression: str + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AlertPolicyRuleSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param display_name: + The value to assign to the display_name property of this AlertPolicyRuleSummary. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this AlertPolicyRuleSummary. + :type time_created: datetime + """ self.swagger_types = { 'key': 'str', 'description': 'str', - 'expression': 'str' + 'expression': 'str', + 'lifecycle_state': 'str', + 'display_name': 'str', + 'time_created': 'datetime' } self.attribute_map = { 'key': 'key', 'description': 'description', - 'expression': 'expression' + 'expression': 'expression', + 'lifecycle_state': 'lifecycleState', + 'display_name': 'displayName', + 'time_created': 'timeCreated' } self._key = None self._description = None self._expression = None + self._lifecycle_state = None + self._display_name = None + self._time_created = None @property def key(self): @@ -121,6 +164,88 @@ def expression(self, expression): """ self._expression = expression + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this AlertPolicyRuleSummary. + The current state of the alert policy rule. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AlertPolicyRuleSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AlertPolicyRuleSummary. + The current state of the alert policy rule. + + + :param lifecycle_state: The lifecycle_state of this AlertPolicyRuleSummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def display_name(self): + """ + Gets the display_name of this AlertPolicyRuleSummary. + The display name of the alert policy rule. + + + :return: The display_name of this AlertPolicyRuleSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlertPolicyRuleSummary. + The display name of the alert policy rule. + + + :param display_name: The display_name of this AlertPolicyRuleSummary. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + Gets the time_created of this AlertPolicyRuleSummary. + Creation date and time of the alert policy rule, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AlertPolicyRuleSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AlertPolicyRuleSummary. + Creation date and time of the alert policy rule, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AlertPolicyRuleSummary. + :type: datetime + """ + self._time_created = time_created + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/alert_policy_summary.py b/src/oci/data_safe/models/alert_policy_summary.py index 2d5806a1a7..d7dca2f225 100644 --- a/src/oci/data_safe/models/alert_policy_summary.py +++ b/src/oci/data_safe/models/alert_policy_summary.py @@ -122,6 +122,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str + :param lifecycle_details: + The value to assign to the lifecycle_details property of this AlertPolicySummary. + :type lifecycle_details: str + :param freeform_tags: The value to assign to the freeform_tags property of this AlertPolicySummary. :type freeform_tags: dict(str, str) @@ -142,6 +146,7 @@ def __init__(self, **kwargs): 'time_created': 'datetime', 'time_updated': 'datetime', 'lifecycle_state': 'str', + 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -157,6 +162,7 @@ def __init__(self, **kwargs): 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -171,6 +177,7 @@ def __init__(self, **kwargs): self._time_created = None self._time_updated = None self._lifecycle_state = None + self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None @@ -440,6 +447,30 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this AlertPolicySummary. + Details about the current state of the alert policy. + + + :return: The lifecycle_details of this AlertPolicySummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AlertPolicySummary. + Details about the current state of the alert policy. + + + :param lifecycle_details: The lifecycle_details of this AlertPolicySummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/alert_summary.py b/src/oci/data_safe/models/alert_summary.py index da841c1e7f..aca8924032 100644 --- a/src/oci/data_safe/models/alert_summary.py +++ b/src/oci/data_safe/models/alert_summary.py @@ -154,6 +154,14 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str + :param alert_policy_rule_key: + The value to assign to the alert_policy_rule_key property of this AlertSummary. + :type alert_policy_rule_key: str + + :param alert_policy_rule_name: + The value to assign to the alert_policy_rule_name property of this AlertSummary. + :type alert_policy_rule_name: str + :param feature_details: The value to assign to the feature_details property of this AlertSummary. :type feature_details: dict(str, dict(str, object)) @@ -184,6 +192,8 @@ def __init__(self, **kwargs): 'time_created': 'datetime', 'time_updated': 'datetime', 'lifecycle_state': 'str', + 'alert_policy_rule_key': 'str', + 'alert_policy_rule_name': 'str', 'feature_details': 'dict(str, dict(str, object))', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' @@ -206,6 +216,8 @@ def __init__(self, **kwargs): 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', + 'alert_policy_rule_key': 'alertPolicyRuleKey', + 'alert_policy_rule_name': 'alertPolicyRuleName', 'feature_details': 'featureDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' @@ -227,6 +239,8 @@ def __init__(self, **kwargs): self._time_created = None self._time_updated = None self._lifecycle_state = None + self._alert_policy_rule_key = None + self._alert_policy_rule_name = None self._feature_details = None self._freeform_tags = None self._defined_tags = None @@ -657,6 +671,54 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def alert_policy_rule_key(self): + """ + Gets the alert_policy_rule_key of this AlertSummary. + The key of the rule of alert policy that triggered alert. + + + :return: The alert_policy_rule_key of this AlertSummary. + :rtype: str + """ + return self._alert_policy_rule_key + + @alert_policy_rule_key.setter + def alert_policy_rule_key(self, alert_policy_rule_key): + """ + Sets the alert_policy_rule_key of this AlertSummary. + The key of the rule of alert policy that triggered alert. + + + :param alert_policy_rule_key: The alert_policy_rule_key of this AlertSummary. + :type: str + """ + self._alert_policy_rule_key = alert_policy_rule_key + + @property + def alert_policy_rule_name(self): + """ + Gets the alert_policy_rule_name of this AlertSummary. + The display name of the rule of alert policy that triggered alert. + + + :return: The alert_policy_rule_name of this AlertSummary. + :rtype: str + """ + return self._alert_policy_rule_name + + @alert_policy_rule_name.setter + def alert_policy_rule_name(self, alert_policy_rule_name): + """ + Sets the alert_policy_rule_name of this AlertSummary. + The display name of the rule of alert policy that triggered alert. + + + :param alert_policy_rule_name: The alert_policy_rule_name of this AlertSummary. + :type: str + """ + self._alert_policy_rule_name = alert_policy_rule_name + @property def feature_details(self): """ diff --git a/src/oci/data_safe/models/create_alert_policy_details.py b/src/oci/data_safe/models/create_alert_policy_details.py index e34688ffbd..140172451f 100644 --- a/src/oci/data_safe/models/create_alert_policy_details.py +++ b/src/oci/data_safe/models/create_alert_policy_details.py @@ -74,6 +74,10 @@ def __init__(self, **kwargs): The value to assign to the compartment_id property of this CreateAlertPolicyDetails. :type compartment_id: str + :param alert_policy_rule_details: + The value to assign to the alert_policy_rule_details property of this CreateAlertPolicyDetails. + :type alert_policy_rule_details: list[oci.data_safe.models.CreateAlertPolicyRuleDetails] + :param freeform_tags: The value to assign to the freeform_tags property of this CreateAlertPolicyDetails. :type freeform_tags: dict(str, str) @@ -89,6 +93,7 @@ def __init__(self, **kwargs): 'description': 'str', 'severity': 'str', 'compartment_id': 'str', + 'alert_policy_rule_details': 'list[CreateAlertPolicyRuleDetails]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -99,6 +104,7 @@ def __init__(self, **kwargs): 'description': 'description', 'severity': 'severity', 'compartment_id': 'compartmentId', + 'alert_policy_rule_details': 'alertPolicyRuleDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -108,6 +114,7 @@ def __init__(self, **kwargs): self._description = None self._severity = None self._compartment_id = None + self._alert_policy_rule_details = None self._freeform_tags = None self._defined_tags = None @@ -245,6 +252,30 @@ def compartment_id(self, compartment_id): """ self._compartment_id = compartment_id + @property + def alert_policy_rule_details(self): + """ + Gets the alert_policy_rule_details of this CreateAlertPolicyDetails. + The details of the alert policy rule. + + + :return: The alert_policy_rule_details of this CreateAlertPolicyDetails. + :rtype: list[oci.data_safe.models.CreateAlertPolicyRuleDetails] + """ + return self._alert_policy_rule_details + + @alert_policy_rule_details.setter + def alert_policy_rule_details(self, alert_policy_rule_details): + """ + Sets the alert_policy_rule_details of this CreateAlertPolicyDetails. + The details of the alert policy rule. + + + :param alert_policy_rule_details: The alert_policy_rule_details of this CreateAlertPolicyDetails. + :type: list[oci.data_safe.models.CreateAlertPolicyRuleDetails] + """ + self._alert_policy_rule_details = alert_policy_rule_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/create_alert_policy_rule_details.py b/src/oci/data_safe/models/create_alert_policy_rule_details.py index 9290c5504c..ec75663973 100644 --- a/src/oci/data_safe/models/create_alert_policy_rule_details.py +++ b/src/oci/data_safe/models/create_alert_policy_rule_details.py @@ -28,19 +28,26 @@ def __init__(self, **kwargs): The value to assign to the description property of this CreateAlertPolicyRuleDetails. :type description: str + :param display_name: + The value to assign to the display_name property of this CreateAlertPolicyRuleDetails. + :type display_name: str + """ self.swagger_types = { 'expression': 'str', - 'description': 'str' + 'description': 'str', + 'display_name': 'str' } self.attribute_map = { 'expression': 'expression', - 'description': 'description' + 'description': 'description', + 'display_name': 'displayName' } self._expression = None self._description = None + self._display_name = None @property def expression(self): @@ -90,6 +97,30 @@ def description(self, description): """ self._description = description + @property + def display_name(self): + """ + Gets the display_name of this CreateAlertPolicyRuleDetails. + The display name of the alert policy rule. + + + :return: The display_name of this CreateAlertPolicyRuleDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateAlertPolicyRuleDetails. + The display name of the alert policy rule. + + + :param display_name: The display_name of this CreateAlertPolicyRuleDetails. + :type: str + """ + self._display_name = display_name + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/report.py b/src/oci/data_safe/models/report.py index 5384165004..bb55c96734 100644 --- a/src/oci/data_safe/models/report.py +++ b/src/oci/data_safe/models/report.py @@ -31,6 +31,14 @@ class Report(object): #: This constant has a value of "ACTIVE" LIFECYCLE_STATE_ACTIVE = "ACTIVE" + #: A constant which can be used with the lifecycle_state property of a Report. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Report. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + #: A constant which can be used with the type property of a Report. #: This constant has a value of "GENERATED" TYPE_GENERATED = "GENERATED" @@ -76,7 +84,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this Report. - Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "UPDATING", "ACTIVE", "CREATING", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -86,6 +94,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type type: str + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Report. + :type lifecycle_details: str + :param freeform_tags: The value to assign to the freeform_tags property of this Report. :type freeform_tags: dict(str, str) @@ -109,6 +121,7 @@ def __init__(self, **kwargs): 'time_generated': 'datetime', 'lifecycle_state': 'str', 'type': 'str', + 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -124,6 +137,7 @@ def __init__(self, **kwargs): 'time_generated': 'timeGenerated', 'lifecycle_state': 'lifecycleState', 'type': 'type', + 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -138,6 +152,7 @@ def __init__(self, **kwargs): self._time_generated = None self._lifecycle_state = None self._type = None + self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -322,7 +337,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this Report. The current state of the audit report. - Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "UPDATING", "ACTIVE", "CREATING", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -341,7 +356,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this Report. :type: str """ - allowed_values = ["UPDATING", "ACTIVE"] + allowed_values = ["UPDATING", "ACTIVE", "CREATING", "FAILED"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state @@ -376,6 +391,30 @@ def type(self, type): type = 'UNKNOWN_ENUM_VALUE' self._type = type + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Report. + Details about the current state of the report in Data Safe. + + + :return: The lifecycle_details of this Report. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Report. + Details about the current state of the report in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this Report. + :type: str + """ + self._lifecycle_details = lifecycle_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/report_definition.py b/src/oci/data_safe/models/report_definition.py index 40f1eaca10..e34f8aa35d 100644 --- a/src/oci/data_safe/models/report_definition.py +++ b/src/oci/data_safe/models/report_definition.py @@ -71,6 +71,10 @@ class ReportDefinition(object): #: This constant has a value of "DELETED" LIFECYCLE_STATE_DELETED = "DELETED" + #: A constant which can be used with the lifecycle_state property of a ReportDefinition. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + #: A constant which can be used with the scheduled_report_mime_type property of a ReportDefinition. #: This constant has a value of "PDF" SCHEDULED_REPORT_MIME_TYPE_PDF = "PDF" @@ -154,7 +158,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this ReportDefinition. - Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -188,6 +192,10 @@ def __init__(self, **kwargs): The value to assign to the compliance_standards property of this ReportDefinition. :type compliance_standards: list[str] + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ReportDefinition. + :type lifecycle_details: str + :param freeform_tags: The value to assign to the freeform_tags property of this ReportDefinition. :type freeform_tags: dict(str, str) @@ -226,6 +234,7 @@ def __init__(self, **kwargs): 'scheduled_report_compartment_id': 'str', 'record_time_span': 'str', 'compliance_standards': 'list[str]', + 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -256,6 +265,7 @@ def __init__(self, **kwargs): 'scheduled_report_compartment_id': 'scheduledReportCompartmentId', 'record_time_span': 'recordTimeSpan', 'compliance_standards': 'complianceStandards', + 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -285,6 +295,7 @@ def __init__(self, **kwargs): self._scheduled_report_compartment_id = None self._record_time_span = None self._compliance_standards = None + self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -691,7 +702,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this ReportDefinition. The current state of the report. - Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -710,7 +721,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this ReportDefinition. :type: str """ - allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state @@ -931,6 +942,30 @@ def compliance_standards(self, compliance_standards): """ self._compliance_standards = compliance_standards + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this ReportDefinition. + Details about the current state of the report definition in Data Safe. + + + :return: The lifecycle_details of this ReportDefinition. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ReportDefinition. + Details about the current state of the report definition in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this ReportDefinition. + :type: str + """ + self._lifecycle_details = lifecycle_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/report_definition_summary.py b/src/oci/data_safe/models/report_definition_summary.py index 6a43285692..f0b30f7fca 100644 --- a/src/oci/data_safe/models/report_definition_summary.py +++ b/src/oci/data_safe/models/report_definition_summary.py @@ -71,6 +71,10 @@ class ReportDefinitionSummary(object): #: This constant has a value of "DELETED" LIFECYCLE_STATE_DELETED = "DELETED" + #: A constant which can be used with the lifecycle_state property of a ReportDefinitionSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + def __init__(self, **kwargs): """ Initializes a new ReportDefinitionSummary object with values from keyword arguments. @@ -122,7 +126,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this ReportDefinitionSummary. - Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -453,7 +457,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this ReportDefinitionSummary. The current state of the audit report. - Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -472,7 +476,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this ReportDefinitionSummary. :type: str """ - allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state diff --git a/src/oci/data_safe/models/report_summary.py b/src/oci/data_safe/models/report_summary.py index eb2ca760df..dbc11c9af0 100644 --- a/src/oci/data_safe/models/report_summary.py +++ b/src/oci/data_safe/models/report_summary.py @@ -31,6 +31,14 @@ class ReportSummary(object): #: This constant has a value of "ACTIVE" LIFECYCLE_STATE_ACTIVE = "ACTIVE" + #: A constant which can be used with the lifecycle_state property of a ReportSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ReportSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + #: A constant which can be used with the type property of a ReportSummary. #: This constant has a value of "GENERATED" TYPE_GENERATED = "GENERATED" @@ -76,7 +84,7 @@ def __init__(self, **kwargs): :param lifecycle_state: The value to assign to the lifecycle_state property of this ReportSummary. - Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "UPDATING", "ACTIVE", "CREATING", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str @@ -315,7 +323,7 @@ def lifecycle_state(self): **[Required]** Gets the lifecycle_state of this ReportSummary. The current state of the report. - Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "UPDATING", "ACTIVE", "CREATING", "FAILED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -334,7 +342,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this ReportSummary. :type: str """ - allowed_values = ["UPDATING", "ACTIVE"] + allowed_values = ["UPDATING", "ACTIVE", "CREATING", "FAILED"] if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state diff --git a/src/oci/data_safe/models/target_alert_policy_association.py b/src/oci/data_safe/models/target_alert_policy_association.py index 3471ba4d97..3a8969fb2c 100644 --- a/src/oci/data_safe/models/target_alert_policy_association.py +++ b/src/oci/data_safe/models/target_alert_policy_association.py @@ -86,6 +86,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str + :param lifecycle_details: + The value to assign to the lifecycle_details property of this TargetAlertPolicyAssociation. + :type lifecycle_details: str + :param freeform_tags: The value to assign to the freeform_tags property of this TargetAlertPolicyAssociation. :type freeform_tags: dict(str, str) @@ -110,6 +114,7 @@ def __init__(self, **kwargs): 'time_created': 'datetime', 'time_updated': 'datetime', 'lifecycle_state': 'str', + 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -126,6 +131,7 @@ def __init__(self, **kwargs): 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -141,6 +147,7 @@ def __init__(self, **kwargs): self._time_created = None self._time_updated = None self._lifecycle_state = None + self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -399,6 +406,30 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this TargetAlertPolicyAssociation. + Details about the current state of the target-alert policy association. + + + :return: The lifecycle_details of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this TargetAlertPolicyAssociation. + Details about the current state of the target-alert policy association. + + + :param lifecycle_details: The lifecycle_details of this TargetAlertPolicyAssociation. + :type: str + """ + self._lifecycle_details = lifecycle_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/target_alert_policy_association_summary.py b/src/oci/data_safe/models/target_alert_policy_association_summary.py index 186540b356..fe57c94529 100644 --- a/src/oci/data_safe/models/target_alert_policy_association_summary.py +++ b/src/oci/data_safe/models/target_alert_policy_association_summary.py @@ -86,6 +86,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str + :param lifecycle_details: + The value to assign to the lifecycle_details property of this TargetAlertPolicyAssociationSummary. + :type lifecycle_details: str + :param freeform_tags: The value to assign to the freeform_tags property of this TargetAlertPolicyAssociationSummary. :type freeform_tags: dict(str, str) @@ -106,6 +110,7 @@ def __init__(self, **kwargs): 'time_created': 'datetime', 'time_updated': 'datetime', 'lifecycle_state': 'str', + 'lifecycle_details': 'str', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -121,6 +126,7 @@ def __init__(self, **kwargs): 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -135,6 +141,7 @@ def __init__(self, **kwargs): self._time_created = None self._time_updated = None self._lifecycle_state = None + self._lifecycle_details = None self._freeform_tags = None self._defined_tags = None @@ -392,6 +399,30 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this TargetAlertPolicyAssociationSummary. + Details about the current state of the target-alert policy association. + + + :return: The lifecycle_details of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this TargetAlertPolicyAssociationSummary. + Details about the current state of the target-alert policy association. + + + :param lifecycle_details: The lifecycle_details of this TargetAlertPolicyAssociationSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/update_alert_policy_details.py b/src/oci/data_safe/models/update_alert_policy_details.py new file mode 100644 index 0000000000..3cfe5eb70b --- /dev/null +++ b/src/oci/data_safe/models/update_alert_policy_details.py @@ -0,0 +1,240 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAlertPolicyDetails(object): + """ + The details used to update a alert policy. + """ + + #: A constant which can be used with the severity property of a UpdateAlertPolicyDetails. + #: This constant has a value of "CRITICAL" + SEVERITY_CRITICAL = "CRITICAL" + + #: A constant which can be used with the severity property of a UpdateAlertPolicyDetails. + #: This constant has a value of "HIGH" + SEVERITY_HIGH = "HIGH" + + #: A constant which can be used with the severity property of a UpdateAlertPolicyDetails. + #: This constant has a value of "MEDIUM" + SEVERITY_MEDIUM = "MEDIUM" + + #: A constant which can be used with the severity property of a UpdateAlertPolicyDetails. + #: This constant has a value of "LOW" + SEVERITY_LOW = "LOW" + + #: A constant which can be used with the severity property of a UpdateAlertPolicyDetails. + #: This constant has a value of "EVALUATE" + SEVERITY_EVALUATE = "EVALUATE" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAlertPolicyDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateAlertPolicyDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateAlertPolicyDetails. + :type description: str + + :param severity: + The value to assign to the severity property of this UpdateAlertPolicyDetails. + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE" + :type severity: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAlertPolicyDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAlertPolicyDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'severity': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'severity': 'severity', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._severity = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateAlertPolicyDetails. + The display name of the alert policy. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateAlertPolicyDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateAlertPolicyDetails. + The display name of the alert policy. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateAlertPolicyDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateAlertPolicyDetails. + The description of the alert policy. + + + :return: The description of this UpdateAlertPolicyDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateAlertPolicyDetails. + The description of the alert policy. + + + :param description: The description of this UpdateAlertPolicyDetails. + :type: str + """ + self._description = description + + @property + def severity(self): + """ + Gets the severity of this UpdateAlertPolicyDetails. + Severity level of the alert raised by this policy. + + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE" + + + :return: The severity of this UpdateAlertPolicyDetails. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this UpdateAlertPolicyDetails. + Severity level of the alert raised by this policy. + + + :param severity: The severity of this UpdateAlertPolicyDetails. + :type: str + """ + allowed_values = ["CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE"] + if not value_allowed_none_or_none_sentinel(severity, allowed_values): + raise ValueError( + f"Invalid value for `severity`, must be None or one of {allowed_values}" + ) + self._severity = severity + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateAlertPolicyDetails. + 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`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateAlertPolicyDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateAlertPolicyDetails. + 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`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateAlertPolicyDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateAlertPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateAlertPolicyDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateAlertPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateAlertPolicyDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_alert_policy_rule_details.py b/src/oci/data_safe/models/update_alert_policy_rule_details.py index 313ce27206..e2882b86e3 100644 --- a/src/oci/data_safe/models/update_alert_policy_rule_details.py +++ b/src/oci/data_safe/models/update_alert_policy_rule_details.py @@ -28,19 +28,26 @@ def __init__(self, **kwargs): The value to assign to the expression property of this UpdateAlertPolicyRuleDetails. :type expression: str + :param display_name: + The value to assign to the display_name property of this UpdateAlertPolicyRuleDetails. + :type display_name: str + """ self.swagger_types = { 'description': 'str', - 'expression': 'str' + 'expression': 'str', + 'display_name': 'str' } self.attribute_map = { 'description': 'description', - 'expression': 'expression' + 'expression': 'expression', + 'display_name': 'displayName' } self._description = None self._expression = None + self._display_name = None @property def description(self): @@ -90,6 +97,30 @@ def expression(self, expression): """ self._expression = expression + @property + def display_name(self): + """ + Gets the display_name of this UpdateAlertPolicyRuleDetails. + The display name of the alert policy rule. + + + :return: The display_name of this UpdateAlertPolicyRuleDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateAlertPolicyRuleDetails. + The display name of the alert policy rule. + + + :param display_name: The display_name of this UpdateAlertPolicyRuleDetails. + :type: str + """ + self._display_name = display_name + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/data_safe/models/work_request.py b/src/oci/data_safe/models/work_request.py index 2b1dea2aa9..7b3592e956 100644 --- a/src/oci/data_safe/models/work_request.py +++ b/src/oci/data_safe/models/work_request.py @@ -551,6 +551,34 @@ class WorkRequest(object): #: This constant has a value of "PATCH_TARGET_ALERT_POLICY_ASSOCIATION" OPERATION_TYPE_PATCH_TARGET_ALERT_POLICY_ASSOCIATION = "PATCH_TARGET_ALERT_POLICY_ASSOCIATION" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_ALERT_POLICY" + OPERATION_TYPE_CREATE_ALERT_POLICY = "CREATE_ALERT_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_ALERT_POLICY" + OPERATION_TYPE_UPDATE_ALERT_POLICY = "UPDATE_ALERT_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_ALERT_POLICY" + OPERATION_TYPE_DELETE_ALERT_POLICY = "DELETE_ALERT_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_ALERT_POLICY_RULE" + OPERATION_TYPE_CREATE_ALERT_POLICY_RULE = "CREATE_ALERT_POLICY_RULE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_ALERT_POLICY_RULE" + OPERATION_TYPE_UPDATE_ALERT_POLICY_RULE = "UPDATE_ALERT_POLICY_RULE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_ALERT_POLICY_RULE" + OPERATION_TYPE_DELETE_ALERT_POLICY_RULE = "DELETE_ALERT_POLICY_RULE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CHANGE_ALERT_POLICY_COMPARTMENT" + OPERATION_TYPE_CHANGE_ALERT_POLICY_COMPARTMENT = "CHANGE_ALERT_POLICY_COMPARTMENT" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -590,7 +618,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_ALERT_POLICY", "UPDATE_ALERT_POLICY", "DELETE_ALERT_POLICY", "CREATE_ALERT_POLICY_RULE", "UPDATE_ALERT_POLICY_RULE", "DELETE_ALERT_POLICY_RULE", "CHANGE_ALERT_POLICY_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -669,7 +697,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. The resources that are affected by the work request. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_ALERT_POLICY", "UPDATE_ALERT_POLICY", "DELETE_ALERT_POLICY", "CREATE_ALERT_POLICY_RULE", "UPDATE_ALERT_POLICY_RULE", "DELETE_ALERT_POLICY_RULE", "CHANGE_ALERT_POLICY_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -688,7 +716,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION"] + allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_ALERT_POLICY", "UPDATE_ALERT_POLICY", "DELETE_ALERT_POLICY", "CREATE_ALERT_POLICY_RULE", "UPDATE_ALERT_POLICY_RULE", "DELETE_ALERT_POLICY_RULE", "CHANGE_ALERT_POLICY_COMPARTMENT"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/data_safe/models/work_request_summary.py b/src/oci/data_safe/models/work_request_summary.py index fdf2ea6fa3..3e00cf01fc 100644 --- a/src/oci/data_safe/models/work_request_summary.py +++ b/src/oci/data_safe/models/work_request_summary.py @@ -547,6 +547,34 @@ class WorkRequestSummary(object): #: This constant has a value of "PATCH_TARGET_ALERT_POLICY_ASSOCIATION" OPERATION_TYPE_PATCH_TARGET_ALERT_POLICY_ASSOCIATION = "PATCH_TARGET_ALERT_POLICY_ASSOCIATION" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_ALERT_POLICY" + OPERATION_TYPE_CREATE_ALERT_POLICY = "CREATE_ALERT_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_ALERT_POLICY" + OPERATION_TYPE_UPDATE_ALERT_POLICY = "UPDATE_ALERT_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_ALERT_POLICY" + OPERATION_TYPE_DELETE_ALERT_POLICY = "DELETE_ALERT_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_ALERT_POLICY_RULE" + OPERATION_TYPE_CREATE_ALERT_POLICY_RULE = "CREATE_ALERT_POLICY_RULE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_ALERT_POLICY_RULE" + OPERATION_TYPE_UPDATE_ALERT_POLICY_RULE = "UPDATE_ALERT_POLICY_RULE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_ALERT_POLICY_RULE" + OPERATION_TYPE_DELETE_ALERT_POLICY_RULE = "DELETE_ALERT_POLICY_RULE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CHANGE_ALERT_POLICY_COMPARTMENT" + OPERATION_TYPE_CHANGE_ALERT_POLICY_COMPARTMENT = "CHANGE_ALERT_POLICY_COMPARTMENT" + #: A constant which can be used with the status property of a WorkRequestSummary. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -586,7 +614,7 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequestSummary. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_ALERT_POLICY", "UPDATE_ALERT_POLICY", "DELETE_ALERT_POLICY", "CREATE_ALERT_POLICY_RULE", "UPDATE_ALERT_POLICY_RULE", "DELETE_ALERT_POLICY_RULE", "CHANGE_ALERT_POLICY_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str @@ -665,7 +693,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequestSummary. The asynchronous operation tracked by this work request. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_ALERT_POLICY", "UPDATE_ALERT_POLICY", "DELETE_ALERT_POLICY", "CREATE_ALERT_POLICY_RULE", "UPDATE_ALERT_POLICY_RULE", "DELETE_ALERT_POLICY_RULE", "CHANGE_ALERT_POLICY_COMPARTMENT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -684,7 +712,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequestSummary. :type: str """ - allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION"] + allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_PEER_TARGET_DATABASE", "UPDATE_PEER_TARGET_DATABASE", "DELETE_PEER_TARGET_DATABASE", "REFRESH_TARGET_DATABASE", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "UPDATE_FINDING_RISK", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "CREATE_DB_SECURITY_CONFIG", "REFRESH_DB_SECURITY_CONFIG", "UPDATE_DB_SECURITY_CONFIG", "CHANGE_DB_SECURITY_CONFIG_COMPARTMENT", "GENERATE_FIREWALL_POLICY", "UPDATE_FIREWALL_POLICY", "CHANGE_FIREWALL_POLICY_COMPARTMENT", "DELETE_FIREWALL_POLICY", "CREATE_SQL_COLLECTION", "UPDATE_SQL_COLLECTION", "START_SQL_COLLECTION", "STOP_SQL_COLLECTION", "DELETE_SQL_COLLECTION", "CHANGE_SQL_COLLECTION_COMPARTMENT", "REFRESH_SQL_COLLECTION_LOG_INSIGHTS", "PURGE_SQL_COLLECTION_LOGS", "REFRESH_VIOLATIONS", "CREATE_ARCHIVAL", "UPDATE_SECURITY_POLICY", "CHANGE_SECURITY_POLICY_COMPARTMENT", "UPDATE_SECURITY_POLICY_DEPLOYMENT", "CHANGE_SECURITY_POLICY_DEPLOYMENT_COMPARTMENT", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", "CREATE_DIFFERENCE", "DELETE_DIFFERENCE", "UPDATE_DIFFERENCE", "PATCH_DIFFERENCE", "APPLY_DIFFERENCE", "MASK_POLICY_GENERATE_HEALTH_REPORT", "MASK_POLICY_DELETE_HEALTH_REPORT", "ABORT_MASKING", "CREATE_SECURITY_POLICY_REPORT", "REFRESH_SECURITY_POLICY_CACHE", "DELETE_SECURITY_POLICY_CACHE", "CREATE_SCHEDULE", "REMOVE_SCHEDULE_REPORT", "UPDATE_ALL_ALERT", "PATCH_TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_ALERT_POLICY", "UPDATE_ALERT_POLICY", "DELETE_ALERT_POLICY", "CREATE_ALERT_POLICY_RULE", "UPDATE_ALERT_POLICY_RULE", "DELETE_ALERT_POLICY_RULE", "CHANGE_ALERT_POLICY_COMPARTMENT"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type diff --git a/src/oci/database/models/autonomous_database.py b/src/oci/database/models/autonomous_database.py index 95942828c8..cec3cb22b5 100644 --- a/src/oci/database/models/autonomous_database.py +++ b/src/oci/database/models/autonomous_database.py @@ -808,6 +808,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type net_services_architecture: str + :param cluster_placement_group_id: + The value to assign to the cluster_placement_group_id property of this AutonomousDatabase. + :type cluster_placement_group_id: str + """ self.swagger_types = { 'id': 'str', @@ -926,7 +930,8 @@ def __init__(self, **kwargs): 'disaster_recovery_region_type': 'str', 'time_disaster_recovery_role_changed': 'datetime', 'remote_disaster_recovery_configuration': 'DisasterRecoveryConfiguration', - 'net_services_architecture': 'str' + 'net_services_architecture': 'str', + 'cluster_placement_group_id': 'str' } self.attribute_map = { @@ -1046,7 +1051,8 @@ def __init__(self, **kwargs): 'disaster_recovery_region_type': 'disasterRecoveryRegionType', 'time_disaster_recovery_role_changed': 'timeDisasterRecoveryRoleChanged', 'remote_disaster_recovery_configuration': 'remoteDisasterRecoveryConfiguration', - 'net_services_architecture': 'netServicesArchitecture' + 'net_services_architecture': 'netServicesArchitecture', + 'cluster_placement_group_id': 'clusterPlacementGroupId' } self._id = None @@ -1166,6 +1172,7 @@ def __init__(self, **kwargs): self._time_disaster_recovery_role_changed = None self._remote_disaster_recovery_configuration = None self._net_services_architecture = None + self._cluster_placement_group_id = None @property def id(self): @@ -4375,6 +4382,34 @@ def net_services_architecture(self, net_services_architecture): net_services_architecture = 'UNKNOWN_ENUM_VALUE' self._net_services_architecture = net_services_architecture + @property + def cluster_placement_group_id(self): + """ + Gets the cluster_placement_group_id of this AutonomousDatabase. + The `OCID`__ of the cluster placement group of the Autonomous Serverless Database. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The cluster_placement_group_id of this AutonomousDatabase. + :rtype: str + """ + return self._cluster_placement_group_id + + @cluster_placement_group_id.setter + def cluster_placement_group_id(self, cluster_placement_group_id): + """ + Sets the cluster_placement_group_id of this AutonomousDatabase. + The `OCID`__ of the cluster placement group of the Autonomous Serverless Database. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param cluster_placement_group_id: The cluster_placement_group_id of this AutonomousDatabase. + :type: str + """ + self._cluster_placement_group_id = cluster_placement_group_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database/models/autonomous_database_summary.py b/src/oci/database/models/autonomous_database_summary.py index 4be2044f18..c27ca939ab 100644 --- a/src/oci/database/models/autonomous_database_summary.py +++ b/src/oci/database/models/autonomous_database_summary.py @@ -810,6 +810,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type net_services_architecture: str + :param cluster_placement_group_id: + The value to assign to the cluster_placement_group_id property of this AutonomousDatabaseSummary. + :type cluster_placement_group_id: str + """ self.swagger_types = { 'id': 'str', @@ -928,7 +932,8 @@ def __init__(self, **kwargs): 'disaster_recovery_region_type': 'str', 'time_disaster_recovery_role_changed': 'datetime', 'remote_disaster_recovery_configuration': 'DisasterRecoveryConfiguration', - 'net_services_architecture': 'str' + 'net_services_architecture': 'str', + 'cluster_placement_group_id': 'str' } self.attribute_map = { @@ -1048,7 +1053,8 @@ def __init__(self, **kwargs): 'disaster_recovery_region_type': 'disasterRecoveryRegionType', 'time_disaster_recovery_role_changed': 'timeDisasterRecoveryRoleChanged', 'remote_disaster_recovery_configuration': 'remoteDisasterRecoveryConfiguration', - 'net_services_architecture': 'netServicesArchitecture' + 'net_services_architecture': 'netServicesArchitecture', + 'cluster_placement_group_id': 'clusterPlacementGroupId' } self._id = None @@ -1168,6 +1174,7 @@ def __init__(self, **kwargs): self._time_disaster_recovery_role_changed = None self._remote_disaster_recovery_configuration = None self._net_services_architecture = None + self._cluster_placement_group_id = None @property def id(self): @@ -4377,6 +4384,34 @@ def net_services_architecture(self, net_services_architecture): net_services_architecture = 'UNKNOWN_ENUM_VALUE' self._net_services_architecture = net_services_architecture + @property + def cluster_placement_group_id(self): + """ + Gets the cluster_placement_group_id of this AutonomousDatabaseSummary. + The `OCID`__ of the cluster placement group of the Autonomous Serverless Database. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The cluster_placement_group_id of this AutonomousDatabaseSummary. + :rtype: str + """ + return self._cluster_placement_group_id + + @cluster_placement_group_id.setter + def cluster_placement_group_id(self, cluster_placement_group_id): + """ + Sets the cluster_placement_group_id of this AutonomousDatabaseSummary. + The `OCID`__ of the cluster placement group of the Autonomous Serverless Database. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param cluster_placement_group_id: The cluster_placement_group_id of this AutonomousDatabaseSummary. + :type: str + """ + self._cluster_placement_group_id = cluster_placement_group_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database_migration/database_migration_client.py b/src/oci/database_migration/database_migration_client.py index 3ec9925292..bdf4e97c63 100644 --- a/src/oci/database_migration/database_migration_client.py +++ b/src/oci/database_migration/database_migration_client.py @@ -1029,6 +1029,127 @@ def create_migration(self, create_migration_details, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_parameter_file_version(self, job_id, create_parameter_file_version_details, **kwargs): + """ + Creates a new version of the current parameter file contents to the specified value. + + + :param str job_id: (required) + The OCID of the job + + :param oci.database_migration.models.CreateParameterFileVersionDetails create_parameter_file_version_details: (required) + The parameter file version details to be created + + :param str if_match: (optional) + 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. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_parameter_file_version API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}/parameterFileVersions" + method = "POST" + operation_name = "create_parameter_file_version" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/CreateParameterFileVersion" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_parameter_file_version got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_parameter_file_version_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_parameter_file_version_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def delete_connection(self, connection_id, **kwargs): """ Deletes the Database Connection represented by the specified connection ID. @@ -1347,6 +1468,116 @@ def delete_migration(self, migration_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def delete_parameter_file_version(self, job_id, parameter_file_name, **kwargs): + """ + Deletes the given parameter file version + + + :param str job_id: (required) + The OCID of the job + + :param str parameter_file_name: (required) + A unique name associated with the current migration/job and extract/replicat name + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param str if_match: (optional) + 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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_parameter_file_version API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId', 'parameterFileName'] + resource_path = "/jobs/{jobId}/parameterFileVersions/{parameterFileName}" + method = "DELETE" + operation_name = "delete_parameter_file_version" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/DeleteParameterFileVersion" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_parameter_file_version got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_id, + "parameterFileName": parameter_file_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def evaluate_migration(self, migration_id, **kwargs): """ Start Validate Migration job. @@ -1969,13 +2200,17 @@ def get_migration(self, migration_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_work_request(self, work_request_id, **kwargs): + def get_parameter_file_version(self, parameter_file_name, job_id, **kwargs): """ - Gets the details of a work request. + Obtain the parameter file version contents for the specified parameter file name and the associated job. This operation will + be allowed only if the job is certain acceptable lifecycle states. - :param str work_request_id: (required) - The ID of the asynchronous request. + :param str parameter_file_name: (required) + A unique name associated with the current migration/job and extract/replicat name + + :param str job_id: (required) + The OCID of the job :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -1993,18 +2228,18 @@ def get_work_request(self, work_request_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database_migration.models.WorkRequest` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database_migration.models.ParameterFileVersion` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_work_request API. + Click `here `__ to see an example of how to use get_parameter_file_version API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['workRequestId'] - resource_path = "/workRequests/{workRequestId}" + required_arguments = ['parameterFileName', 'jobId'] + resource_path = "/jobs/{jobId}/parameterFileVersions/{parameterFileName}" method = "GET" - operation_name = "get_work_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/WorkRequest/GetWorkRequest" + operation_name = "get_parameter_file_version" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/GetParameterFileVersion" # Don't accept unknown kwargs expected_kwargs = [ @@ -2015,10 +2250,11 @@ def get_work_request(self, work_request_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_work_request got unknown kwargs: {extra_kwargs!r}") + f"get_parameter_file_version got unknown kwargs: {extra_kwargs!r}") path_params = { - "workRequestId": work_request_id + "parameterFileName": parameter_file_name, + "jobId": job_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2051,7 +2287,7 @@ def get_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest", + response_type="ParameterFileVersion", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -2062,41 +2298,140 @@ def get_work_request(self, work_request_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="WorkRequest", + response_type="ParameterFileVersion", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_connections(self, compartment_id, **kwargs): + def get_work_request(self, work_request_id, **kwargs): """ - List all Database Connections. + Gets the details of a work request. - :param str compartment_id: (required) - The ID of the compartment in which to list resources. + :param str work_request_id: (required) + The ID of the asynchronous request. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :param list[str] technology_type: (optional) - The array of technology types. - - Allowed values are: "OCI_AUTONOMOUS_DATABASE", "OCI_MYSQL", "ORACLE_DATABASE", "ORACLE_EXADATA", "AMAZON_RDS_ORACLE", "AMAZON_AURORA_MYSQL", "AMAZON_RDS_MYSQL", "AZURE_MYSQL", "GOOGLE_CLOUD_SQL_MYSQL", "MYSQL_SERVER" + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - :param list[str] connection_type: (optional) - The array of connection types. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. - Allowed values are: "MYSQL", "ORACLE" + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :param str source_connection_id: (optional) - The OCID of the source database connection. + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings - :param str display_name: (optional) - A filter to return only resources that match the entire display name given. + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database_migration.models.WorkRequest` + :rtype: :class:`~oci.response.Response` - :param int limit: (optional) + :example: + Click `here `__ to see an example of how to use get_work_request API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['workRequestId'] + resource_path = "/workRequests/{workRequestId}" + method = "GET" + operation_name = "get_work_request" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/WorkRequest/GetWorkRequest" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_work_request got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_connections(self, compartment_id, **kwargs): + """ + List all Database Connections. + + + :param str compartment_id: (required) + The ID of the compartment in which to list resources. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param list[str] technology_type: (optional) + The array of technology types. + + Allowed values are: "OCI_AUTONOMOUS_DATABASE", "OCI_MYSQL", "ORACLE_DATABASE", "ORACLE_EXADATA", "AMAZON_RDS_ORACLE", "AMAZON_AURORA_MYSQL", "AMAZON_RDS_MYSQL", "AZURE_MYSQL", "GOOGLE_CLOUD_SQL_MYSQL", "MYSQL_SERVER" + + :param list[str] connection_type: (optional) + The array of connection types. + + Allowed values are: "MYSQL", "ORACLE" + + :param str source_connection_id: (optional) + The OCID of the source database connection. + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int limit: (optional) The maximum number of items to return. :param str page: (optional) @@ -3300,6 +3635,157 @@ def list_migrations(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_parameter_file_versions(self, job_id, **kwargs): + """ + Return a list of the parameter file metadata of the migration execution of the specified job. This will + only be acceptable if the job is in particular state. It will be accessible if the job is in + the FAILED, PAUSED or SUSPENDED state. + + + :param str job_id: (required) + The OCID of the job + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param str name: (optional) + A filter to return only resources that match the entire name given. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. + Default order for displayName is ascending. If no value is specified timeCreated is default. + + Allowed values are: "timeCreated", "displayName" + + :param str sort_order: (optional) + The sort order to use, either 'asc' or 'desc'. + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database_migration.models.ParameterFileVersionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_parameter_file_versions API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}/parameterFileVersions" + method = "GET" + operation_name = "list_parameter_file_versions" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/ListParameterFileVersions" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "name", + "limit", + "page", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_parameter_file_versions got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + query_params = { + "name": kwargs.get("name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="ParameterFileVersionCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="ParameterFileVersionCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def list_work_request_errors(self, work_request_id, **kwargs): """ Gets the errors for a work request. @@ -3739,6 +4225,128 @@ def list_work_requests(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def make_current_parameter_file_version(self, job_id, parameter_file_name, **kwargs): + """ + Make current the given parameter file version + + + :param str job_id: (required) + The OCID of the job + + :param str parameter_file_name: (required) + A unique name associated with the current migration/job and extract/replicat name + + :param str if_match: (optional) + 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. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database_migration.models.Job` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use make_current_parameter_file_version API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId', 'parameterFileName'] + resource_path = "/jobs/{jobId}/parameterFileVersions/{parameterFileName}/actions/makeCurrent" + method = "POST" + operation_name = "make_current_parameter_file_version" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/MakeCurrentParameterFileVersion" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"make_current_parameter_file_version got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_id, + "parameterFileName": parameter_file_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def remove_migration_objects(self, migration_id, remove_migration_objects_details, **kwargs): """ Remove excluded/included objects. @@ -4197,6 +4805,124 @@ def start_migration(self, migration_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def suspend_job(self, job_id, **kwargs): + """ + Place the currently executing migration Job in a Suspended State. + + + :param str job_id: (required) + The OCID of the job + + :param str if_match: (optional) + 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. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database_migration.models.Job` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use suspend_job API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['jobId'] + resource_path = "/jobs/{jobId}/actions/suspend" + method = "POST" + operation_name = "suspend_job" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20230518/Job/SuspendJob" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"suspend_job got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "jobId": job_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Job", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_connection(self, connection_id, update_connection_details, **kwargs): """ Update Database Connection resource details. diff --git a/src/oci/database_migration/database_migration_client_composite_operations.py b/src/oci/database_migration/database_migration_client_composite_operations.py index a627ca3290..6f8be72a89 100644 --- a/src/oci/database_migration/database_migration_client_composite_operations.py +++ b/src/oci/database_migration/database_migration_client_composite_operations.py @@ -187,6 +187,48 @@ def create_migration_and_wait_for_state(self, create_migration_details, wait_for except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_parameter_file_version_and_wait_for_state(self, job_id, create_parameter_file_version_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.create_parameter_file_version` and waits for the :py:class:`~oci.database_migration.models.WorkRequest` + to enter the given state(s). + + :param str job_id: (required) + The OCID of the job + + :param oci.database_migration.models.CreateParameterFileVersionDetails create_parameter_file_version_details: (required) + The parameter file version details to be created + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.database_migration.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.database_migration.DatabaseMigrationClient.create_parameter_file_version` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_parameter_file_version(job_id, create_parameter_file_version_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_connection_and_wait_for_state(self, connection_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.delete_connection` and waits for the :py:class:`~oci.database_migration.models.WorkRequest` @@ -340,6 +382,56 @@ def delete_migration_and_wait_for_state(self, migration_id, wait_for_states=[], except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_parameter_file_version_and_wait_for_state(self, job_id, parameter_file_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.delete_parameter_file_version` and waits for the :py:class:`~oci.database_migration.models.WorkRequest` + to enter the given state(s). + + :param str job_id: (required) + The OCID of the job + + :param str parameter_file_name: (required) + A unique name associated with the current migration/job and extract/replicat name + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.database_migration.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.database_migration.DatabaseMigrationClient.delete_parameter_file_version` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_parameter_file_version(job_id, parameter_file_name, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def evaluate_migration_and_wait_for_state(self, migration_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.evaluate_migration` and waits for the :py:class:`~oci.database_migration.models.WorkRequest` @@ -379,6 +471,51 @@ def evaluate_migration_and_wait_for_state(self, migration_id, wait_for_states=[] except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def make_current_parameter_file_version_and_wait_for_state(self, job_id, parameter_file_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.make_current_parameter_file_version` and waits for the :py:class:`~oci.database_migration.models.Job` acted upon + to enter the given state(s). + + :param str job_id: (required) + The OCID of the job + + :param str parameter_file_name: (required) + A unique name associated with the current migration/job and extract/replicat name + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.database_migration.models.Job.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.database_migration.DatabaseMigrationClient.make_current_parameter_file_version` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.make_current_parameter_file_version(job_id, parameter_file_name, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + job_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_job(job_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def resume_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.resume_job` and waits for the :py:class:`~oci.database_migration.models.Job` acted upon @@ -460,6 +597,48 @@ def start_migration_and_wait_for_state(self, migration_id, wait_for_states=[], o except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def suspend_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.suspend_job` and waits for the :py:class:`~oci.database_migration.models.Job` acted upon + to enter the given state(s). + + :param str job_id: (required) + The OCID of the job + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.database_migration.models.Job.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.database_migration.DatabaseMigrationClient.suspend_job` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.suspend_job(job_id, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + job_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_job(job_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_connection_and_wait_for_state(self, connection_id, update_connection_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.database_migration.DatabaseMigrationClient.update_connection` and waits for the :py:class:`~oci.database_migration.models.WorkRequest` diff --git a/src/oci/database_migration/models/__init__.py b/src/oci/database_migration/models/__init__.py index 2375091300..8a38e3a34a 100644 --- a/src/oci/database_migration/models/__init__.py +++ b/src/oci/database_migration/models/__init__.py @@ -52,6 +52,7 @@ from .create_oracle_migration_details import CreateOracleMigrationDetails from .create_oracle_nfs_data_transfer_medium_details import CreateOracleNfsDataTransferMediumDetails from .create_oracle_object_storage_data_transfer_medium_details import CreateOracleObjectStorageDataTransferMediumDetails +from .create_parameter_file_version_details import CreateParameterFileVersionDetails from .create_replicat import CreateReplicat from .create_target_type_tablespace_details import CreateTargetTypeTablespaceDetails from .curl_transfer_details import CurlTransferDetails @@ -120,6 +121,9 @@ from .oracle_migration_summary import OracleMigrationSummary from .oracle_nfs_data_transfer_medium_details import OracleNfsDataTransferMediumDetails from .oracle_object_storage_data_transfer_medium_details import OracleObjectStorageDataTransferMediumDetails +from .parameter_file_version import ParameterFileVersion +from .parameter_file_version_collection import ParameterFileVersionCollection +from .parameter_file_version_summary import ParameterFileVersionSummary from .phase_extract_entry import PhaseExtractEntry from .phase_status import PhaseStatus from .replicat import Replicat @@ -223,6 +227,7 @@ "CreateOracleMigrationDetails": CreateOracleMigrationDetails, "CreateOracleNfsDataTransferMediumDetails": CreateOracleNfsDataTransferMediumDetails, "CreateOracleObjectStorageDataTransferMediumDetails": CreateOracleObjectStorageDataTransferMediumDetails, + "CreateParameterFileVersionDetails": CreateParameterFileVersionDetails, "CreateReplicat": CreateReplicat, "CreateTargetTypeTablespaceDetails": CreateTargetTypeTablespaceDetails, "CurlTransferDetails": CurlTransferDetails, @@ -291,6 +296,9 @@ "OracleMigrationSummary": OracleMigrationSummary, "OracleNfsDataTransferMediumDetails": OracleNfsDataTransferMediumDetails, "OracleObjectStorageDataTransferMediumDetails": OracleObjectStorageDataTransferMediumDetails, + "ParameterFileVersion": ParameterFileVersion, + "ParameterFileVersionCollection": ParameterFileVersionCollection, + "ParameterFileVersionSummary": ParameterFileVersionSummary, "PhaseExtractEntry": PhaseExtractEntry, "PhaseStatus": PhaseStatus, "Replicat": Replicat, diff --git a/src/oci/database_migration/models/adb_dedicated_auto_create_tablespace_details.py b/src/oci/database_migration/models/adb_dedicated_auto_create_tablespace_details.py index d395d567cd..0e663bef6e 100644 --- a/src/oci/database_migration/models/adb_dedicated_auto_create_tablespace_details.py +++ b/src/oci/database_migration/models/adb_dedicated_auto_create_tablespace_details.py @@ -15,6 +15,10 @@ class ADBDedicatedAutoCreateTablespaceDetails(TargetTypeTablespaceDetails): Auto create tablespace settings that are valid for Dedicated Autonomous Databases. """ + #: A constant which can be used with the block_size_in_kbs property of a ADBDedicatedAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_2K" + BLOCK_SIZE_IN_KBS_SIZE_2_K = "SIZE_2K" + #: A constant which can be used with the block_size_in_kbs property of a ADBDedicatedAutoCreateTablespaceDetails. #: This constant has a value of "SIZE_8K" BLOCK_SIZE_IN_KBS_SIZE_8_K = "SIZE_8K" @@ -23,6 +27,10 @@ class ADBDedicatedAutoCreateTablespaceDetails(TargetTypeTablespaceDetails): #: This constant has a value of "SIZE_16K" BLOCK_SIZE_IN_KBS_SIZE_16_K = "SIZE_16K" + #: A constant which can be used with the block_size_in_kbs property of a ADBDedicatedAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_32K" + BLOCK_SIZE_IN_KBS_SIZE_32_K = "SIZE_32K" + def __init__(self, **kwargs): """ Initializes a new ADBDedicatedAutoCreateTablespaceDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database_migration.models.ADBDedicatedAutoCreateTablespaceDetails.target_type` attribute @@ -49,7 +57,7 @@ def __init__(self, **kwargs): :param block_size_in_kbs: The value to assign to the block_size_in_kbs property of this ADBDedicatedAutoCreateTablespaceDetails. - Allowed values for this property are: "SIZE_8K", "SIZE_16K", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type block_size_in_kbs: str @@ -159,7 +167,7 @@ def block_size_in_kbs(self): Gets the block_size_in_kbs of this ADBDedicatedAutoCreateTablespaceDetails. Size of Oracle database blocks in KB. - Allowed values for this property are: "SIZE_8K", "SIZE_16K", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -178,7 +186,7 @@ def block_size_in_kbs(self, block_size_in_kbs): :param block_size_in_kbs: The block_size_in_kbs of this ADBDedicatedAutoCreateTablespaceDetails. :type: str """ - allowed_values = ["SIZE_8K", "SIZE_16K"] + allowed_values = ["SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K"] if not value_allowed_none_or_none_sentinel(block_size_in_kbs, allowed_values): block_size_in_kbs = 'UNKNOWN_ENUM_VALUE' self._block_size_in_kbs = block_size_in_kbs diff --git a/src/oci/database_migration/models/create_adb_dedicated_auto_create_tablespace_details.py b/src/oci/database_migration/models/create_adb_dedicated_auto_create_tablespace_details.py index a947cd5e1f..afb5600f11 100644 --- a/src/oci/database_migration/models/create_adb_dedicated_auto_create_tablespace_details.py +++ b/src/oci/database_migration/models/create_adb_dedicated_auto_create_tablespace_details.py @@ -15,6 +15,10 @@ class CreateADBDedicatedAutoCreateTablespaceDetails(CreateTargetTypeTablespaceDe Auto create tablespace settings that are valid for Dedicated Autonomous Databases. """ + #: A constant which can be used with the block_size_in_kbs property of a CreateADBDedicatedAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_2K" + BLOCK_SIZE_IN_KBS_SIZE_2_K = "SIZE_2K" + #: A constant which can be used with the block_size_in_kbs property of a CreateADBDedicatedAutoCreateTablespaceDetails. #: This constant has a value of "SIZE_8K" BLOCK_SIZE_IN_KBS_SIZE_8_K = "SIZE_8K" @@ -23,6 +27,10 @@ class CreateADBDedicatedAutoCreateTablespaceDetails(CreateTargetTypeTablespaceDe #: This constant has a value of "SIZE_16K" BLOCK_SIZE_IN_KBS_SIZE_16_K = "SIZE_16K" + #: A constant which can be used with the block_size_in_kbs property of a CreateADBDedicatedAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_32K" + BLOCK_SIZE_IN_KBS_SIZE_32_K = "SIZE_32K" + def __init__(self, **kwargs): """ Initializes a new CreateADBDedicatedAutoCreateTablespaceDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database_migration.models.CreateADBDedicatedAutoCreateTablespaceDetails.target_type` attribute @@ -48,7 +56,7 @@ def __init__(self, **kwargs): :param block_size_in_kbs: The value to assign to the block_size_in_kbs property of this CreateADBDedicatedAutoCreateTablespaceDetails. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :type block_size_in_kbs: str """ @@ -157,7 +165,7 @@ def block_size_in_kbs(self): Gets the block_size_in_kbs of this CreateADBDedicatedAutoCreateTablespaceDetails. Size of Oracle database blocks in KB. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :return: The block_size_in_kbs of this CreateADBDedicatedAutoCreateTablespaceDetails. @@ -175,7 +183,7 @@ def block_size_in_kbs(self, block_size_in_kbs): :param block_size_in_kbs: The block_size_in_kbs of this CreateADBDedicatedAutoCreateTablespaceDetails. :type: str """ - allowed_values = ["SIZE_8K", "SIZE_16K"] + allowed_values = ["SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K"] if not value_allowed_none_or_none_sentinel(block_size_in_kbs, allowed_values): raise ValueError( f"Invalid value for `block_size_in_kbs`, must be None or one of {allowed_values}" diff --git a/src/oci/database_migration/models/create_non_adb_auto_create_tablespace_details.py b/src/oci/database_migration/models/create_non_adb_auto_create_tablespace_details.py index 8db185eee6..005e2f0144 100644 --- a/src/oci/database_migration/models/create_non_adb_auto_create_tablespace_details.py +++ b/src/oci/database_migration/models/create_non_adb_auto_create_tablespace_details.py @@ -15,6 +15,10 @@ class CreateNonADBAutoCreateTablespaceDetails(CreateTargetTypeTablespaceDetails) Migration tablespace settings valid for NON-ADB target type using auto create feature. """ + #: A constant which can be used with the block_size_in_kbs property of a CreateNonADBAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_2K" + BLOCK_SIZE_IN_KBS_SIZE_2_K = "SIZE_2K" + #: A constant which can be used with the block_size_in_kbs property of a CreateNonADBAutoCreateTablespaceDetails. #: This constant has a value of "SIZE_8K" BLOCK_SIZE_IN_KBS_SIZE_8_K = "SIZE_8K" @@ -23,6 +27,10 @@ class CreateNonADBAutoCreateTablespaceDetails(CreateTargetTypeTablespaceDetails) #: This constant has a value of "SIZE_16K" BLOCK_SIZE_IN_KBS_SIZE_16_K = "SIZE_16K" + #: A constant which can be used with the block_size_in_kbs property of a CreateNonADBAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_32K" + BLOCK_SIZE_IN_KBS_SIZE_32_K = "SIZE_32K" + def __init__(self, **kwargs): """ Initializes a new CreateNonADBAutoCreateTablespaceDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database_migration.models.CreateNonADBAutoCreateTablespaceDetails.target_type` attribute @@ -48,7 +56,7 @@ def __init__(self, **kwargs): :param block_size_in_kbs: The value to assign to the block_size_in_kbs property of this CreateNonADBAutoCreateTablespaceDetails. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :type block_size_in_kbs: str """ @@ -153,7 +161,7 @@ def block_size_in_kbs(self): Gets the block_size_in_kbs of this CreateNonADBAutoCreateTablespaceDetails. Size of Oracle database blocks in KB. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :return: The block_size_in_kbs of this CreateNonADBAutoCreateTablespaceDetails. @@ -171,7 +179,7 @@ def block_size_in_kbs(self, block_size_in_kbs): :param block_size_in_kbs: The block_size_in_kbs of this CreateNonADBAutoCreateTablespaceDetails. :type: str """ - allowed_values = ["SIZE_8K", "SIZE_16K"] + allowed_values = ["SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K"] if not value_allowed_none_or_none_sentinel(block_size_in_kbs, allowed_values): raise ValueError( f"Invalid value for `block_size_in_kbs`, must be None or one of {allowed_values}" diff --git a/src/oci/database_migration/models/create_parameter_file_version_details.py b/src/oci/database_migration/models/create_parameter_file_version_details.py new file mode 100644 index 0000000000..17d52c1b9c --- /dev/null +++ b/src/oci/database_migration/models/create_parameter_file_version_details.py @@ -0,0 +1,181 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230518 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateParameterFileVersionDetails(object): + """ + Details about a specific ParameterFileVersion + """ + + #: A constant which can be used with the kind property of a CreateParameterFileVersionDetails. + #: This constant has a value of "EXTRACT" + KIND_EXTRACT = "EXTRACT" + + #: A constant which can be used with the kind property of a CreateParameterFileVersionDetails. + #: This constant has a value of "REPLICAT" + KIND_REPLICAT = "REPLICAT" + + def __init__(self, **kwargs): + """ + Initializes a new CreateParameterFileVersionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this CreateParameterFileVersionDetails. + :type description: str + + :param kind: + The value to assign to the kind property of this CreateParameterFileVersionDetails. + Allowed values for this property are: "EXTRACT", "REPLICAT" + :type kind: str + + :param content: + The value to assign to the content property of this CreateParameterFileVersionDetails. + :type content: str + + :param name: + The value to assign to the name property of this CreateParameterFileVersionDetails. + :type name: str + + """ + self.swagger_types = { + 'description': 'str', + 'kind': 'str', + 'content': 'str', + 'name': 'str' + } + + self.attribute_map = { + 'description': 'description', + 'kind': 'kind', + 'content': 'content', + 'name': 'name' + } + + self._description = None + self._kind = None + self._content = None + self._name = None + + @property + def description(self): + """ + Gets the description of this CreateParameterFileVersionDetails. + Describes the current parameter file version + + + :return: The description of this CreateParameterFileVersionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateParameterFileVersionDetails. + Describes the current parameter file version + + + :param description: The description of this CreateParameterFileVersionDetails. + :type: str + """ + self._description = description + + @property + def kind(self): + """ + **[Required]** Gets the kind of this CreateParameterFileVersionDetails. + Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + + Allowed values for this property are: "EXTRACT", "REPLICAT" + + + :return: The kind of this CreateParameterFileVersionDetails. + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """ + Sets the kind of this CreateParameterFileVersionDetails. + Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + + + :param kind: The kind of this CreateParameterFileVersionDetails. + :type: str + """ + allowed_values = ["EXTRACT", "REPLICAT"] + if not value_allowed_none_or_none_sentinel(kind, allowed_values): + raise ValueError( + f"Invalid value for `kind`, must be None or one of {allowed_values}" + ) + self._kind = kind + + @property + def content(self): + """ + **[Required]** Gets the content of this CreateParameterFileVersionDetails. + The content in base64 encoded character string containing the value of the parameter file + + + :return: The content of this CreateParameterFileVersionDetails. + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """ + Sets the content of this CreateParameterFileVersionDetails. + The content in base64 encoded character string containing the value of the parameter file + + + :param content: The content of this CreateParameterFileVersionDetails. + :type: str + """ + self._content = content + + @property + def name(self): + """ + Gets the name of this CreateParameterFileVersionDetails. + Customizable name for the paramenter file version. + + + :return: The name of this CreateParameterFileVersionDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateParameterFileVersionDetails. + Customizable name for the paramenter file version. + + + :param name: The name of this CreateParameterFileVersionDetails. + :type: str + """ + self._name = name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database_migration/models/job.py b/src/oci/database_migration/models/job.py index 0b0d1a251d..000015a567 100644 --- a/src/oci/database_migration/models/job.py +++ b/src/oci/database_migration/models/job.py @@ -108,6 +108,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this Job. :type lifecycle_details: str + :param parameter_file_versions: + The value to assign to the parameter_file_versions property of this Job. + :type parameter_file_versions: list[oci.database_migration.models.ParameterFileVersionSummary] + :param freeform_tags: The value to assign to the freeform_tags property of this Job. :type freeform_tags: dict(str, str) @@ -132,6 +136,7 @@ def __init__(self, **kwargs): 'unsupported_objects': 'list[UnsupportedDatabaseObject]', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'parameter_file_versions': 'list[ParameterFileVersionSummary]', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' @@ -148,6 +153,7 @@ def __init__(self, **kwargs): 'unsupported_objects': 'unsupportedObjects', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'parameter_file_versions': 'parameterFileVersions', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' @@ -163,6 +169,7 @@ def __init__(self, **kwargs): self._unsupported_objects = None self._lifecycle_state = None self._lifecycle_details = None + self._parameter_file_versions = None self._freeform_tags = None self._defined_tags = None self._system_tags = None @@ -417,6 +424,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def parameter_file_versions(self): + """ + Gets the parameter_file_versions of this Job. + A list of parameter file versions that can be viewed or edited for the current job. + + + :return: The parameter_file_versions of this Job. + :rtype: list[oci.database_migration.models.ParameterFileVersionSummary] + """ + return self._parameter_file_versions + + @parameter_file_versions.setter + def parameter_file_versions(self, parameter_file_versions): + """ + Sets the parameter_file_versions of this Job. + A list of parameter file versions that can be viewed or edited for the current job. + + + :param parameter_file_versions: The parameter_file_versions of this Job. + :type: list[oci.database_migration.models.ParameterFileVersionSummary] + """ + self._parameter_file_versions = parameter_file_versions + @property def freeform_tags(self): """ diff --git a/src/oci/database_migration/models/non_adb_auto_create_tablespace_details.py b/src/oci/database_migration/models/non_adb_auto_create_tablespace_details.py index a136bfb71d..8f2c07b2d2 100644 --- a/src/oci/database_migration/models/non_adb_auto_create_tablespace_details.py +++ b/src/oci/database_migration/models/non_adb_auto_create_tablespace_details.py @@ -15,6 +15,10 @@ class NonADBAutoCreateTablespaceDetails(TargetTypeTablespaceDetails): Migration tablespace settings valid for NON-ADB target type using auto create feature. """ + #: A constant which can be used with the block_size_in_kbs property of a NonADBAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_2K" + BLOCK_SIZE_IN_KBS_SIZE_2_K = "SIZE_2K" + #: A constant which can be used with the block_size_in_kbs property of a NonADBAutoCreateTablespaceDetails. #: This constant has a value of "SIZE_8K" BLOCK_SIZE_IN_KBS_SIZE_8_K = "SIZE_8K" @@ -23,6 +27,10 @@ class NonADBAutoCreateTablespaceDetails(TargetTypeTablespaceDetails): #: This constant has a value of "SIZE_16K" BLOCK_SIZE_IN_KBS_SIZE_16_K = "SIZE_16K" + #: A constant which can be used with the block_size_in_kbs property of a NonADBAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_32K" + BLOCK_SIZE_IN_KBS_SIZE_32_K = "SIZE_32K" + def __init__(self, **kwargs): """ Initializes a new NonADBAutoCreateTablespaceDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database_migration.models.NonADBAutoCreateTablespaceDetails.target_type` attribute @@ -49,7 +57,7 @@ def __init__(self, **kwargs): :param block_size_in_kbs: The value to assign to the block_size_in_kbs property of this NonADBAutoCreateTablespaceDetails. - Allowed values for this property are: "SIZE_8K", "SIZE_16K", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type block_size_in_kbs: str @@ -155,7 +163,7 @@ def block_size_in_kbs(self): Gets the block_size_in_kbs of this NonADBAutoCreateTablespaceDetails. Size of Oracle database blocks in KB. - Allowed values for this property are: "SIZE_8K", "SIZE_16K", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -174,7 +182,7 @@ def block_size_in_kbs(self, block_size_in_kbs): :param block_size_in_kbs: The block_size_in_kbs of this NonADBAutoCreateTablespaceDetails. :type: str """ - allowed_values = ["SIZE_8K", "SIZE_16K"] + allowed_values = ["SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K"] if not value_allowed_none_or_none_sentinel(block_size_in_kbs, allowed_values): block_size_in_kbs = 'UNKNOWN_ENUM_VALUE' self._block_size_in_kbs = block_size_in_kbs diff --git a/src/oci/database_migration/models/parameter_file_version.py b/src/oci/database_migration/models/parameter_file_version.py new file mode 100644 index 0000000000..e6e2d5a4f0 --- /dev/null +++ b/src/oci/database_migration/models/parameter_file_version.py @@ -0,0 +1,274 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230518 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ParameterFileVersion(object): + """ + A parameter file detatails + """ + + #: A constant which can be used with the kind property of a ParameterFileVersion. + #: This constant has a value of "EXTRACT" + KIND_EXTRACT = "EXTRACT" + + #: A constant which can be used with the kind property of a ParameterFileVersion. + #: This constant has a value of "REPLICAT" + KIND_REPLICAT = "REPLICAT" + + def __init__(self, **kwargs): + """ + Initializes a new ParameterFileVersion object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this ParameterFileVersion. + :type name: str + + :param description: + The value to assign to the description property of this ParameterFileVersion. + :type description: str + + :param is_current: + The value to assign to the is_current property of this ParameterFileVersion. + :type is_current: bool + + :param is_factory: + The value to assign to the is_factory property of this ParameterFileVersion. + :type is_factory: bool + + :param kind: + The value to assign to the kind property of this ParameterFileVersion. + Allowed values for this property are: "EXTRACT", "REPLICAT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type kind: str + + :param time_created: + The value to assign to the time_created property of this ParameterFileVersion. + :type time_created: datetime + + :param content: + The value to assign to the content property of this ParameterFileVersion. + :type content: str + + """ + self.swagger_types = { + 'name': 'str', + 'description': 'str', + 'is_current': 'bool', + 'is_factory': 'bool', + 'kind': 'str', + 'time_created': 'datetime', + 'content': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'description': 'description', + 'is_current': 'isCurrent', + 'is_factory': 'isFactory', + 'kind': 'kind', + 'time_created': 'timeCreated', + 'content': 'content' + } + + self._name = None + self._description = None + self._is_current = None + self._is_factory = None + self._kind = None + self._time_created = None + self._content = None + + @property + def name(self): + """ + **[Required]** Gets the name of this ParameterFileVersion. + A unique name associated with the current migration/job and extract/replicat name + + + :return: The name of this ParameterFileVersion. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ParameterFileVersion. + A unique name associated with the current migration/job and extract/replicat name + + + :param name: The name of this ParameterFileVersion. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this ParameterFileVersion. + Describes the current parameter file version + + + :return: The description of this ParameterFileVersion. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ParameterFileVersion. + Describes the current parameter file version + + + :param description: The description of this ParameterFileVersion. + :type: str + """ + self._description = description + + @property + def is_current(self): + """ + **[Required]** Gets the is_current of this ParameterFileVersion. + Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + + + :return: The is_current of this ParameterFileVersion. + :rtype: bool + """ + return self._is_current + + @is_current.setter + def is_current(self, is_current): + """ + Sets the is_current of this ParameterFileVersion. + Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + + + :param is_current: The is_current of this ParameterFileVersion. + :type: bool + """ + self._is_current = is_current + + @property + def is_factory(self): + """ + **[Required]** Gets the is_factory of this ParameterFileVersion. + Return true/false for whether the parameter file is oracle provided (Factory) + + + :return: The is_factory of this ParameterFileVersion. + :rtype: bool + """ + return self._is_factory + + @is_factory.setter + def is_factory(self, is_factory): + """ + Sets the is_factory of this ParameterFileVersion. + Return true/false for whether the parameter file is oracle provided (Factory) + + + :param is_factory: The is_factory of this ParameterFileVersion. + :type: bool + """ + self._is_factory = is_factory + + @property + def kind(self): + """ + **[Required]** Gets the kind of this ParameterFileVersion. + Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + + Allowed values for this property are: "EXTRACT", "REPLICAT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The kind of this ParameterFileVersion. + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """ + Sets the kind of this ParameterFileVersion. + Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + + + :param kind: The kind of this ParameterFileVersion. + :type: str + """ + allowed_values = ["EXTRACT", "REPLICAT"] + if not value_allowed_none_or_none_sentinel(kind, allowed_values): + kind = 'UNKNOWN_ENUM_VALUE' + self._kind = kind + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ParameterFileVersion. + The time when this parameter file was applied on the process + + + :return: The time_created of this ParameterFileVersion. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ParameterFileVersion. + The time when this parameter file was applied on the process + + + :param time_created: The time_created of this ParameterFileVersion. + :type: datetime + """ + self._time_created = time_created + + @property + def content(self): + """ + **[Required]** Gets the content of this ParameterFileVersion. + The content in base64 encoded character string containing the value of the parameter file + + + :return: The content of this ParameterFileVersion. + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """ + Sets the content of this ParameterFileVersion. + The content in base64 encoded character string containing the value of the parameter file + + + :param content: The content of this ParameterFileVersion. + :type: str + """ + self._content = content + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database_migration/models/parameter_file_version_collection.py b/src/oci/database_migration/models/parameter_file_version_collection.py new file mode 100644 index 0000000000..2d941bc99c --- /dev/null +++ b/src/oci/database_migration/models/parameter_file_version_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230518 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ParameterFileVersionCollection(object): + """ + Results of request for Parameter Files. Contents is a collection of ParameterFileVersionSummary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ParameterFileVersionCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ParameterFileVersionCollection. + :type items: list[oci.database_migration.models.ParameterFileVersionSummary] + + """ + self.swagger_types = { + 'items': 'list[ParameterFileVersionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ParameterFileVersionCollection. + A list of A parameter file metadata + + + :return: The items of this ParameterFileVersionCollection. + :rtype: list[oci.database_migration.models.ParameterFileVersionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ParameterFileVersionCollection. + A list of A parameter file metadata + + + :param items: The items of this ParameterFileVersionCollection. + :type: list[oci.database_migration.models.ParameterFileVersionSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database_migration/models/parameter_file_version_summary.py b/src/oci/database_migration/models/parameter_file_version_summary.py new file mode 100644 index 0000000000..112533f990 --- /dev/null +++ b/src/oci/database_migration/models/parameter_file_version_summary.py @@ -0,0 +1,342 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230518 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ParameterFileVersionSummary(object): + """ + A parameter file detatails + """ + + #: A constant which can be used with the kind property of a ParameterFileVersionSummary. + #: This constant has a value of "EXTRACT" + KIND_EXTRACT = "EXTRACT" + + #: A constant which can be used with the kind property of a ParameterFileVersionSummary. + #: This constant has a value of "REPLICAT" + KIND_REPLICAT = "REPLICAT" + + def __init__(self, **kwargs): + """ + Initializes a new ParameterFileVersionSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this ParameterFileVersionSummary. + :type name: str + + :param kind: + The value to assign to the kind property of this ParameterFileVersionSummary. + Allowed values for this property are: "EXTRACT", "REPLICAT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type kind: str + + :param description: + The value to assign to the description property of this ParameterFileVersionSummary. + :type description: str + + :param is_current: + The value to assign to the is_current property of this ParameterFileVersionSummary. + :type is_current: bool + + :param is_factory: + The value to assign to the is_factory property of this ParameterFileVersionSummary. + :type is_factory: bool + + :param time_created: + The value to assign to the time_created property of this ParameterFileVersionSummary. + :type time_created: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this ParameterFileVersionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ParameterFileVersionSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ParameterFileVersionSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'name': 'str', + 'kind': 'str', + 'description': 'str', + 'is_current': 'bool', + 'is_factory': 'bool', + 'time_created': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'name': 'name', + 'kind': 'kind', + 'description': 'description', + 'is_current': 'isCurrent', + 'is_factory': 'isFactory', + 'time_created': 'timeCreated', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._name = None + self._kind = None + self._description = None + self._is_current = None + self._is_factory = None + self._time_created = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def name(self): + """ + **[Required]** Gets the name of this ParameterFileVersionSummary. + A unique name associated with the current migration/job and extract/replicat name + + + :return: The name of this ParameterFileVersionSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ParameterFileVersionSummary. + A unique name associated with the current migration/job and extract/replicat name + + + :param name: The name of this ParameterFileVersionSummary. + :type: str + """ + self._name = name + + @property + def kind(self): + """ + **[Required]** Gets the kind of this ParameterFileVersionSummary. + Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + + Allowed values for this property are: "EXTRACT", "REPLICAT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The kind of this ParameterFileVersionSummary. + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """ + Sets the kind of this ParameterFileVersionSummary. + Indicator of Parameter File 'kind' (for an EXTRACT or a REPLICAT) + + + :param kind: The kind of this ParameterFileVersionSummary. + :type: str + """ + allowed_values = ["EXTRACT", "REPLICAT"] + if not value_allowed_none_or_none_sentinel(kind, allowed_values): + kind = 'UNKNOWN_ENUM_VALUE' + self._kind = kind + + @property + def description(self): + """ + Gets the description of this ParameterFileVersionSummary. + A description to discribe the current parameter file version + + + :return: The description of this ParameterFileVersionSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ParameterFileVersionSummary. + A description to discribe the current parameter file version + + + :param description: The description of this ParameterFileVersionSummary. + :type: str + """ + self._description = description + + @property + def is_current(self): + """ + **[Required]** Gets the is_current of this ParameterFileVersionSummary. + Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + + + :return: The is_current of this ParameterFileVersionSummary. + :rtype: bool + """ + return self._is_current + + @is_current.setter + def is_current(self, is_current): + """ + Sets the is_current of this ParameterFileVersionSummary. + Return boolean true/false for the currently in-use parameter file (factory or a versioned file) + + + :param is_current: The is_current of this ParameterFileVersionSummary. + :type: bool + """ + self._is_current = is_current + + @property + def is_factory(self): + """ + **[Required]** Gets the is_factory of this ParameterFileVersionSummary. + Return true/false for whether the parameter file is oracle provided (Factory) + + + :return: The is_factory of this ParameterFileVersionSummary. + :rtype: bool + """ + return self._is_factory + + @is_factory.setter + def is_factory(self, is_factory): + """ + Sets the is_factory of this ParameterFileVersionSummary. + Return true/false for whether the parameter file is oracle provided (Factory) + + + :param is_factory: The is_factory of this ParameterFileVersionSummary. + :type: bool + """ + self._is_factory = is_factory + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ParameterFileVersionSummary. + The time when this parameter file was applied on the process + + + :return: The time_created of this ParameterFileVersionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ParameterFileVersionSummary. + The time when this parameter file was applied on the process + + + :param time_created: The time_created of this ParameterFileVersionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ParameterFileVersionSummary. + 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. Example: {\"Department\": \"Finance\"} + + + :return: The freeform_tags of this ParameterFileVersionSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ParameterFileVersionSummary. + 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. Example: {\"Department\": \"Finance\"} + + + :param freeform_tags: The freeform_tags of this ParameterFileVersionSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ParameterFileVersionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this ParameterFileVersionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ParameterFileVersionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this ParameterFileVersionSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ParameterFileVersionSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this ParameterFileVersionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this ParameterFileVersionSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this ParameterFileVersionSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/database_migration/models/phase_status.py b/src/oci/database_migration/models/phase_status.py index a12c64a4f6..b68e9826ba 100644 --- a/src/oci/database_migration/models/phase_status.py +++ b/src/oci/database_migration/models/phase_status.py @@ -123,6 +123,14 @@ class PhaseStatus(object): #: This constant has a value of "FAILED" STATUS_FAILED = "FAILED" + #: A constant which can be used with the editable_parameter_files property of a PhaseStatus. + #: This constant has a value of "EXTRACT" + EDITABLE_PARAMETER_FILES_EXTRACT = "EXTRACT" + + #: A constant which can be used with the editable_parameter_files property of a PhaseStatus. + #: This constant has a value of "REPLICAT" + EDITABLE_PARAMETER_FILES_REPLICAT = "REPLICAT" + def __init__(self, **kwargs): """ Initializes a new PhaseStatus object with values from keyword arguments. @@ -168,6 +176,16 @@ def __init__(self, **kwargs): The value to assign to the progress property of this PhaseStatus. :type progress: int + :param is_suspend_available: + The value to assign to the is_suspend_available property of this PhaseStatus. + :type is_suspend_available: bool + + :param editable_parameter_files: + The value to assign to the editable_parameter_files property of this PhaseStatus. + Allowed values for items in this list are: "EXTRACT", "REPLICAT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type editable_parameter_files: list[str] + """ self.swagger_types = { 'name': 'str', @@ -178,7 +196,9 @@ def __init__(self, **kwargs): 'action': 'str', 'extract': 'list[PhaseExtractEntry]', 'log_location': 'LogLocationBucketDetails', - 'progress': 'int' + 'progress': 'int', + 'is_suspend_available': 'bool', + 'editable_parameter_files': 'list[str]' } self.attribute_map = { @@ -190,7 +210,9 @@ def __init__(self, **kwargs): 'action': 'action', 'extract': 'extract', 'log_location': 'logLocation', - 'progress': 'progress' + 'progress': 'progress', + 'is_suspend_available': 'isSuspendAvailable', + 'editable_parameter_files': 'editableParameterFiles' } self._name = None @@ -202,6 +224,8 @@ def __init__(self, **kwargs): self._extract = None self._log_location = None self._progress = None + self._is_suspend_available = None + self._editable_parameter_files = None @property def name(self): @@ -427,6 +451,60 @@ def progress(self, progress): """ self._progress = progress + @property + def is_suspend_available(self): + """ + Gets the is_suspend_available of this PhaseStatus. + This is returned as true if the current phase can be suspended. + + + :return: The is_suspend_available of this PhaseStatus. + :rtype: bool + """ + return self._is_suspend_available + + @is_suspend_available.setter + def is_suspend_available(self, is_suspend_available): + """ + Sets the is_suspend_available of this PhaseStatus. + This is returned as true if the current phase can be suspended. + + + :param is_suspend_available: The is_suspend_available of this PhaseStatus. + :type: bool + """ + self._is_suspend_available = is_suspend_available + + @property + def editable_parameter_files(self): + """ + Gets the editable_parameter_files of this PhaseStatus. + Attribute that returns an array of names and types of GoldenGate configuration files that are available for read or update. + + Allowed values for items in this list are: "EXTRACT", "REPLICAT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The editable_parameter_files of this PhaseStatus. + :rtype: list[str] + """ + return self._editable_parameter_files + + @editable_parameter_files.setter + def editable_parameter_files(self, editable_parameter_files): + """ + Sets the editable_parameter_files of this PhaseStatus. + Attribute that returns an array of names and types of GoldenGate configuration files that are available for read or update. + + + :param editable_parameter_files: The editable_parameter_files of this PhaseStatus. + :type: list[str] + """ + allowed_values = ["EXTRACT", "REPLICAT"] + if editable_parameter_files: + editable_parameter_files[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in editable_parameter_files] + self._editable_parameter_files = editable_parameter_files + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/database_migration/models/update_adb_dedicated_auto_create_tablespace_details.py b/src/oci/database_migration/models/update_adb_dedicated_auto_create_tablespace_details.py index c046b970c5..0ec5f587a9 100644 --- a/src/oci/database_migration/models/update_adb_dedicated_auto_create_tablespace_details.py +++ b/src/oci/database_migration/models/update_adb_dedicated_auto_create_tablespace_details.py @@ -15,6 +15,10 @@ class UpdateADBDedicatedAutoCreateTablespaceDetails(UpdateTargetTypeTablespaceDe Auto create tablespace settings that are valid for Dedicated Autonomous Databases. """ + #: A constant which can be used with the block_size_in_kbs property of a UpdateADBDedicatedAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_2K" + BLOCK_SIZE_IN_KBS_SIZE_2_K = "SIZE_2K" + #: A constant which can be used with the block_size_in_kbs property of a UpdateADBDedicatedAutoCreateTablespaceDetails. #: This constant has a value of "SIZE_8K" BLOCK_SIZE_IN_KBS_SIZE_8_K = "SIZE_8K" @@ -23,6 +27,10 @@ class UpdateADBDedicatedAutoCreateTablespaceDetails(UpdateTargetTypeTablespaceDe #: This constant has a value of "SIZE_16K" BLOCK_SIZE_IN_KBS_SIZE_16_K = "SIZE_16K" + #: A constant which can be used with the block_size_in_kbs property of a UpdateADBDedicatedAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_32K" + BLOCK_SIZE_IN_KBS_SIZE_32_K = "SIZE_32K" + def __init__(self, **kwargs): """ Initializes a new UpdateADBDedicatedAutoCreateTablespaceDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database_migration.models.UpdateADBDedicatedAutoCreateTablespaceDetails.target_type` attribute @@ -48,7 +56,7 @@ def __init__(self, **kwargs): :param block_size_in_kbs: The value to assign to the block_size_in_kbs property of this UpdateADBDedicatedAutoCreateTablespaceDetails. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :type block_size_in_kbs: str """ @@ -157,7 +165,7 @@ def block_size_in_kbs(self): Gets the block_size_in_kbs of this UpdateADBDedicatedAutoCreateTablespaceDetails. Size of Oracle database blocks in KB. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :return: The block_size_in_kbs of this UpdateADBDedicatedAutoCreateTablespaceDetails. @@ -175,7 +183,7 @@ def block_size_in_kbs(self, block_size_in_kbs): :param block_size_in_kbs: The block_size_in_kbs of this UpdateADBDedicatedAutoCreateTablespaceDetails. :type: str """ - allowed_values = ["SIZE_8K", "SIZE_16K"] + allowed_values = ["SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K"] if not value_allowed_none_or_none_sentinel(block_size_in_kbs, allowed_values): raise ValueError( f"Invalid value for `block_size_in_kbs`, must be None or one of {allowed_values}" diff --git a/src/oci/database_migration/models/update_non_adb_auto_create_tablespace_details.py b/src/oci/database_migration/models/update_non_adb_auto_create_tablespace_details.py index 07138fdca8..e63d5fcfbc 100644 --- a/src/oci/database_migration/models/update_non_adb_auto_create_tablespace_details.py +++ b/src/oci/database_migration/models/update_non_adb_auto_create_tablespace_details.py @@ -15,6 +15,10 @@ class UpdateNonADBAutoCreateTablespaceDetails(UpdateTargetTypeTablespaceDetails) Migration tablespace settings valid for NON-ADB target type using auto create feature. """ + #: A constant which can be used with the block_size_in_kbs property of a UpdateNonADBAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_2K" + BLOCK_SIZE_IN_KBS_SIZE_2_K = "SIZE_2K" + #: A constant which can be used with the block_size_in_kbs property of a UpdateNonADBAutoCreateTablespaceDetails. #: This constant has a value of "SIZE_8K" BLOCK_SIZE_IN_KBS_SIZE_8_K = "SIZE_8K" @@ -23,6 +27,10 @@ class UpdateNonADBAutoCreateTablespaceDetails(UpdateTargetTypeTablespaceDetails) #: This constant has a value of "SIZE_16K" BLOCK_SIZE_IN_KBS_SIZE_16_K = "SIZE_16K" + #: A constant which can be used with the block_size_in_kbs property of a UpdateNonADBAutoCreateTablespaceDetails. + #: This constant has a value of "SIZE_32K" + BLOCK_SIZE_IN_KBS_SIZE_32_K = "SIZE_32K" + def __init__(self, **kwargs): """ Initializes a new UpdateNonADBAutoCreateTablespaceDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database_migration.models.UpdateNonADBAutoCreateTablespaceDetails.target_type` attribute @@ -48,7 +56,7 @@ def __init__(self, **kwargs): :param block_size_in_kbs: The value to assign to the block_size_in_kbs property of this UpdateNonADBAutoCreateTablespaceDetails. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :type block_size_in_kbs: str """ @@ -153,7 +161,7 @@ def block_size_in_kbs(self): Gets the block_size_in_kbs of this UpdateNonADBAutoCreateTablespaceDetails. Size of Oracle database blocks in KB. - Allowed values for this property are: "SIZE_8K", "SIZE_16K" + Allowed values for this property are: "SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K" :return: The block_size_in_kbs of this UpdateNonADBAutoCreateTablespaceDetails. @@ -171,7 +179,7 @@ def block_size_in_kbs(self, block_size_in_kbs): :param block_size_in_kbs: The block_size_in_kbs of this UpdateNonADBAutoCreateTablespaceDetails. :type: str """ - allowed_values = ["SIZE_8K", "SIZE_16K"] + allowed_values = ["SIZE_2K", "SIZE_8K", "SIZE_16K", "SIZE_32K"] if not value_allowed_none_or_none_sentinel(block_size_in_kbs, allowed_values): raise ValueError( f"Invalid value for `block_size_in_kbs`, must be None or one of {allowed_values}" diff --git a/src/oci/fleet_software_update/fleet_software_update_client.py b/src/oci/fleet_software_update/fleet_software_update_client.py index 98ee3e00a6..778de6211a 100644 --- a/src/oci/fleet_software_update/fleet_software_update_client.py +++ b/src/oci/fleet_software_update/fleet_software_update_client.py @@ -1269,7 +1269,8 @@ def create_fsu_cycle(self, create_fsu_cycle_details, **kwargs): :param oci.fleet_software_update.models.CreateFsuCycleDetails create_fsu_cycle_details: (required) - Details for the new Exadata Fleet Update Cycle. + Details for the new Exadata Fleet Update Maintenance Cycle. + Targets can only exist in one active Fleet Software Update Maintenance Cycle. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -1669,6 +1670,117 @@ def delete_fsu_collection(self, fsu_collection_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def delete_fsu_collection_target(self, fsu_collection_id, target_id, **kwargs): + """ + Removes a target from an existing Exadata Fleet Update Collection. + This operation can only be performed on Collections that do not have an Action executing under an active Fleet Software Update Cycle. + Additionally, during an active Fleet Software Update Cycle, a target can be removed only prior to executing an Apply Action. + + + :param str fsu_collection_id: (required) + Unique Exadata Fleet Update Collection identifier. + + :param str target_id: (required) + Target resource OCID. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_fsu_collection_target API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['fsuCollectionId', 'targetId'] + resource_path = "/fsuCollections/{fsuCollectionId}/targets/{targetId}" + method = "DELETE" + operation_name = "delete_fsu_collection_target" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/edsfu/20220528/FsuCollection/DeleteFsuCollectionTarget" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_fsu_collection_target got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "fsuCollectionId": fsu_collection_id, + "targetId": target_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def delete_fsu_cycle(self, fsu_cycle_id, **kwargs): """ Deletes a Exadata Fleet Update Cycle resource by identifier. @@ -2279,6 +2391,108 @@ def get_fsu_collection(self, fsu_collection_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_fsu_collection_target(self, fsu_collection_id, target_id, **kwargs): + """ + Gets a Exadata Fleet Update Collection Target by identifier. + + + :param str fsu_collection_id: (required) + Unique Exadata Fleet Update Collection identifier. + + :param str target_id: (required) + Target resource OCID. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.fleet_software_update.models.FsuCollectionTarget` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_fsu_collection_target API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['fsuCollectionId', 'targetId'] + resource_path = "/fsuCollections/{fsuCollectionId}/targets/{targetId}" + method = "GET" + operation_name = "get_fsu_collection_target" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/edsfu/20220528/FsuCollectionTarget/GetFsuCollectionTarget" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_fsu_collection_target got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "fsuCollectionId": fsu_collection_id, + "targetId": target_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="FsuCollectionTarget", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="FsuCollectionTarget", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_fsu_cycle(self, fsu_cycle_id, **kwargs): """ Gets a Exadata Fleet Update Cycle by identifier. diff --git a/src/oci/fleet_software_update/fleet_software_update_client_composite_operations.py b/src/oci/fleet_software_update/fleet_software_update_client_composite_operations.py index aeeb271001..9f3257a895 100644 --- a/src/oci/fleet_software_update/fleet_software_update_client_composite_operations.py +++ b/src/oci/fleet_software_update/fleet_software_update_client_composite_operations.py @@ -319,7 +319,8 @@ def create_fsu_cycle_and_wait_for_state(self, create_fsu_cycle_details, wait_for to enter the given state(s). :param oci.fleet_software_update.models.CreateFsuCycleDetails create_fsu_cycle_details: (required) - Details for the new Exadata Fleet Update Cycle. + Details for the new Exadata Fleet Update Maintenance Cycle. + Targets can only exist in one active Fleet Software Update Maintenance Cycle. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.fleet_software_update.models.WorkRequest.status` @@ -485,6 +486,56 @@ def delete_fsu_collection_and_wait_for_state(self, fsu_collection_id, wait_for_s except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_fsu_collection_target_and_wait_for_state(self, fsu_collection_id, target_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.fleet_software_update.FleetSoftwareUpdateClient.delete_fsu_collection_target` and waits for the :py:class:`~oci.fleet_software_update.models.WorkRequest` + to enter the given state(s). + + :param str fsu_collection_id: (required) + Unique Exadata Fleet Update Collection identifier. + + :param str target_id: (required) + Target resource OCID. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.fleet_software_update.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.fleet_software_update.FleetSoftwareUpdateClient.delete_fsu_collection_target` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_fsu_collection_target(fsu_collection_id, target_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_fsu_cycle_and_wait_for_state(self, fsu_cycle_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.fleet_software_update.FleetSoftwareUpdateClient.delete_fsu_cycle` and waits for the :py:class:`~oci.fleet_software_update.models.WorkRequest` diff --git a/src/oci/fleet_software_update/models/__init__.py b/src/oci/fleet_software_update/models/__init__.py index 0e639b6c1b..598999d09c 100644 --- a/src/oci/fleet_software_update/models/__init__.py +++ b/src/oci/fleet_software_update/models/__init__.py @@ -61,6 +61,7 @@ from .db_unique_name_filter import DbUniqueNameFilter from .db_version_filter import DbVersionFilter from .defined_tag_filter_entry import DefinedTagFilterEntry +from .diagnostics_collection_details import DiagnosticsCollectionDetails from .discovery_details import DiscoveryDetails from .discovery_details_summary import DiscoveryDetailsSummary from .failed_jobs_rollback_details import FailedJobsRollbackDetails @@ -73,6 +74,7 @@ from .fsu_collection import FsuCollection from .fsu_collection_summary import FsuCollectionSummary from .fsu_collection_summary_collection import FsuCollectionSummaryCollection +from .fsu_collection_target import FsuCollectionTarget from .fsu_cycle import FsuCycle from .fsu_cycle_summary import FsuCycleSummary from .fsu_cycle_summary_collection import FsuCycleSummaryCollection @@ -218,6 +220,7 @@ "DbUniqueNameFilter": DbUniqueNameFilter, "DbVersionFilter": DbVersionFilter, "DefinedTagFilterEntry": DefinedTagFilterEntry, + "DiagnosticsCollectionDetails": DiagnosticsCollectionDetails, "DiscoveryDetails": DiscoveryDetails, "DiscoveryDetailsSummary": DiscoveryDetailsSummary, "FailedJobsRollbackDetails": FailedJobsRollbackDetails, @@ -230,6 +233,7 @@ "FsuCollection": FsuCollection, "FsuCollectionSummary": FsuCollectionSummary, "FsuCollectionSummaryCollection": FsuCollectionSummaryCollection, + "FsuCollectionTarget": FsuCollectionTarget, "FsuCycle": FsuCycle, "FsuCycleSummary": FsuCycleSummary, "FsuCycleSummaryCollection": FsuCycleSummaryCollection, diff --git a/src/oci/fleet_software_update/models/cloud_vm_cluster_target_summary.py b/src/oci/fleet_software_update/models/cloud_vm_cluster_target_summary.py index 4bf67dfe21..8b101e76e6 100644 --- a/src/oci/fleet_software_update/models/cloud_vm_cluster_target_summary.py +++ b/src/oci/fleet_software_update/models/cloud_vm_cluster_target_summary.py @@ -40,25 +40,32 @@ def __init__(self, **kwargs): The value to assign to the infrastructure_id property of this CloudVmClusterTargetSummary. :type infrastructure_id: str + :param software_image_id: + The value to assign to the software_image_id property of this CloudVmClusterTargetSummary. + :type software_image_id: str + """ self.swagger_types = { 'entity_type': 'str', 'id': 'str', 'compartment_id': 'str', - 'infrastructure_id': 'str' + 'infrastructure_id': 'str', + 'software_image_id': 'str' } self.attribute_map = { 'entity_type': 'entityType', 'id': 'id', 'compartment_id': 'compartmentId', - 'infrastructure_id': 'infrastructureId' + 'infrastructure_id': 'infrastructureId', + 'software_image_id': 'softwareImageId' } self._entity_type = None self._id = None self._compartment_id = None self._infrastructure_id = None + self._software_image_id = None self._entity_type = 'CLOUDVMCLUSTER' @property @@ -85,6 +92,30 @@ def infrastructure_id(self, infrastructure_id): """ self._infrastructure_id = infrastructure_id + @property + def software_image_id(self): + """ + Gets the software_image_id of this CloudVmClusterTargetSummary. + OCID of the Grid Infrastructure software image. + + + :return: The software_image_id of this CloudVmClusterTargetSummary. + :rtype: str + """ + return self._software_image_id + + @software_image_id.setter + def software_image_id(self, software_image_id): + """ + Sets the software_image_id of this CloudVmClusterTargetSummary. + OCID of the Grid Infrastructure software image. + + + :param software_image_id: The software_image_id of this CloudVmClusterTargetSummary. + :type: str + """ + self._software_image_id = software_image_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/fleet_software_update/models/create_fsu_cycle_details.py b/src/oci/fleet_software_update/models/create_fsu_cycle_details.py index a4080f3fbd..2ea6c1bdbb 100644 --- a/src/oci/fleet_software_update/models/create_fsu_cycle_details.py +++ b/src/oci/fleet_software_update/models/create_fsu_cycle_details.py @@ -61,6 +61,10 @@ def __init__(self, **kwargs): The value to assign to the apply_action_schedule property of this CreateFsuCycleDetails. :type apply_action_schedule: oci.fleet_software_update.models.CreateScheduleDetails + :param diagnostics_collection: + The value to assign to the diagnostics_collection property of this CreateFsuCycleDetails. + :type diagnostics_collection: oci.fleet_software_update.models.DiagnosticsCollectionDetails + :param freeform_tags: The value to assign to the freeform_tags property of this CreateFsuCycleDetails. :type freeform_tags: dict(str, str) @@ -79,6 +83,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'CreateBatchingStrategyDetails', 'stage_action_schedule': 'CreateScheduleDetails', 'apply_action_schedule': 'CreateScheduleDetails', + 'diagnostics_collection': 'DiagnosticsCollectionDetails', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -92,6 +97,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'batchingStrategy', 'stage_action_schedule': 'stageActionSchedule', 'apply_action_schedule': 'applyActionSchedule', + 'diagnostics_collection': 'diagnosticsCollection', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -104,6 +110,7 @@ def __init__(self, **kwargs): self._batching_strategy = None self._stage_action_schedule = None self._apply_action_schedule = None + self._diagnostics_collection = None self._freeform_tags = None self._defined_tags = None @@ -303,6 +310,26 @@ def apply_action_schedule(self, apply_action_schedule): """ self._apply_action_schedule = apply_action_schedule + @property + def diagnostics_collection(self): + """ + Gets the diagnostics_collection of this CreateFsuCycleDetails. + + :return: The diagnostics_collection of this CreateFsuCycleDetails. + :rtype: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + return self._diagnostics_collection + + @diagnostics_collection.setter + def diagnostics_collection(self, diagnostics_collection): + """ + Sets the diagnostics_collection of this CreateFsuCycleDetails. + + :param diagnostics_collection: The diagnostics_collection of this CreateFsuCycleDetails. + :type: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + self._diagnostics_collection = diagnostics_collection + @property def freeform_tags(self): """ diff --git a/src/oci/fleet_software_update/models/create_patch_fsu_cycle.py b/src/oci/fleet_software_update/models/create_patch_fsu_cycle.py index 1a0cbbf64d..38b1679c72 100644 --- a/src/oci/fleet_software_update/models/create_patch_fsu_cycle.py +++ b/src/oci/fleet_software_update/models/create_patch_fsu_cycle.py @@ -54,6 +54,10 @@ def __init__(self, **kwargs): The value to assign to the apply_action_schedule property of this CreatePatchFsuCycle. :type apply_action_schedule: oci.fleet_software_update.models.CreateScheduleDetails + :param diagnostics_collection: + The value to assign to the diagnostics_collection property of this CreatePatchFsuCycle. + :type diagnostics_collection: oci.fleet_software_update.models.DiagnosticsCollectionDetails + :param freeform_tags: The value to assign to the freeform_tags property of this CreatePatchFsuCycle. :type freeform_tags: dict(str, str) @@ -88,6 +92,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'CreateBatchingStrategyDetails', 'stage_action_schedule': 'CreateScheduleDetails', 'apply_action_schedule': 'CreateScheduleDetails', + 'diagnostics_collection': 'DiagnosticsCollectionDetails', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'is_ignore_patches': 'bool', @@ -105,6 +110,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'batchingStrategy', 'stage_action_schedule': 'stageActionSchedule', 'apply_action_schedule': 'applyActionSchedule', + 'diagnostics_collection': 'diagnosticsCollection', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'is_ignore_patches': 'isIgnorePatches', @@ -121,6 +127,7 @@ def __init__(self, **kwargs): self._batching_strategy = None self._stage_action_schedule = None self._apply_action_schedule = None + self._diagnostics_collection = None self._freeform_tags = None self._defined_tags = None self._is_ignore_patches = None diff --git a/src/oci/fleet_software_update/models/diagnostics_collection_details.py b/src/oci/fleet_software_update/models/diagnostics_collection_details.py new file mode 100644 index 0000000000..3f687dae4d --- /dev/null +++ b/src/oci/fleet_software_update/models/diagnostics_collection_details.py @@ -0,0 +1,94 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220528 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiagnosticsCollectionDetails(object): + """ + Details to configure diagnostics collection for targets affected by this Exadata Fleet Update Maintenance Cycle. + """ + + #: A constant which can be used with the log_collection_mode property of a DiagnosticsCollectionDetails. + #: This constant has a value of "ENABLE" + LOG_COLLECTION_MODE_ENABLE = "ENABLE" + + #: A constant which can be used with the log_collection_mode property of a DiagnosticsCollectionDetails. + #: This constant has a value of "ENABLE_AND_RESTORE" + LOG_COLLECTION_MODE_ENABLE_AND_RESTORE = "ENABLE_AND_RESTORE" + + #: A constant which can be used with the log_collection_mode property of a DiagnosticsCollectionDetails. + #: This constant has a value of "NO_CHANGE" + LOG_COLLECTION_MODE_NO_CHANGE = "NO_CHANGE" + + def __init__(self, **kwargs): + """ + Initializes a new DiagnosticsCollectionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param log_collection_mode: + The value to assign to the log_collection_mode property of this DiagnosticsCollectionDetails. + Allowed values for this property are: "ENABLE", "ENABLE_AND_RESTORE", "NO_CHANGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type log_collection_mode: str + + """ + self.swagger_types = { + 'log_collection_mode': 'str' + } + + self.attribute_map = { + 'log_collection_mode': 'logCollectionMode' + } + + self._log_collection_mode = None + + @property + def log_collection_mode(self): + """ + Gets the log_collection_mode of this DiagnosticsCollectionDetails. + Enable incident logs and trace collection. + Allow Oracle to collect incident logs and traces to enable fault diagnosis and issue resolution according to the selected mode. + + Allowed values for this property are: "ENABLE", "ENABLE_AND_RESTORE", "NO_CHANGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The log_collection_mode of this DiagnosticsCollectionDetails. + :rtype: str + """ + return self._log_collection_mode + + @log_collection_mode.setter + def log_collection_mode(self, log_collection_mode): + """ + Sets the log_collection_mode of this DiagnosticsCollectionDetails. + Enable incident logs and trace collection. + Allow Oracle to collect incident logs and traces to enable fault diagnosis and issue resolution according to the selected mode. + + + :param log_collection_mode: The log_collection_mode of this DiagnosticsCollectionDetails. + :type: str + """ + allowed_values = ["ENABLE", "ENABLE_AND_RESTORE", "NO_CHANGE"] + if not value_allowed_none_or_none_sentinel(log_collection_mode, allowed_values): + log_collection_mode = 'UNKNOWN_ENUM_VALUE' + self._log_collection_mode = log_collection_mode + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/fleet_software_update/models/fsu_collection_target.py b/src/oci/fleet_software_update/models/fsu_collection_target.py new file mode 100644 index 0000000000..d67bbbfa9b --- /dev/null +++ b/src/oci/fleet_software_update/models/fsu_collection_target.py @@ -0,0 +1,239 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220528 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FsuCollectionTarget(object): + """ + Details of a target member of a Exadata Fleet Update Collection. + """ + + #: A constant which can be used with the status property of a FsuCollectionTarget. + #: This constant has a value of "IDLE" + STATUS_IDLE = "IDLE" + + #: A constant which can be used with the status property of a FsuCollectionTarget. + #: This constant has a value of "EXECUTING_JOB" + STATUS_EXECUTING_JOB = "EXECUTING_JOB" + + #: A constant which can be used with the status property of a FsuCollectionTarget. + #: This constant has a value of "JOB_FAILED" + STATUS_JOB_FAILED = "JOB_FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new FsuCollectionTarget object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target: + The value to assign to the target property of this FsuCollectionTarget. + :type target: oci.fleet_software_update.models.TargetDetails + + :param current_version: + The value to assign to the current_version property of this FsuCollectionTarget. + :type current_version: str + + :param status: + The value to assign to the status property of this FsuCollectionTarget. + Allowed values for this property are: "IDLE", "EXECUTING_JOB", "JOB_FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param executing_fsu_job_id: + The value to assign to the executing_fsu_job_id property of this FsuCollectionTarget. + :type executing_fsu_job_id: str + + :param active_fsu_cycle_id: + The value to assign to the active_fsu_cycle_id property of this FsuCollectionTarget. + :type active_fsu_cycle_id: str + + :param progress: + The value to assign to the progress property of this FsuCollectionTarget. + :type progress: oci.fleet_software_update.models.TargetProgressSummary + + """ + self.swagger_types = { + 'target': 'TargetDetails', + 'current_version': 'str', + 'status': 'str', + 'executing_fsu_job_id': 'str', + 'active_fsu_cycle_id': 'str', + 'progress': 'TargetProgressSummary' + } + + self.attribute_map = { + 'target': 'target', + 'current_version': 'currentVersion', + 'status': 'status', + 'executing_fsu_job_id': 'executingFsuJobId', + 'active_fsu_cycle_id': 'activeFsuCycleId', + 'progress': 'progress' + } + + self._target = None + self._current_version = None + self._status = None + self._executing_fsu_job_id = None + self._active_fsu_cycle_id = None + self._progress = None + + @property + def target(self): + """ + **[Required]** Gets the target of this FsuCollectionTarget. + + :return: The target of this FsuCollectionTarget. + :rtype: oci.fleet_software_update.models.TargetDetails + """ + return self._target + + @target.setter + def target(self, target): + """ + Sets the target of this FsuCollectionTarget. + + :param target: The target of this FsuCollectionTarget. + :type: oci.fleet_software_update.models.TargetDetails + """ + self._target = target + + @property + def current_version(self): + """ + Gets the current_version of this FsuCollectionTarget. + Current version of the target. + + + :return: The current_version of this FsuCollectionTarget. + :rtype: str + """ + return self._current_version + + @current_version.setter + def current_version(self, current_version): + """ + Sets the current_version of this FsuCollectionTarget. + Current version of the target. + + + :param current_version: The current_version of this FsuCollectionTarget. + :type: str + """ + self._current_version = current_version + + @property + def status(self): + """ + Gets the status of this FsuCollectionTarget. + Status of the target in the Exadata Fleet Update Collection. + + Allowed values for this property are: "IDLE", "EXECUTING_JOB", "JOB_FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this FsuCollectionTarget. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this FsuCollectionTarget. + Status of the target in the Exadata Fleet Update Collection. + + + :param status: The status of this FsuCollectionTarget. + :type: str + """ + allowed_values = ["IDLE", "EXECUTING_JOB", "JOB_FAILED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def executing_fsu_job_id(self): + """ + Gets the executing_fsu_job_id of this FsuCollectionTarget. + Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed. + + + :return: The executing_fsu_job_id of this FsuCollectionTarget. + :rtype: str + """ + return self._executing_fsu_job_id + + @executing_fsu_job_id.setter + def executing_fsu_job_id(self, executing_fsu_job_id): + """ + Sets the executing_fsu_job_id of this FsuCollectionTarget. + Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed. + + + :param executing_fsu_job_id: The executing_fsu_job_id of this FsuCollectionTarget. + :type: str + """ + self._executing_fsu_job_id = executing_fsu_job_id + + @property + def active_fsu_cycle_id(self): + """ + Gets the active_fsu_cycle_id of this FsuCollectionTarget. + Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member. + + + :return: The active_fsu_cycle_id of this FsuCollectionTarget. + :rtype: str + """ + return self._active_fsu_cycle_id + + @active_fsu_cycle_id.setter + def active_fsu_cycle_id(self, active_fsu_cycle_id): + """ + Sets the active_fsu_cycle_id of this FsuCollectionTarget. + Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member. + + + :param active_fsu_cycle_id: The active_fsu_cycle_id of this FsuCollectionTarget. + :type: str + """ + self._active_fsu_cycle_id = active_fsu_cycle_id + + @property + def progress(self): + """ + Gets the progress of this FsuCollectionTarget. + + :return: The progress of this FsuCollectionTarget. + :rtype: oci.fleet_software_update.models.TargetProgressSummary + """ + return self._progress + + @progress.setter + def progress(self, progress): + """ + Sets the progress of this FsuCollectionTarget. + + :param progress: The progress of this FsuCollectionTarget. + :type: oci.fleet_software_update.models.TargetProgressSummary + """ + self._progress = progress + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/fleet_software_update/models/fsu_cycle.py b/src/oci/fleet_software_update/models/fsu_cycle.py index 0f30246b2a..69f056e184 100644 --- a/src/oci/fleet_software_update/models/fsu_cycle.py +++ b/src/oci/fleet_software_update/models/fsu_cycle.py @@ -154,6 +154,10 @@ def __init__(self, **kwargs): The value to assign to the apply_action_schedule property of this FsuCycle. :type apply_action_schedule: oci.fleet_software_update.models.ScheduleDetails + :param diagnostics_collection: + The value to assign to the diagnostics_collection property of this FsuCycle. + :type diagnostics_collection: oci.fleet_software_update.models.DiagnosticsCollectionDetails + :param time_created: The value to assign to the time_created property of this FsuCycle. :type time_created: datetime @@ -203,6 +207,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'BatchingStrategyDetails', 'stage_action_schedule': 'ScheduleDetails', 'apply_action_schedule': 'ScheduleDetails', + 'diagnostics_collection': 'DiagnosticsCollectionDetails', 'time_created': 'datetime', 'time_updated': 'datetime', 'time_finished': 'datetime', @@ -227,6 +232,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'batchingStrategy', 'stage_action_schedule': 'stageActionSchedule', 'apply_action_schedule': 'applyActionSchedule', + 'diagnostics_collection': 'diagnosticsCollection', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'time_finished': 'timeFinished', @@ -250,6 +256,7 @@ def __init__(self, **kwargs): self._batching_strategy = None self._stage_action_schedule = None self._apply_action_schedule = None + self._diagnostics_collection = None self._time_created = None self._time_updated = None self._time_finished = None @@ -588,6 +595,26 @@ def apply_action_schedule(self, apply_action_schedule): """ self._apply_action_schedule = apply_action_schedule + @property + def diagnostics_collection(self): + """ + Gets the diagnostics_collection of this FsuCycle. + + :return: The diagnostics_collection of this FsuCycle. + :rtype: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + return self._diagnostics_collection + + @diagnostics_collection.setter + def diagnostics_collection(self, diagnostics_collection): + """ + Sets the diagnostics_collection of this FsuCycle. + + :param diagnostics_collection: The diagnostics_collection of this FsuCycle. + :type: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + self._diagnostics_collection = diagnostics_collection + @property def time_created(self): """ diff --git a/src/oci/fleet_software_update/models/fsu_cycle_summary.py b/src/oci/fleet_software_update/models/fsu_cycle_summary.py index 0e992f4cbc..8ee135efd3 100644 --- a/src/oci/fleet_software_update/models/fsu_cycle_summary.py +++ b/src/oci/fleet_software_update/models/fsu_cycle_summary.py @@ -138,6 +138,10 @@ def __init__(self, **kwargs): The value to assign to the goal_version_details property of this FsuCycleSummary. :type goal_version_details: oci.fleet_software_update.models.FsuGoalVersionDetails + :param diagnostics_collection: + The value to assign to the diagnostics_collection property of this FsuCycleSummary. + :type diagnostics_collection: oci.fleet_software_update.models.DiagnosticsCollectionDetails + :param time_created: The value to assign to the time_created property of this FsuCycleSummary. :type time_created: datetime @@ -184,6 +188,7 @@ def __init__(self, **kwargs): 'next_action_to_execute': 'list[NextActionToExecuteDetails]', 'last_completed_action': 'str', 'goal_version_details': 'FsuGoalVersionDetails', + 'diagnostics_collection': 'DiagnosticsCollectionDetails', 'time_created': 'datetime', 'time_updated': 'datetime', 'time_finished': 'datetime', @@ -205,6 +210,7 @@ def __init__(self, **kwargs): 'next_action_to_execute': 'nextActionToExecute', 'last_completed_action': 'lastCompletedAction', 'goal_version_details': 'goalVersionDetails', + 'diagnostics_collection': 'diagnosticsCollection', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'time_finished': 'timeFinished', @@ -225,6 +231,7 @@ def __init__(self, **kwargs): self._next_action_to_execute = None self._last_completed_action = None self._goal_version_details = None + self._diagnostics_collection = None self._time_created = None self._time_updated = None self._time_finished = None @@ -490,6 +497,26 @@ def goal_version_details(self, goal_version_details): """ self._goal_version_details = goal_version_details + @property + def diagnostics_collection(self): + """ + Gets the diagnostics_collection of this FsuCycleSummary. + + :return: The diagnostics_collection of this FsuCycleSummary. + :rtype: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + return self._diagnostics_collection + + @diagnostics_collection.setter + def diagnostics_collection(self, diagnostics_collection): + """ + Sets the diagnostics_collection of this FsuCycleSummary. + + :param diagnostics_collection: The diagnostics_collection of this FsuCycleSummary. + :type: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + self._diagnostics_collection = diagnostics_collection + @property def time_created(self): """ diff --git a/src/oci/fleet_software_update/models/gi_resource_id_filter.py b/src/oci/fleet_software_update/models/gi_resource_id_filter.py index 1d5d89b76b..33c9217922 100644 --- a/src/oci/fleet_software_update/models/gi_resource_id_filter.py +++ b/src/oci/fleet_software_update/models/gi_resource_id_filter.py @@ -15,6 +15,10 @@ class GiResourceIdFilter(GiFleetDiscoveryFilter): Related resource Ids to include in the discovery. """ + #: A constant which can be used with the entity_type property of a GiResourceIdFilter. + #: This constant has a value of "DATABASESOFTWAREIMAGE" + ENTITY_TYPE_DATABASESOFTWAREIMAGE = "DATABASESOFTWAREIMAGE" + #: A constant which can be used with the entity_type property of a GiResourceIdFilter. #: This constant has a value of "EXADATAINFRASTRUCTURE" ENTITY_TYPE_EXADATAINFRASTRUCTURE = "EXADATAINFRASTRUCTURE" @@ -63,7 +67,7 @@ def __init__(self, **kwargs): :param entity_type: The value to assign to the entity_type property of this GiResourceIdFilter. - Allowed values for this property are: "EXADATAINFRASTRUCTURE", "CLOUDEXADATAINFRASTRUCTURE", "VMCLUSTER", "CLOUDVMCLUSTER", "FSUCOLLECTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "DATABASESOFTWAREIMAGE", "EXADATAINFRASTRUCTURE", "CLOUDEXADATAINFRASTRUCTURE", "VMCLUSTER", "CLOUDVMCLUSTER", "FSUCOLLECTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type entity_type: str @@ -107,7 +111,7 @@ def entity_type(self): **[Required]** Gets the entity_type of this GiResourceIdFilter. Type of resource to match in the discovery. - Allowed values for this property are: "EXADATAINFRASTRUCTURE", "CLOUDEXADATAINFRASTRUCTURE", "VMCLUSTER", "CLOUDVMCLUSTER", "FSUCOLLECTION", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "DATABASESOFTWAREIMAGE", "EXADATAINFRASTRUCTURE", "CLOUDEXADATAINFRASTRUCTURE", "VMCLUSTER", "CLOUDVMCLUSTER", "FSUCOLLECTION", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -126,7 +130,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this GiResourceIdFilter. :type: str """ - allowed_values = ["EXADATAINFRASTRUCTURE", "CLOUDEXADATAINFRASTRUCTURE", "VMCLUSTER", "CLOUDVMCLUSTER", "FSUCOLLECTION"] + allowed_values = ["DATABASESOFTWAREIMAGE", "EXADATAINFRASTRUCTURE", "CLOUDEXADATAINFRASTRUCTURE", "VMCLUSTER", "CLOUDVMCLUSTER", "FSUCOLLECTION"] if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): entity_type = 'UNKNOWN_ENUM_VALUE' self._entity_type = entity_type diff --git a/src/oci/fleet_software_update/models/image_id_fsu_target_details.py b/src/oci/fleet_software_update/models/image_id_fsu_target_details.py index ffa24082d8..6206fb1377 100644 --- a/src/oci/fleet_software_update/models/image_id_fsu_target_details.py +++ b/src/oci/fleet_software_update/models/image_id_fsu_target_details.py @@ -12,7 +12,10 @@ @init_model_state_from_kwargs class ImageIdFsuTargetDetails(FsuGoalVersionDetails): """ - Exadata Fleet Update Cycle Target Image Id details. + The Database service Database Software Image resource is required as goal version for the Exadata Fleet Update Maintenance Cycle + when IMAGE_ID type is selected. + Specify a Database Software Image of type DATABASE_IMAGE for a DB Collection. + Specify a Database Software Image of type GRID_IMAGE for a GI Collection. """ def __init__(self, **kwargs): diff --git a/src/oci/fleet_software_update/models/patch_fsu_cycle.py b/src/oci/fleet_software_update/models/patch_fsu_cycle.py index 4648452f65..19ddf3967c 100644 --- a/src/oci/fleet_software_update/models/patch_fsu_cycle.py +++ b/src/oci/fleet_software_update/models/patch_fsu_cycle.py @@ -76,6 +76,10 @@ def __init__(self, **kwargs): The value to assign to the apply_action_schedule property of this PatchFsuCycle. :type apply_action_schedule: oci.fleet_software_update.models.ScheduleDetails + :param diagnostics_collection: + The value to assign to the diagnostics_collection property of this PatchFsuCycle. + :type diagnostics_collection: oci.fleet_software_update.models.DiagnosticsCollectionDetails + :param time_created: The value to assign to the time_created property of this PatchFsuCycle. :type time_created: datetime @@ -140,6 +144,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'BatchingStrategyDetails', 'stage_action_schedule': 'ScheduleDetails', 'apply_action_schedule': 'ScheduleDetails', + 'diagnostics_collection': 'DiagnosticsCollectionDetails', 'time_created': 'datetime', 'time_updated': 'datetime', 'time_finished': 'datetime', @@ -168,6 +173,7 @@ def __init__(self, **kwargs): 'batching_strategy': 'batchingStrategy', 'stage_action_schedule': 'stageActionSchedule', 'apply_action_schedule': 'applyActionSchedule', + 'diagnostics_collection': 'diagnosticsCollection', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', 'time_finished': 'timeFinished', @@ -195,6 +201,7 @@ def __init__(self, **kwargs): self._batching_strategy = None self._stage_action_schedule = None self._apply_action_schedule = None + self._diagnostics_collection = None self._time_created = None self._time_updated = None self._time_finished = None diff --git a/src/oci/fleet_software_update/models/update_fsu_cycle_details.py b/src/oci/fleet_software_update/models/update_fsu_cycle_details.py index e64f354dc3..09a170a667 100644 --- a/src/oci/fleet_software_update/models/update_fsu_cycle_details.py +++ b/src/oci/fleet_software_update/models/update_fsu_cycle_details.py @@ -45,6 +45,10 @@ def __init__(self, **kwargs): The value to assign to the batching_strategy property of this UpdateFsuCycleDetails. :type batching_strategy: oci.fleet_software_update.models.UpdateBatchingStrategyDetails + :param diagnostics_collection: + The value to assign to the diagnostics_collection property of this UpdateFsuCycleDetails. + :type diagnostics_collection: oci.fleet_software_update.models.DiagnosticsCollectionDetails + :param freeform_tags: The value to assign to the freeform_tags property of this UpdateFsuCycleDetails. :type freeform_tags: dict(str, str) @@ -59,6 +63,7 @@ def __init__(self, **kwargs): 'type': 'str', 'goal_version_details': 'FsuGoalVersionDetails', 'batching_strategy': 'UpdateBatchingStrategyDetails', + 'diagnostics_collection': 'DiagnosticsCollectionDetails', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -68,6 +73,7 @@ def __init__(self, **kwargs): 'type': 'type', 'goal_version_details': 'goalVersionDetails', 'batching_strategy': 'batchingStrategy', + 'diagnostics_collection': 'diagnosticsCollection', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -76,6 +82,7 @@ def __init__(self, **kwargs): self._type = None self._goal_version_details = None self._batching_strategy = None + self._diagnostics_collection = None self._freeform_tags = None self._defined_tags = None @@ -191,6 +198,26 @@ def batching_strategy(self, batching_strategy): """ self._batching_strategy = batching_strategy + @property + def diagnostics_collection(self): + """ + Gets the diagnostics_collection of this UpdateFsuCycleDetails. + + :return: The diagnostics_collection of this UpdateFsuCycleDetails. + :rtype: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + return self._diagnostics_collection + + @diagnostics_collection.setter + def diagnostics_collection(self, diagnostics_collection): + """ + Sets the diagnostics_collection of this UpdateFsuCycleDetails. + + :param diagnostics_collection: The diagnostics_collection of this UpdateFsuCycleDetails. + :type: oci.fleet_software_update.models.DiagnosticsCollectionDetails + """ + self._diagnostics_collection = diagnostics_collection + @property def freeform_tags(self): """ diff --git a/src/oci/fleet_software_update/models/update_patch_fsu_cycle.py b/src/oci/fleet_software_update/models/update_patch_fsu_cycle.py index 3dd45e22c6..7dd23c2b7d 100644 --- a/src/oci/fleet_software_update/models/update_patch_fsu_cycle.py +++ b/src/oci/fleet_software_update/models/update_patch_fsu_cycle.py @@ -38,6 +38,10 @@ def __init__(self, **kwargs): The value to assign to the batching_strategy property of this UpdatePatchFsuCycle. :type batching_strategy: oci.fleet_software_update.models.UpdateBatchingStrategyDetails + :param diagnostics_collection: + The value to assign to the diagnostics_collection property of this UpdatePatchFsuCycle. + :type diagnostics_collection: oci.fleet_software_update.models.DiagnosticsCollectionDetails + :param freeform_tags: The value to assign to the freeform_tags property of this UpdatePatchFsuCycle. :type freeform_tags: dict(str, str) @@ -68,6 +72,7 @@ def __init__(self, **kwargs): 'type': 'str', 'goal_version_details': 'FsuGoalVersionDetails', 'batching_strategy': 'UpdateBatchingStrategyDetails', + 'diagnostics_collection': 'DiagnosticsCollectionDetails', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'is_ignore_patches': 'bool', @@ -81,6 +86,7 @@ def __init__(self, **kwargs): 'type': 'type', 'goal_version_details': 'goalVersionDetails', 'batching_strategy': 'batchingStrategy', + 'diagnostics_collection': 'diagnosticsCollection', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'is_ignore_patches': 'isIgnorePatches', @@ -93,6 +99,7 @@ def __init__(self, **kwargs): self._type = None self._goal_version_details = None self._batching_strategy = None + self._diagnostics_collection = None self._freeform_tags = None self._defined_tags = None self._is_ignore_patches = None diff --git a/src/oci/fleet_software_update/models/vm_cluster_target_summary.py b/src/oci/fleet_software_update/models/vm_cluster_target_summary.py index 92832625fc..58596367ce 100644 --- a/src/oci/fleet_software_update/models/vm_cluster_target_summary.py +++ b/src/oci/fleet_software_update/models/vm_cluster_target_summary.py @@ -40,25 +40,32 @@ def __init__(self, **kwargs): The value to assign to the infrastructure_id property of this VmClusterTargetSummary. :type infrastructure_id: str + :param software_image_id: + The value to assign to the software_image_id property of this VmClusterTargetSummary. + :type software_image_id: str + """ self.swagger_types = { 'entity_type': 'str', 'id': 'str', 'compartment_id': 'str', - 'infrastructure_id': 'str' + 'infrastructure_id': 'str', + 'software_image_id': 'str' } self.attribute_map = { 'entity_type': 'entityType', 'id': 'id', 'compartment_id': 'compartmentId', - 'infrastructure_id': 'infrastructureId' + 'infrastructure_id': 'infrastructureId', + 'software_image_id': 'softwareImageId' } self._entity_type = None self._id = None self._compartment_id = None self._infrastructure_id = None + self._software_image_id = None self._entity_type = 'VMCLUSTER' @property @@ -85,6 +92,30 @@ def infrastructure_id(self, infrastructure_id): """ self._infrastructure_id = infrastructure_id + @property + def software_image_id(self): + """ + Gets the software_image_id of this VmClusterTargetSummary. + OCID of the Grid Infrastructure software image. + + + :return: The software_image_id of this VmClusterTargetSummary. + :rtype: str + """ + return self._software_image_id + + @software_image_id.setter + def software_image_id(self, software_image_id): + """ + Sets the software_image_id of this VmClusterTargetSummary. + OCID of the Grid Infrastructure software image. + + + :param software_image_id: The software_image_id of this VmClusterTargetSummary. + :type: str + """ + self._software_image_id = software_image_id + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/identity_domains/identity_domains_client.py b/src/oci/identity_domains/identity_domains_client.py index d323d7dcff..132630a843 100644 --- a/src/oci/identity_domains/identity_domains_client.py +++ b/src/oci/identity_domains/identity_domains_client.py @@ -22,7 +22,8 @@ class IdentityDomainsClient(object): """ - Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see [Identity and Access Management (with identity domains)](https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. + Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see [Identity and Access Management (with identity domains)](https://docs.oracle.com/iaas/Content/Identity/home.htm). + Use this pattern to construct endpoints for identity domains: `https:///admin/v1/`. See [Finding an Identity Domain URL](https://docs.oracle.com/en-us/iaas/Content/Identity/api-getstarted/locate-identity-domain-url.htm) to locate the domain URL you need. Use the table of contents and search tool to explore the Identity Domains API. """ @@ -5219,6 +5220,118 @@ def create_smtp_credential(self, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_social_identity_provider(self, **kwargs): + """ + Create a Social Identity Provider + + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param oci.identity_domains.models.SocialIdentityProvider social_identity_provider: (optional) + SocialIdentityProvider schema. + + Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SocialIdentityProvider` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_social_identity_provider API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/admin/v1/SocialIdentityProviders" + method = "POST" + operation_name = "create_social_identity_provider" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "social_identity_provider", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_social_identity_provider got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=kwargs.get('social_identity_provider'), + response_type="SocialIdentityProvider", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=kwargs.get('social_identity_provider'), + response_type="SocialIdentityProvider", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def create_user(self, **kwargs): """ Create a user. @@ -9847,12 +9960,12 @@ def delete_smtp_credential(self, smtp_credential_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_user(self, user_id, **kwargs): + def delete_social_identity_provider(self, social_identity_provider_id, **kwargs): """ - Delete a user. + Delete a Social Identity Provider - :param str user_id: (required) + :param str social_identity_provider_id: (required) ID of the resource :param str authorization: (optional) @@ -9886,14 +9999,14 @@ def delete_user(self, user_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_user API. + Click `here `__ to see an example of how to use delete_social_identity_provider API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['userId'] - resource_path = "/admin/v1/Users/{userId}" + required_arguments = ['socialIdentityProviderId'] + resource_path = "/admin/v1/SocialIdentityProviders/{socialIdentityProviderId}" method = "DELETE" - operation_name = "delete_user" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/User/DeleteUser" + operation_name = "delete_social_identity_provider" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/DeleteSocialIdentityProvider" # Don't accept unknown kwargs expected_kwargs = [ @@ -9908,10 +10021,10 @@ def delete_user(self, user_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_user got unknown kwargs: {extra_kwargs!r}") + f"delete_social_identity_provider got unknown kwargs: {extra_kwargs!r}") path_params = { - "userId": user_id + "socialIdentityProviderId": social_identity_provider_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -9968,12 +10081,12 @@ def delete_user(self, user_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def delete_user_db_credential(self, user_db_credential_id, **kwargs): + def delete_user(self, user_id, **kwargs): """ - Delete a user's database (DB) credentials. + Delete a user. - :param str user_db_credential_id: (required) + :param str user_id: (required) ID of the resource :param str authorization: (optional) @@ -10007,14 +10120,14 @@ def delete_user_db_credential(self, user_db_credential_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_user_db_credential API. + Click `here `__ to see an example of how to use delete_user API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['userDbCredentialId'] - resource_path = "/admin/v1/UserDbCredentials/{userDbCredentialId}" + required_arguments = ['userId'] + resource_path = "/admin/v1/Users/{userId}" method = "DELETE" - operation_name = "delete_user_db_credential" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredential/DeleteUserDbCredential" + operation_name = "delete_user" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/User/DeleteUser" # Don't accept unknown kwargs expected_kwargs = [ @@ -10029,10 +10142,10 @@ def delete_user_db_credential(self, user_db_credential_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"delete_user_db_credential got unknown kwargs: {extra_kwargs!r}") + f"delete_user got unknown kwargs: {extra_kwargs!r}") path_params = { - "userDbCredentialId": user_db_credential_id + "userId": user_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10089,12 +10202,12 @@ def delete_user_db_credential(self, user_db_credential_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): + def delete_user_db_credential(self, user_db_credential_id, **kwargs): """ - Get Account Mgmt Info + Delete a user's database (DB) credentials. - :param str account_mgmt_info_id: (required) + :param str user_db_credential_id: (required) ID of the resource :param str authorization: (optional) @@ -10103,13 +10216,11 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. - - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + :param bool force_delete: (optional) + To force delete the resource and all its references (if any). - Allowed values are: "all", "always", "never", "request", "default" + :param str if_match: (optional) + Used to make the request conditional on an ETag :param str opc_retry_token: (optional) A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. @@ -10126,18 +10237,18 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AccountMgmtInfo` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_account_mgmt_info API. + Click `here `__ to see an example of how to use delete_user_db_credential API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['accountMgmtInfoId'] - resource_path = "/admin/v1/AccountMgmtInfos/{accountMgmtInfoId}" - method = "GET" - operation_name = "get_account_mgmt_info" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountMgmtInfo/GetAccountMgmtInfo" + required_arguments = ['userDbCredentialId'] + resource_path = "/admin/v1/UserDbCredentials/{userDbCredentialId}" + method = "DELETE" + operation_name = "delete_user_db_credential" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredential/DeleteUserDbCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -10145,17 +10256,17 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", - "attributes", - "attribute_sets", + "force_delete", + "if_match", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_account_mgmt_info got unknown kwargs: {extra_kwargs!r}") + f"delete_user_db_credential got unknown kwargs: {extra_kwargs!r}") path_params = { - "accountMgmtInfoId": account_mgmt_info_id + "userDbCredentialId": user_db_credential_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10164,17 +10275,8 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) - query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + "forceDelete": kwargs.get("force_delete", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -10183,6 +10285,7 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): "content-type": "application/json", "authorization": kwargs.get("authorization", missing), "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -10204,7 +10307,6 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AccountMgmtInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10216,18 +10318,17 @@ def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AccountMgmtInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_account_recovery_setting(self, account_recovery_setting_id, **kwargs): + def get_account_mgmt_info(self, account_mgmt_info_id, **kwargs): """ - Get an account recovery setting. + Get Account Mgmt Info - :param str account_recovery_setting_id: (required) + :param str account_mgmt_info_id: (required) ID of the resource :param str authorization: (optional) @@ -10259,18 +10360,18 @@ def get_account_recovery_setting(self, account_recovery_setting_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AccountRecoverySetting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AccountMgmtInfo` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_account_recovery_setting API. + Click `here `__ to see an example of how to use get_account_mgmt_info API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['accountRecoverySettingId'] - resource_path = "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}" + required_arguments = ['accountMgmtInfoId'] + resource_path = "/admin/v1/AccountMgmtInfos/{accountMgmtInfoId}" method = "GET" - operation_name = "get_account_recovery_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySetting/GetAccountRecoverySetting" + operation_name = "get_account_mgmt_info" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountMgmtInfo/GetAccountMgmtInfo" # Don't accept unknown kwargs expected_kwargs = [ @@ -10285,10 +10386,10 @@ def get_account_recovery_setting(self, account_recovery_setting_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_account_recovery_setting got unknown kwargs: {extra_kwargs!r}") + f"get_account_mgmt_info got unknown kwargs: {extra_kwargs!r}") path_params = { - "accountRecoverySettingId": account_recovery_setting_id + "accountMgmtInfoId": account_mgmt_info_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10337,7 +10438,7 @@ def get_account_recovery_setting(self, account_recovery_setting_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AccountRecoverySetting", + response_type="AccountMgmtInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10349,18 +10450,18 @@ def get_account_recovery_setting(self, account_recovery_setting_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AccountRecoverySetting", + response_type="AccountMgmtInfo", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_api_key(self, api_key_id, **kwargs): + def get_account_recovery_setting(self, account_recovery_setting_id, **kwargs): """ - Get a user's API key. + Get an account recovery setting. - :param str api_key_id: (required) + :param str account_recovery_setting_id: (required) ID of the resource :param str authorization: (optional) @@ -10392,18 +10493,18 @@ def get_api_key(self, api_key_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApiKey` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AccountRecoverySetting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_api_key API. + Click `here `__ to see an example of how to use get_account_recovery_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['apiKeyId'] - resource_path = "/admin/v1/ApiKeys/{apiKeyId}" + required_arguments = ['accountRecoverySettingId'] + resource_path = "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}" method = "GET" - operation_name = "get_api_key" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKey/GetApiKey" + operation_name = "get_account_recovery_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySetting/GetAccountRecoverySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -10418,10 +10519,10 @@ def get_api_key(self, api_key_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_api_key got unknown kwargs: {extra_kwargs!r}") + f"get_account_recovery_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "apiKeyId": api_key_id + "accountRecoverySettingId": account_recovery_setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10470,7 +10571,7 @@ def get_api_key(self, api_key_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApiKey", + response_type="AccountRecoverySetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10482,18 +10583,18 @@ def get_api_key(self, api_key_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApiKey", + response_type="AccountRecoverySetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_app(self, app_id, **kwargs): + def get_api_key(self, api_key_id, **kwargs): """ - Get an App + Get a user's API key. - :param str app_id: (required) + :param str api_key_id: (required) ID of the resource :param str authorization: (optional) @@ -10525,18 +10626,18 @@ def get_app(self, app_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.App` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApiKey` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_app API. + Click `here `__ to see an example of how to use get_api_key API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['appId'] - resource_path = "/admin/v1/Apps/{appId}" + required_arguments = ['apiKeyId'] + resource_path = "/admin/v1/ApiKeys/{apiKeyId}" method = "GET" - operation_name = "get_app" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/GetApp" + operation_name = "get_api_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKey/GetApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -10551,10 +10652,10 @@ def get_app(self, app_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_app got unknown kwargs: {extra_kwargs!r}") + f"get_api_key got unknown kwargs: {extra_kwargs!r}") path_params = { - "appId": app_id + "apiKeyId": api_key_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10603,7 +10704,7 @@ def get_app(self, app_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="App", + response_type="ApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10615,18 +10716,18 @@ def get_app(self, app_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="App", + response_type="ApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_app_role(self, app_role_id, **kwargs): + def get_app(self, app_id, **kwargs): """ - Get an AppRole + Get an App - :param str app_role_id: (required) + :param str app_id: (required) ID of the resource :param str authorization: (optional) @@ -10658,18 +10759,18 @@ def get_app_role(self, app_role_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AppRole` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.App` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_app_role API. + Click `here `__ to see an example of how to use get_app API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['appRoleId'] - resource_path = "/admin/v1/AppRoles/{appRoleId}" + required_arguments = ['appId'] + resource_path = "/admin/v1/Apps/{appId}" method = "GET" - operation_name = "get_app_role" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppRole/GetAppRole" + operation_name = "get_app" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/GetApp" # Don't accept unknown kwargs expected_kwargs = [ @@ -10684,10 +10785,10 @@ def get_app_role(self, app_role_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_app_role got unknown kwargs: {extra_kwargs!r}") + f"get_app got unknown kwargs: {extra_kwargs!r}") path_params = { - "appRoleId": app_role_id + "appId": app_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10736,7 +10837,7 @@ def get_app_role(self, app_role_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AppRole", + response_type="App", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10748,18 +10849,18 @@ def get_app_role(self, app_role_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AppRole", + response_type="App", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_approval_workflow(self, approval_workflow_id, **kwargs): + def get_app_role(self, app_role_id, **kwargs): """ - Get ApprovalWorkflow + Get an AppRole - :param str approval_workflow_id: (required) + :param str app_role_id: (required) ID of the resource :param str authorization: (optional) @@ -10791,18 +10892,18 @@ def get_approval_workflow(self, approval_workflow_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApprovalWorkflow` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AppRole` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_approval_workflow API. + Click `here `__ to see an example of how to use get_app_role API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['approvalWorkflowId'] - resource_path = "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}" + required_arguments = ['appRoleId'] + resource_path = "/admin/v1/AppRoles/{appRoleId}" method = "GET" - operation_name = "get_approval_workflow" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflow/GetApprovalWorkflow" + operation_name = "get_app_role" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AppRole/GetAppRole" # Don't accept unknown kwargs expected_kwargs = [ @@ -10817,10 +10918,10 @@ def get_approval_workflow(self, approval_workflow_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_approval_workflow got unknown kwargs: {extra_kwargs!r}") + f"get_app_role got unknown kwargs: {extra_kwargs!r}") path_params = { - "approvalWorkflowId": approval_workflow_id + "appRoleId": app_role_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -10869,7 +10970,7 @@ def get_approval_workflow(self, approval_workflow_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApprovalWorkflow", + response_type="AppRole", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -10881,18 +10982,18 @@ def get_approval_workflow(self, approval_workflow_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApprovalWorkflow", + response_type="AppRole", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_approval_workflow_assignment(self, approval_workflow_assignment_id, **kwargs): + def get_approval_workflow(self, approval_workflow_id, **kwargs): """ - Get an Approval Workflow Assignment + Get ApprovalWorkflow - :param str approval_workflow_assignment_id: (required) + :param str approval_workflow_id: (required) ID of the resource :param str authorization: (optional) @@ -10924,18 +11025,18 @@ def get_approval_workflow_assignment(self, approval_workflow_assignment_id, **kw allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApprovalWorkflowAssignment` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApprovalWorkflow` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_approval_workflow_assignment API. + Click `here `__ to see an example of how to use get_approval_workflow API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['approvalWorkflowAssignmentId'] - resource_path = "/admin/v1/ApprovalWorkflowAssignments/{approvalWorkflowAssignmentId}" + required_arguments = ['approvalWorkflowId'] + resource_path = "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}" method = "GET" - operation_name = "get_approval_workflow_assignment" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowAssignment/GetApprovalWorkflowAssignment" + operation_name = "get_approval_workflow" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflow/GetApprovalWorkflow" # Don't accept unknown kwargs expected_kwargs = [ @@ -10950,10 +11051,10 @@ def get_approval_workflow_assignment(self, approval_workflow_assignment_id, **kw extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_approval_workflow_assignment got unknown kwargs: {extra_kwargs!r}") + f"get_approval_workflow got unknown kwargs: {extra_kwargs!r}") path_params = { - "approvalWorkflowAssignmentId": approval_workflow_assignment_id + "approvalWorkflowId": approval_workflow_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11002,7 +11103,7 @@ def get_approval_workflow_assignment(self, approval_workflow_assignment_id, **kw path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApprovalWorkflowAssignment", + response_type="ApprovalWorkflow", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11014,18 +11115,18 @@ def get_approval_workflow_assignment(self, approval_workflow_assignment_id, **kw path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApprovalWorkflowAssignment", + response_type="ApprovalWorkflow", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_approval_workflow_step(self, approval_workflow_step_id, **kwargs): + def get_approval_workflow_assignment(self, approval_workflow_assignment_id, **kwargs): """ - Get ApprovalWorkflowStep + Get an Approval Workflow Assignment - :param str approval_workflow_step_id: (required) + :param str approval_workflow_assignment_id: (required) ID of the resource :param str authorization: (optional) @@ -11057,18 +11158,18 @@ def get_approval_workflow_step(self, approval_workflow_step_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApprovalWorkflowStep` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApprovalWorkflowAssignment` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_approval_workflow_step API. + Click `here `__ to see an example of how to use get_approval_workflow_assignment API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['approvalWorkflowStepId'] - resource_path = "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}" + required_arguments = ['approvalWorkflowAssignmentId'] + resource_path = "/admin/v1/ApprovalWorkflowAssignments/{approvalWorkflowAssignmentId}" method = "GET" - operation_name = "get_approval_workflow_step" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowStep/GetApprovalWorkflowStep" + operation_name = "get_approval_workflow_assignment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowAssignment/GetApprovalWorkflowAssignment" # Don't accept unknown kwargs expected_kwargs = [ @@ -11083,10 +11184,10 @@ def get_approval_workflow_step(self, approval_workflow_step_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_approval_workflow_step got unknown kwargs: {extra_kwargs!r}") + f"get_approval_workflow_assignment got unknown kwargs: {extra_kwargs!r}") path_params = { - "approvalWorkflowStepId": approval_workflow_step_id + "approvalWorkflowAssignmentId": approval_workflow_assignment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11135,7 +11236,7 @@ def get_approval_workflow_step(self, approval_workflow_step_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApprovalWorkflowStep", + response_type="ApprovalWorkflowAssignment", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11147,18 +11248,18 @@ def get_approval_workflow_step(self, approval_workflow_step_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="ApprovalWorkflowStep", + response_type="ApprovalWorkflowAssignment", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_auth_token(self, auth_token_id, **kwargs): + def get_approval_workflow_step(self, approval_workflow_step_id, **kwargs): """ - Get a user's Auth token. + Get ApprovalWorkflowStep - :param str auth_token_id: (required) + :param str approval_workflow_step_id: (required) ID of the resource :param str authorization: (optional) @@ -11190,18 +11291,18 @@ def get_auth_token(self, auth_token_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AuthToken` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApprovalWorkflowStep` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_auth_token API. + Click `here `__ to see an example of how to use get_approval_workflow_step API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['authTokenId'] - resource_path = "/admin/v1/AuthTokens/{authTokenId}" + required_arguments = ['approvalWorkflowStepId'] + resource_path = "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}" method = "GET" - operation_name = "get_auth_token" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthToken/GetAuthToken" + operation_name = "get_approval_workflow_step" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApprovalWorkflowStep/GetApprovalWorkflowStep" # Don't accept unknown kwargs expected_kwargs = [ @@ -11216,10 +11317,10 @@ def get_auth_token(self, auth_token_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_auth_token got unknown kwargs: {extra_kwargs!r}") + f"get_approval_workflow_step got unknown kwargs: {extra_kwargs!r}") path_params = { - "authTokenId": auth_token_id + "approvalWorkflowStepId": approval_workflow_step_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11268,7 +11369,7 @@ def get_auth_token(self, auth_token_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AuthToken", + response_type="ApprovalWorkflowStep", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11280,18 +11381,18 @@ def get_auth_token(self, auth_token_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AuthToken", + response_type="ApprovalWorkflowStep", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_authentication_factor_setting(self, authentication_factor_setting_id, **kwargs): + def get_auth_token(self, auth_token_id, **kwargs): """ - Get Authentication Factor Settings + Get a user's Auth token. - :param str authentication_factor_setting_id: (required) + :param str auth_token_id: (required) ID of the resource :param str authorization: (optional) @@ -11323,18 +11424,18 @@ def get_authentication_factor_setting(self, authentication_factor_setting_id, ** allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AuthenticationFactorSetting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AuthToken` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_authentication_factor_setting API. + Click `here `__ to see an example of how to use get_auth_token API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['authenticationFactorSettingId'] - resource_path = "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}" + required_arguments = ['authTokenId'] + resource_path = "/admin/v1/AuthTokens/{authTokenId}" method = "GET" - operation_name = "get_authentication_factor_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthenticationFactorSetting/GetAuthenticationFactorSetting" + operation_name = "get_auth_token" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthToken/GetAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -11349,10 +11450,10 @@ def get_authentication_factor_setting(self, authentication_factor_setting_id, ** extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_authentication_factor_setting got unknown kwargs: {extra_kwargs!r}") + f"get_auth_token got unknown kwargs: {extra_kwargs!r}") path_params = { - "authenticationFactorSettingId": authentication_factor_setting_id + "authTokenId": auth_token_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11401,7 +11502,7 @@ def get_authentication_factor_setting(self, authentication_factor_setting_id, ** path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AuthenticationFactorSetting", + response_type="AuthToken", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11413,18 +11514,18 @@ def get_authentication_factor_setting(self, authentication_factor_setting_id, ** path_params=path_params, query_params=query_params, header_params=header_params, - response_type="AuthenticationFactorSetting", + response_type="AuthToken", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_branding_setting(self, branding_setting_id, **kwargs): + def get_authentication_factor_setting(self, authentication_factor_setting_id, **kwargs): """ - Get Branding Settings + Get Authentication Factor Settings - :param str branding_setting_id: (required) + :param str authentication_factor_setting_id: (required) ID of the resource :param str authorization: (optional) @@ -11456,18 +11557,18 @@ def get_branding_setting(self, branding_setting_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.BrandingSetting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AuthenticationFactorSetting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_branding_setting API. + Click `here `__ to see an example of how to use get_authentication_factor_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['brandingSettingId'] - resource_path = "/admin/v1/BrandingSettings/{brandingSettingId}" + required_arguments = ['authenticationFactorSettingId'] + resource_path = "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}" method = "GET" - operation_name = "get_branding_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/BrandingSetting/GetBrandingSetting" + operation_name = "get_authentication_factor_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AuthenticationFactorSetting/GetAuthenticationFactorSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -11482,10 +11583,10 @@ def get_branding_setting(self, branding_setting_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_branding_setting got unknown kwargs: {extra_kwargs!r}") + f"get_authentication_factor_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "brandingSettingId": branding_setting_id + "authenticationFactorSettingId": authentication_factor_setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11534,7 +11635,7 @@ def get_branding_setting(self, branding_setting_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="BrandingSetting", + response_type="AuthenticationFactorSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11546,18 +11647,18 @@ def get_branding_setting(self, branding_setting_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="BrandingSetting", + response_type="AuthenticationFactorSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_cloud_gate(self, cloud_gate_id, **kwargs): + def get_branding_setting(self, branding_setting_id, **kwargs): """ - Get a Cloud Gate + Get Branding Settings - :param str cloud_gate_id: (required) + :param str branding_setting_id: (required) ID of the resource :param str authorization: (optional) @@ -11589,18 +11690,18 @@ def get_cloud_gate(self, cloud_gate_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGate` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.BrandingSetting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_cloud_gate API. + Click `here `__ to see an example of how to use get_branding_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['cloudGateId'] - resource_path = "/admin/v1/CloudGates/{cloudGateId}" + required_arguments = ['brandingSettingId'] + resource_path = "/admin/v1/BrandingSettings/{brandingSettingId}" method = "GET" - operation_name = "get_cloud_gate" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGate/GetCloudGate" + operation_name = "get_branding_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/BrandingSetting/GetBrandingSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -11615,10 +11716,10 @@ def get_cloud_gate(self, cloud_gate_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_cloud_gate got unknown kwargs: {extra_kwargs!r}") + f"get_branding_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "cloudGateId": cloud_gate_id + "brandingSettingId": branding_setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11667,7 +11768,7 @@ def get_cloud_gate(self, cloud_gate_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="CloudGate", + response_type="BrandingSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11679,18 +11780,18 @@ def get_cloud_gate(self, cloud_gate_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="CloudGate", + response_type="BrandingSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): + def get_cloud_gate(self, cloud_gate_id, **kwargs): """ - Get a Cloud Gate mapping + Get a Cloud Gate - :param str cloud_gate_mapping_id: (required) + :param str cloud_gate_id: (required) ID of the resource :param str authorization: (optional) @@ -11722,18 +11823,18 @@ def get_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGateMapping` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGate` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_cloud_gate_mapping API. + Click `here `__ to see an example of how to use get_cloud_gate API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['cloudGateMappingId'] - resource_path = "/admin/v1/CloudGateMappings/{cloudGateMappingId}" + required_arguments = ['cloudGateId'] + resource_path = "/admin/v1/CloudGates/{cloudGateId}" method = "GET" - operation_name = "get_cloud_gate_mapping" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMapping/GetCloudGateMapping" + operation_name = "get_cloud_gate" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGate/GetCloudGate" # Don't accept unknown kwargs expected_kwargs = [ @@ -11748,10 +11849,10 @@ def get_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_cloud_gate_mapping got unknown kwargs: {extra_kwargs!r}") + f"get_cloud_gate got unknown kwargs: {extra_kwargs!r}") path_params = { - "cloudGateMappingId": cloud_gate_mapping_id + "cloudGateId": cloud_gate_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11800,7 +11901,7 @@ def get_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="CloudGateMapping", + response_type="CloudGate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11812,18 +11913,18 @@ def get_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="CloudGateMapping", + response_type="CloudGate", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): + def get_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): """ - Get a Cloud Gate server + Get a Cloud Gate mapping - :param str cloud_gate_server_id: (required) + :param str cloud_gate_mapping_id: (required) ID of the resource :param str authorization: (optional) @@ -11855,18 +11956,18 @@ def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGateServer` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGateMapping` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_cloud_gate_server API. + Click `here `__ to see an example of how to use get_cloud_gate_mapping API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['cloudGateServerId'] - resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" + required_arguments = ['cloudGateMappingId'] + resource_path = "/admin/v1/CloudGateMappings/{cloudGateMappingId}" method = "GET" - operation_name = "get_cloud_gate_server" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/GetCloudGateServer" + operation_name = "get_cloud_gate_mapping" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateMapping/GetCloudGateMapping" # Don't accept unknown kwargs expected_kwargs = [ @@ -11881,10 +11982,10 @@ def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_cloud_gate_server got unknown kwargs: {extra_kwargs!r}") + f"get_cloud_gate_mapping got unknown kwargs: {extra_kwargs!r}") path_params = { - "cloudGateServerId": cloud_gate_server_id + "cloudGateMappingId": cloud_gate_mapping_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -11933,7 +12034,7 @@ def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="CloudGateServer", + response_type="CloudGateMapping", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -11945,18 +12046,151 @@ def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="CloudGateServer", + response_type="CloudGateMapping", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_condition(self, condition_id, **kwargs): + def get_cloud_gate_server(self, cloud_gate_server_id, **kwargs): """ - Get a Condition + Get a Cloud Gate server - :param str condition_id: (required) + :param str cloud_gate_server_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGateServer` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_cloud_gate_server API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['cloudGateServerId'] + resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" + method = "GET" + operation_name = "get_cloud_gate_server" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/GetCloudGateServer" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "attributes", + "attribute_sets", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_cloud_gate_server got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "cloudGateServerId": cloud_gate_server_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CloudGateServer", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CloudGateServer", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_condition(self, condition_id, **kwargs): + """ + Get a Condition + + + :param str condition_id: (required) ID of the resource :param str authorization: (optional) @@ -16412,6 +16646,113 @@ def get_smtp_credential(self, smtp_credential_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def get_social_identity_provider(self, social_identity_provider_id, **kwargs): + """ + Get a Social Identity Provider + + + :param str social_identity_provider_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SocialIdentityProvider` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_social_identity_provider API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['socialIdentityProviderId'] + resource_path = "/admin/v1/SocialIdentityProviders/{socialIdentityProviderId}" + method = "GET" + operation_name = "get_social_identity_provider" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/GetSocialIdentityProvider" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_social_identity_provider got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "socialIdentityProviderId": social_identity_provider_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SocialIdentityProvider", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SocialIdentityProvider", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def get_user(self, user_id, **kwargs): """ Get a user. @@ -24930,18 +25271,29 @@ def list_smtp_credentials(self, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_user_attributes_settings(self, **kwargs): + def list_social_identity_providers(self, **kwargs): """ - Search User Schema Attribute Settings + Search Social Identity Providers - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + :param str filter: (optional) + OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + :param str sort_by: (optional) + OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). - Allowed values are: "all", "always", "never", "request", "default" + :param str sort_order: (optional) + A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (`Sorting Section`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + Allowed values are: "ASCENDING", "DESCENDING" + + :param int start_index: (optional) + OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + + :param int count: (optional) + OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). :param str authorization: (optional) The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. @@ -24970,25 +25322,28 @@ def list_user_attributes_settings(self, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.UserAttributesSettings` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SocialIdentityProviders` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_user_attributes_settings API. + Click `here `__ to see an example of how to use list_social_identity_providers API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/admin/v1/UserAttributesSettings" + resource_path = "/admin/v1/SocialIdentityProviders" method = "GET" - operation_name = "list_user_attributes_settings" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/ListUserAttributesSettings" + operation_name = "list_social_identity_providers" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProviders/ListSocialIdentityProviders" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "attributes", - "attribute_sets", + "filter", + "sort_by", + "sort_order", + "start_index", + "count", "authorization", "resource_type_schema_version", "opc_retry_token", @@ -24998,19 +25353,21 @@ def list_user_attributes_settings(self, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_user_attributes_settings got unknown kwargs: {extra_kwargs!r}") + f"list_social_identity_providers got unknown kwargs: {extra_kwargs!r}") - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASCENDING", "DESCENDING"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi'), + "filter": kwargs.get("filter", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "startIndex": kwargs.get("start_index", missing), + "count": kwargs.get("count", missing), "page": kwargs.get("page", missing), "limit": kwargs.get("limit", missing) } @@ -25041,7 +25398,7 @@ def list_user_attributes_settings(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="UserAttributesSettings", + response_type="SocialIdentityProviders", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -25052,35 +25409,16 @@ def list_user_attributes_settings(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="UserAttributesSettings", + response_type="SocialIdentityProviders", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_user_db_credentials(self, **kwargs): + def list_user_attributes_settings(self, **kwargs): """ - Search for a user's database (DB) credentials. - - - :param str filter: (optional) - OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. - - :param str sort_by: (optional) - OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). - - :param str sort_order: (optional) - A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (`Sorting Section`__). OPTIONAL. - - __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 - - Allowed values are: "ASCENDING", "DESCENDING" - - :param int start_index: (optional) - OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + Search User Schema Attribute Settings - :param int count: (optional) - OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). :param str attributes: (optional) A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. @@ -25117,28 +25455,23 @@ def list_user_db_credentials(self, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.UserDbCredentials` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.UserAttributesSettings` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_user_db_credentials API. + Click `here `__ to see an example of how to use list_user_attributes_settings API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/admin/v1/UserDbCredentials" + resource_path = "/admin/v1/UserAttributesSettings" method = "GET" - operation_name = "list_user_db_credentials" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredentials/ListUserDbCredentials" + operation_name = "list_user_attributes_settings" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/ListUserAttributesSettings" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "filter", - "sort_by", - "sort_order", - "start_index", - "count", "attributes", "attribute_sets", "authorization", @@ -25150,14 +25483,7 @@ def list_user_db_credentials(self, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_user_db_credentials got unknown kwargs: {extra_kwargs!r}") - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASCENDING", "DESCENDING"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" - ) + f"list_user_attributes_settings got unknown kwargs: {extra_kwargs!r}") if 'attribute_sets' in kwargs: attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] @@ -25168,11 +25494,6 @@ def list_user_db_credentials(self, **kwargs): ) query_params = { - "filter": kwargs.get("filter", missing), - "sortBy": kwargs.get("sort_by", missing), - "sortOrder": kwargs.get("sort_order", missing), - "startIndex": kwargs.get("start_index", missing), - "count": kwargs.get("count", missing), "attributes": kwargs.get("attributes", missing), "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi'), "page": kwargs.get("page", missing), @@ -25205,7 +25526,7 @@ def list_user_db_credentials(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="UserDbCredentials", + response_type="UserAttributesSettings", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -25216,15 +25537,15 @@ def list_user_db_credentials(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="UserDbCredentials", + response_type="UserAttributesSettings", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def list_users(self, **kwargs): + def list_user_db_credentials(self, **kwargs): """ - Search for users. + Search for a user's database (DB) credentials. :param str filter: (optional) @@ -25281,18 +25602,18 @@ def list_users(self, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Users` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.UserDbCredentials` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_users API. + Click `here `__ to see an example of how to use list_user_db_credentials API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. required_arguments = [] - resource_path = "/admin/v1/Users" + resource_path = "/admin/v1/UserDbCredentials" method = "GET" - operation_name = "list_users" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Users/ListUsers" + operation_name = "list_user_db_credentials" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserDbCredentials/ListUserDbCredentials" # Don't accept unknown kwargs expected_kwargs = [ @@ -25314,7 +25635,7 @@ def list_users(self, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"list_users got unknown kwargs: {extra_kwargs!r}") + f"list_user_db_credentials got unknown kwargs: {extra_kwargs!r}") if 'sort_order' in kwargs: sort_order_allowed_values = ["ASCENDING", "DESCENDING"] @@ -25369,7 +25690,7 @@ def list_users(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="Users", + response_type="UserDbCredentials", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -25380,25 +25701,35 @@ def list_users(self, **kwargs): method=method, query_params=query_params, header_params=header_params, - response_type="Users", + response_type="UserDbCredentials", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): + def list_users(self, **kwargs): """ - Update an account recovery setting. + Search for users. - :param str account_recovery_setting_id: (required) - ID of the resource + :param str filter: (optional) + OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. - :param str authorization: (optional) - The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + :param str sort_by: (optional) + OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). - :param str resource_type_schema_version: (optional) - An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + :param str sort_order: (optional) + A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (`Sorting Section`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + Allowed values are: "ASCENDING", "DESCENDING" + + :param int start_index: (optional) + OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + + :param int count: (optional) + OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). :param str attributes: (optional) A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. @@ -25408,27 +25739,21 @@ def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the AccountRecoverySettings with SCIM Patch schema. - - Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. - - Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. - :param str if_match: (optional) - Used to make the request conditional on an ETag + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. :param str opc_retry_token: (optional) A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + :param str page: (optional) + The value of the `opc-next-page` response header from the previous 'List' call. + + :param int limit: (optional) + The maximum number of items to return in a paginated 'List' call. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -25441,45 +25766,47 @@ def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AccountRecoverySetting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Users` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_account_recovery_setting API. + Click `here `__ to see an example of how to use list_users API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['accountRecoverySettingId'] - resource_path = "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}" - method = "PATCH" - operation_name = "patch_account_recovery_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySetting/PatchAccountRecoverySetting" + required_arguments = [] + resource_path = "/admin/v1/Users" + method = "GET" + operation_name = "list_users" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Users/ListUsers" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "authorization", - "resource_type_schema_version", + "filter", + "sort_by", + "sort_order", + "start_index", + "count", "attributes", "attribute_sets", - "patch_op", - "if_match", - "opc_retry_token" + "authorization", + "resource_type_schema_version", + "opc_retry_token", + "page", + "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_account_recovery_setting got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "accountRecoverySettingId": account_recovery_setting_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + f"list_users got unknown kwargs: {extra_kwargs!r}") - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASCENDING", "DESCENDING"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) if 'attribute_sets' in kwargs: attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] @@ -25490,8 +25817,15 @@ def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): ) query_params = { + "filter": kwargs.get("filter", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "startIndex": kwargs.get("start_index", missing), + "count": kwargs.get("count", missing), "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi'), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -25500,7 +25834,6 @@ def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): "content-type": "application/json", "authorization": kwargs.get("authorization", missing), "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), - "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -25519,11 +25852,9 @@ def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - body=kwargs.get('patch_op'), - response_type="AccountRecoverySetting", + response_type="Users", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -25532,22 +25863,20 @@ def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, - body=kwargs.get('patch_op'), - response_type="AccountRecoverySetting", + response_type="Users", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_api_key(self, api_key_id, **kwargs): + def patch_account_recovery_setting(self, account_recovery_setting_id, **kwargs): """ - Update a user's API key. + Update an account recovery setting. - :param str api_key_id: (required) + :param str account_recovery_setting_id: (required) ID of the resource :param str authorization: (optional) @@ -25565,7 +25894,7 @@ def patch_api_key(self, api_key_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the ApiKey with SCIM Patch schema. + Update the AccountRecoverySettings with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -25597,18 +25926,18 @@ def patch_api_key(self, api_key_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApiKey` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.AccountRecoverySetting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_api_key API. + Click `here `__ to see an example of how to use patch_account_recovery_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['apiKeyId'] - resource_path = "/admin/v1/ApiKeys/{apiKeyId}" + required_arguments = ['accountRecoverySettingId'] + resource_path = "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}" method = "PATCH" - operation_name = "patch_api_key" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKey/PatchApiKey" + operation_name = "patch_account_recovery_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/AccountRecoverySetting/PatchAccountRecoverySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -25625,10 +25954,10 @@ def patch_api_key(self, api_key_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_api_key got unknown kwargs: {extra_kwargs!r}") + f"patch_account_recovery_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "apiKeyId": api_key_id + "accountRecoverySettingId": account_recovery_setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -25679,7 +26008,7 @@ def patch_api_key(self, api_key_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="ApiKey", + response_type="AccountRecoverySetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -25692,18 +26021,18 @@ def patch_api_key(self, api_key_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="ApiKey", + response_type="AccountRecoverySetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_app(self, app_id, **kwargs): + def patch_api_key(self, api_key_id, **kwargs): """ - Update an App + Update a user's API key. - :param str app_id: (required) + :param str api_key_id: (required) ID of the resource :param str authorization: (optional) @@ -25721,7 +26050,7 @@ def patch_app(self, app_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the App with SCIM Patch schema. + Update the ApiKey with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -25753,18 +26082,18 @@ def patch_app(self, app_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.App` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.ApiKey` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_app API. + Click `here `__ to see an example of how to use patch_api_key API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['appId'] - resource_path = "/admin/v1/Apps/{appId}" + required_arguments = ['apiKeyId'] + resource_path = "/admin/v1/ApiKeys/{apiKeyId}" method = "PATCH" - operation_name = "patch_app" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/PatchApp" + operation_name = "patch_api_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/ApiKey/PatchApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -25781,10 +26110,10 @@ def patch_app(self, app_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_app got unknown kwargs: {extra_kwargs!r}") + f"patch_api_key got unknown kwargs: {extra_kwargs!r}") path_params = { - "appId": app_id + "apiKeyId": api_key_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -25835,7 +26164,7 @@ def patch_app(self, app_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="App", + response_type="ApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -25848,18 +26177,18 @@ def patch_app(self, app_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="App", + response_type="ApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_app_role(self, app_role_id, **kwargs): + def patch_app(self, app_id, **kwargs): """ - Update an AppRole + Update an App - :param str app_role_id: (required) + :param str app_id: (required) ID of the resource :param str authorization: (optional) @@ -25877,7 +26206,163 @@ def patch_app_role(self, app_role_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the AppRole with SCIM Patch schema. + Update the App with SCIM Patch schema. + + Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str if_match: (optional) + Used to make the request conditional on an ETag + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.App` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_app API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['appId'] + resource_path = "/admin/v1/Apps/{appId}" + method = "PATCH" + operation_name = "patch_app" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/App/PatchApp" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "attributes", + "attribute_sets", + "patch_op", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"patch_app got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "appId": app_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="App", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="App", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def patch_app_role(self, app_role_id, **kwargs): + """ + Update an AppRole + + + :param str app_role_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param oci.identity_domains.models.PatchOp patch_op: (optional) + Update the AppRole with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -26771,7 +27256,631 @@ def patch_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="CloudGateMapping", + response_type="CloudGateMapping", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="CloudGateMapping", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): + """ + Update a Cloud Gate server + + + :param str cloud_gate_server_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param oci.identity_domains.models.PatchOp patch_op: (optional) + Update the CloudGateServer with SCIM Patch schema. + + Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str if_match: (optional) + Used to make the request conditional on an ETag + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGateServer` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_cloud_gate_server API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['cloudGateServerId'] + resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" + method = "PATCH" + operation_name = "patch_cloud_gate_server" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/PatchCloudGateServer" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "attributes", + "attribute_sets", + "patch_op", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"patch_cloud_gate_server got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "cloudGateServerId": cloud_gate_server_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="CloudGateServer", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="CloudGateServer", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def patch_condition(self, condition_id, **kwargs): + """ + Update a Condition + + + :param str condition_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param oci.identity_domains.models.PatchOp patch_op: (optional) + Update the Condition with SCIM Patch schema. + + Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str if_match: (optional) + Used to make the request conditional on an ETag + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Condition` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_condition API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['conditionId'] + resource_path = "/admin/v1/Conditions/{conditionId}" + method = "PATCH" + operation_name = "patch_condition" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/PatchCondition" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "attributes", + "attribute_sets", + "patch_op", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"patch_condition got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "conditionId": condition_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="Condition", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="Condition", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def patch_customer_secret_key(self, customer_secret_key_id, **kwargs): + """ + Update a user's customer secret key. + + + :param str customer_secret_key_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param oci.identity_domains.models.PatchOp patch_op: (optional) + Update the CustomerSecretKey with SCIM Patch schema. + + Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str if_match: (optional) + Used to make the request conditional on an ETag + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CustomerSecretKey` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_customer_secret_key API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['customerSecretKeyId'] + resource_path = "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}" + method = "PATCH" + operation_name = "patch_customer_secret_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CustomerSecretKey/PatchCustomerSecretKey" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "attributes", + "attribute_sets", + "patch_op", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"patch_customer_secret_key got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "customerSecretKeyId": customer_secret_key_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="CustomerSecretKey", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="CustomerSecretKey", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def patch_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): + """ + Update a Dynamic Resource Group. + + + :param str dynamic_resource_group_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + + :param oci.identity_domains.models.PatchOp patch_op: (optional) + Update the DynamicResourceGroup with SCIM Patch schema. + + Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str if_match: (optional) + Used to make the request conditional on an ETag + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.DynamicResourceGroup` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_dynamic_resource_group API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['dynamicResourceGroupId'] + resource_path = "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}" + method = "PATCH" + operation_name = "patch_dynamic_resource_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroup/PatchDynamicResourceGroup" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "attributes", + "attribute_sets", + "patch_op", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"patch_dynamic_resource_group got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "dynamicResourceGroupId": dynamic_resource_group_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=kwargs.get('patch_op'), + response_type="DynamicResourceGroup", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -26784,18 +27893,18 @@ def patch_cloud_gate_mapping(self, cloud_gate_mapping_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="CloudGateMapping", + response_type="DynamicResourceGroup", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): + def patch_grant(self, grant_id, **kwargs): """ - Update a Cloud Gate server + Update a Grant - :param str cloud_gate_server_id: (required) + :param str grant_id: (required) ID of the resource :param str authorization: (optional) @@ -26813,7 +27922,7 @@ def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the CloudGateServer with SCIM Patch schema. + Update the Grant with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -26845,18 +27954,18 @@ def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CloudGateServer` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Grant` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_cloud_gate_server API. + Click `here `__ to see an example of how to use patch_grant API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['cloudGateServerId'] - resource_path = "/admin/v1/CloudGateServers/{cloudGateServerId}" + required_arguments = ['grantId'] + resource_path = "/admin/v1/Grants/{grantId}" method = "PATCH" - operation_name = "patch_cloud_gate_server" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CloudGateServer/PatchCloudGateServer" + operation_name = "patch_grant" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Grant/PatchGrant" # Don't accept unknown kwargs expected_kwargs = [ @@ -26873,10 +27982,10 @@ def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_cloud_gate_server got unknown kwargs: {extra_kwargs!r}") + f"patch_grant got unknown kwargs: {extra_kwargs!r}") path_params = { - "cloudGateServerId": cloud_gate_server_id + "grantId": grant_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -26927,7 +28036,7 @@ def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="CloudGateServer", + response_type="Grant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -26940,18 +28049,18 @@ def patch_cloud_gate_server(self, cloud_gate_server_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="CloudGateServer", + response_type="Grant", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_condition(self, condition_id, **kwargs): + def patch_group(self, group_id, **kwargs): """ - Update a Condition + Update a group. - :param str condition_id: (required) + :param str group_id: (required) ID of the resource :param str authorization: (optional) @@ -26969,7 +28078,7 @@ def patch_condition(self, condition_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Condition with SCIM Patch schema. + Update the Group with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -27001,18 +28110,18 @@ def patch_condition(self, condition_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Condition` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Group` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_condition API. + Click `here `__ to see an example of how to use patch_group API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['conditionId'] - resource_path = "/admin/v1/Conditions/{conditionId}" + required_arguments = ['groupId'] + resource_path = "/admin/v1/Groups/{groupId}" method = "PATCH" - operation_name = "patch_condition" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Condition/PatchCondition" + operation_name = "patch_group" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Group/PatchGroup" # Don't accept unknown kwargs expected_kwargs = [ @@ -27029,10 +28138,10 @@ def patch_condition(self, condition_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_condition got unknown kwargs: {extra_kwargs!r}") + f"patch_group got unknown kwargs: {extra_kwargs!r}") path_params = { - "conditionId": condition_id + "groupId": group_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -27083,7 +28192,7 @@ def patch_condition(self, condition_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Condition", + response_type="Group", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -27096,18 +28205,18 @@ def patch_condition(self, condition_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Condition", + response_type="Group", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_customer_secret_key(self, customer_secret_key_id, **kwargs): + def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwargs): """ - Update a user's customer secret key. + Update an existing Identity Propagation Trust configuration. - :param str customer_secret_key_id: (required) + :param str identity_propagation_trust_id: (required) ID of the resource :param str authorization: (optional) @@ -27125,171 +28234,17 @@ def patch_customer_secret_key(self, customer_secret_key_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the CustomerSecretKey with SCIM Patch schema. + Update the IdentityPropagationTrust with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. - - Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. - - :param str if_match: (optional) - Used to make the request conditional on an ETag - - :param str opc_retry_token: (optional) - A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. - - :param obj retry_strategy: (optional) - A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. - The specifics of the default retry strategy are described `here `__. - - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - - :param bool allow_control_chars: (optional) - allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. - By default, the response will not allow control characters in strings - - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.CustomerSecretKey` - :rtype: :class:`~oci.response.Response` - - :example: - Click `here `__ to see an example of how to use patch_customer_secret_key API. - """ - # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['customerSecretKeyId'] - resource_path = "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}" - method = "PATCH" - operation_name = "patch_customer_secret_key" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/CustomerSecretKey/PatchCustomerSecretKey" - - # Don't accept unknown kwargs - expected_kwargs = [ - "allow_control_chars", - "retry_strategy", - "authorization", - "resource_type_schema_version", - "attributes", - "attribute_sets", - "patch_op", - "if_match", - "opc_retry_token" - ] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - f"patch_customer_secret_key got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "customerSecretKeyId": customer_secret_key_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) - - query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - - header_params = { - "accept": "application/json, application/scim+json", - "content-type": "application/json", - "authorization": kwargs.get("authorization", missing), - "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), - "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) - } - header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} - - retry_strategy = self.base_client.get_preferred_retry_strategy( - operation_retry_strategy=kwargs.get('retry_strategy'), - client_retry_strategy=self.retry_strategy - ) - - if retry_strategy: - if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) - self.base_client.add_opc_client_retries_header(header_params) - retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) - return retry_strategy.make_retrying_call( - self.base_client.call_api, - resource_path=resource_path, - method=method, - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=kwargs.get('patch_op'), - response_type="CustomerSecretKey", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - else: - return self.base_client.call_api( - resource_path=resource_path, - method=method, - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=kwargs.get('patch_op'), - response_type="CustomerSecretKey", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - - def patch_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): - """ - Update a Dynamic Resource Group. - - :param str dynamic_resource_group_id: (required) - ID of the resource - - :param str authorization: (optional) - The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. - - :param str resource_type_schema_version: (optional) - An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. - - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. - - Allowed values are: "all", "always", "never", "request", "default" - - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the DynamicResourceGroup with SCIM Patch schema. - - Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -27313,18 +28268,18 @@ def patch_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.DynamicResourceGroup` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.IdentityPropagationTrust` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_dynamic_resource_group API. + Click `here `__ to see an example of how to use patch_identity_propagation_trust API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['dynamicResourceGroupId'] - resource_path = "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}" + required_arguments = ['identityPropagationTrustId'] + resource_path = "/admin/v1/IdentityPropagationTrusts/{identityPropagationTrustId}" method = "PATCH" - operation_name = "patch_dynamic_resource_group" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/DynamicResourceGroup/PatchDynamicResourceGroup" + operation_name = "patch_identity_propagation_trust" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityPropagationTrust/PatchIdentityPropagationTrust" # Don't accept unknown kwargs expected_kwargs = [ @@ -27341,10 +28296,10 @@ def patch_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_dynamic_resource_group got unknown kwargs: {extra_kwargs!r}") + f"patch_identity_propagation_trust got unknown kwargs: {extra_kwargs!r}") path_params = { - "dynamicResourceGroupId": dynamic_resource_group_id + "identityPropagationTrustId": identity_propagation_trust_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -27395,7 +28350,7 @@ def patch_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="DynamicResourceGroup", + response_type="IdentityPropagationTrust", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -27408,18 +28363,18 @@ def patch_dynamic_resource_group(self, dynamic_resource_group_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="DynamicResourceGroup", + response_type="IdentityPropagationTrust", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_grant(self, grant_id, **kwargs): + def patch_identity_provider(self, identity_provider_id, **kwargs): """ - Update a Grant + Update an Identity Provider - :param str grant_id: (required) + :param str identity_provider_id: (required) ID of the resource :param str authorization: (optional) @@ -27437,7 +28392,7 @@ def patch_grant(self, grant_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Grant with SCIM Patch schema. + Update the IdentityProvider with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -27469,18 +28424,18 @@ def patch_grant(self, grant_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Grant` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.IdentityProvider` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_grant API. + Click `here `__ to see an example of how to use patch_identity_provider API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['grantId'] - resource_path = "/admin/v1/Grants/{grantId}" + required_arguments = ['identityProviderId'] + resource_path = "/admin/v1/IdentityProviders/{identityProviderId}" method = "PATCH" - operation_name = "patch_grant" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Grant/PatchGrant" + operation_name = "patch_identity_provider" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProvider/PatchIdentityProvider" # Don't accept unknown kwargs expected_kwargs = [ @@ -27497,10 +28452,10 @@ def patch_grant(self, grant_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_grant got unknown kwargs: {extra_kwargs!r}") + f"patch_identity_provider got unknown kwargs: {extra_kwargs!r}") path_params = { - "grantId": grant_id + "identityProviderId": identity_provider_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -27551,7 +28506,7 @@ def patch_grant(self, grant_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Grant", + response_type="IdentityProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -27564,18 +28519,18 @@ def patch_grant(self, grant_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Grant", + response_type="IdentityProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_group(self, group_id, **kwargs): + def patch_identity_setting(self, identity_setting_id, **kwargs): """ - Update a group. + Update an Identity setting. - :param str group_id: (required) + :param str identity_setting_id: (required) ID of the resource :param str authorization: (optional) @@ -27593,7 +28548,7 @@ def patch_group(self, group_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Group with SCIM Patch schema. + Update the IdentitySettings with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -27625,18 +28580,18 @@ def patch_group(self, group_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Group` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.IdentitySetting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_group API. + Click `here `__ to see an example of how to use patch_identity_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['groupId'] - resource_path = "/admin/v1/Groups/{groupId}" + required_arguments = ['identitySettingId'] + resource_path = "/admin/v1/IdentitySettings/{identitySettingId}" method = "PATCH" - operation_name = "patch_group" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Group/PatchGroup" + operation_name = "patch_identity_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentitySetting/PatchIdentitySetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -27653,10 +28608,10 @@ def patch_group(self, group_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_group got unknown kwargs: {extra_kwargs!r}") + f"patch_identity_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "groupId": group_id + "identitySettingId": identity_setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -27707,7 +28662,7 @@ def patch_group(self, group_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Group", + response_type="IdentitySetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -27720,18 +28675,18 @@ def patch_group(self, group_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Group", + response_type="IdentitySetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwargs): + def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): """ - Update an existing Identity Propagation Trust configuration. + Update a Setting - :param str identity_propagation_trust_id: (required) + :param str kmsi_setting_id: (required) ID of the resource :param str authorization: (optional) @@ -27749,17 +28704,15 @@ def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwar Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the IdentityPropagationTrust with SCIM Patch schema. + Update the KmsiSettings with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -27783,18 +28736,18 @@ def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwar allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.IdentityPropagationTrust` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.KmsiSetting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_identity_propagation_trust API. + Click `here `__ to see an example of how to use patch_kmsi_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['identityPropagationTrustId'] - resource_path = "/admin/v1/IdentityPropagationTrusts/{identityPropagationTrustId}" + required_arguments = ['kmsiSettingId'] + resource_path = "/admin/v1/KmsiSettings/{kmsiSettingId}" method = "PATCH" - operation_name = "patch_identity_propagation_trust" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityPropagationTrust/PatchIdentityPropagationTrust" + operation_name = "patch_kmsi_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/KmsiSetting/PatchKmsiSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -27811,10 +28764,10 @@ def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwar extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_identity_propagation_trust got unknown kwargs: {extra_kwargs!r}") + f"patch_kmsi_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "identityPropagationTrustId": identity_propagation_trust_id + "kmsiSettingId": kmsi_setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -27865,7 +28818,7 @@ def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwar query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="IdentityPropagationTrust", + response_type="KmsiSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -27878,19 +28831,16 @@ def patch_identity_propagation_trust(self, identity_propagation_trust_id, **kwar query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="IdentityPropagationTrust", + response_type="KmsiSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_identity_provider(self, identity_provider_id, **kwargs): + def patch_me(self, **kwargs): """ - Update an Identity Provider - + Update a user's own information. - :param str identity_provider_id: (required) - ID of the resource :param str authorization: (optional) The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. @@ -27907,7 +28857,7 @@ def patch_identity_provider(self, identity_provider_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the IdentityProvider with SCIM Patch schema. + Update the Me with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -27939,18 +28889,18 @@ def patch_identity_provider(self, identity_provider_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.IdentityProvider` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Me` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_identity_provider API. + Click `here `__ to see an example of how to use patch_me API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['identityProviderId'] - resource_path = "/admin/v1/IdentityProviders/{identityProviderId}" + required_arguments = [] + resource_path = "/admin/v1/Me" method = "PATCH" - operation_name = "patch_identity_provider" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentityProvider/PatchIdentityProvider" + operation_name = "patch_me" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Me/PatchMe" # Don't accept unknown kwargs expected_kwargs = [ @@ -27967,17 +28917,7 @@ def patch_identity_provider(self, identity_provider_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_identity_provider got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "identityProviderId": identity_provider_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + f"patch_me got unknown kwargs: {extra_kwargs!r}") if 'attribute_sets' in kwargs: attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] @@ -28017,11 +28957,10 @@ def patch_identity_provider(self, identity_provider_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="IdentityProvider", + response_type="Me", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -28030,22 +28969,21 @@ def patch_identity_provider(self, identity_provider_id, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="IdentityProvider", + response_type="Me", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_identity_setting(self, identity_setting_id, **kwargs): + def patch_my_api_key(self, my_api_key_id, **kwargs): """ - Update an Identity setting. + Update a user's own API key. - :param str identity_setting_id: (required) + :param str my_api_key_id: (required) ID of the resource :param str authorization: (optional) @@ -28054,16 +28992,8 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. - - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. - - Allowed values are: "all", "always", "never", "request", "default" - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the IdentitySettings with SCIM Patch schema. + Update the MyApiKey with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -28095,18 +29025,18 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.IdentitySetting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyApiKey` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_identity_setting API. + Click `here `__ to see an example of how to use patch_my_api_key API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['identitySettingId'] - resource_path = "/admin/v1/IdentitySettings/{identitySettingId}" + required_arguments = ['myApiKeyId'] + resource_path = "/admin/v1/MyApiKeys/{myApiKeyId}" method = "PATCH" - operation_name = "patch_identity_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/IdentitySetting/PatchIdentitySetting" + operation_name = "patch_my_api_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApiKey/PatchMyApiKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -28114,8 +29044,6 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", - "attributes", - "attribute_sets", "patch_op", "if_match", "opc_retry_token" @@ -28123,10 +29051,10 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_identity_setting got unknown kwargs: {extra_kwargs!r}") + f"patch_my_api_key got unknown kwargs: {extra_kwargs!r}") path_params = { - "identitySettingId": identity_setting_id + "myApiKeyId": my_api_key_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -28135,20 +29063,6 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) - - query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - header_params = { "accept": "application/json, application/scim+json", "content-type": "application/json", @@ -28174,10 +29088,9 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="IdentitySetting", + response_type="MyApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -28187,21 +29100,20 @@ def patch_identity_setting(self, identity_setting_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="IdentitySetting", + response_type="MyApiKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): + def patch_my_auth_token(self, my_auth_token_id, **kwargs): """ - Update a Setting + Update a user's own Auth token. - :param str kmsi_setting_id: (required) + :param str my_auth_token_id: (required) ID of the resource :param str authorization: (optional) @@ -28210,16 +29122,8 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. - - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. - - Allowed values are: "all", "always", "never", "request", "default" - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the KmsiSettings with SCIM Patch schema. + Update the MyAuthToken with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -28251,18 +29155,18 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.KmsiSetting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyAuthToken` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_kmsi_setting API. + Click `here `__ to see an example of how to use patch_my_auth_token API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['kmsiSettingId'] - resource_path = "/admin/v1/KmsiSettings/{kmsiSettingId}" + required_arguments = ['myAuthTokenId'] + resource_path = "/admin/v1/MyAuthTokens/{myAuthTokenId}" method = "PATCH" - operation_name = "patch_kmsi_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/KmsiSetting/PatchKmsiSetting" + operation_name = "patch_my_auth_token" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyAuthToken/PatchMyAuthToken" # Don't accept unknown kwargs expected_kwargs = [ @@ -28270,8 +29174,6 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", - "attributes", - "attribute_sets", "patch_op", "if_match", "opc_retry_token" @@ -28279,10 +29181,10 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_kmsi_setting got unknown kwargs: {extra_kwargs!r}") + f"patch_my_auth_token got unknown kwargs: {extra_kwargs!r}") path_params = { - "kmsiSettingId": kmsi_setting_id + "myAuthTokenId": my_auth_token_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -28291,20 +29193,6 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) - - query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - header_params = { "accept": "application/json, application/scim+json", "content-type": "application/json", @@ -28330,10 +29218,9 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="KmsiSetting", + response_type="MyAuthToken", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -28343,36 +29230,30 @@ def patch_kmsi_setting(self, kmsi_setting_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="KmsiSetting", + response_type="MyAuthToken", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_me(self, **kwargs): + def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): """ - Update a user's own information. + Update a user's own customer secret key. + :param str my_customer_secret_key_id: (required) + ID of the resource + :param str authorization: (optional) The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. - - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. - - Allowed values are: "all", "always", "never", "request", "default" - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Me with SCIM Patch schema. + Update the MyCustomerSecretKey with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -28404,18 +29285,18 @@ def patch_me(self, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Me` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyCustomerSecretKey` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_me API. + Click `here `__ to see an example of how to use patch_my_customer_secret_key API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = [] - resource_path = "/admin/v1/Me" + required_arguments = ['myCustomerSecretKeyId'] + resource_path = "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}" method = "PATCH" - operation_name = "patch_me" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Me/PatchMe" + operation_name = "patch_my_customer_secret_key" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCustomerSecretKey/PatchMyCustomerSecretKey" # Don't accept unknown kwargs expected_kwargs = [ @@ -28423,8 +29304,6 @@ def patch_me(self, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", - "attributes", - "attribute_sets", "patch_op", "if_match", "opc_retry_token" @@ -28432,21 +29311,17 @@ def patch_me(self, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_me got unknown kwargs: {extra_kwargs!r}") - - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) + f"patch_my_customer_secret_key got unknown kwargs: {extra_kwargs!r}") - query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + path_params = { + "myCustomerSecretKeyId": my_customer_secret_key_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') header_params = { "accept": "application/json, application/scim+json", @@ -28472,10 +29347,10 @@ def patch_me(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Me", + response_type="MyCustomerSecretKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -28484,21 +29359,21 @@ def patch_me(self, **kwargs): return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Me", + response_type="MyCustomerSecretKey", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_my_api_key(self, my_api_key_id, **kwargs): + def patch_my_device(self, my_device_id, **kwargs): """ - Update a user's own API key. + Update a Device - :param str my_api_key_id: (required) + :param str my_device_id: (required) ID of the resource :param str authorization: (optional) @@ -28507,8 +29382,16 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MyApiKey with SCIM Patch schema. + Update the MyDevice with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -28540,18 +29423,18 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyApiKey` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyDevice` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_my_api_key API. + Click `here `__ to see an example of how to use patch_my_device API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['myApiKeyId'] - resource_path = "/admin/v1/MyApiKeys/{myApiKeyId}" + required_arguments = ['myDeviceId'] + resource_path = "/admin/v1/MyDevices/{myDeviceId}" method = "PATCH" - operation_name = "patch_my_api_key" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyApiKey/PatchMyApiKey" + operation_name = "patch_my_device" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyDevice/PatchMyDevice" # Don't accept unknown kwargs expected_kwargs = [ @@ -28559,6 +29442,8 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", + "attributes", + "attribute_sets", "patch_op", "if_match", "opc_retry_token" @@ -28566,10 +29451,10 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_my_api_key got unknown kwargs: {extra_kwargs!r}") + f"patch_my_device got unknown kwargs: {extra_kwargs!r}") path_params = { - "myApiKeyId": my_api_key_id + "myDeviceId": my_device_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -28578,6 +29463,20 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + header_params = { "accept": "application/json, application/scim+json", "content-type": "application/json", @@ -28603,9 +29502,10 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyApiKey", + response_type="MyDevice", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -28615,20 +29515,21 @@ def patch_my_api_key(self, my_api_key_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyApiKey", + response_type="MyDevice", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_my_auth_token(self, my_auth_token_id, **kwargs): + def patch_my_o_auth2_client_credential(self, my_o_auth2_client_credential_id, **kwargs): """ - Update a user's own Auth token. + Update a user's own OAuth2 client credential. - :param str my_auth_token_id: (required) + :param str my_o_auth2_client_credential_id: (required) ID of the resource :param str authorization: (optional) @@ -28638,7 +29539,7 @@ def patch_my_auth_token(self, my_auth_token_id, **kwargs): An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MyAuthToken with SCIM Patch schema. + Update the MyOAuth2ClientCredential with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -28670,18 +29571,18 @@ def patch_my_auth_token(self, my_auth_token_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyAuthToken` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyOAuth2ClientCredential` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_my_auth_token API. + Click `here `__ to see an example of how to use patch_my_o_auth2_client_credential API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['myAuthTokenId'] - resource_path = "/admin/v1/MyAuthTokens/{myAuthTokenId}" + required_arguments = ['myOAuth2ClientCredentialId'] + resource_path = "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}" method = "PATCH" - operation_name = "patch_my_auth_token" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyAuthToken/PatchMyAuthToken" + operation_name = "patch_my_o_auth2_client_credential" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyOAuth2ClientCredential/PatchMyOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -28696,10 +29597,10 @@ def patch_my_auth_token(self, my_auth_token_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_my_auth_token got unknown kwargs: {extra_kwargs!r}") + f"patch_my_o_auth2_client_credential got unknown kwargs: {extra_kwargs!r}") path_params = { - "myAuthTokenId": my_auth_token_id + "myOAuth2ClientCredentialId": my_o_auth2_client_credential_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -28735,7 +29636,7 @@ def patch_my_auth_token(self, my_auth_token_id, **kwargs): path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyAuthToken", + response_type="MyOAuth2ClientCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -28747,18 +29648,18 @@ def patch_my_auth_token(self, my_auth_token_id, **kwargs): path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyAuthToken", + response_type="MyOAuth2ClientCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): + def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): """ - Update a user's own customer secret key. + Update MyPendingApproval - :param str my_customer_secret_key_id: (required) + :param str my_pending_approval_id: (required) ID of the resource :param str authorization: (optional) @@ -28768,7 +29669,7 @@ def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MyCustomerSecretKey with SCIM Patch schema. + Update the MyPendingApproval with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -28800,18 +29701,18 @@ def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyCustomerSecretKey` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyPendingApproval` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_my_customer_secret_key API. + Click `here `__ to see an example of how to use patch_my_pending_approval API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['myCustomerSecretKeyId'] - resource_path = "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}" + required_arguments = ['myPendingApprovalId'] + resource_path = "/admin/v1/MyPendingApprovals/{myPendingApprovalId}" method = "PATCH" - operation_name = "patch_my_customer_secret_key" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyCustomerSecretKey/PatchMyCustomerSecretKey" + operation_name = "patch_my_pending_approval" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyPendingApproval/PatchMyPendingApproval" # Don't accept unknown kwargs expected_kwargs = [ @@ -28826,10 +29727,10 @@ def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_my_customer_secret_key got unknown kwargs: {extra_kwargs!r}") + f"patch_my_pending_approval got unknown kwargs: {extra_kwargs!r}") path_params = { - "myCustomerSecretKeyId": my_customer_secret_key_id + "myPendingApprovalId": my_pending_approval_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -28865,7 +29766,7 @@ def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyCustomerSecretKey", + response_type="MyPendingApproval", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -28877,18 +29778,18 @@ def patch_my_customer_secret_key(self, my_customer_secret_key_id, **kwargs): path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyCustomerSecretKey", + response_type="MyPendingApproval", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_my_device(self, my_device_id, **kwargs): + def patch_my_request(self, my_request_id, **kwargs): """ - Update a Device + Update My Requests - :param str my_device_id: (required) + :param str my_request_id: (required) ID of the resource :param str authorization: (optional) @@ -28906,7 +29807,7 @@ def patch_my_device(self, my_device_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MyDevice with SCIM Patch schema. + Update the MyRequest with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -28938,18 +29839,18 @@ def patch_my_device(self, my_device_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyDevice` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyRequest` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_my_device API. + Click `here `__ to see an example of how to use patch_my_request API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['myDeviceId'] - resource_path = "/admin/v1/MyDevices/{myDeviceId}" + required_arguments = ['myRequestId'] + resource_path = "/admin/v1/MyRequests/{myRequestId}" method = "PATCH" - operation_name = "patch_my_device" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyDevice/PatchMyDevice" + operation_name = "patch_my_request" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequest/PatchMyRequest" # Don't accept unknown kwargs expected_kwargs = [ @@ -28966,10 +29867,10 @@ def patch_my_device(self, my_device_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_my_device got unknown kwargs: {extra_kwargs!r}") + f"patch_my_request got unknown kwargs: {extra_kwargs!r}") path_params = { - "myDeviceId": my_device_id + "myRequestId": my_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29017,141 +29918,10 @@ def patch_my_device(self, my_device_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, - header_params=header_params, - body=kwargs.get('patch_op'), - response_type="MyDevice", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - else: - return self.base_client.call_api( - resource_path=resource_path, - method=method, - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=kwargs.get('patch_op'), - response_type="MyDevice", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - - def patch_my_o_auth2_client_credential(self, my_o_auth2_client_credential_id, **kwargs): - """ - Update a user's own OAuth2 client credential. - - - :param str my_o_auth2_client_credential_id: (required) - ID of the resource - - :param str authorization: (optional) - The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. - - :param str resource_type_schema_version: (optional) - An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MyOAuth2ClientCredential with SCIM Patch schema. - - Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. - - Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. - - :param str if_match: (optional) - Used to make the request conditional on an ETag - - :param str opc_retry_token: (optional) - A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. - - :param obj retry_strategy: (optional) - A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. - The specifics of the default retry strategy are described `here `__. - - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - - :param bool allow_control_chars: (optional) - allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. - By default, the response will not allow control characters in strings - - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyOAuth2ClientCredential` - :rtype: :class:`~oci.response.Response` - - :example: - Click `here `__ to see an example of how to use patch_my_o_auth2_client_credential API. - """ - # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['myOAuth2ClientCredentialId'] - resource_path = "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}" - method = "PATCH" - operation_name = "patch_my_o_auth2_client_credential" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyOAuth2ClientCredential/PatchMyOAuth2ClientCredential" - - # Don't accept unknown kwargs - expected_kwargs = [ - "allow_control_chars", - "retry_strategy", - "authorization", - "resource_type_schema_version", - "patch_op", - "if_match", - "opc_retry_token" - ] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - f"patch_my_o_auth2_client_credential got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "myOAuth2ClientCredentialId": my_o_auth2_client_credential_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - - header_params = { - "accept": "application/json, application/scim+json", - "content-type": "application/json", - "authorization": kwargs.get("authorization", missing), - "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), - "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) - } - header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} - - retry_strategy = self.base_client.get_preferred_retry_strategy( - operation_retry_strategy=kwargs.get('retry_strategy'), - client_retry_strategy=self.retry_strategy - ) - - if retry_strategy: - if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) - self.base_client.add_opc_client_retries_header(header_params) - retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) - return retry_strategy.make_retrying_call( - self.base_client.call_api, - resource_path=resource_path, - method=method, - path_params=path_params, + query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyOAuth2ClientCredential", + response_type="MyRequest", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29161,20 +29931,21 @@ def patch_my_o_auth2_client_credential(self, my_o_auth2_client_credential_id, ** resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyOAuth2ClientCredential", + response_type="MyRequest", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): + def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): """ - Update MyPendingApproval + Update a user's own SMTP credential. - :param str my_pending_approval_id: (required) + :param str my_smtp_credential_id: (required) ID of the resource :param str authorization: (optional) @@ -29184,7 +29955,7 @@ def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MyPendingApproval with SCIM Patch schema. + Update the MySmtpCredential with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -29216,18 +29987,18 @@ def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyPendingApproval` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MySmtpCredential` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_my_pending_approval API. + Click `here `__ to see an example of how to use patch_my_smtp_credential API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['myPendingApprovalId'] - resource_path = "/admin/v1/MyPendingApprovals/{myPendingApprovalId}" + required_arguments = ['mySmtpCredentialId'] + resource_path = "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}" method = "PATCH" - operation_name = "patch_my_pending_approval" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyPendingApproval/PatchMyPendingApproval" + operation_name = "patch_my_smtp_credential" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySmtpCredential/PatchMySmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -29242,10 +30013,10 @@ def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_my_pending_approval got unknown kwargs: {extra_kwargs!r}") + f"patch_my_smtp_credential got unknown kwargs: {extra_kwargs!r}") path_params = { - "myPendingApprovalId": my_pending_approval_id + "mySmtpCredentialId": my_smtp_credential_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29281,7 +30052,7 @@ def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyPendingApproval", + response_type="MySmtpCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29293,18 +30064,18 @@ def patch_my_pending_approval(self, my_pending_approval_id, **kwargs): path_params=path_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyPendingApproval", + response_type="MySmtpCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_my_request(self, my_request_id, **kwargs): + def patch_network_perimeter(self, network_perimeter_id, **kwargs): """ - Update My Requests + Update a NetworkPerimeter - :param str my_request_id: (required) + :param str network_perimeter_id: (required) ID of the resource :param str authorization: (optional) @@ -29322,7 +30093,7 @@ def patch_my_request(self, my_request_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MyRequest with SCIM Patch schema. + Update the NetworkPerimeter with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -29354,18 +30125,18 @@ def patch_my_request(self, my_request_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MyRequest` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.NetworkPerimeter` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_my_request API. + Click `here `__ to see an example of how to use patch_network_perimeter API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['myRequestId'] - resource_path = "/admin/v1/MyRequests/{myRequestId}" + required_arguments = ['networkPerimeterId'] + resource_path = "/admin/v1/NetworkPerimeters/{networkPerimeterId}" method = "PATCH" - operation_name = "patch_my_request" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MyRequest/PatchMyRequest" + operation_name = "patch_network_perimeter" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeter/PatchNetworkPerimeter" # Don't accept unknown kwargs expected_kwargs = [ @@ -29382,10 +30153,10 @@ def patch_my_request(self, my_request_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_my_request got unknown kwargs: {extra_kwargs!r}") + f"patch_network_perimeter got unknown kwargs: {extra_kwargs!r}") path_params = { - "myRequestId": my_request_id + "networkPerimeterId": network_perimeter_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29436,7 +30207,7 @@ def patch_my_request(self, my_request_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyRequest", + response_type="NetworkPerimeter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29449,18 +30220,18 @@ def patch_my_request(self, my_request_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MyRequest", + response_type="NetworkPerimeter", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): + def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs): """ - Update a user's own SMTP credential. + Update a user's OAuth2 client credentials. - :param str my_smtp_credential_id: (required) + :param str o_auth2_client_credential_id: (required) ID of the resource :param str authorization: (optional) @@ -29469,8 +30240,16 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + :param str attributes: (optional) + A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + + :param list[str] attribute_sets: (optional) + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + + Allowed values are: "all", "always", "never", "request", "default" + :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the MySmtpCredential with SCIM Patch schema. + Update the OAuth2ClientCredential with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -29502,18 +30281,18 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.MySmtpCredential` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.OAuth2ClientCredential` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_my_smtp_credential API. + Click `here `__ to see an example of how to use patch_o_auth2_client_credential API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['mySmtpCredentialId'] - resource_path = "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}" + required_arguments = ['oAuth2ClientCredentialId'] + resource_path = "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}" method = "PATCH" - operation_name = "patch_my_smtp_credential" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/MySmtpCredential/PatchMySmtpCredential" + operation_name = "patch_o_auth2_client_credential" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuth2ClientCredential/PatchOAuth2ClientCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -29521,6 +30300,8 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", + "attributes", + "attribute_sets", "patch_op", "if_match", "opc_retry_token" @@ -29528,10 +30309,10 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_my_smtp_credential got unknown kwargs: {extra_kwargs!r}") + f"patch_o_auth2_client_credential got unknown kwargs: {extra_kwargs!r}") path_params = { - "mySmtpCredentialId": my_smtp_credential_id + "oAuth2ClientCredentialId": o_auth2_client_credential_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29540,6 +30321,20 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + if 'attribute_sets' in kwargs: + attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] + for attribute_sets_item in kwargs['attribute_sets']: + if attribute_sets_item not in attribute_sets_allowed_values: + raise ValueError( + f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" + ) + + query_params = { + "attributes": kwargs.get("attributes", missing), + "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + header_params = { "accept": "application/json, application/scim+json", "content-type": "application/json", @@ -29565,9 +30360,10 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MySmtpCredential", + response_type="OAuth2ClientCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29577,20 +30373,21 @@ def patch_my_smtp_credential(self, my_smtp_credential_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, + query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="MySmtpCredential", + response_type="OAuth2ClientCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_network_perimeter(self, network_perimeter_id, **kwargs): + def patch_password_policy(self, password_policy_id, **kwargs): """ - Update a NetworkPerimeter + Update a password policy. - :param str network_perimeter_id: (required) + :param str password_policy_id: (required) ID of the resource :param str authorization: (optional) @@ -29608,7 +30405,7 @@ def patch_network_perimeter(self, network_perimeter_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the NetworkPerimeter with SCIM Patch schema. + Update the PasswordPolicy with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -29640,18 +30437,18 @@ def patch_network_perimeter(self, network_perimeter_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.NetworkPerimeter` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.PasswordPolicy` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_network_perimeter API. + Click `here `__ to see an example of how to use patch_password_policy API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['networkPerimeterId'] - resource_path = "/admin/v1/NetworkPerimeters/{networkPerimeterId}" + required_arguments = ['passwordPolicyId'] + resource_path = "/admin/v1/PasswordPolicies/{passwordPolicyId}" method = "PATCH" - operation_name = "patch_network_perimeter" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/NetworkPerimeter/PatchNetworkPerimeter" + operation_name = "patch_password_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicy/PatchPasswordPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -29668,10 +30465,10 @@ def patch_network_perimeter(self, network_perimeter_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_network_perimeter got unknown kwargs: {extra_kwargs!r}") + f"patch_password_policy got unknown kwargs: {extra_kwargs!r}") path_params = { - "networkPerimeterId": network_perimeter_id + "passwordPolicyId": password_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29722,7 +30519,7 @@ def patch_network_perimeter(self, network_perimeter_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="NetworkPerimeter", + response_type="PasswordPolicy", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29735,18 +30532,18 @@ def patch_network_perimeter(self, network_perimeter_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="NetworkPerimeter", + response_type="PasswordPolicy", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs): + def patch_policy(self, policy_id, **kwargs): """ - Update a user's OAuth2 client credentials. + Update a Policy - :param str o_auth2_client_credential_id: (required) + :param str policy_id: (required) ID of the resource :param str authorization: (optional) @@ -29764,7 +30561,7 @@ def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the OAuth2ClientCredential with SCIM Patch schema. + Update the Policy with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -29796,18 +30593,18 @@ def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.OAuth2ClientCredential` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Policy` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_o_auth2_client_credential API. + Click `here `__ to see an example of how to use patch_policy API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['oAuth2ClientCredentialId'] - resource_path = "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}" + required_arguments = ['policyId'] + resource_path = "/admin/v1/Policies/{policyId}" method = "PATCH" - operation_name = "patch_o_auth2_client_credential" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/OAuth2ClientCredential/PatchOAuth2ClientCredential" + operation_name = "patch_policy" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/PatchPolicy" # Don't accept unknown kwargs expected_kwargs = [ @@ -29824,10 +30621,10 @@ def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_o_auth2_client_credential got unknown kwargs: {extra_kwargs!r}") + f"patch_policy got unknown kwargs: {extra_kwargs!r}") path_params = { - "oAuth2ClientCredentialId": o_auth2_client_credential_id + "policyId": policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -29878,7 +30675,7 @@ def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="OAuth2ClientCredential", + response_type="Policy", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -29891,18 +30688,18 @@ def patch_o_auth2_client_credential(self, o_auth2_client_credential_id, **kwargs query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="OAuth2ClientCredential", + response_type="Policy", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_password_policy(self, password_policy_id, **kwargs): + def patch_rule(self, rule_id, **kwargs): """ - Update a password policy. + Update a Rule - :param str password_policy_id: (required) + :param str rule_id: (required) ID of the resource :param str authorization: (optional) @@ -29920,7 +30717,7 @@ def patch_password_policy(self, password_policy_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the PasswordPolicy with SCIM Patch schema. + Update the Rule with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -29952,18 +30749,18 @@ def patch_password_policy(self, password_policy_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.PasswordPolicy` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Rule` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_password_policy API. + Click `here `__ to see an example of how to use patch_rule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['passwordPolicyId'] - resource_path = "/admin/v1/PasswordPolicies/{passwordPolicyId}" + required_arguments = ['ruleId'] + resource_path = "/admin/v1/Rules/{ruleId}" method = "PATCH" - operation_name = "patch_password_policy" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/PasswordPolicy/PatchPasswordPolicy" + operation_name = "patch_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/PatchRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -29980,10 +30777,10 @@ def patch_password_policy(self, password_policy_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_password_policy got unknown kwargs: {extra_kwargs!r}") + f"patch_rule got unknown kwargs: {extra_kwargs!r}") path_params = { - "passwordPolicyId": password_policy_id + "ruleId": rule_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30034,7 +30831,7 @@ def patch_password_policy(self, password_policy_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="PasswordPolicy", + response_type="Rule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30047,18 +30844,18 @@ def patch_password_policy(self, password_policy_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="PasswordPolicy", + response_type="Rule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_policy(self, policy_id, **kwargs): + def patch_schema(self, schema_id, **kwargs): """ - Update a Policy + Update a Schema Def - :param str policy_id: (required) + :param str schema_id: (required) ID of the resource :param str authorization: (optional) @@ -30067,16 +30864,8 @@ def patch_policy(self, policy_id, **kwargs): :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. - - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. - - Allowed values are: "all", "always", "never", "request", "default" - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Policy with SCIM Patch schema. + Update the Schema with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -30108,18 +30897,18 @@ def patch_policy(self, policy_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Policy` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Schema` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_policy API. + Click `here `__ to see an example of how to use patch_schema API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['policyId'] - resource_path = "/admin/v1/Policies/{policyId}" + required_arguments = ['schemaId'] + resource_path = "/admin/v1/Schemas/{schemaId}" method = "PATCH" - operation_name = "patch_policy" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Policy/PatchPolicy" + operation_name = "patch_schema" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Schema/PatchSchema" # Don't accept unknown kwargs expected_kwargs = [ @@ -30127,8 +30916,6 @@ def patch_policy(self, policy_id, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", - "attributes", - "attribute_sets", "patch_op", "if_match", "opc_retry_token" @@ -30136,10 +30923,10 @@ def patch_policy(self, policy_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_policy got unknown kwargs: {extra_kwargs!r}") + f"patch_schema got unknown kwargs: {extra_kwargs!r}") path_params = { - "policyId": policy_id + "schemaId": schema_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30148,20 +30935,6 @@ def patch_policy(self, policy_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) - - query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - header_params = { "accept": "application/json, application/scim+json", "content-type": "application/json", @@ -30187,10 +30960,9 @@ def patch_policy(self, policy_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Policy", + response_type="Schema", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30200,21 +30972,20 @@ def patch_policy(self, policy_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Policy", + response_type="Schema", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_rule(self, rule_id, **kwargs): + def patch_security_question(self, security_question_id, **kwargs): """ - Update a Rule + Update a security question. - :param str rule_id: (required) + :param str security_question_id: (required) ID of the resource :param str authorization: (optional) @@ -30232,7 +31003,7 @@ def patch_rule(self, rule_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Rule with SCIM Patch schema. + Update the SecurityQuestion with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -30264,18 +31035,18 @@ def patch_rule(self, rule_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Rule` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SecurityQuestion` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_rule API. + Click `here `__ to see an example of how to use patch_security_question API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['ruleId'] - resource_path = "/admin/v1/Rules/{ruleId}" + required_arguments = ['securityQuestionId'] + resource_path = "/admin/v1/SecurityQuestions/{securityQuestionId}" method = "PATCH" - operation_name = "patch_rule" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Rule/PatchRule" + operation_name = "patch_security_question" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestion/PatchSecurityQuestion" # Don't accept unknown kwargs expected_kwargs = [ @@ -30292,10 +31063,10 @@ def patch_rule(self, rule_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_rule got unknown kwargs: {extra_kwargs!r}") + f"patch_security_question got unknown kwargs: {extra_kwargs!r}") path_params = { - "ruleId": rule_id + "securityQuestionId": security_question_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30346,7 +31117,7 @@ def patch_rule(self, rule_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Rule", + response_type="SecurityQuestion", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30359,148 +31130,18 @@ def patch_rule(self, rule_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Rule", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - - def patch_schema(self, schema_id, **kwargs): - """ - Update a Schema Def - - - :param str schema_id: (required) - ID of the resource - - :param str authorization: (optional) - The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. - - :param str resource_type_schema_version: (optional) - An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Schema with SCIM Patch schema. - - Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. - - Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. - - :param str if_match: (optional) - Used to make the request conditional on an ETag - - :param str opc_retry_token: (optional) - A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. - - :param obj retry_strategy: (optional) - A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - - This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. - The specifics of the default retry strategy are described `here `__. - - To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - - :param bool allow_control_chars: (optional) - allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. - By default, the response will not allow control characters in strings - - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Schema` - :rtype: :class:`~oci.response.Response` - - :example: - Click `here `__ to see an example of how to use patch_schema API. - """ - # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['schemaId'] - resource_path = "/admin/v1/Schemas/{schemaId}" - method = "PATCH" - operation_name = "patch_schema" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Schema/PatchSchema" - - # Don't accept unknown kwargs - expected_kwargs = [ - "allow_control_chars", - "retry_strategy", - "authorization", - "resource_type_schema_version", - "patch_op", - "if_match", - "opc_retry_token" - ] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - f"patch_schema got unknown kwargs: {extra_kwargs!r}") - - path_params = { - "schemaId": schema_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - - header_params = { - "accept": "application/json, application/scim+json", - "content-type": "application/json", - "authorization": kwargs.get("authorization", missing), - "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), - "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) - } - header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} - - retry_strategy = self.base_client.get_preferred_retry_strategy( - operation_retry_strategy=kwargs.get('retry_strategy'), - client_retry_strategy=self.retry_strategy - ) - - if retry_strategy: - if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) - self.base_client.add_opc_client_retries_header(header_params) - retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) - return retry_strategy.make_retrying_call( - self.base_client.call_api, - resource_path=resource_path, - method=method, - path_params=path_params, - header_params=header_params, - body=kwargs.get('patch_op'), - response_type="Schema", - allow_control_chars=kwargs.get('allow_control_chars'), - operation_name=operation_name, - api_reference_link=api_reference_link, - required_arguments=required_arguments) - else: - return self.base_client.call_api( - resource_path=resource_path, - method=method, - path_params=path_params, - header_params=header_params, - body=kwargs.get('patch_op'), - response_type="Schema", + response_type="SecurityQuestion", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_security_question(self, security_question_id, **kwargs): + def patch_security_question_setting(self, security_question_setting_id, **kwargs): """ - Update a security question. + Update a security question setting. - :param str security_question_id: (required) + :param str security_question_setting_id: (required) ID of the resource :param str authorization: (optional) @@ -30518,7 +31159,7 @@ def patch_security_question(self, security_question_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the SecurityQuestion with SCIM Patch schema. + Update the SecurityQuestionSettings with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -30550,18 +31191,18 @@ def patch_security_question(self, security_question_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SecurityQuestion` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SecurityQuestionSetting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_security_question API. + Click `here `__ to see an example of how to use patch_security_question_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['securityQuestionId'] - resource_path = "/admin/v1/SecurityQuestions/{securityQuestionId}" + required_arguments = ['securityQuestionSettingId'] + resource_path = "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}" method = "PATCH" - operation_name = "patch_security_question" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestion/PatchSecurityQuestion" + operation_name = "patch_security_question_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestionSetting/PatchSecurityQuestionSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -30578,10 +31219,10 @@ def patch_security_question(self, security_question_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_security_question got unknown kwargs: {extra_kwargs!r}") + f"patch_security_question_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "securityQuestionId": security_question_id + "securityQuestionSettingId": security_question_setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30632,7 +31273,7 @@ def patch_security_question(self, security_question_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SecurityQuestion", + response_type="SecurityQuestionSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30645,18 +31286,18 @@ def patch_security_question(self, security_question_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SecurityQuestion", + response_type="SecurityQuestionSetting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_security_question_setting(self, security_question_setting_id, **kwargs): + def patch_self_registration_profile(self, self_registration_profile_id, **kwargs): """ - Update a security question setting. + Update a self-registration profile. - :param str security_question_setting_id: (required) + :param str self_registration_profile_id: (required) ID of the resource :param str authorization: (optional) @@ -30674,7 +31315,7 @@ def patch_security_question_setting(self, security_question_setting_id, **kwargs Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the SecurityQuestionSettings with SCIM Patch schema. + Update the SelfRegistrationProfile with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -30706,18 +31347,18 @@ def patch_security_question_setting(self, security_question_setting_id, **kwargs allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SecurityQuestionSetting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SelfRegistrationProfile` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_security_question_setting API. + Click `here `__ to see an example of how to use patch_self_registration_profile API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['securityQuestionSettingId'] - resource_path = "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}" + required_arguments = ['selfRegistrationProfileId'] + resource_path = "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}" method = "PATCH" - operation_name = "patch_security_question_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SecurityQuestionSetting/PatchSecurityQuestionSetting" + operation_name = "patch_self_registration_profile" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfile/PatchSelfRegistrationProfile" # Don't accept unknown kwargs expected_kwargs = [ @@ -30734,10 +31375,10 @@ def patch_security_question_setting(self, security_question_setting_id, **kwargs extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_security_question_setting got unknown kwargs: {extra_kwargs!r}") + f"patch_self_registration_profile got unknown kwargs: {extra_kwargs!r}") path_params = { - "securityQuestionSettingId": security_question_setting_id + "selfRegistrationProfileId": self_registration_profile_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30788,7 +31429,7 @@ def patch_security_question_setting(self, security_question_setting_id, **kwargs query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SecurityQuestionSetting", + response_type="SelfRegistrationProfile", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30801,18 +31442,18 @@ def patch_security_question_setting(self, security_question_setting_id, **kwargs query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SecurityQuestionSetting", + response_type="SelfRegistrationProfile", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_self_registration_profile(self, self_registration_profile_id, **kwargs): + def patch_setting(self, setting_id, **kwargs): """ - Update a self-registration profile. + Update a Setting - :param str self_registration_profile_id: (required) + :param str setting_id: (required) ID of the resource :param str authorization: (optional) @@ -30830,7 +31471,7 @@ def patch_self_registration_profile(self, self_registration_profile_id, **kwargs Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the SelfRegistrationProfile with SCIM Patch schema. + Update the Settings with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -30862,18 +31503,18 @@ def patch_self_registration_profile(self, self_registration_profile_id, **kwargs allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SelfRegistrationProfile` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Setting` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_self_registration_profile API. + Click `here `__ to see an example of how to use patch_setting API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['selfRegistrationProfileId'] - resource_path = "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}" + required_arguments = ['settingId'] + resource_path = "/admin/v1/Settings/{settingId}" method = "PATCH" - operation_name = "patch_self_registration_profile" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SelfRegistrationProfile/PatchSelfRegistrationProfile" + operation_name = "patch_setting" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Setting/PatchSetting" # Don't accept unknown kwargs expected_kwargs = [ @@ -30890,10 +31531,10 @@ def patch_self_registration_profile(self, self_registration_profile_id, **kwargs extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_self_registration_profile got unknown kwargs: {extra_kwargs!r}") + f"patch_setting got unknown kwargs: {extra_kwargs!r}") path_params = { - "selfRegistrationProfileId": self_registration_profile_id + "settingId": setting_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -30944,7 +31585,7 @@ def patch_self_registration_profile(self, self_registration_profile_id, **kwargs query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SelfRegistrationProfile", + response_type="Setting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -30957,18 +31598,18 @@ def patch_self_registration_profile(self, self_registration_profile_id, **kwargs query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SelfRegistrationProfile", + response_type="Setting", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_setting(self, setting_id, **kwargs): + def patch_smtp_credential(self, smtp_credential_id, **kwargs): """ - Update a Setting + Update a user's SMTP credentials. - :param str setting_id: (required) + :param str smtp_credential_id: (required) ID of the resource :param str authorization: (optional) @@ -30986,7 +31627,7 @@ def patch_setting(self, setting_id, **kwargs): Allowed values are: "all", "always", "never", "request", "default" :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the Settings with SCIM Patch schema. + Update the SmtpCredential with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: @@ -31018,18 +31659,18 @@ def patch_setting(self, setting_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.Setting` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SmtpCredential` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_setting API. + Click `here `__ to see an example of how to use patch_smtp_credential API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['settingId'] - resource_path = "/admin/v1/Settings/{settingId}" + required_arguments = ['smtpCredentialId'] + resource_path = "/admin/v1/SmtpCredentials/{smtpCredentialId}" method = "PATCH" - operation_name = "patch_setting" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/Setting/PatchSetting" + operation_name = "patch_smtp_credential" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SmtpCredential/PatchSmtpCredential" # Don't accept unknown kwargs expected_kwargs = [ @@ -31046,10 +31687,10 @@ def patch_setting(self, setting_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_setting got unknown kwargs: {extra_kwargs!r}") + f"patch_smtp_credential got unknown kwargs: {extra_kwargs!r}") path_params = { - "settingId": setting_id + "smtpCredentialId": smtp_credential_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31100,7 +31741,7 @@ def patch_setting(self, setting_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Setting", + response_type="SmtpCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31113,18 +31754,18 @@ def patch_setting(self, setting_id, **kwargs): query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="Setting", + response_type="SmtpCredential", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def patch_smtp_credential(self, smtp_credential_id, **kwargs): + def patch_social_identity_provider(self, social_identity_provider_id, **kwargs): """ - Update a user's SMTP credentials. + Update a Social Identity Provider - :param str smtp_credential_id: (required) + :param str social_identity_provider_id: (required) ID of the resource :param str authorization: (optional) @@ -31133,24 +31774,18 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): :param str resource_type_schema_version: (optional) An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. - :param str attributes: (optional) - A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. - - :param list[str] attribute_sets: (optional) - A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. - - Allowed values are: "all", "always", "never", "request", "default" - :param oci.identity_domains.models.PatchOp patch_op: (optional) - Update the SmtpCredential with SCIM Patch schema. + Update the SocialIdentityProvider with SCIM Patch schema. Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. @@ -31174,18 +31809,18 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SmtpCredential` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SocialIdentityProvider` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use patch_smtp_credential API. + Click `here `__ to see an example of how to use patch_social_identity_provider API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['smtpCredentialId'] - resource_path = "/admin/v1/SmtpCredentials/{smtpCredentialId}" + required_arguments = ['socialIdentityProviderId'] + resource_path = "/admin/v1/SocialIdentityProviders/{socialIdentityProviderId}" method = "PATCH" - operation_name = "patch_smtp_credential" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SmtpCredential/PatchSmtpCredential" + operation_name = "patch_social_identity_provider" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/PatchSocialIdentityProvider" # Don't accept unknown kwargs expected_kwargs = [ @@ -31193,8 +31828,6 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): "retry_strategy", "authorization", "resource_type_schema_version", - "attributes", - "attribute_sets", "patch_op", "if_match", "opc_retry_token" @@ -31202,10 +31835,10 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"patch_smtp_credential got unknown kwargs: {extra_kwargs!r}") + f"patch_social_identity_provider got unknown kwargs: {extra_kwargs!r}") path_params = { - "smtpCredentialId": smtp_credential_id + "socialIdentityProviderId": social_identity_provider_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -31214,20 +31847,6 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') - if 'attribute_sets' in kwargs: - attribute_sets_allowed_values = ["all", "always", "never", "request", "default"] - for attribute_sets_item in kwargs['attribute_sets']: - if attribute_sets_item not in attribute_sets_allowed_values: - raise ValueError( - f"Invalid value for `attribute_sets`, must be one of { attribute_sets_allowed_values }" - ) - - query_params = { - "attributes": kwargs.get("attributes", missing), - "attributeSets": self.base_client.generate_collection_format_param(kwargs.get("attribute_sets", missing), 'multi') - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - header_params = { "accept": "application/json, application/scim+json", "content-type": "application/json", @@ -31253,10 +31872,9 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SmtpCredential", + response_type="SocialIdentityProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -31266,10 +31884,9 @@ def patch_smtp_credential(self, smtp_credential_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, body=kwargs.get('patch_op'), - response_type="SmtpCredential", + response_type="SocialIdentityProvider", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -35563,6 +36180,138 @@ def put_setting(self, setting_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def put_social_identity_provider(self, social_identity_provider_id, **kwargs): + """ + Replace a Social Identity Provider + + + :param str social_identity_provider_id: (required) + ID of the resource + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param oci.identity_domains.models.SocialIdentityProvider social_identity_provider: (optional) + Replace the current instance of SocialIdentityProvider with provided payload. + + Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + + - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + + Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + + - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + + :param str if_match: (optional) + Used to make the request conditional on an ETag + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SocialIdentityProvider` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use put_social_identity_provider API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['socialIdentityProviderId'] + resource_path = "/admin/v1/SocialIdentityProviders/{socialIdentityProviderId}" + method = "PUT" + operation_name = "put_social_identity_provider" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProvider/PutSocialIdentityProvider" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "social_identity_provider", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"put_social_identity_provider got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "socialIdentityProviderId": social_identity_provider_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=kwargs.get('social_identity_provider'), + response_type="SocialIdentityProvider", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=kwargs.get('social_identity_provider'), + response_type="SocialIdentityProvider", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def put_user(self, user_id, **kwargs): """ Replace a user. @@ -40369,6 +41118,120 @@ def search_smtp_credentials(self, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def search_social_identity_providers(self, **kwargs): + """ + Search Social Identity Providers Using POST + + + :param str authorization: (optional) + The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + + :param str resource_type_schema_version: (optional) + An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + + :param oci.identity_domains.models.SocialIdentityProviderSearchRequest social_identity_provider_search_request: (optional) + Parameters for searching SocialIdentityProviders + + :param str opc_retry_token: (optional) + A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous 'List' call. + + :param int limit: (optional) + The maximum number of items to return in a paginated 'List' call. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.identity_domains.models.SocialIdentityProviders` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use search_social_identity_providers API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/admin/v1/SocialIdentityProviders/.search" + method = "POST" + operation_name = "search_social_identity_providers" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/SocialIdentityProviders/SearchSocialIdentityProviders" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "authorization", + "resource_type_schema_version", + "social_identity_provider_search_request", + "opc_retry_token", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"search_social_identity_providers got unknown kwargs: {extra_kwargs!r}") + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json, application/scim+json", + "content-type": "application/json", + "authorization": kwargs.get("authorization", missing), + "resource_type_schema_version": kwargs.get("resource_type_schema_version", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=kwargs.get('social_identity_provider_search_request'), + response_type="SocialIdentityProviders", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=kwargs.get('social_identity_provider_search_request'), + response_type="SocialIdentityProviders", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def search_user_attributes_settings(self, **kwargs): """ Search User Schema Attribute Settings Using POST @@ -40415,7 +41278,7 @@ def search_user_attributes_settings(self, **kwargs): resource_path = "/admin/v1/UserAttributesSettings/.search" method = "POST" operation_name = "search_user_attributes_settings" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSettings/SearchUserAttributesSettings" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/identity-domains/v1/UserAttributesSetting/SearchUserAttributesSettings" # Don't accept unknown kwargs expected_kwargs = [ diff --git a/src/oci/identity_domains/models/__init__.py b/src/oci/identity_domains/models/__init__.py index 18b1c5c91c..2df929d238 100644 --- a/src/oci/identity_domains/models/__init__.py +++ b/src/oci/identity_domains/models/__init__.py @@ -215,6 +215,7 @@ from .identity_propagation_trusts import IdentityPropagationTrusts from .identity_provider import IdentityProvider from .identity_provider_correlation_policy import IdentityProviderCorrelationPolicy +from .identity_provider_jit_prov_assigned_groups import IdentityProviderJitProvAssignedGroups from .identity_provider_jit_user_prov_assigned_groups import IdentityProviderJitUserProvAssignedGroups from .identity_provider_jit_user_prov_attributes import IdentityProviderJitUserProvAttributes from .identity_provider_jit_user_prov_group_mappings import IdentityProviderJitUserProvGroupMappings @@ -397,6 +398,11 @@ from .smtp_credential_search_request import SmtpCredentialSearchRequest from .smtp_credential_user import SmtpCredentialUser from .smtp_credentials import SmtpCredentials +from .social_identity_provider import SocialIdentityProvider +from .social_identity_provider_jit_prov_assigned_groups import SocialIdentityProviderJitProvAssignedGroups +from .social_identity_provider_relay_idp_param_mappings import SocialIdentityProviderRelayIdpParamMappings +from .social_identity_provider_search_request import SocialIdentityProviderSearchRequest +from .social_identity_providers import SocialIdentityProviders from .tags import Tags from .user import User from .user_attributes_setting import UserAttributesSetting @@ -666,6 +672,7 @@ "IdentityPropagationTrusts": IdentityPropagationTrusts, "IdentityProvider": IdentityProvider, "IdentityProviderCorrelationPolicy": IdentityProviderCorrelationPolicy, + "IdentityProviderJitProvAssignedGroups": IdentityProviderJitProvAssignedGroups, "IdentityProviderJitUserProvAssignedGroups": IdentityProviderJitUserProvAssignedGroups, "IdentityProviderJitUserProvAttributes": IdentityProviderJitUserProvAttributes, "IdentityProviderJitUserProvGroupMappings": IdentityProviderJitUserProvGroupMappings, @@ -848,6 +855,11 @@ "SmtpCredentialSearchRequest": SmtpCredentialSearchRequest, "SmtpCredentialUser": SmtpCredentialUser, "SmtpCredentials": SmtpCredentials, + "SocialIdentityProvider": SocialIdentityProvider, + "SocialIdentityProviderJitProvAssignedGroups": SocialIdentityProviderJitProvAssignedGroups, + "SocialIdentityProviderRelayIdpParamMappings": SocialIdentityProviderRelayIdpParamMappings, + "SocialIdentityProviderSearchRequest": SocialIdentityProviderSearchRequest, + "SocialIdentityProviders": SocialIdentityProviders, "Tags": Tags, "User": User, "UserAttributesSetting": UserAttributesSetting, diff --git a/src/oci/identity_domains/models/extension_social_identity_provider.py b/src/oci/identity_domains/models/extension_social_identity_provider.py index eca2f24788..070ed35adc 100644 --- a/src/oci/identity_domains/models/extension_social_identity_provider.py +++ b/src/oci/identity_domains/models/extension_social_identity_provider.py @@ -32,6 +32,22 @@ def __init__(self, **kwargs): The value to assign to the account_linking_enabled property of this ExtensionSocialIdentityProvider. :type account_linking_enabled: bool + :param auto_redirect_enabled: + The value to assign to the auto_redirect_enabled property of this ExtensionSocialIdentityProvider. + :type auto_redirect_enabled: bool + + :param social_jit_provisioning_enabled: + The value to assign to the social_jit_provisioning_enabled property of this ExtensionSocialIdentityProvider. + :type social_jit_provisioning_enabled: bool + + :param jit_prov_group_static_list_enabled: + The value to assign to the jit_prov_group_static_list_enabled property of this ExtensionSocialIdentityProvider. + :type jit_prov_group_static_list_enabled: bool + + :param jit_prov_assigned_groups: + The value to assign to the jit_prov_assigned_groups property of this ExtensionSocialIdentityProvider. + :type jit_prov_assigned_groups: list[oci.identity_domains.models.IdentityProviderJitProvAssignedGroups] + :param registration_enabled: The value to assign to the registration_enabled property of this ExtensionSocialIdentityProvider. :type registration_enabled: bool @@ -101,6 +117,10 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'account_linking_enabled': 'bool', + 'auto_redirect_enabled': 'bool', + 'social_jit_provisioning_enabled': 'bool', + 'jit_prov_group_static_list_enabled': 'bool', + 'jit_prov_assigned_groups': 'list[IdentityProviderJitProvAssignedGroups]', 'registration_enabled': 'bool', 'status': 'str', 'authz_url': 'str', @@ -121,6 +141,10 @@ def __init__(self, **kwargs): self.attribute_map = { 'account_linking_enabled': 'accountLinkingEnabled', + 'auto_redirect_enabled': 'autoRedirectEnabled', + 'social_jit_provisioning_enabled': 'socialJitProvisioningEnabled', + 'jit_prov_group_static_list_enabled': 'jitProvGroupStaticListEnabled', + 'jit_prov_assigned_groups': 'jitProvAssignedGroups', 'registration_enabled': 'registrationEnabled', 'status': 'status', 'authz_url': 'authzUrl', @@ -140,6 +164,10 @@ def __init__(self, **kwargs): } self._account_linking_enabled = None + self._auto_redirect_enabled = None + self._social_jit_provisioning_enabled = None + self._jit_prov_group_static_list_enabled = None + self._jit_prov_assigned_groups = None self._registration_enabled = None self._status = None self._authz_url = None @@ -205,6 +233,198 @@ def account_linking_enabled(self, account_linking_enabled): """ self._account_linking_enabled = account_linking_enabled + @property + def auto_redirect_enabled(self): + """ + Gets the auto_redirect_enabled of this ExtensionSocialIdentityProvider. + Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The auto_redirect_enabled of this ExtensionSocialIdentityProvider. + :rtype: bool + """ + return self._auto_redirect_enabled + + @auto_redirect_enabled.setter + def auto_redirect_enabled(self, auto_redirect_enabled): + """ + Sets the auto_redirect_enabled of this ExtensionSocialIdentityProvider. + Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param auto_redirect_enabled: The auto_redirect_enabled of this ExtensionSocialIdentityProvider. + :type: bool + """ + self._auto_redirect_enabled = auto_redirect_enabled + + @property + def social_jit_provisioning_enabled(self): + """ + Gets the social_jit_provisioning_enabled of this ExtensionSocialIdentityProvider. + Whether Social JIT Provisioning is enabled + + **Added In:** 2307282043 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The social_jit_provisioning_enabled of this ExtensionSocialIdentityProvider. + :rtype: bool + """ + return self._social_jit_provisioning_enabled + + @social_jit_provisioning_enabled.setter + def social_jit_provisioning_enabled(self, social_jit_provisioning_enabled): + """ + Sets the social_jit_provisioning_enabled of this ExtensionSocialIdentityProvider. + Whether Social JIT Provisioning is enabled + + **Added In:** 2307282043 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param social_jit_provisioning_enabled: The social_jit_provisioning_enabled of this ExtensionSocialIdentityProvider. + :type: bool + """ + self._social_jit_provisioning_enabled = social_jit_provisioning_enabled + + @property + def jit_prov_group_static_list_enabled(self): + """ + Gets the jit_prov_group_static_list_enabled of this ExtensionSocialIdentityProvider. + Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The jit_prov_group_static_list_enabled of this ExtensionSocialIdentityProvider. + :rtype: bool + """ + return self._jit_prov_group_static_list_enabled + + @jit_prov_group_static_list_enabled.setter + def jit_prov_group_static_list_enabled(self, jit_prov_group_static_list_enabled): + """ + Sets the jit_prov_group_static_list_enabled of this ExtensionSocialIdentityProvider. + Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param jit_prov_group_static_list_enabled: The jit_prov_group_static_list_enabled of this ExtensionSocialIdentityProvider. + :type: bool + """ + self._jit_prov_group_static_list_enabled = jit_prov_group_static_list_enabled + + @property + def jit_prov_assigned_groups(self): + """ + Gets the jit_prov_assigned_groups of this ExtensionSocialIdentityProvider. + Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - idcsCompositeKey: [value] + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: complex + - uniqueness: none + + + :return: The jit_prov_assigned_groups of this ExtensionSocialIdentityProvider. + :rtype: list[oci.identity_domains.models.IdentityProviderJitProvAssignedGroups] + """ + return self._jit_prov_assigned_groups + + @jit_prov_assigned_groups.setter + def jit_prov_assigned_groups(self, jit_prov_assigned_groups): + """ + Sets the jit_prov_assigned_groups of this ExtensionSocialIdentityProvider. + Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - idcsCompositeKey: [value] + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: complex + - uniqueness: none + + + :param jit_prov_assigned_groups: The jit_prov_assigned_groups of this ExtensionSocialIdentityProvider. + :type: list[oci.identity_domains.models.IdentityProviderJitProvAssignedGroups] + """ + self._jit_prov_assigned_groups = jit_prov_assigned_groups + @property def registration_enabled(self): """ diff --git a/src/oci/identity_domains/models/identity_propagation_trust.py b/src/oci/identity_domains/models/identity_propagation_trust.py index 22100db9bd..552a136845 100644 --- a/src/oci/identity_domains/models/identity_propagation_trust.py +++ b/src/oci/identity_domains/models/identity_propagation_trust.py @@ -170,10 +170,6 @@ def __init__(self, **kwargs): The value to assign to the oauth_clients property of this IdentityPropagationTrust. :type oauth_clients: list[str] - :param service_principals: - The value to assign to the service_principals property of this IdentityPropagationTrust. - :type service_principals: list[str] - :param allow_impersonation: The value to assign to the allow_impersonation property of this IdentityPropagationTrust. :type allow_impersonation: bool @@ -219,7 +215,6 @@ def __init__(self, **kwargs): 'public_key_endpoint': 'str', 'public_certificate': 'str', 'oauth_clients': 'list[str]', - 'service_principals': 'list[str]', 'allow_impersonation': 'bool', 'clock_skew_seconds': 'int', 'impersonation_service_users': 'list[IdentityPropagationTrustImpersonationServiceUsers]', @@ -254,7 +249,6 @@ def __init__(self, **kwargs): 'public_key_endpoint': 'publicKeyEndpoint', 'public_certificate': 'publicCertificate', 'oauth_clients': 'oauthClients', - 'service_principals': 'servicePrincipals', 'allow_impersonation': 'allowImpersonation', 'clock_skew_seconds': 'clockSkewSeconds', 'impersonation_service_users': 'impersonationServiceUsers', @@ -288,7 +282,6 @@ def __init__(self, **kwargs): self._public_key_endpoint = None self._public_certificate = None self._oauth_clients = None - self._service_principals = None self._allow_impersonation = None self._clock_skew_seconds = None self._impersonation_service_users = None @@ -1414,48 +1407,6 @@ def oauth_clients(self, oauth_clients): """ self._oauth_clients = oauth_clients - @property - def service_principals(self): - """ - Gets the service_principals of this IdentityPropagationTrust. - The value of all the authorized OCI Service Principals. - - **SCIM++ Properties:** - - idcsSearchable: false - - multiValued: true - - mutability: readWrite - - required: false - - returned: default - - type: string - - uniqueness: none - - - :return: The service_principals of this IdentityPropagationTrust. - :rtype: list[str] - """ - return self._service_principals - - @service_principals.setter - def service_principals(self, service_principals): - """ - Sets the service_principals of this IdentityPropagationTrust. - The value of all the authorized OCI Service Principals. - - **SCIM++ Properties:** - - idcsSearchable: false - - multiValued: true - - mutability: readWrite - - required: false - - returned: default - - type: string - - uniqueness: none - - - :param service_principals: The service_principals of this IdentityPropagationTrust. - :type: list[str] - """ - self._service_principals = service_principals - @property def allow_impersonation(self): """ diff --git a/src/oci/identity_domains/models/identity_provider_jit_prov_assigned_groups.py b/src/oci/identity_domains/models/identity_provider_jit_prov_assigned_groups.py new file mode 100644 index 0000000000..2398ba531c --- /dev/null +++ b/src/oci/identity_domains/models/identity_provider_jit_prov_assigned_groups.py @@ -0,0 +1,214 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IdentityProviderJitProvAssignedGroups(object): + """ + Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - idcsCompositeKey: [value] + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: complex + - uniqueness: none + """ + + def __init__(self, **kwargs): + """ + Initializes a new IdentityProviderJitProvAssignedGroups object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value: + The value to assign to the value property of this IdentityProviderJitProvAssignedGroups. + :type value: str + + :param ref: + The value to assign to the ref property of this IdentityProviderJitProvAssignedGroups. + :type ref: str + + :param display: + The value to assign to the display property of this IdentityProviderJitProvAssignedGroups. + :type display: str + + """ + self.swagger_types = { + 'value': 'str', + 'ref': 'str', + 'display': 'str' + } + + self.attribute_map = { + 'value': 'value', + 'ref': '$ref', + 'display': 'display' + } + + self._value = None + self._ref = None + self._display = None + + @property + def value(self): + """ + **[Required]** Gets the value of this IdentityProviderJitProvAssignedGroups. + Group identifier + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The value of this IdentityProviderJitProvAssignedGroups. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this IdentityProviderJitProvAssignedGroups. + Group identifier + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param value: The value of this IdentityProviderJitProvAssignedGroups. + :type: str + """ + self._value = value + + @property + def ref(self): + """ + Gets the ref of this IdentityProviderJitProvAssignedGroups. + Group URI + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: reference + - uniqueness: none + + + :return: The ref of this IdentityProviderJitProvAssignedGroups. + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """ + Sets the ref of this IdentityProviderJitProvAssignedGroups. + Group URI + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: reference + - uniqueness: none + + + :param ref: The ref of this IdentityProviderJitProvAssignedGroups. + :type: str + """ + self._ref = ref + + @property + def display(self): + """ + Gets the display of this IdentityProviderJitProvAssignedGroups. + A human readable name, primarily used for display purposes. READ-ONLY. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :return: The display of this IdentityProviderJitProvAssignedGroups. + :rtype: str + """ + return self._display + + @display.setter + def display(self, display): + """ + Sets the display of this IdentityProviderJitProvAssignedGroups. + A human readable name, primarily used for display purposes. READ-ONLY. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :param display: The display of this IdentityProviderJitProvAssignedGroups. + :type: str + """ + self._display = display + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/social_identity_provider.py b/src/oci/identity_domains/models/social_identity_provider.py new file mode 100644 index 0000000000..0806c4520e --- /dev/null +++ b/src/oci/identity_domains/models/social_identity_provider.py @@ -0,0 +1,2083 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SocialIdentityProvider(object): + """ + Social Identity Provider + """ + + #: A constant which can be used with the idcs_prevented_operations property of a SocialIdentityProvider. + #: This constant has a value of "replace" + IDCS_PREVENTED_OPERATIONS_REPLACE = "replace" + + #: A constant which can be used with the idcs_prevented_operations property of a SocialIdentityProvider. + #: This constant has a value of "update" + IDCS_PREVENTED_OPERATIONS_UPDATE = "update" + + #: A constant which can be used with the idcs_prevented_operations property of a SocialIdentityProvider. + #: This constant has a value of "delete" + IDCS_PREVENTED_OPERATIONS_DELETE = "delete" + + #: A constant which can be used with the status property of a SocialIdentityProvider. + #: This constant has a value of "created" + STATUS_CREATED = "created" + + #: A constant which can be used with the status property of a SocialIdentityProvider. + #: This constant has a value of "deleted" + STATUS_DELETED = "deleted" + + def __init__(self, **kwargs): + """ + Initializes a new SocialIdentityProvider object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this SocialIdentityProvider. + :type id: str + + :param ocid: + The value to assign to the ocid property of this SocialIdentityProvider. + :type ocid: str + + :param schemas: + The value to assign to the schemas property of this SocialIdentityProvider. + :type schemas: list[str] + + :param meta: + The value to assign to the meta property of this SocialIdentityProvider. + :type meta: oci.identity_domains.models.Meta + + :param idcs_created_by: + The value to assign to the idcs_created_by property of this SocialIdentityProvider. + :type idcs_created_by: oci.identity_domains.models.IdcsCreatedBy + + :param idcs_last_modified_by: + The value to assign to the idcs_last_modified_by property of this SocialIdentityProvider. + :type idcs_last_modified_by: oci.identity_domains.models.IdcsLastModifiedBy + + :param idcs_prevented_operations: + The value to assign to the idcs_prevented_operations property of this SocialIdentityProvider. + Allowed values for items in this list are: "replace", "update", "delete", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type idcs_prevented_operations: list[str] + + :param tags: + The value to assign to the tags property of this SocialIdentityProvider. + :type tags: list[oci.identity_domains.models.Tags] + + :param delete_in_progress: + The value to assign to the delete_in_progress property of this SocialIdentityProvider. + :type delete_in_progress: bool + + :param idcs_last_upgraded_in_release: + The value to assign to the idcs_last_upgraded_in_release property of this SocialIdentityProvider. + :type idcs_last_upgraded_in_release: str + + :param domain_ocid: + The value to assign to the domain_ocid property of this SocialIdentityProvider. + :type domain_ocid: str + + :param compartment_ocid: + The value to assign to the compartment_ocid property of this SocialIdentityProvider. + :type compartment_ocid: str + + :param tenancy_ocid: + The value to assign to the tenancy_ocid property of this SocialIdentityProvider. + :type tenancy_ocid: str + + :param name: + The value to assign to the name property of this SocialIdentityProvider. + :type name: str + + :param description: + The value to assign to the description property of this SocialIdentityProvider. + :type description: str + + :param enabled: + The value to assign to the enabled property of this SocialIdentityProvider. + :type enabled: bool + + :param account_linking_enabled: + The value to assign to the account_linking_enabled property of this SocialIdentityProvider. + :type account_linking_enabled: bool + + :param social_jit_provisioning_enabled: + The value to assign to the social_jit_provisioning_enabled property of this SocialIdentityProvider. + :type social_jit_provisioning_enabled: bool + + :param jit_prov_group_static_list_enabled: + The value to assign to the jit_prov_group_static_list_enabled property of this SocialIdentityProvider. + :type jit_prov_group_static_list_enabled: bool + + :param jit_prov_assigned_groups: + The value to assign to the jit_prov_assigned_groups property of this SocialIdentityProvider. + :type jit_prov_assigned_groups: list[oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups] + + :param registration_enabled: + The value to assign to the registration_enabled property of this SocialIdentityProvider. + :type registration_enabled: bool + + :param auto_redirect_enabled: + The value to assign to the auto_redirect_enabled property of this SocialIdentityProvider. + :type auto_redirect_enabled: bool + + :param show_on_login: + The value to assign to the show_on_login property of this SocialIdentityProvider. + :type show_on_login: bool + + :param status: + The value to assign to the status property of this SocialIdentityProvider. + Allowed values for this property are: "created", "deleted", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param id_attribute: + The value to assign to the id_attribute property of this SocialIdentityProvider. + :type id_attribute: str + + :param authz_url: + The value to assign to the authz_url property of this SocialIdentityProvider. + :type authz_url: str + + :param access_token_url: + The value to assign to the access_token_url property of this SocialIdentityProvider. + :type access_token_url: str + + :param profile_url: + The value to assign to the profile_url property of this SocialIdentityProvider. + :type profile_url: str + + :param scope: + The value to assign to the scope property of this SocialIdentityProvider. + :type scope: list[str] + + :param admin_scope: + The value to assign to the admin_scope property of this SocialIdentityProvider. + :type admin_scope: list[str] + + :param consumer_key: + The value to assign to the consumer_key property of this SocialIdentityProvider. + :type consumer_key: str + + :param consumer_secret: + The value to assign to the consumer_secret property of this SocialIdentityProvider. + :type consumer_secret: str + + :param service_provider_name: + The value to assign to the service_provider_name property of this SocialIdentityProvider. + :type service_provider_name: str + + :param clock_skew_in_seconds: + The value to assign to the clock_skew_in_seconds property of this SocialIdentityProvider. + :type clock_skew_in_seconds: int + + :param redirect_url: + The value to assign to the redirect_url property of this SocialIdentityProvider. + :type redirect_url: str + + :param icon_url: + The value to assign to the icon_url property of this SocialIdentityProvider. + :type icon_url: str + + :param discovery_url: + The value to assign to the discovery_url property of this SocialIdentityProvider. + :type discovery_url: str + + :param client_credential_in_payload: + The value to assign to the client_credential_in_payload property of this SocialIdentityProvider. + :type client_credential_in_payload: bool + + :param refresh_token_url: + The value to assign to the refresh_token_url property of this SocialIdentityProvider. + :type refresh_token_url: str + + :param relay_idp_param_mappings: + The value to assign to the relay_idp_param_mappings property of this SocialIdentityProvider. + :type relay_idp_param_mappings: list[oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings] + + """ + self.swagger_types = { + 'id': 'str', + 'ocid': 'str', + 'schemas': 'list[str]', + 'meta': 'Meta', + 'idcs_created_by': 'IdcsCreatedBy', + 'idcs_last_modified_by': 'IdcsLastModifiedBy', + 'idcs_prevented_operations': 'list[str]', + 'tags': 'list[Tags]', + 'delete_in_progress': 'bool', + 'idcs_last_upgraded_in_release': 'str', + 'domain_ocid': 'str', + 'compartment_ocid': 'str', + 'tenancy_ocid': 'str', + 'name': 'str', + 'description': 'str', + 'enabled': 'bool', + 'account_linking_enabled': 'bool', + 'social_jit_provisioning_enabled': 'bool', + 'jit_prov_group_static_list_enabled': 'bool', + 'jit_prov_assigned_groups': 'list[SocialIdentityProviderJitProvAssignedGroups]', + 'registration_enabled': 'bool', + 'auto_redirect_enabled': 'bool', + 'show_on_login': 'bool', + 'status': 'str', + 'id_attribute': 'str', + 'authz_url': 'str', + 'access_token_url': 'str', + 'profile_url': 'str', + 'scope': 'list[str]', + 'admin_scope': 'list[str]', + 'consumer_key': 'str', + 'consumer_secret': 'str', + 'service_provider_name': 'str', + 'clock_skew_in_seconds': 'int', + 'redirect_url': 'str', + 'icon_url': 'str', + 'discovery_url': 'str', + 'client_credential_in_payload': 'bool', + 'refresh_token_url': 'str', + 'relay_idp_param_mappings': 'list[SocialIdentityProviderRelayIdpParamMappings]' + } + + self.attribute_map = { + 'id': 'id', + 'ocid': 'ocid', + 'schemas': 'schemas', + 'meta': 'meta', + 'idcs_created_by': 'idcsCreatedBy', + 'idcs_last_modified_by': 'idcsLastModifiedBy', + 'idcs_prevented_operations': 'idcsPreventedOperations', + 'tags': 'tags', + 'delete_in_progress': 'deleteInProgress', + 'idcs_last_upgraded_in_release': 'idcsLastUpgradedInRelease', + 'domain_ocid': 'domainOcid', + 'compartment_ocid': 'compartmentOcid', + 'tenancy_ocid': 'tenancyOcid', + 'name': 'name', + 'description': 'description', + 'enabled': 'enabled', + 'account_linking_enabled': 'accountLinkingEnabled', + 'social_jit_provisioning_enabled': 'socialJitProvisioningEnabled', + 'jit_prov_group_static_list_enabled': 'jitProvGroupStaticListEnabled', + 'jit_prov_assigned_groups': 'jitProvAssignedGroups', + 'registration_enabled': 'registrationEnabled', + 'auto_redirect_enabled': 'autoRedirectEnabled', + 'show_on_login': 'showOnLogin', + 'status': 'status', + 'id_attribute': 'idAttribute', + 'authz_url': 'authzUrl', + 'access_token_url': 'accessTokenUrl', + 'profile_url': 'profileUrl', + 'scope': 'scope', + 'admin_scope': 'adminScope', + 'consumer_key': 'consumerKey', + 'consumer_secret': 'consumerSecret', + 'service_provider_name': 'serviceProviderName', + 'clock_skew_in_seconds': 'clockSkewInSeconds', + 'redirect_url': 'redirectUrl', + 'icon_url': 'iconUrl', + 'discovery_url': 'discoveryUrl', + 'client_credential_in_payload': 'clientCredentialInPayload', + 'refresh_token_url': 'refreshTokenUrl', + 'relay_idp_param_mappings': 'relayIdpParamMappings' + } + + self._id = None + self._ocid = None + self._schemas = None + self._meta = None + self._idcs_created_by = None + self._idcs_last_modified_by = None + self._idcs_prevented_operations = None + self._tags = None + self._delete_in_progress = None + self._idcs_last_upgraded_in_release = None + self._domain_ocid = None + self._compartment_ocid = None + self._tenancy_ocid = None + self._name = None + self._description = None + self._enabled = None + self._account_linking_enabled = None + self._social_jit_provisioning_enabled = None + self._jit_prov_group_static_list_enabled = None + self._jit_prov_assigned_groups = None + self._registration_enabled = None + self._auto_redirect_enabled = None + self._show_on_login = None + self._status = None + self._id_attribute = None + self._authz_url = None + self._access_token_url = None + self._profile_url = None + self._scope = None + self._admin_scope = None + self._consumer_key = None + self._consumer_secret = None + self._service_provider_name = None + self._clock_skew_in_seconds = None + self._redirect_url = None + self._icon_url = None + self._discovery_url = None + self._client_credential_in_payload = None + self._refresh_token_url = None + self._relay_idp_param_mappings = None + + @property + def id(self): + """ + Gets the id of this SocialIdentityProvider. + Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: always + - type: string + - uniqueness: global + + + :return: The id of this SocialIdentityProvider. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SocialIdentityProvider. + Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: always + - type: string + - uniqueness: global + + + :param id: The id of this SocialIdentityProvider. + :type: str + """ + self._id = id + + @property + def ocid(self): + """ + Gets the ocid of this SocialIdentityProvider. + Unique OCI identifier for the SCIM Resource. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: global + + + :return: The ocid of this SocialIdentityProvider. + :rtype: str + """ + return self._ocid + + @ocid.setter + def ocid(self, ocid): + """ + Sets the ocid of this SocialIdentityProvider. + Unique OCI identifier for the SCIM Resource. + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: global + + + :param ocid: The ocid of this SocialIdentityProvider. + :type: str + """ + self._ocid = ocid + + @property + def schemas(self): + """ + **[Required]** Gets the schemas of this SocialIdentityProvider. + REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\\"enterprise\\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The schemas of this SocialIdentityProvider. + :rtype: list[str] + """ + return self._schemas + + @schemas.setter + def schemas(self, schemas): + """ + Sets the schemas of this SocialIdentityProvider. + REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \\\"enterprise\\\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param schemas: The schemas of this SocialIdentityProvider. + :type: list[str] + """ + self._schemas = schemas + + @property + def meta(self): + """ + Gets the meta of this SocialIdentityProvider. + + :return: The meta of this SocialIdentityProvider. + :rtype: oci.identity_domains.models.Meta + """ + return self._meta + + @meta.setter + def meta(self, meta): + """ + Sets the meta of this SocialIdentityProvider. + + :param meta: The meta of this SocialIdentityProvider. + :type: oci.identity_domains.models.Meta + """ + self._meta = meta + + @property + def idcs_created_by(self): + """ + Gets the idcs_created_by of this SocialIdentityProvider. + + :return: The idcs_created_by of this SocialIdentityProvider. + :rtype: oci.identity_domains.models.IdcsCreatedBy + """ + return self._idcs_created_by + + @idcs_created_by.setter + def idcs_created_by(self, idcs_created_by): + """ + Sets the idcs_created_by of this SocialIdentityProvider. + + :param idcs_created_by: The idcs_created_by of this SocialIdentityProvider. + :type: oci.identity_domains.models.IdcsCreatedBy + """ + self._idcs_created_by = idcs_created_by + + @property + def idcs_last_modified_by(self): + """ + Gets the idcs_last_modified_by of this SocialIdentityProvider. + + :return: The idcs_last_modified_by of this SocialIdentityProvider. + :rtype: oci.identity_domains.models.IdcsLastModifiedBy + """ + return self._idcs_last_modified_by + + @idcs_last_modified_by.setter + def idcs_last_modified_by(self, idcs_last_modified_by): + """ + Sets the idcs_last_modified_by of this SocialIdentityProvider. + + :param idcs_last_modified_by: The idcs_last_modified_by of this SocialIdentityProvider. + :type: oci.identity_domains.models.IdcsLastModifiedBy + """ + self._idcs_last_modified_by = idcs_last_modified_by + + @property + def idcs_prevented_operations(self): + """ + Gets the idcs_prevented_operations of this SocialIdentityProvider. + Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + Allowed values for items in this list are: "replace", "update", "delete", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The idcs_prevented_operations of this SocialIdentityProvider. + :rtype: list[str] + """ + return self._idcs_prevented_operations + + @idcs_prevented_operations.setter + def idcs_prevented_operations(self, idcs_prevented_operations): + """ + Sets the idcs_prevented_operations of this SocialIdentityProvider. + Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: true + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :param idcs_prevented_operations: The idcs_prevented_operations of this SocialIdentityProvider. + :type: list[str] + """ + allowed_values = ["replace", "update", "delete"] + if idcs_prevented_operations: + idcs_prevented_operations[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in idcs_prevented_operations] + self._idcs_prevented_operations = idcs_prevented_operations + + @property + def tags(self): + """ + Gets the tags of this SocialIdentityProvider. + A list of tags on this resource. + + **SCIM++ Properties:** + - idcsCompositeKey: [key, value] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: request + - type: complex + - uniqueness: none + + + :return: The tags of this SocialIdentityProvider. + :rtype: list[oci.identity_domains.models.Tags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """ + Sets the tags of this SocialIdentityProvider. + A list of tags on this resource. + + **SCIM++ Properties:** + - idcsCompositeKey: [key, value] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: request + - type: complex + - uniqueness: none + + + :param tags: The tags of this SocialIdentityProvider. + :type: list[oci.identity_domains.models.Tags] + """ + self._tags = tags + + @property + def delete_in_progress(self): + """ + Gets the delete_in_progress of this SocialIdentityProvider. + A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The delete_in_progress of this SocialIdentityProvider. + :rtype: bool + """ + return self._delete_in_progress + + @delete_in_progress.setter + def delete_in_progress(self, delete_in_progress): + """ + Sets the delete_in_progress of this SocialIdentityProvider. + A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param delete_in_progress: The delete_in_progress of this SocialIdentityProvider. + :type: bool + """ + self._delete_in_progress = delete_in_progress + + @property + def idcs_last_upgraded_in_release(self): + """ + Gets the idcs_last_upgraded_in_release of this SocialIdentityProvider. + The release number when the resource was upgraded. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :return: The idcs_last_upgraded_in_release of this SocialIdentityProvider. + :rtype: str + """ + return self._idcs_last_upgraded_in_release + + @idcs_last_upgraded_in_release.setter + def idcs_last_upgraded_in_release(self, idcs_last_upgraded_in_release): + """ + Sets the idcs_last_upgraded_in_release of this SocialIdentityProvider. + The release number when the resource was upgraded. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :param idcs_last_upgraded_in_release: The idcs_last_upgraded_in_release of this SocialIdentityProvider. + :type: str + """ + self._idcs_last_upgraded_in_release = idcs_last_upgraded_in_release + + @property + def domain_ocid(self): + """ + Gets the domain_ocid of this SocialIdentityProvider. + OCI Domain Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The domain_ocid of this SocialIdentityProvider. + :rtype: str + """ + return self._domain_ocid + + @domain_ocid.setter + def domain_ocid(self, domain_ocid): + """ + Sets the domain_ocid of this SocialIdentityProvider. + OCI Domain Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param domain_ocid: The domain_ocid of this SocialIdentityProvider. + :type: str + """ + self._domain_ocid = domain_ocid + + @property + def compartment_ocid(self): + """ + Gets the compartment_ocid of this SocialIdentityProvider. + OCI Compartment Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The compartment_ocid of this SocialIdentityProvider. + :rtype: str + """ + return self._compartment_ocid + + @compartment_ocid.setter + def compartment_ocid(self, compartment_ocid): + """ + Sets the compartment_ocid of this SocialIdentityProvider. + OCI Compartment Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param compartment_ocid: The compartment_ocid of this SocialIdentityProvider. + :type: str + """ + self._compartment_ocid = compartment_ocid + + @property + def tenancy_ocid(self): + """ + Gets the tenancy_ocid of this SocialIdentityProvider. + OCI Tenant Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The tenancy_ocid of this SocialIdentityProvider. + :rtype: str + """ + return self._tenancy_ocid + + @tenancy_ocid.setter + def tenancy_ocid(self, tenancy_ocid): + """ + Sets the tenancy_ocid of this SocialIdentityProvider. + OCI Tenant Id (ocid) in which the resource lives. + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param tenancy_ocid: The tenancy_ocid of this SocialIdentityProvider. + :type: str + """ + self._tenancy_ocid = tenancy_ocid + + @property + def name(self): + """ + **[Required]** Gets the name of this SocialIdentityProvider. + Social provider name + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: always + - type: string + - uniqueness: global + + + :return: The name of this SocialIdentityProvider. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this SocialIdentityProvider. + Social provider name + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: always + - type: string + - uniqueness: global + + + :param name: The name of this SocialIdentityProvider. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this SocialIdentityProvider. + Social IDP description + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The description of this SocialIdentityProvider. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SocialIdentityProvider. + Social IDP description + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param description: The description of this SocialIdentityProvider. + :type: str + """ + self._description = description + + @property + def enabled(self): + """ + **[Required]** Gets the enabled of this SocialIdentityProvider. + Whether the IDP is enabled or not + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :return: The enabled of this SocialIdentityProvider. + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """ + Sets the enabled of this SocialIdentityProvider. + Whether the IDP is enabled or not + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :param enabled: The enabled of this SocialIdentityProvider. + :type: bool + """ + self._enabled = enabled + + @property + def account_linking_enabled(self): + """ + **[Required]** Gets the account_linking_enabled of this SocialIdentityProvider. + Whether account linking is enabled + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :return: The account_linking_enabled of this SocialIdentityProvider. + :rtype: bool + """ + return self._account_linking_enabled + + @account_linking_enabled.setter + def account_linking_enabled(self, account_linking_enabled): + """ + Sets the account_linking_enabled of this SocialIdentityProvider. + Whether account linking is enabled + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :param account_linking_enabled: The account_linking_enabled of this SocialIdentityProvider. + :type: bool + """ + self._account_linking_enabled = account_linking_enabled + + @property + def social_jit_provisioning_enabled(self): + """ + Gets the social_jit_provisioning_enabled of this SocialIdentityProvider. + Whether Social JIT Provisioning is enabled + + **Added In:** 2307282043 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The social_jit_provisioning_enabled of this SocialIdentityProvider. + :rtype: bool + """ + return self._social_jit_provisioning_enabled + + @social_jit_provisioning_enabled.setter + def social_jit_provisioning_enabled(self, social_jit_provisioning_enabled): + """ + Sets the social_jit_provisioning_enabled of this SocialIdentityProvider. + Whether Social JIT Provisioning is enabled + + **Added In:** 2307282043 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param social_jit_provisioning_enabled: The social_jit_provisioning_enabled of this SocialIdentityProvider. + :type: bool + """ + self._social_jit_provisioning_enabled = social_jit_provisioning_enabled + + @property + def jit_prov_group_static_list_enabled(self): + """ + Gets the jit_prov_group_static_list_enabled of this SocialIdentityProvider. + Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The jit_prov_group_static_list_enabled of this SocialIdentityProvider. + :rtype: bool + """ + return self._jit_prov_group_static_list_enabled + + @jit_prov_group_static_list_enabled.setter + def jit_prov_group_static_list_enabled(self, jit_prov_group_static_list_enabled): + """ + Sets the jit_prov_group_static_list_enabled of this SocialIdentityProvider. + Set to true to indicate Social JIT User Provisioning Groups should be assigned from a static list + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - caseExact: false + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param jit_prov_group_static_list_enabled: The jit_prov_group_static_list_enabled of this SocialIdentityProvider. + :type: bool + """ + self._jit_prov_group_static_list_enabled = jit_prov_group_static_list_enabled + + @property + def jit_prov_assigned_groups(self): + """ + Gets the jit_prov_assigned_groups of this SocialIdentityProvider. + Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - idcsCompositeKey: [value] + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: complex + - uniqueness: none + + + :return: The jit_prov_assigned_groups of this SocialIdentityProvider. + :rtype: list[oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups] + """ + return self._jit_prov_assigned_groups + + @jit_prov_assigned_groups.setter + def jit_prov_assigned_groups(self, jit_prov_assigned_groups): + """ + Sets the jit_prov_assigned_groups of this SocialIdentityProvider. + Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - idcsCompositeKey: [value] + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: complex + - uniqueness: none + + + :param jit_prov_assigned_groups: The jit_prov_assigned_groups of this SocialIdentityProvider. + :type: list[oci.identity_domains.models.SocialIdentityProviderJitProvAssignedGroups] + """ + self._jit_prov_assigned_groups = jit_prov_assigned_groups + + @property + def registration_enabled(self): + """ + **[Required]** Gets the registration_enabled of this SocialIdentityProvider. + Whether registration is enabled + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :return: The registration_enabled of this SocialIdentityProvider. + :rtype: bool + """ + return self._registration_enabled + + @registration_enabled.setter + def registration_enabled(self, registration_enabled): + """ + Sets the registration_enabled of this SocialIdentityProvider. + Whether registration is enabled + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :param registration_enabled: The registration_enabled of this SocialIdentityProvider. + :type: bool + """ + self._registration_enabled = registration_enabled + + @property + def auto_redirect_enabled(self): + """ + Gets the auto_redirect_enabled of this SocialIdentityProvider. + Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The auto_redirect_enabled of this SocialIdentityProvider. + :rtype: bool + """ + return self._auto_redirect_enabled + + @auto_redirect_enabled.setter + def auto_redirect_enabled(self, auto_redirect_enabled): + """ + Sets the auto_redirect_enabled of this SocialIdentityProvider. + Whether social auto redirect is enabled. The IDP policy should be configured with only one Social IDP, and without username/password selected. + + **Added In:** 2310202314 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param auto_redirect_enabled: The auto_redirect_enabled of this SocialIdentityProvider. + :type: bool + """ + self._auto_redirect_enabled = auto_redirect_enabled + + @property + def show_on_login(self): + """ + **[Required]** Gets the show_on_login of this SocialIdentityProvider. + Whether show on login + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :return: The show_on_login of this SocialIdentityProvider. + :rtype: bool + """ + return self._show_on_login + + @show_on_login.setter + def show_on_login(self, show_on_login): + """ + Sets the show_on_login of this SocialIdentityProvider. + Whether show on login + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: boolean + - uniqueness: none + + + :param show_on_login: The show_on_login of this SocialIdentityProvider. + :type: bool + """ + self._show_on_login = show_on_login + + @property + def status(self): + """ + Gets the status of this SocialIdentityProvider. + Status + + **Added In:** 17.4.6 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + Allowed values for this property are: "created", "deleted", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this SocialIdentityProvider. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this SocialIdentityProvider. + Status + + **Added In:** 17.4.6 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param status: The status of this SocialIdentityProvider. + :type: str + """ + allowed_values = ["created", "deleted"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def id_attribute(self): + """ + Gets the id_attribute of this SocialIdentityProvider. + Id attribute used for account linking + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The id_attribute of this SocialIdentityProvider. + :rtype: str + """ + return self._id_attribute + + @id_attribute.setter + def id_attribute(self, id_attribute): + """ + Sets the id_attribute of this SocialIdentityProvider. + Id attribute used for account linking + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: immutable + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param id_attribute: The id_attribute of this SocialIdentityProvider. + :type: str + """ + self._id_attribute = id_attribute + + @property + def authz_url(self): + """ + Gets the authz_url of this SocialIdentityProvider. + Social IDP Authorization URL + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The authz_url of this SocialIdentityProvider. + :rtype: str + """ + return self._authz_url + + @authz_url.setter + def authz_url(self, authz_url): + """ + Sets the authz_url of this SocialIdentityProvider. + Social IDP Authorization URL + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param authz_url: The authz_url of this SocialIdentityProvider. + :type: str + """ + self._authz_url = authz_url + + @property + def access_token_url(self): + """ + Gets the access_token_url of this SocialIdentityProvider. + Social IDP Access token URL + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The access_token_url of this SocialIdentityProvider. + :rtype: str + """ + return self._access_token_url + + @access_token_url.setter + def access_token_url(self, access_token_url): + """ + Sets the access_token_url of this SocialIdentityProvider. + Social IDP Access token URL + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param access_token_url: The access_token_url of this SocialIdentityProvider. + :type: str + """ + self._access_token_url = access_token_url + + @property + def profile_url(self): + """ + Gets the profile_url of this SocialIdentityProvider. + Social IDP User profile URL + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The profile_url of this SocialIdentityProvider. + :rtype: str + """ + return self._profile_url + + @profile_url.setter + def profile_url(self, profile_url): + """ + Sets the profile_url of this SocialIdentityProvider. + Social IDP User profile URL + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param profile_url: The profile_url of this SocialIdentityProvider. + :type: str + """ + self._profile_url = profile_url + + @property + def scope(self): + """ + Gets the scope of this SocialIdentityProvider. + Scope to request + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The scope of this SocialIdentityProvider. + :rtype: list[str] + """ + return self._scope + + @scope.setter + def scope(self, scope): + """ + Sets the scope of this SocialIdentityProvider. + Scope to request + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param scope: The scope of this SocialIdentityProvider. + :type: list[str] + """ + self._scope = scope + + @property + def admin_scope(self): + """ + Gets the admin_scope of this SocialIdentityProvider. + Admin scope to request + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The admin_scope of this SocialIdentityProvider. + :rtype: list[str] + """ + return self._admin_scope + + @admin_scope.setter + def admin_scope(self, admin_scope): + """ + Sets the admin_scope of this SocialIdentityProvider. + Admin scope to request + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param admin_scope: The admin_scope of this SocialIdentityProvider. + :type: list[str] + """ + self._admin_scope = admin_scope + + @property + def consumer_key(self): + """ + **[Required]** Gets the consumer_key of this SocialIdentityProvider. + Social IDP Client Application Client ID + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The consumer_key of this SocialIdentityProvider. + :rtype: str + """ + return self._consumer_key + + @consumer_key.setter + def consumer_key(self, consumer_key): + """ + Sets the consumer_key of this SocialIdentityProvider. + Social IDP Client Application Client ID + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param consumer_key: The consumer_key of this SocialIdentityProvider. + :type: str + """ + self._consumer_key = consumer_key + + @property + def consumer_secret(self): + """ + **[Required]** Gets the consumer_secret of this SocialIdentityProvider. + Social IDP Client Application Client Secret + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - idcsSensitive: encrypt + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The consumer_secret of this SocialIdentityProvider. + :rtype: str + """ + return self._consumer_secret + + @consumer_secret.setter + def consumer_secret(self, consumer_secret): + """ + Sets the consumer_secret of this SocialIdentityProvider. + Social IDP Client Application Client Secret + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - idcsSensitive: encrypt + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param consumer_secret: The consumer_secret of this SocialIdentityProvider. + :type: str + """ + self._consumer_secret = consumer_secret + + @property + def service_provider_name(self): + """ + **[Required]** Gets the service_provider_name of this SocialIdentityProvider. + Service Provider Name + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The service_provider_name of this SocialIdentityProvider. + :rtype: str + """ + return self._service_provider_name + + @service_provider_name.setter + def service_provider_name(self, service_provider_name): + """ + Sets the service_provider_name of this SocialIdentityProvider. + Service Provider Name + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: immutable + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param service_provider_name: The service_provider_name of this SocialIdentityProvider. + :type: str + """ + self._service_provider_name = service_provider_name + + @property + def clock_skew_in_seconds(self): + """ + Gets the clock_skew_in_seconds of this SocialIdentityProvider. + Social IDP allowed clock skew time + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: integer + - uniqueness: none + + + :return: The clock_skew_in_seconds of this SocialIdentityProvider. + :rtype: int + """ + return self._clock_skew_in_seconds + + @clock_skew_in_seconds.setter + def clock_skew_in_seconds(self, clock_skew_in_seconds): + """ + Sets the clock_skew_in_seconds of this SocialIdentityProvider. + Social IDP allowed clock skew time + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: integer + - uniqueness: none + + + :param clock_skew_in_seconds: The clock_skew_in_seconds of this SocialIdentityProvider. + :type: int + """ + self._clock_skew_in_seconds = clock_skew_in_seconds + + @property + def redirect_url(self): + """ + Gets the redirect_url of this SocialIdentityProvider. + redirect URL for social idp + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The redirect_url of this SocialIdentityProvider. + :rtype: str + """ + return self._redirect_url + + @redirect_url.setter + def redirect_url(self, redirect_url): + """ + Sets the redirect_url of this SocialIdentityProvider. + redirect URL for social idp + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param redirect_url: The redirect_url of this SocialIdentityProvider. + :type: str + """ + self._redirect_url = redirect_url + + @property + def icon_url(self): + """ + Gets the icon_url of this SocialIdentityProvider. + ICON URL for social idp + + **Added In:** 17.4.6 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The icon_url of this SocialIdentityProvider. + :rtype: str + """ + return self._icon_url + + @icon_url.setter + def icon_url(self, icon_url): + """ + Sets the icon_url of this SocialIdentityProvider. + ICON URL for social idp + + **Added In:** 17.4.6 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param icon_url: The icon_url of this SocialIdentityProvider. + :type: str + """ + self._icon_url = icon_url + + @property + def discovery_url(self): + """ + Gets the discovery_url of this SocialIdentityProvider. + Discovery URL + + **Added In:** 17.4.6 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The discovery_url of this SocialIdentityProvider. + :rtype: str + """ + return self._discovery_url + + @discovery_url.setter + def discovery_url(self, discovery_url): + """ + Sets the discovery_url of this SocialIdentityProvider. + Discovery URL + + **Added In:** 17.4.6 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param discovery_url: The discovery_url of this SocialIdentityProvider. + :type: str + """ + self._discovery_url = discovery_url + + @property + def client_credential_in_payload(self): + """ + Gets the client_credential_in_payload of this SocialIdentityProvider. + Whether the client credential is contained in payload + + **Added In:** 18.4.2 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :return: The client_credential_in_payload of this SocialIdentityProvider. + :rtype: bool + """ + return self._client_credential_in_payload + + @client_credential_in_payload.setter + def client_credential_in_payload(self, client_credential_in_payload): + """ + Sets the client_credential_in_payload of this SocialIdentityProvider. + Whether the client credential is contained in payload + + **Added In:** 18.4.2 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: boolean + - uniqueness: none + + + :param client_credential_in_payload: The client_credential_in_payload of this SocialIdentityProvider. + :type: bool + """ + self._client_credential_in_payload = client_credential_in_payload + + @property + def refresh_token_url(self): + """ + Gets the refresh_token_url of this SocialIdentityProvider. + Social IDP Refresh token URL + + **Added In:** 19.1.4 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The refresh_token_url of this SocialIdentityProvider. + :rtype: str + """ + return self._refresh_token_url + + @refresh_token_url.setter + def refresh_token_url(self, refresh_token_url): + """ + Sets the refresh_token_url of this SocialIdentityProvider. + Social IDP Refresh token URL + + **Added In:** 19.1.4 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param refresh_token_url: The refresh_token_url of this SocialIdentityProvider. + :type: str + """ + self._refresh_token_url = refresh_token_url + + @property + def relay_idp_param_mappings(self): + """ + Gets the relay_idp_param_mappings of this SocialIdentityProvider. + Relay Param variable for Social IDP + + **Added In:** 2305190132 + + **SCIM++ Properties:** + - idcsCompositeKey: [relayParamKey] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: complex + - uniqueness: none + + + :return: The relay_idp_param_mappings of this SocialIdentityProvider. + :rtype: list[oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings] + """ + return self._relay_idp_param_mappings + + @relay_idp_param_mappings.setter + def relay_idp_param_mappings(self, relay_idp_param_mappings): + """ + Sets the relay_idp_param_mappings of this SocialIdentityProvider. + Relay Param variable for Social IDP + + **Added In:** 2305190132 + + **SCIM++ Properties:** + - idcsCompositeKey: [relayParamKey] + - idcsSearchable: true + - multiValued: true + - mutability: readWrite + - required: false + - returned: default + - type: complex + - uniqueness: none + + + :param relay_idp_param_mappings: The relay_idp_param_mappings of this SocialIdentityProvider. + :type: list[oci.identity_domains.models.SocialIdentityProviderRelayIdpParamMappings] + """ + self._relay_idp_param_mappings = relay_idp_param_mappings + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/social_identity_provider_jit_prov_assigned_groups.py b/src/oci/identity_domains/models/social_identity_provider_jit_prov_assigned_groups.py new file mode 100644 index 0000000000..36ae7de8cb --- /dev/null +++ b/src/oci/identity_domains/models/social_identity_provider_jit_prov_assigned_groups.py @@ -0,0 +1,202 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SocialIdentityProviderJitProvAssignedGroups(object): + """ + Lists the groups each social JIT-provisioned user is a member. Just-in-Time user-provisioning applies this static list when jitProvGroupStaticListEnabled:true. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SocialIdentityProviderJitProvAssignedGroups object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value: + The value to assign to the value property of this SocialIdentityProviderJitProvAssignedGroups. + :type value: str + + :param ref: + The value to assign to the ref property of this SocialIdentityProviderJitProvAssignedGroups. + :type ref: str + + :param display: + The value to assign to the display property of this SocialIdentityProviderJitProvAssignedGroups. + :type display: str + + """ + self.swagger_types = { + 'value': 'str', + 'ref': 'str', + 'display': 'str' + } + + self.attribute_map = { + 'value': 'value', + 'ref': '$ref', + 'display': 'display' + } + + self._value = None + self._ref = None + self._display = None + + @property + def value(self): + """ + **[Required]** Gets the value of this SocialIdentityProviderJitProvAssignedGroups. + Group identifier + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The value of this SocialIdentityProviderJitProvAssignedGroups. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this SocialIdentityProviderJitProvAssignedGroups. + Group identifier + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - caseExact: true + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param value: The value of this SocialIdentityProviderJitProvAssignedGroups. + :type: str + """ + self._value = value + + @property + def ref(self): + """ + Gets the ref of this SocialIdentityProviderJitProvAssignedGroups. + Group URI + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: reference + - uniqueness: none + + + :return: The ref of this SocialIdentityProviderJitProvAssignedGroups. + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """ + Sets the ref of this SocialIdentityProviderJitProvAssignedGroups. + Group URI + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: default + - type: reference + - uniqueness: none + + + :param ref: The ref of this SocialIdentityProviderJitProvAssignedGroups. + :type: str + """ + self._ref = ref + + @property + def display(self): + """ + Gets the display of this SocialIdentityProviderJitProvAssignedGroups. + A human readable name, primarily used for display purposes. READ-ONLY. + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :return: The display of this SocialIdentityProviderJitProvAssignedGroups. + :rtype: str + """ + return self._display + + @display.setter + def display(self, display): + """ + Sets the display of this SocialIdentityProviderJitProvAssignedGroups. + A human readable name, primarily used for display purposes. READ-ONLY. + + **Added In:** 2309290043 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readOnly + - required: false + - returned: request + - type: string + - uniqueness: none + + + :param display: The display of this SocialIdentityProviderJitProvAssignedGroups. + :type: str + """ + self._display = display + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/social_identity_provider_relay_idp_param_mappings.py b/src/oci/identity_domains/models/social_identity_provider_relay_idp_param_mappings.py new file mode 100644 index 0000000000..7b82d845f5 --- /dev/null +++ b/src/oci/identity_domains/models/social_identity_provider_relay_idp_param_mappings.py @@ -0,0 +1,147 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SocialIdentityProviderRelayIdpParamMappings(object): + """ + Relay Param variable for Social IDP + """ + + def __init__(self, **kwargs): + """ + Initializes a new SocialIdentityProviderRelayIdpParamMappings object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param relay_param_key: + The value to assign to the relay_param_key property of this SocialIdentityProviderRelayIdpParamMappings. + :type relay_param_key: str + + :param relay_param_value: + The value to assign to the relay_param_value property of this SocialIdentityProviderRelayIdpParamMappings. + :type relay_param_value: str + + """ + self.swagger_types = { + 'relay_param_key': 'str', + 'relay_param_value': 'str' + } + + self.attribute_map = { + 'relay_param_key': 'relayParamKey', + 'relay_param_value': 'relayParamValue' + } + + self._relay_param_key = None + self._relay_param_value = None + + @property + def relay_param_key(self): + """ + **[Required]** Gets the relay_param_key of this SocialIdentityProviderRelayIdpParamMappings. + Key or name of the relayParam. + + **Added In:** 2305190132 + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :return: The relay_param_key of this SocialIdentityProviderRelayIdpParamMappings. + :rtype: str + """ + return self._relay_param_key + + @relay_param_key.setter + def relay_param_key(self, relay_param_key): + """ + Sets the relay_param_key of this SocialIdentityProviderRelayIdpParamMappings. + Key or name of the relayParam. + + **Added In:** 2305190132 + + **SCIM++ Properties:** + - idcsSearchable: true + - multiValued: false + - mutability: readWrite + - required: true + - returned: default + - type: string + - uniqueness: none + + + :param relay_param_key: The relay_param_key of this SocialIdentityProviderRelayIdpParamMappings. + :type: str + """ + self._relay_param_key = relay_param_key + + @property + def relay_param_value(self): + """ + Gets the relay_param_value of this SocialIdentityProviderRelayIdpParamMappings. + Value of the relayParam (if defined) + + **Added In:** 2305190132 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :return: The relay_param_value of this SocialIdentityProviderRelayIdpParamMappings. + :rtype: str + """ + return self._relay_param_value + + @relay_param_value.setter + def relay_param_value(self, relay_param_value): + """ + Sets the relay_param_value of this SocialIdentityProviderRelayIdpParamMappings. + Value of the relayParam (if defined) + + **Added In:** 2305190132 + + **SCIM++ Properties:** + - idcsSearchable: false + - multiValued: false + - mutability: readWrite + - required: false + - returned: default + - type: string + - uniqueness: none + + + :param relay_param_value: The relay_param_value of this SocialIdentityProviderRelayIdpParamMappings. + :type: str + """ + self._relay_param_value = relay_param_value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/social_identity_provider_search_request.py b/src/oci/identity_domains/models/social_identity_provider_search_request.py new file mode 100644 index 0000000000..c969468c0e --- /dev/null +++ b/src/oci/identity_domains/models/social_identity_provider_search_request.py @@ -0,0 +1,364 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SocialIdentityProviderSearchRequest(object): + """ + Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. + """ + + #: A constant which can be used with the attribute_sets property of a SocialIdentityProviderSearchRequest. + #: This constant has a value of "all" + ATTRIBUTE_SETS_ALL = "all" + + #: A constant which can be used with the attribute_sets property of a SocialIdentityProviderSearchRequest. + #: This constant has a value of "always" + ATTRIBUTE_SETS_ALWAYS = "always" + + #: A constant which can be used with the attribute_sets property of a SocialIdentityProviderSearchRequest. + #: This constant has a value of "never" + ATTRIBUTE_SETS_NEVER = "never" + + #: A constant which can be used with the attribute_sets property of a SocialIdentityProviderSearchRequest. + #: This constant has a value of "request" + ATTRIBUTE_SETS_REQUEST = "request" + + #: A constant which can be used with the attribute_sets property of a SocialIdentityProviderSearchRequest. + #: This constant has a value of "default" + ATTRIBUTE_SETS_DEFAULT = "default" + + #: A constant which can be used with the sort_order property of a SocialIdentityProviderSearchRequest. + #: This constant has a value of "ASCENDING" + SORT_ORDER_ASCENDING = "ASCENDING" + + #: A constant which can be used with the sort_order property of a SocialIdentityProviderSearchRequest. + #: This constant has a value of "DESCENDING" + SORT_ORDER_DESCENDING = "DESCENDING" + + def __init__(self, **kwargs): + """ + Initializes a new SocialIdentityProviderSearchRequest object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param schemas: + The value to assign to the schemas property of this SocialIdentityProviderSearchRequest. + :type schemas: list[str] + + :param attributes: + The value to assign to the attributes property of this SocialIdentityProviderSearchRequest. + :type attributes: list[str] + + :param attribute_sets: + The value to assign to the attribute_sets property of this SocialIdentityProviderSearchRequest. + Allowed values for items in this list are: "all", "always", "never", "request", "default" + :type attribute_sets: list[str] + + :param filter: + The value to assign to the filter property of this SocialIdentityProviderSearchRequest. + :type filter: str + + :param sort_by: + The value to assign to the sort_by property of this SocialIdentityProviderSearchRequest. + :type sort_by: str + + :param sort_order: + The value to assign to the sort_order property of this SocialIdentityProviderSearchRequest. + Allowed values for this property are: "ASCENDING", "DESCENDING" + :type sort_order: str + + :param start_index: + The value to assign to the start_index property of this SocialIdentityProviderSearchRequest. + :type start_index: int + + :param count: + The value to assign to the count property of this SocialIdentityProviderSearchRequest. + :type count: int + + """ + self.swagger_types = { + 'schemas': 'list[str]', + 'attributes': 'list[str]', + 'attribute_sets': 'list[str]', + 'filter': 'str', + 'sort_by': 'str', + 'sort_order': 'str', + 'start_index': 'int', + 'count': 'int' + } + + self.attribute_map = { + 'schemas': 'schemas', + 'attributes': 'attributes', + 'attribute_sets': 'attributeSets', + 'filter': 'filter', + 'sort_by': 'sortBy', + 'sort_order': 'sortOrder', + 'start_index': 'startIndex', + 'count': 'count' + } + + self._schemas = None + self._attributes = None + self._attribute_sets = None + self._filter = None + self._sort_by = None + self._sort_order = None + self._start_index = None + self._count = None + + @property + def schemas(self): + """ + **[Required]** Gets the schemas of this SocialIdentityProviderSearchRequest. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: \"urn:ietf:params:scim:api:messages:2.0:SearchRequest\" REQUIRED. + + + :return: The schemas of this SocialIdentityProviderSearchRequest. + :rtype: list[str] + """ + return self._schemas + + @schemas.setter + def schemas(self, schemas): + """ + Sets the schemas of this SocialIdentityProviderSearchRequest. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: \"urn:ietf:params:scim:api:messages:2.0:SearchRequest\" REQUIRED. + + + :param schemas: The schemas of this SocialIdentityProviderSearchRequest. + :type: list[str] + """ + self._schemas = schemas + + @property + def attributes(self): + """ + Gets the attributes of this SocialIdentityProviderSearchRequest. + A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (`Section 3.10`__) form. See (`additional retrieval query parameters`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9 + + + :return: The attributes of this SocialIdentityProviderSearchRequest. + :rtype: list[str] + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """ + Sets the attributes of this SocialIdentityProviderSearchRequest. + A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (`Section 3.10`__) form. See (`additional retrieval query parameters`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9 + + + :param attributes: The attributes of this SocialIdentityProviderSearchRequest. + :type: list[str] + """ + self._attributes = attributes + + @property + def attribute_sets(self): + """ + Gets the attribute_sets of this SocialIdentityProviderSearchRequest. + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If \"attributes\" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + + Allowed values for items in this list are: "all", "always", "never", "request", "default" + + + :return: The attribute_sets of this SocialIdentityProviderSearchRequest. + :rtype: list[str] + """ + return self._attribute_sets + + @attribute_sets.setter + def attribute_sets(self, attribute_sets): + """ + Sets the attribute_sets of this SocialIdentityProviderSearchRequest. + A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If \"attributes\" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + + + :param attribute_sets: The attribute_sets of this SocialIdentityProviderSearchRequest. + :type: list[str] + """ + allowed_values = ["all", "always", "never", "request", "default"] + + if attribute_sets and attribute_sets is not NONE_SENTINEL: + for value in attribute_sets: + if not value_allowed_none_or_none_sentinel(value, allowed_values): + raise ValueError( + f"Invalid value for `attribute_sets`, must be None or one of {allowed_values}" + ) + self._attribute_sets = attribute_sets + + @property + def filter(self): + """ + Gets the filter of this SocialIdentityProviderSearchRequest. + The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See `Section 3.4.2.2`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2 + + + :return: The filter of this SocialIdentityProviderSearchRequest. + :rtype: str + """ + return self._filter + + @filter.setter + def filter(self, filter): + """ + Sets the filter of this SocialIdentityProviderSearchRequest. + The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See `Section 3.4.2.2`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2 + + + :param filter: The filter of this SocialIdentityProviderSearchRequest. + :type: str + """ + self._filter = filter + + @property + def sort_by(self): + """ + Gets the sort_by of this SocialIdentityProviderSearchRequest. + A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (`Section 3.10`__) form. See `Sorting section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + + :return: The sort_by of this SocialIdentityProviderSearchRequest. + :rtype: str + """ + return self._sort_by + + @sort_by.setter + def sort_by(self, sort_by): + """ + Sets the sort_by of this SocialIdentityProviderSearchRequest. + A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (`Section 3.10`__) form. See `Sorting section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10 + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + + :param sort_by: The sort_by of this SocialIdentityProviderSearchRequest. + :type: str + """ + self._sort_by = sort_by + + @property + def sort_order(self): + """ + Gets the sort_order of this SocialIdentityProviderSearchRequest. + A string that indicates the order in which the sortBy parameter is applied. Allowed values are \"ascending\" and \"descending\". See (`Sorting Section`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + Allowed values for this property are: "ASCENDING", "DESCENDING" + + + :return: The sort_order of this SocialIdentityProviderSearchRequest. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order): + """ + Sets the sort_order of this SocialIdentityProviderSearchRequest. + A string that indicates the order in which the sortBy parameter is applied. Allowed values are \"ascending\" and \"descending\". See (`Sorting Section`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3 + + + :param sort_order: The sort_order of this SocialIdentityProviderSearchRequest. + :type: str + """ + allowed_values = ["ASCENDING", "DESCENDING"] + if not value_allowed_none_or_none_sentinel(sort_order, allowed_values): + raise ValueError( + f"Invalid value for `sort_order`, must be None or one of {allowed_values}" + ) + self._sort_order = sort_order + + @property + def start_index(self): + """ + Gets the start_index of this SocialIdentityProviderSearchRequest. + An integer that indicates the 1-based index of the first query result. See `Pagination Section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :return: The start_index of this SocialIdentityProviderSearchRequest. + :rtype: int + """ + return self._start_index + + @start_index.setter + def start_index(self, start_index): + """ + Sets the start_index of this SocialIdentityProviderSearchRequest. + An integer that indicates the 1-based index of the first query result. See `Pagination Section`__. OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :param start_index: The start_index of this SocialIdentityProviderSearchRequest. + :type: int + """ + self._start_index = start_index + + @property + def count(self): + """ + Gets the count of this SocialIdentityProviderSearchRequest. + An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (`Section 3.4.2.4`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :return: The count of this SocialIdentityProviderSearchRequest. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this SocialIdentityProviderSearchRequest. + An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (`Section 3.4.2.4`__). OPTIONAL. + + __ https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4 + + + :param count: The count of this SocialIdentityProviderSearchRequest. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/identity_domains/models/social_identity_providers.py b/src/oci/identity_domains/models/social_identity_providers.py new file mode 100644 index 0000000000..cdab3f816f --- /dev/null +++ b/src/oci/identity_domains/models/social_identity_providers.py @@ -0,0 +1,196 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: v1 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SocialIdentityProviders(object): + """ + The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SocialIdentityProviders object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param schemas: + The value to assign to the schemas property of this SocialIdentityProviders. + :type schemas: list[str] + + :param total_results: + The value to assign to the total_results property of this SocialIdentityProviders. + :type total_results: int + + :param resources: + The value to assign to the resources property of this SocialIdentityProviders. + :type resources: list[oci.identity_domains.models.SocialIdentityProvider] + + :param start_index: + The value to assign to the start_index property of this SocialIdentityProviders. + :type start_index: int + + :param items_per_page: + The value to assign to the items_per_page property of this SocialIdentityProviders. + :type items_per_page: int + + """ + self.swagger_types = { + 'schemas': 'list[str]', + 'total_results': 'int', + 'resources': 'list[SocialIdentityProvider]', + 'start_index': 'int', + 'items_per_page': 'int' + } + + self.attribute_map = { + 'schemas': 'schemas', + 'total_results': 'totalResults', + 'resources': 'Resources', + 'start_index': 'startIndex', + 'items_per_page': 'itemsPerPage' + } + + self._schemas = None + self._total_results = None + self._resources = None + self._start_index = None + self._items_per_page = None + + @property + def schemas(self): + """ + **[Required]** Gets the schemas of this SocialIdentityProviders. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + + + :return: The schemas of this SocialIdentityProviders. + :rtype: list[str] + """ + return self._schemas + + @schemas.setter + def schemas(self, schemas): + """ + Sets the schemas of this SocialIdentityProviders. + The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + + + :param schemas: The schemas of this SocialIdentityProviders. + :type: list[str] + """ + self._schemas = schemas + + @property + def total_results(self): + """ + **[Required]** Gets the total_results of this SocialIdentityProviders. + The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + + + :return: The total_results of this SocialIdentityProviders. + :rtype: int + """ + return self._total_results + + @total_results.setter + def total_results(self, total_results): + """ + Sets the total_results of this SocialIdentityProviders. + The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + + + :param total_results: The total_results of this SocialIdentityProviders. + :type: int + """ + self._total_results = total_results + + @property + def resources(self): + """ + **[Required]** Gets the resources of this SocialIdentityProviders. + A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if \"totalResults\" is non-zero. + + + :return: The resources of this SocialIdentityProviders. + :rtype: list[oci.identity_domains.models.SocialIdentityProvider] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this SocialIdentityProviders. + A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if \"totalResults\" is non-zero. + + + :param resources: The resources of this SocialIdentityProviders. + :type: list[oci.identity_domains.models.SocialIdentityProvider] + """ + self._resources = resources + + @property + def start_index(self): + """ + **[Required]** Gets the start_index of this SocialIdentityProviders. + The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + + + :return: The start_index of this SocialIdentityProviders. + :rtype: int + """ + return self._start_index + + @start_index.setter + def start_index(self, start_index): + """ + Sets the start_index of this SocialIdentityProviders. + The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + + + :param start_index: The start_index of this SocialIdentityProviders. + :type: int + """ + self._start_index = start_index + + @property + def items_per_page(self): + """ + **[Required]** Gets the items_per_page of this SocialIdentityProviders. + The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + + + :return: The items_per_page of this SocialIdentityProviders. + :rtype: int + """ + return self._items_per_page + + @items_per_page.setter + def items_per_page(self, items_per_page): + """ + Sets the items_per_page of this SocialIdentityProviders. + The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + + + :param items_per_page: The items_per_page of this SocialIdentityProviders. + :type: int + """ + self._items_per_page = items_per_page + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/__init__.py b/src/oci/network_firewall/models/__init__.py index f92319a510..33ce1e0ef3 100644 --- a/src/oci/network_firewall/models/__init__.py +++ b/src/oci/network_firewall/models/__init__.py @@ -35,9 +35,11 @@ from .create_ssl_forward_proxy_profile_details import CreateSslForwardProxyProfileDetails from .create_ssl_inbound_inspection_profile_details import CreateSslInboundInspectionProfileDetails from .create_tcp_service_details import CreateTcpServiceDetails +from .create_tunnel_inspection_rule_details import CreateTunnelInspectionRuleDetails from .create_udp_service_details import CreateUdpServiceDetails from .create_url_list_details import CreateUrlListDetails from .create_vault_mapped_secret_details import CreateVaultMappedSecretDetails +from .create_vxlan_inspection_rule_details import CreateVxlanInspectionRuleDetails from .decryption_profile import DecryptionProfile from .decryption_profile_summary import DecryptionProfileSummary from .decryption_profile_summary_collection import DecryptionProfileSummaryCollection @@ -74,6 +76,9 @@ from .ssl_forward_proxy_profile import SslForwardProxyProfile from .ssl_inbound_inspection_profile import SslInboundInspectionProfile from .tcp_service import TcpService +from .tunnel_inspection_rule import TunnelInspectionRule +from .tunnel_inspection_rule_summary import TunnelInspectionRuleSummary +from .tunnel_inspection_rule_summary_collection import TunnelInspectionRuleSummaryCollection from .udp_service import UdpService from .update_address_list_details import UpdateAddressListDetails from .update_application_details import UpdateApplicationDetails @@ -93,14 +98,20 @@ from .update_ssl_forward_proxy_profile_details import UpdateSslForwardProxyProfileDetails from .update_ssl_inbound_inspection_profile_details import UpdateSslInboundInspectionProfileDetails from .update_tcp_service_details import UpdateTcpServiceDetails +from .update_tunnel_inspection_rule_details import UpdateTunnelInspectionRuleDetails from .update_udp_service_details import UpdateUdpServiceDetails from .update_url_list_details import UpdateUrlListDetails from .update_vault_mapped_secret_details import UpdateVaultMappedSecretDetails +from .update_vxlan_inspection_rule_details import UpdateVxlanInspectionRuleDetails from .url_list import UrlList from .url_list_summary import UrlListSummary from .url_list_summary_collection import UrlListSummaryCollection from .url_pattern import UrlPattern from .vault_mapped_secret import VaultMappedSecret +from .vxlan_inspection_rule import VxlanInspectionRule +from .vxlan_inspection_rule_match_criteria import VxlanInspectionRuleMatchCriteria +from .vxlan_inspection_rule_profile import VxlanInspectionRuleProfile +from .vxlan_inspection_rule_summary import VxlanInspectionRuleSummary from .work_request import WorkRequest from .work_request_error import WorkRequestError from .work_request_error_collection import WorkRequestErrorCollection @@ -141,9 +152,11 @@ "CreateSslForwardProxyProfileDetails": CreateSslForwardProxyProfileDetails, "CreateSslInboundInspectionProfileDetails": CreateSslInboundInspectionProfileDetails, "CreateTcpServiceDetails": CreateTcpServiceDetails, + "CreateTunnelInspectionRuleDetails": CreateTunnelInspectionRuleDetails, "CreateUdpServiceDetails": CreateUdpServiceDetails, "CreateUrlListDetails": CreateUrlListDetails, "CreateVaultMappedSecretDetails": CreateVaultMappedSecretDetails, + "CreateVxlanInspectionRuleDetails": CreateVxlanInspectionRuleDetails, "DecryptionProfile": DecryptionProfile, "DecryptionProfileSummary": DecryptionProfileSummary, "DecryptionProfileSummaryCollection": DecryptionProfileSummaryCollection, @@ -180,6 +193,9 @@ "SslForwardProxyProfile": SslForwardProxyProfile, "SslInboundInspectionProfile": SslInboundInspectionProfile, "TcpService": TcpService, + "TunnelInspectionRule": TunnelInspectionRule, + "TunnelInspectionRuleSummary": TunnelInspectionRuleSummary, + "TunnelInspectionRuleSummaryCollection": TunnelInspectionRuleSummaryCollection, "UdpService": UdpService, "UpdateAddressListDetails": UpdateAddressListDetails, "UpdateApplicationDetails": UpdateApplicationDetails, @@ -199,14 +215,20 @@ "UpdateSslForwardProxyProfileDetails": UpdateSslForwardProxyProfileDetails, "UpdateSslInboundInspectionProfileDetails": UpdateSslInboundInspectionProfileDetails, "UpdateTcpServiceDetails": UpdateTcpServiceDetails, + "UpdateTunnelInspectionRuleDetails": UpdateTunnelInspectionRuleDetails, "UpdateUdpServiceDetails": UpdateUdpServiceDetails, "UpdateUrlListDetails": UpdateUrlListDetails, "UpdateVaultMappedSecretDetails": UpdateVaultMappedSecretDetails, + "UpdateVxlanInspectionRuleDetails": UpdateVxlanInspectionRuleDetails, "UrlList": UrlList, "UrlListSummary": UrlListSummary, "UrlListSummaryCollection": UrlListSummaryCollection, "UrlPattern": UrlPattern, "VaultMappedSecret": VaultMappedSecret, + "VxlanInspectionRule": VxlanInspectionRule, + "VxlanInspectionRuleMatchCriteria": VxlanInspectionRuleMatchCriteria, + "VxlanInspectionRuleProfile": VxlanInspectionRuleProfile, + "VxlanInspectionRuleSummary": VxlanInspectionRuleSummary, "WorkRequest": WorkRequest, "WorkRequestError": WorkRequestError, "WorkRequestErrorCollection": WorkRequestErrorCollection, diff --git a/src/oci/network_firewall/models/create_tunnel_inspection_rule_details.py b/src/oci/network_firewall/models/create_tunnel_inspection_rule_details.py new file mode 100644 index 0000000000..e8d8f10dd9 --- /dev/null +++ b/src/oci/network_firewall/models/create_tunnel_inspection_rule_details.py @@ -0,0 +1,218 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateTunnelInspectionRuleDetails(object): + """ + Request for creating Tunnel Inspection Rule used in the firewall policy rules. + Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + such as Tunnel Inspection protocol, the source and destination IP address. + """ + + #: A constant which can be used with the action property of a CreateTunnelInspectionRuleDetails. + #: This constant has a value of "INSPECT" + ACTION_INSPECT = "INSPECT" + + #: A constant which can be used with the action property of a CreateTunnelInspectionRuleDetails. + #: This constant has a value of "INSPECT_AND_CAPTURE_LOG" + ACTION_INSPECT_AND_CAPTURE_LOG = "INSPECT_AND_CAPTURE_LOG" + + #: A constant which can be used with the protocol property of a CreateTunnelInspectionRuleDetails. + #: This constant has a value of "VXLAN" + PROTOCOL_VXLAN = "VXLAN" + + def __init__(self, **kwargs): + """ + Initializes a new CreateTunnelInspectionRuleDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.network_firewall.models.CreateVxlanInspectionRuleDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this CreateTunnelInspectionRuleDetails. + :type name: str + + :param action: + The value to assign to the action property of this CreateTunnelInspectionRuleDetails. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + :type action: str + + :param protocol: + The value to assign to the protocol property of this CreateTunnelInspectionRuleDetails. + Allowed values for this property are: "VXLAN" + :type protocol: str + + :param position: + The value to assign to the position property of this CreateTunnelInspectionRuleDetails. + :type position: oci.network_firewall.models.RulePosition + + """ + self.swagger_types = { + 'name': 'str', + 'action': 'str', + 'protocol': 'str', + 'position': 'RulePosition' + } + + self.attribute_map = { + 'name': 'name', + 'action': 'action', + 'protocol': 'protocol', + 'position': 'position' + } + + self._name = None + self._action = None + self._protocol = None + self._position = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['protocol'] + + if type == 'VXLAN': + return 'CreateVxlanInspectionRuleDetails' + else: + return 'CreateTunnelInspectionRuleDetails' + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateTunnelInspectionRuleDetails. + Name for the Tunnel Inspection Rule, must be unique within the policy. + + + :return: The name of this CreateTunnelInspectionRuleDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateTunnelInspectionRuleDetails. + Name for the Tunnel Inspection Rule, must be unique within the policy. + + + :param name: The name of this CreateTunnelInspectionRuleDetails. + :type: str + """ + self._name = name + + @property + def action(self): + """ + Gets the action of this CreateTunnelInspectionRuleDetails. + Types of Inspect Action on the traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + + + :return: The action of this CreateTunnelInspectionRuleDetails. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this CreateTunnelInspectionRuleDetails. + Types of Inspect Action on the traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + + :param action: The action of this CreateTunnelInspectionRuleDetails. + :type: str + """ + allowed_values = ["INSPECT", "INSPECT_AND_CAPTURE_LOG"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + raise ValueError( + f"Invalid value for `action`, must be None or one of {allowed_values}" + ) + self._action = action + + @property + def protocol(self): + """ + **[Required]** Gets the protocol of this CreateTunnelInspectionRuleDetails. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + Allowed values for this property are: "VXLAN" + + + :return: The protocol of this CreateTunnelInspectionRuleDetails. + :rtype: str + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol): + """ + Sets the protocol of this CreateTunnelInspectionRuleDetails. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + + :param protocol: The protocol of this CreateTunnelInspectionRuleDetails. + :type: str + """ + allowed_values = ["VXLAN"] + if not value_allowed_none_or_none_sentinel(protocol, allowed_values): + raise ValueError( + f"Invalid value for `protocol`, must be None or one of {allowed_values}" + ) + self._protocol = protocol + + @property + def position(self): + """ + Gets the position of this CreateTunnelInspectionRuleDetails. + + :return: The position of this CreateTunnelInspectionRuleDetails. + :rtype: oci.network_firewall.models.RulePosition + """ + return self._position + + @position.setter + def position(self, position): + """ + Sets the position of this CreateTunnelInspectionRuleDetails. + + :param position: The position of this CreateTunnelInspectionRuleDetails. + :type: oci.network_firewall.models.RulePosition + """ + self._position = position + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/create_vxlan_inspection_rule_details.py b/src/oci/network_firewall/models/create_vxlan_inspection_rule_details.py new file mode 100644 index 0000000000..e7385d32fc --- /dev/null +++ b/src/oci/network_firewall/models/create_vxlan_inspection_rule_details.py @@ -0,0 +1,127 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + +from .create_tunnel_inspection_rule_details import CreateTunnelInspectionRuleDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateVxlanInspectionRuleDetails(CreateTunnelInspectionRuleDetails): + """ + Request for creating Vxlan Tunnel Inspection Rule used in the firewall policy rules. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateVxlanInspectionRuleDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.network_firewall.models.CreateVxlanInspectionRuleDetails.protocol` attribute + of this class is ``VXLAN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this CreateVxlanInspectionRuleDetails. + :type name: str + + :param action: + The value to assign to the action property of this CreateVxlanInspectionRuleDetails. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + :type action: str + + :param protocol: + The value to assign to the protocol property of this CreateVxlanInspectionRuleDetails. + Allowed values for this property are: "VXLAN" + :type protocol: str + + :param position: + The value to assign to the position property of this CreateVxlanInspectionRuleDetails. + :type position: oci.network_firewall.models.RulePosition + + :param condition: + The value to assign to the condition property of this CreateVxlanInspectionRuleDetails. + :type condition: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + + :param profile: + The value to assign to the profile property of this CreateVxlanInspectionRuleDetails. + :type profile: oci.network_firewall.models.VxlanInspectionRuleProfile + + """ + self.swagger_types = { + 'name': 'str', + 'action': 'str', + 'protocol': 'str', + 'position': 'RulePosition', + 'condition': 'VxlanInspectionRuleMatchCriteria', + 'profile': 'VxlanInspectionRuleProfile' + } + + self.attribute_map = { + 'name': 'name', + 'action': 'action', + 'protocol': 'protocol', + 'position': 'position', + 'condition': 'condition', + 'profile': 'profile' + } + + self._name = None + self._action = None + self._protocol = None + self._position = None + self._condition = None + self._profile = None + self._protocol = 'VXLAN' + + @property + def condition(self): + """ + **[Required]** Gets the condition of this CreateVxlanInspectionRuleDetails. + + :return: The condition of this CreateVxlanInspectionRuleDetails. + :rtype: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + return self._condition + + @condition.setter + def condition(self, condition): + """ + Sets the condition of this CreateVxlanInspectionRuleDetails. + + :param condition: The condition of this CreateVxlanInspectionRuleDetails. + :type: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + self._condition = condition + + @property + def profile(self): + """ + Gets the profile of this CreateVxlanInspectionRuleDetails. + + :return: The profile of this CreateVxlanInspectionRuleDetails. + :rtype: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + return self._profile + + @profile.setter + def profile(self, profile): + """ + Sets the profile of this CreateVxlanInspectionRuleDetails. + + :param profile: The profile of this CreateVxlanInspectionRuleDetails. + :type: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + self._profile = profile + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/tunnel_inspection_rule.py b/src/oci/network_firewall/models/tunnel_inspection_rule.py new file mode 100644 index 0000000000..636f3f131b --- /dev/null +++ b/src/oci/network_firewall/models/tunnel_inspection_rule.py @@ -0,0 +1,280 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TunnelInspectionRule(object): + """ + Tunnel Inspection Rule used in the firewall policy rules. + Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + such as Tunnel Inspect protocol, the source and destination IP addresses. + """ + + #: A constant which can be used with the protocol property of a TunnelInspectionRule. + #: This constant has a value of "VXLAN" + PROTOCOL_VXLAN = "VXLAN" + + #: A constant which can be used with the action property of a TunnelInspectionRule. + #: This constant has a value of "INSPECT" + ACTION_INSPECT = "INSPECT" + + #: A constant which can be used with the action property of a TunnelInspectionRule. + #: This constant has a value of "INSPECT_AND_CAPTURE_LOG" + ACTION_INSPECT_AND_CAPTURE_LOG = "INSPECT_AND_CAPTURE_LOG" + + def __init__(self, **kwargs): + """ + Initializes a new TunnelInspectionRule object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.network_firewall.models.VxlanInspectionRule` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this TunnelInspectionRule. + :type name: str + + :param protocol: + The value to assign to the protocol property of this TunnelInspectionRule. + Allowed values for this property are: "VXLAN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type protocol: str + + :param action: + The value to assign to the action property of this TunnelInspectionRule. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action: str + + :param priority_order: + The value to assign to the priority_order property of this TunnelInspectionRule. + :type priority_order: int + + :param position: + The value to assign to the position property of this TunnelInspectionRule. + :type position: oci.network_firewall.models.RulePosition + + :param parent_resource_id: + The value to assign to the parent_resource_id property of this TunnelInspectionRule. + :type parent_resource_id: str + + """ + self.swagger_types = { + 'name': 'str', + 'protocol': 'str', + 'action': 'str', + 'priority_order': 'int', + 'position': 'RulePosition', + 'parent_resource_id': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'protocol': 'protocol', + 'action': 'action', + 'priority_order': 'priorityOrder', + 'position': 'position', + 'parent_resource_id': 'parentResourceId' + } + + self._name = None + self._protocol = None + self._action = None + self._priority_order = None + self._position = None + self._parent_resource_id = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['protocol'] + + if type == 'VXLAN': + return 'VxlanInspectionRule' + else: + return 'TunnelInspectionRule' + + @property + def name(self): + """ + **[Required]** Gets the name of this TunnelInspectionRule. + Name for the Tunnel Inspection Rule, must be unique within the policy. + + + :return: The name of this TunnelInspectionRule. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this TunnelInspectionRule. + Name for the Tunnel Inspection Rule, must be unique within the policy. + + + :param name: The name of this TunnelInspectionRule. + :type: str + """ + self._name = name + + @property + def protocol(self): + """ + **[Required]** Gets the protocol of this TunnelInspectionRule. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + Allowed values for this property are: "VXLAN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The protocol of this TunnelInspectionRule. + :rtype: str + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol): + """ + Sets the protocol of this TunnelInspectionRule. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + + :param protocol: The protocol of this TunnelInspectionRule. + :type: str + """ + allowed_values = ["VXLAN"] + if not value_allowed_none_or_none_sentinel(protocol, allowed_values): + protocol = 'UNKNOWN_ENUM_VALUE' + self._protocol = protocol + + @property + def action(self): + """ + Gets the action of this TunnelInspectionRule. + Types of Inspect Action on the Traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action of this TunnelInspectionRule. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this TunnelInspectionRule. + Types of Inspect Action on the Traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + + :param action: The action of this TunnelInspectionRule. + :type: str + """ + allowed_values = ["INSPECT", "INSPECT_AND_CAPTURE_LOG"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + action = 'UNKNOWN_ENUM_VALUE' + self._action = action + + @property + def priority_order(self): + """ + Gets the priority_order of this TunnelInspectionRule. + The priority order in which this rule should be evaluated + + + :return: The priority_order of this TunnelInspectionRule. + :rtype: int + """ + return self._priority_order + + @priority_order.setter + def priority_order(self, priority_order): + """ + Sets the priority_order of this TunnelInspectionRule. + The priority order in which this rule should be evaluated + + + :param priority_order: The priority_order of this TunnelInspectionRule. + :type: int + """ + self._priority_order = priority_order + + @property + def position(self): + """ + Gets the position of this TunnelInspectionRule. + + :return: The position of this TunnelInspectionRule. + :rtype: oci.network_firewall.models.RulePosition + """ + return self._position + + @position.setter + def position(self, position): + """ + Sets the position of this TunnelInspectionRule. + + :param position: The position of this TunnelInspectionRule. + :type: oci.network_firewall.models.RulePosition + """ + self._position = position + + @property + def parent_resource_id(self): + """ + **[Required]** Gets the parent_resource_id of this TunnelInspectionRule. + OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + + + :return: The parent_resource_id of this TunnelInspectionRule. + :rtype: str + """ + return self._parent_resource_id + + @parent_resource_id.setter + def parent_resource_id(self, parent_resource_id): + """ + Sets the parent_resource_id of this TunnelInspectionRule. + OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + + + :param parent_resource_id: The parent_resource_id of this TunnelInspectionRule. + :type: str + """ + self._parent_resource_id = parent_resource_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/tunnel_inspection_rule_summary.py b/src/oci/network_firewall/models/tunnel_inspection_rule_summary.py new file mode 100644 index 0000000000..817778335d --- /dev/null +++ b/src/oci/network_firewall/models/tunnel_inspection_rule_summary.py @@ -0,0 +1,253 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TunnelInspectionRuleSummary(object): + """ + Summary for the Tunnel Inspection Rule used in the firewall policy rules. + Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + such as Tunnel Inspect protocol, the source and destination IP address. + """ + + #: A constant which can be used with the protocol property of a TunnelInspectionRuleSummary. + #: This constant has a value of "VXLAN" + PROTOCOL_VXLAN = "VXLAN" + + #: A constant which can be used with the action property of a TunnelInspectionRuleSummary. + #: This constant has a value of "INSPECT" + ACTION_INSPECT = "INSPECT" + + #: A constant which can be used with the action property of a TunnelInspectionRuleSummary. + #: This constant has a value of "INSPECT_AND_CAPTURE_LOG" + ACTION_INSPECT_AND_CAPTURE_LOG = "INSPECT_AND_CAPTURE_LOG" + + def __init__(self, **kwargs): + """ + Initializes a new TunnelInspectionRuleSummary object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.network_firewall.models.VxlanInspectionRuleSummary` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this TunnelInspectionRuleSummary. + :type name: str + + :param protocol: + The value to assign to the protocol property of this TunnelInspectionRuleSummary. + Allowed values for this property are: "VXLAN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type protocol: str + + :param action: + The value to assign to the action property of this TunnelInspectionRuleSummary. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action: str + + :param priority_order: + The value to assign to the priority_order property of this TunnelInspectionRuleSummary. + :type priority_order: int + + :param parent_resource_id: + The value to assign to the parent_resource_id property of this TunnelInspectionRuleSummary. + :type parent_resource_id: str + + """ + self.swagger_types = { + 'name': 'str', + 'protocol': 'str', + 'action': 'str', + 'priority_order': 'int', + 'parent_resource_id': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'protocol': 'protocol', + 'action': 'action', + 'priority_order': 'priorityOrder', + 'parent_resource_id': 'parentResourceId' + } + + self._name = None + self._protocol = None + self._action = None + self._priority_order = None + self._parent_resource_id = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['protocol'] + + if type == 'VXLAN': + return 'VxlanInspectionRuleSummary' + else: + return 'TunnelInspectionRuleSummary' + + @property + def name(self): + """ + **[Required]** Gets the name of this TunnelInspectionRuleSummary. + Name for the Tunnel Inspection Rule, must be unique within the policy. + + + :return: The name of this TunnelInspectionRuleSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this TunnelInspectionRuleSummary. + Name for the Tunnel Inspection Rule, must be unique within the policy. + + + :param name: The name of this TunnelInspectionRuleSummary. + :type: str + """ + self._name = name + + @property + def protocol(self): + """ + **[Required]** Gets the protocol of this TunnelInspectionRuleSummary. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + Allowed values for this property are: "VXLAN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The protocol of this TunnelInspectionRuleSummary. + :rtype: str + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol): + """ + Sets the protocol of this TunnelInspectionRuleSummary. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + + :param protocol: The protocol of this TunnelInspectionRuleSummary. + :type: str + """ + allowed_values = ["VXLAN"] + if not value_allowed_none_or_none_sentinel(protocol, allowed_values): + protocol = 'UNKNOWN_ENUM_VALUE' + self._protocol = protocol + + @property + def action(self): + """ + Gets the action of this TunnelInspectionRuleSummary. + Types of Inspect Action on the Traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action of this TunnelInspectionRuleSummary. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this TunnelInspectionRuleSummary. + Types of Inspect Action on the Traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + + :param action: The action of this TunnelInspectionRuleSummary. + :type: str + """ + allowed_values = ["INSPECT", "INSPECT_AND_CAPTURE_LOG"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + action = 'UNKNOWN_ENUM_VALUE' + self._action = action + + @property + def priority_order(self): + """ + **[Required]** Gets the priority_order of this TunnelInspectionRuleSummary. + The priority order in which this rule should be evaluated + + + :return: The priority_order of this TunnelInspectionRuleSummary. + :rtype: int + """ + return self._priority_order + + @priority_order.setter + def priority_order(self, priority_order): + """ + Sets the priority_order of this TunnelInspectionRuleSummary. + The priority order in which this rule should be evaluated + + + :param priority_order: The priority_order of this TunnelInspectionRuleSummary. + :type: int + """ + self._priority_order = priority_order + + @property + def parent_resource_id(self): + """ + **[Required]** Gets the parent_resource_id of this TunnelInspectionRuleSummary. + OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + + + :return: The parent_resource_id of this TunnelInspectionRuleSummary. + :rtype: str + """ + return self._parent_resource_id + + @parent_resource_id.setter + def parent_resource_id(self, parent_resource_id): + """ + Sets the parent_resource_id of this TunnelInspectionRuleSummary. + OCID of the Network Firewall Policy this Tunnel Inspection Rule belongs to. + + + :param parent_resource_id: The parent_resource_id of this TunnelInspectionRuleSummary. + :type: str + """ + self._parent_resource_id = parent_resource_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/tunnel_inspection_rule_summary_collection.py b/src/oci/network_firewall/models/tunnel_inspection_rule_summary_collection.py new file mode 100644 index 0000000000..94a42ec4f7 --- /dev/null +++ b/src/oci/network_firewall/models/tunnel_inspection_rule_summary_collection.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TunnelInspectionRuleSummaryCollection(object): + """ + Collection of Tunnel Inspection Rule Summaries in the network firewall policy + """ + + def __init__(self, **kwargs): + """ + Initializes a new TunnelInspectionRuleSummaryCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this TunnelInspectionRuleSummaryCollection. + :type items: list[oci.network_firewall.models.TunnelInspectionRuleSummary] + + """ + self.swagger_types = { + 'items': 'list[TunnelInspectionRuleSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this TunnelInspectionRuleSummaryCollection. + Collection of Tunnel Inspection Rule Summaries. + + + :return: The items of this TunnelInspectionRuleSummaryCollection. + :rtype: list[oci.network_firewall.models.TunnelInspectionRuleSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this TunnelInspectionRuleSummaryCollection. + Collection of Tunnel Inspection Rule Summaries. + + + :param items: The items of this TunnelInspectionRuleSummaryCollection. + :type: list[oci.network_firewall.models.TunnelInspectionRuleSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/update_tunnel_inspection_rule_details.py b/src/oci/network_firewall/models/update_tunnel_inspection_rule_details.py new file mode 100644 index 0000000000..8b352a535b --- /dev/null +++ b/src/oci/network_firewall/models/update_tunnel_inspection_rule_details.py @@ -0,0 +1,187 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateTunnelInspectionRuleDetails(object): + """ + Update Request for creating Tunnel Inspection Rule used in the firewall policy rules. + Tunnel Inspection Rule determines whether tunnel inspection is applied on the traffic based on attributes + such as Tunnel Inspect protocol, the source and destination IP address. + """ + + #: A constant which can be used with the action property of a UpdateTunnelInspectionRuleDetails. + #: This constant has a value of "INSPECT" + ACTION_INSPECT = "INSPECT" + + #: A constant which can be used with the action property of a UpdateTunnelInspectionRuleDetails. + #: This constant has a value of "INSPECT_AND_CAPTURE_LOG" + ACTION_INSPECT_AND_CAPTURE_LOG = "INSPECT_AND_CAPTURE_LOG" + + #: A constant which can be used with the protocol property of a UpdateTunnelInspectionRuleDetails. + #: This constant has a value of "VXLAN" + PROTOCOL_VXLAN = "VXLAN" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateTunnelInspectionRuleDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.network_firewall.models.UpdateVxlanInspectionRuleDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param action: + The value to assign to the action property of this UpdateTunnelInspectionRuleDetails. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + :type action: str + + :param protocol: + The value to assign to the protocol property of this UpdateTunnelInspectionRuleDetails. + Allowed values for this property are: "VXLAN" + :type protocol: str + + :param position: + The value to assign to the position property of this UpdateTunnelInspectionRuleDetails. + :type position: oci.network_firewall.models.RulePosition + + """ + self.swagger_types = { + 'action': 'str', + 'protocol': 'str', + 'position': 'RulePosition' + } + + self.attribute_map = { + 'action': 'action', + 'protocol': 'protocol', + 'position': 'position' + } + + self._action = None + self._protocol = None + self._position = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['protocol'] + + if type == 'VXLAN': + return 'UpdateVxlanInspectionRuleDetails' + else: + return 'UpdateTunnelInspectionRuleDetails' + + @property + def action(self): + """ + Gets the action of this UpdateTunnelInspectionRuleDetails. + Types of Inspect Action on the Traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + + + :return: The action of this UpdateTunnelInspectionRuleDetails. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this UpdateTunnelInspectionRuleDetails. + Types of Inspect Action on the Traffic flow. + + * INSPECT - Inspect the traffic. + * INSPECT_AND_CAPTURE_LOG - Inspect and capture logs for the traffic. + + + :param action: The action of this UpdateTunnelInspectionRuleDetails. + :type: str + """ + allowed_values = ["INSPECT", "INSPECT_AND_CAPTURE_LOG"] + if not value_allowed_none_or_none_sentinel(action, allowed_values): + raise ValueError( + f"Invalid value for `action`, must be None or one of {allowed_values}" + ) + self._action = action + + @property + def protocol(self): + """ + **[Required]** Gets the protocol of this UpdateTunnelInspectionRuleDetails. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + Allowed values for this property are: "VXLAN" + + + :return: The protocol of this UpdateTunnelInspectionRuleDetails. + :rtype: str + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol): + """ + Sets the protocol of this UpdateTunnelInspectionRuleDetails. + Types of Tunnel Inspection Protocol to be applied on the traffic. + + * VXLAN - VXLAN Tunnel Inspection Protocol will be applied on the traffic. + + + :param protocol: The protocol of this UpdateTunnelInspectionRuleDetails. + :type: str + """ + allowed_values = ["VXLAN"] + if not value_allowed_none_or_none_sentinel(protocol, allowed_values): + raise ValueError( + f"Invalid value for `protocol`, must be None or one of {allowed_values}" + ) + self._protocol = protocol + + @property + def position(self): + """ + Gets the position of this UpdateTunnelInspectionRuleDetails. + + :return: The position of this UpdateTunnelInspectionRuleDetails. + :rtype: oci.network_firewall.models.RulePosition + """ + return self._position + + @position.setter + def position(self, position): + """ + Sets the position of this UpdateTunnelInspectionRuleDetails. + + :param position: The position of this UpdateTunnelInspectionRuleDetails. + :type: oci.network_firewall.models.RulePosition + """ + self._position = position + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/update_vxlan_inspection_rule_details.py b/src/oci/network_firewall/models/update_vxlan_inspection_rule_details.py new file mode 100644 index 0000000000..3ee941e869 --- /dev/null +++ b/src/oci/network_firewall/models/update_vxlan_inspection_rule_details.py @@ -0,0 +1,120 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + +from .update_tunnel_inspection_rule_details import UpdateTunnelInspectionRuleDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateVxlanInspectionRuleDetails(UpdateTunnelInspectionRuleDetails): + """ + Update Request for creating Vxlan Tunnel Inspection Rule used in the firewall policy rules. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateVxlanInspectionRuleDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.network_firewall.models.UpdateVxlanInspectionRuleDetails.protocol` attribute + of this class is ``VXLAN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param action: + The value to assign to the action property of this UpdateVxlanInspectionRuleDetails. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + :type action: str + + :param protocol: + The value to assign to the protocol property of this UpdateVxlanInspectionRuleDetails. + Allowed values for this property are: "VXLAN" + :type protocol: str + + :param position: + The value to assign to the position property of this UpdateVxlanInspectionRuleDetails. + :type position: oci.network_firewall.models.RulePosition + + :param condition: + The value to assign to the condition property of this UpdateVxlanInspectionRuleDetails. + :type condition: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + + :param profile: + The value to assign to the profile property of this UpdateVxlanInspectionRuleDetails. + :type profile: oci.network_firewall.models.VxlanInspectionRuleProfile + + """ + self.swagger_types = { + 'action': 'str', + 'protocol': 'str', + 'position': 'RulePosition', + 'condition': 'VxlanInspectionRuleMatchCriteria', + 'profile': 'VxlanInspectionRuleProfile' + } + + self.attribute_map = { + 'action': 'action', + 'protocol': 'protocol', + 'position': 'position', + 'condition': 'condition', + 'profile': 'profile' + } + + self._action = None + self._protocol = None + self._position = None + self._condition = None + self._profile = None + self._protocol = 'VXLAN' + + @property + def condition(self): + """ + **[Required]** Gets the condition of this UpdateVxlanInspectionRuleDetails. + + :return: The condition of this UpdateVxlanInspectionRuleDetails. + :rtype: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + return self._condition + + @condition.setter + def condition(self, condition): + """ + Sets the condition of this UpdateVxlanInspectionRuleDetails. + + :param condition: The condition of this UpdateVxlanInspectionRuleDetails. + :type: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + self._condition = condition + + @property + def profile(self): + """ + Gets the profile of this UpdateVxlanInspectionRuleDetails. + + :return: The profile of this UpdateVxlanInspectionRuleDetails. + :rtype: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + return self._profile + + @profile.setter + def profile(self, profile): + """ + Sets the profile of this UpdateVxlanInspectionRuleDetails. + + :param profile: The profile of this UpdateVxlanInspectionRuleDetails. + :type: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + self._profile = profile + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/vxlan_inspection_rule.py b/src/oci/network_firewall/models/vxlan_inspection_rule.py new file mode 100644 index 0000000000..b4dc68028a --- /dev/null +++ b/src/oci/network_firewall/models/vxlan_inspection_rule.py @@ -0,0 +1,141 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + +from .tunnel_inspection_rule import TunnelInspectionRule +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class VxlanInspectionRule(TunnelInspectionRule): + """ + Vxlan Tunnel Inspection Rule used on the firewall policy rules. + """ + + def __init__(self, **kwargs): + """ + Initializes a new VxlanInspectionRule object with values from keyword arguments. The default value of the :py:attr:`~oci.network_firewall.models.VxlanInspectionRule.protocol` attribute + of this class is ``VXLAN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this VxlanInspectionRule. + :type name: str + + :param protocol: + The value to assign to the protocol property of this VxlanInspectionRule. + Allowed values for this property are: "VXLAN" + :type protocol: str + + :param action: + The value to assign to the action property of this VxlanInspectionRule. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + :type action: str + + :param priority_order: + The value to assign to the priority_order property of this VxlanInspectionRule. + :type priority_order: int + + :param position: + The value to assign to the position property of this VxlanInspectionRule. + :type position: oci.network_firewall.models.RulePosition + + :param parent_resource_id: + The value to assign to the parent_resource_id property of this VxlanInspectionRule. + :type parent_resource_id: str + + :param condition: + The value to assign to the condition property of this VxlanInspectionRule. + :type condition: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + + :param profile: + The value to assign to the profile property of this VxlanInspectionRule. + :type profile: oci.network_firewall.models.VxlanInspectionRuleProfile + + """ + self.swagger_types = { + 'name': 'str', + 'protocol': 'str', + 'action': 'str', + 'priority_order': 'int', + 'position': 'RulePosition', + 'parent_resource_id': 'str', + 'condition': 'VxlanInspectionRuleMatchCriteria', + 'profile': 'VxlanInspectionRuleProfile' + } + + self.attribute_map = { + 'name': 'name', + 'protocol': 'protocol', + 'action': 'action', + 'priority_order': 'priorityOrder', + 'position': 'position', + 'parent_resource_id': 'parentResourceId', + 'condition': 'condition', + 'profile': 'profile' + } + + self._name = None + self._protocol = None + self._action = None + self._priority_order = None + self._position = None + self._parent_resource_id = None + self._condition = None + self._profile = None + self._protocol = 'VXLAN' + + @property + def condition(self): + """ + **[Required]** Gets the condition of this VxlanInspectionRule. + + :return: The condition of this VxlanInspectionRule. + :rtype: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + return self._condition + + @condition.setter + def condition(self, condition): + """ + Sets the condition of this VxlanInspectionRule. + + :param condition: The condition of this VxlanInspectionRule. + :type: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + self._condition = condition + + @property + def profile(self): + """ + **[Required]** Gets the profile of this VxlanInspectionRule. + + :return: The profile of this VxlanInspectionRule. + :rtype: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + return self._profile + + @profile.setter + def profile(self, profile): + """ + Sets the profile of this VxlanInspectionRule. + + :param profile: The profile of this VxlanInspectionRule. + :type: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + self._profile = profile + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/vxlan_inspection_rule_match_criteria.py b/src/oci/network_firewall/models/vxlan_inspection_rule_match_criteria.py new file mode 100644 index 0000000000..2dded962b3 --- /dev/null +++ b/src/oci/network_firewall/models/vxlan_inspection_rule_match_criteria.py @@ -0,0 +1,104 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class VxlanInspectionRuleMatchCriteria(object): + """ + Criteria to evaluate against incoming network traffic. + A match occurs when at least one item in the array associated with each specified property corresponds with the relevant aspect of the traffic. + """ + + def __init__(self, **kwargs): + """ + Initializes a new VxlanInspectionRuleMatchCriteria object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_address: + The value to assign to the source_address property of this VxlanInspectionRuleMatchCriteria. + :type source_address: list[str] + + :param destination_address: + The value to assign to the destination_address property of this VxlanInspectionRuleMatchCriteria. + :type destination_address: list[str] + + """ + self.swagger_types = { + 'source_address': 'list[str]', + 'destination_address': 'list[str]' + } + + self.attribute_map = { + 'source_address': 'sourceAddress', + 'destination_address': 'destinationAddress' + } + + self._source_address = None + self._destination_address = None + + @property + def source_address(self): + """ + Gets the source_address of this VxlanInspectionRuleMatchCriteria. + An array of address list names to be evaluated against the traffic source address. + + + :return: The source_address of this VxlanInspectionRuleMatchCriteria. + :rtype: list[str] + """ + return self._source_address + + @source_address.setter + def source_address(self, source_address): + """ + Sets the source_address of this VxlanInspectionRuleMatchCriteria. + An array of address list names to be evaluated against the traffic source address. + + + :param source_address: The source_address of this VxlanInspectionRuleMatchCriteria. + :type: list[str] + """ + self._source_address = source_address + + @property + def destination_address(self): + """ + Gets the destination_address of this VxlanInspectionRuleMatchCriteria. + An array of address list names to be evaluated against the traffic destination address. + + + :return: The destination_address of this VxlanInspectionRuleMatchCriteria. + :rtype: list[str] + """ + return self._destination_address + + @destination_address.setter + def destination_address(self, destination_address): + """ + Sets the destination_address of this VxlanInspectionRuleMatchCriteria. + An array of address list names to be evaluated against the traffic destination address. + + + :param destination_address: The destination_address of this VxlanInspectionRuleMatchCriteria. + :type: list[str] + """ + self._destination_address = destination_address + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/vxlan_inspection_rule_profile.py b/src/oci/network_firewall/models/vxlan_inspection_rule_profile.py new file mode 100644 index 0000000000..00730ee779 --- /dev/null +++ b/src/oci/network_firewall/models/vxlan_inspection_rule_profile.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class VxlanInspectionRuleProfile(object): + """ + Vxlan Inspect profile used in Vxlan Tunnel Inspection Rules. + """ + + def __init__(self, **kwargs): + """ + Initializes a new VxlanInspectionRuleProfile object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param must_return_traffic_to_source: + The value to assign to the must_return_traffic_to_source property of this VxlanInspectionRuleProfile. + :type must_return_traffic_to_source: bool + + """ + self.swagger_types = { + 'must_return_traffic_to_source': 'bool' + } + + self.attribute_map = { + 'must_return_traffic_to_source': 'mustReturnTrafficToSource' + } + + self._must_return_traffic_to_source = None + + @property + def must_return_traffic_to_source(self): + """ + Gets the must_return_traffic_to_source of this VxlanInspectionRuleProfile. + Return scanned VXLAN tunnel traffic to source. + + + :return: The must_return_traffic_to_source of this VxlanInspectionRuleProfile. + :rtype: bool + """ + return self._must_return_traffic_to_source + + @must_return_traffic_to_source.setter + def must_return_traffic_to_source(self, must_return_traffic_to_source): + """ + Sets the must_return_traffic_to_source of this VxlanInspectionRuleProfile. + Return scanned VXLAN tunnel traffic to source. + + + :param must_return_traffic_to_source: The must_return_traffic_to_source of this VxlanInspectionRuleProfile. + :type: bool + """ + self._must_return_traffic_to_source = must_return_traffic_to_source + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/models/vxlan_inspection_rule_summary.py b/src/oci/network_firewall/models/vxlan_inspection_rule_summary.py new file mode 100644 index 0000000000..81dac1fb74 --- /dev/null +++ b/src/oci/network_firewall/models/vxlan_inspection_rule_summary.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230501 + +from .tunnel_inspection_rule_summary import TunnelInspectionRuleSummary +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class VxlanInspectionRuleSummary(TunnelInspectionRuleSummary): + """ + Vxlan Tunnel Inspection Rule used on the firewall policy rules. + """ + + def __init__(self, **kwargs): + """ + Initializes a new VxlanInspectionRuleSummary object with values from keyword arguments. The default value of the :py:attr:`~oci.network_firewall.models.VxlanInspectionRuleSummary.protocol` attribute + of this class is ``VXLAN`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this VxlanInspectionRuleSummary. + :type name: str + + :param protocol: + The value to assign to the protocol property of this VxlanInspectionRuleSummary. + Allowed values for this property are: "VXLAN" + :type protocol: str + + :param action: + The value to assign to the action property of this VxlanInspectionRuleSummary. + Allowed values for this property are: "INSPECT", "INSPECT_AND_CAPTURE_LOG" + :type action: str + + :param priority_order: + The value to assign to the priority_order property of this VxlanInspectionRuleSummary. + :type priority_order: int + + :param parent_resource_id: + The value to assign to the parent_resource_id property of this VxlanInspectionRuleSummary. + :type parent_resource_id: str + + :param condition: + The value to assign to the condition property of this VxlanInspectionRuleSummary. + :type condition: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + + :param profile: + The value to assign to the profile property of this VxlanInspectionRuleSummary. + :type profile: oci.network_firewall.models.VxlanInspectionRuleProfile + + """ + self.swagger_types = { + 'name': 'str', + 'protocol': 'str', + 'action': 'str', + 'priority_order': 'int', + 'parent_resource_id': 'str', + 'condition': 'VxlanInspectionRuleMatchCriteria', + 'profile': 'VxlanInspectionRuleProfile' + } + + self.attribute_map = { + 'name': 'name', + 'protocol': 'protocol', + 'action': 'action', + 'priority_order': 'priorityOrder', + 'parent_resource_id': 'parentResourceId', + 'condition': 'condition', + 'profile': 'profile' + } + + self._name = None + self._protocol = None + self._action = None + self._priority_order = None + self._parent_resource_id = None + self._condition = None + self._profile = None + self._protocol = 'VXLAN' + + @property + def condition(self): + """ + Gets the condition of this VxlanInspectionRuleSummary. + + :return: The condition of this VxlanInspectionRuleSummary. + :rtype: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + return self._condition + + @condition.setter + def condition(self, condition): + """ + Sets the condition of this VxlanInspectionRuleSummary. + + :param condition: The condition of this VxlanInspectionRuleSummary. + :type: oci.network_firewall.models.VxlanInspectionRuleMatchCriteria + """ + self._condition = condition + + @property + def profile(self): + """ + **[Required]** Gets the profile of this VxlanInspectionRuleSummary. + + :return: The profile of this VxlanInspectionRuleSummary. + :rtype: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + return self._profile + + @profile.setter + def profile(self, profile): + """ + Sets the profile of this VxlanInspectionRuleSummary. + + :param profile: The profile of this VxlanInspectionRuleSummary. + :type: oci.network_firewall.models.VxlanInspectionRuleProfile + """ + self._profile = profile + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/network_firewall/network_firewall_client.py b/src/oci/network_firewall/network_firewall_client.py index efe6d28812..ccbfb1d9e9 100644 --- a/src/oci/network_firewall/network_firewall_client.py +++ b/src/oci/network_firewall/network_firewall_client.py @@ -1571,6 +1571,154 @@ def bulk_upload_services(self, network_firewall_policy_id, bulk_upload_services_ api_reference_link=api_reference_link, required_arguments=required_arguments) + def bulk_upload_tunnel_inspection_rules(self, network_firewall_policy_id, bulk_upload_tunnel_inspection_rules_details, **kwargs): + """ + Creates a new Tunnel Inspection Rule at bulk for the Network Firewall Policy. + + + :param str network_firewall_policy_id: (required) + Unique Network Firewall Policy identifier + + :param stream bulk_upload_tunnel_inspection_rules_details: (required) + Request details to create the tunnel inspection rule for the network firewall policy Resource. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str if_match: (optional) + 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. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + :param int buffer_limit: (optional) + A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. + If the stream size is greater than the buffer_limit, a BufferError exception will be thrown. + + The buffer_limit parameter is used when the stream object does not have a `seek`, `tell`, or `fileno` property for the Python Request library to calculate out the content length. + If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. + Large streams can cause the process to freeze, consider passing in content-length for large streams instead. + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use bulk_upload_tunnel_inspection_rules API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['networkFirewallPolicyId'] + resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/tunnelInspectionRules/actions/bulkUpload" + method = "POST" + operation_name = "bulk_upload_tunnel_inspection_rules" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/BulkUploadTunnelInspectionRules" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "buffer_limit", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"bulk_upload_tunnel_inspection_rules got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "networkFirewallPolicyId": network_firewall_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + # If the body parameter is optional we need to assign it to a variable so additional type checking can be performed. + try: + bulk_upload_tunnel_inspection_rules_details + except NameError: + bulk_upload_tunnel_inspection_rules_details = kwargs.get("bulk_upload_tunnel_inspection_rules_details", missing) + + if bulk_upload_tunnel_inspection_rules_details is not missing and bulk_upload_tunnel_inspection_rules_details is not None: + if (not isinstance(bulk_upload_tunnel_inspection_rules_details, (six.binary_type, six.string_types)) and + not hasattr(bulk_upload_tunnel_inspection_rules_details, "read")): + raise TypeError('The body must be a string, bytes, or provide a read() method.') + + if hasattr(bulk_upload_tunnel_inspection_rules_details, 'fileno') and hasattr(bulk_upload_tunnel_inspection_rules_details, 'name') and bulk_upload_tunnel_inspection_rules_details.name != '': + if requests.utils.super_len(bulk_upload_tunnel_inspection_rules_details) == 0: + header_params['Content-Length'] = '0' + + # If content length is not given and stream object have no 'fileno' and is not a string or bytes, try to calculate content length + elif 'Content-Length' not in header_params and not is_content_length_calculable_by_req_util(bulk_upload_tunnel_inspection_rules_details): + calculated_obj = back_up_body_calculate_stream_content_length(bulk_upload_tunnel_inspection_rules_details, kwargs.get("buffer_limit")) + header_params['Content-Length'] = calculated_obj["content_length"] + bulk_upload_tunnel_inspection_rules_details = calculated_obj["byte_content"] + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=bulk_upload_tunnel_inspection_rules_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=bulk_upload_tunnel_inspection_rules_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def bulk_upload_url_lists(self, network_firewall_policy_id, bulk_upload_url_lists_details, **kwargs): """ Creates a new Url Lists at bulk for the Network Firewall Policy. @@ -3401,6 +3549,119 @@ def create_service_list(self, network_firewall_policy_id, create_service_list_de api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_tunnel_inspection_rule(self, network_firewall_policy_id, create_tunnel_inspection_rule_details, **kwargs): + """ + Creates a new tunnel inspection rule for the network firewall policy. + + + :param str network_firewall_policy_id: (required) + Unique Network Firewall Policy identifier + + :param oci.network_firewall.models.CreateTunnelInspectionRuleDetails create_tunnel_inspection_rule_details: (required) + Request Details to create the network firewall policy resource. + + :param str opc_retry_token: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_firewall.models.TunnelInspectionRule` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_tunnel_inspection_rule API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['networkFirewallPolicyId'] + resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/tunnelInspectionRules" + method = "POST" + operation_name = "create_tunnel_inspection_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/CreateTunnelInspectionRule" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"create_tunnel_inspection_rule got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "networkFirewallPolicyId": network_firewall_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_tunnel_inspection_rule_details, + response_type="TunnelInspectionRule", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_tunnel_inspection_rule_details, + response_type="TunnelInspectionRule", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def create_url_list(self, network_firewall_policy_id, create_url_list_details, **kwargs): """ Creates a new Url List for the Network Firewall Policy. @@ -4707,6 +4968,115 @@ def delete_service_list(self, network_firewall_policy_id, service_list_name, **k api_reference_link=api_reference_link, required_arguments=required_arguments) + def delete_tunnel_inspection_rule(self, network_firewall_policy_id, tunnel_inspection_rule_name, **kwargs): + """ + Deletes a tunnel inspection rule resource with the given identifier. + + + :param str network_firewall_policy_id: (required) + Unique Network Firewall Policy identifier + + :param str tunnel_inspection_rule_name: (required) + Unique identifier for Tunnel Inspection Rules in the network firewall policy. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_tunnel_inspection_rule API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['networkFirewallPolicyId', 'tunnelInspectionRuleName'] + resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/tunnelInspectionRules/{tunnelInspectionRuleName}" + method = "DELETE" + operation_name = "delete_tunnel_inspection_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/DeleteTunnelInspectionRule" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"delete_tunnel_inspection_rule got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "networkFirewallPolicyId": network_firewall_policy_id, + "tunnelInspectionRuleName": tunnel_inspection_rule_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def delete_url_list(self, network_firewall_policy_id, url_list_name, **kwargs): """ Deletes a Url List resource with the given identifier. @@ -5876,7 +6246,110 @@ def get_service(self, network_firewall_policy_id, service_name, **kwargs): path_params=path_params, query_params=query_params, header_params=header_params, - response_type="Service", + response_type="Service", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="Service", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_service_list(self, network_firewall_policy_id, service_list_name, **kwargs): + """ + Get ServiceList by the given name in the context of network firewall policy. + + + :param str network_firewall_policy_id: (required) + Unique Network Firewall Policy identifier + + :param str service_list_name: (required) + Unique name identifier for Service Lists in the scope of Network Firewall Policy. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_firewall.models.ServiceList` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_service_list API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['networkFirewallPolicyId', 'serviceListName'] + resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/serviceLists/{serviceListName}" + method = "GET" + operation_name = "get_service_list" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/ServiceList/GetServiceList" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"get_service_list got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "networkFirewallPolicyId": network_firewall_policy_id, + "serviceListName": service_list_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ServiceList", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5886,24 +6359,23 @@ def get_service(self, network_firewall_policy_id, service_name, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="Service", + response_type="ServiceList", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_service_list(self, network_firewall_policy_id, service_list_name, **kwargs): + def get_tunnel_inspection_rule(self, network_firewall_policy_id, tunnel_inspection_rule_name, **kwargs): """ - Get ServiceList by the given name in the context of network firewall policy. + Get tunnel inspection rule by the given name in the context of network firewall policy. :param str network_firewall_policy_id: (required) Unique Network Firewall Policy identifier - :param str service_list_name: (required) - Unique name identifier for Service Lists in the scope of Network Firewall Policy. + :param str tunnel_inspection_rule_name: (required) + Unique identifier for Tunnel Inspection Rules in the network firewall policy. :param str opc_request_id: (optional) The client request ID for tracing. @@ -5920,18 +6392,18 @@ def get_service_list(self, network_firewall_policy_id, service_list_name, **kwar allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings - :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_firewall.models.ServiceList` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_firewall.models.TunnelInspectionRule` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_service_list API. + Click `here `__ to see an example of how to use get_tunnel_inspection_rule API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['networkFirewallPolicyId', 'serviceListName'] - resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/serviceLists/{serviceListName}" + required_arguments = ['networkFirewallPolicyId', 'tunnelInspectionRuleName'] + resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/tunnelInspectionRules/{tunnelInspectionRuleName}" method = "GET" - operation_name = "get_service_list" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/ServiceList/GetServiceList" + operation_name = "get_tunnel_inspection_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/GetTunnelInspectionRule" # Don't accept unknown kwargs expected_kwargs = [ @@ -5942,11 +6414,11 @@ def get_service_list(self, network_firewall_policy_id, service_list_name, **kwar extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_service_list got unknown kwargs: {extra_kwargs!r}") + f"get_tunnel_inspection_rule got unknown kwargs: {extra_kwargs!r}") path_params = { "networkFirewallPolicyId": network_firewall_policy_id, - "serviceListName": service_list_name + "tunnelInspectionRuleName": tunnel_inspection_rule_name } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5979,7 +6451,7 @@ def get_service_list(self, network_firewall_policy_id, service_list_name, **kwar method=method, path_params=path_params, header_params=header_params, - response_type="ServiceList", + response_type="TunnelInspectionRule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -5990,7 +6462,7 @@ def get_service_list(self, network_firewall_policy_id, service_list_name, **kwar method=method, path_params=path_params, header_params=header_params, - response_type="ServiceList", + response_type="TunnelInspectionRule", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -7853,6 +8325,158 @@ def list_services(self, network_firewall_policy_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_tunnel_inspection_rules(self, network_firewall_policy_id, **kwargs): + """ + Returns a list of tunnel inspection rules for the network firewall policy. + + + :param str network_firewall_policy_id: (required) + Unique Network Firewall Policy identifier + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + A token representing the position at which to start retrieving results. This must come from the `opc-next-page` or `opc-prev-page` header field of a previous response. + + :param str sort_order: (optional) + The sort order to use, either 'ASC' or 'DESC'. + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param int tunnel_inspection_rule_priority_order: (optional) + Unique priority order for Tunnel Inspection rules in the network firewall policy. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_firewall.models.TunnelInspectionRuleSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_tunnel_inspection_rules API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['networkFirewallPolicyId'] + resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/tunnelInspectionRules" + method = "GET" + operation_name = "list_tunnel_inspection_rules" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/ListTunnelInspectionRules" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "display_name", + "tunnel_inspection_rule_priority_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_tunnel_inspection_rules got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "networkFirewallPolicyId": network_firewall_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }" + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }" + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "displayName": kwargs.get("display_name", missing), + "tunnelInspectionRulePriorityOrder": kwargs.get("tunnel_inspection_rule_priority_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TunnelInspectionRuleSummaryCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TunnelInspectionRuleSummaryCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def list_url_lists(self, network_firewall_policy_id, **kwargs): """ Returns a list of URL lists for the Network Firewall Policy. @@ -9820,6 +10444,122 @@ def update_service_list(self, network_firewall_policy_id, service_list_name, upd api_reference_link=api_reference_link, required_arguments=required_arguments) + def update_tunnel_inspection_rule(self, network_firewall_policy_id, tunnel_inspection_rule_name, update_tunnel_inspection_rule_details, **kwargs): + """ + Updates the tunnel inspection rule with the given name in the network firewall policy. + + + :param str network_firewall_policy_id: (required) + Unique Network Firewall Policy identifier + + :param str tunnel_inspection_rule_name: (required) + Unique identifier for Tunnel Inspection Rules in the network firewall policy. + + :param oci.network_firewall.models.UpdateTunnelInspectionRuleDetails update_tunnel_inspection_rule_details: (required) + The information to be updated. + + :param str if_match: (optional) + 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. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_firewall.models.TunnelInspectionRule` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_tunnel_inspection_rule API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['networkFirewallPolicyId', 'tunnelInspectionRuleName'] + resource_path = "/networkFirewallPolicies/{networkFirewallPolicyId}/tunnelInspectionRules/{tunnelInspectionRuleName}" + method = "PUT" + operation_name = "update_tunnel_inspection_rule" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/network-firewall/20230501/TunnelInspectionRule/UpdateTunnelInspectionRule" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"update_tunnel_inspection_rule got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "networkFirewallPolicyId": network_firewall_policy_id, + "tunnelInspectionRuleName": tunnel_inspection_rule_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string') + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_tunnel_inspection_rule_details, + response_type="TunnelInspectionRule", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_tunnel_inspection_rule_details, + response_type="TunnelInspectionRule", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def update_url_list(self, network_firewall_policy_id, url_list_name, update_url_list_details, **kwargs): """ Updates the Url list with the given name in the network firewall policy. diff --git a/src/oci/network_firewall/network_firewall_client_composite_operations.py b/src/oci/network_firewall/network_firewall_client_composite_operations.py index bca57d26c4..4f9bd4169f 100644 --- a/src/oci/network_firewall/network_firewall_client_composite_operations.py +++ b/src/oci/network_firewall/network_firewall_client_composite_operations.py @@ -445,6 +445,48 @@ def bulk_upload_services_and_wait_for_state(self, network_firewall_policy_id, bu except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def bulk_upload_tunnel_inspection_rules_and_wait_for_state(self, network_firewall_policy_id, bulk_upload_tunnel_inspection_rules_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.network_firewall.NetworkFirewallClient.bulk_upload_tunnel_inspection_rules` and waits for the :py:class:`~oci.network_firewall.models.WorkRequest` + to enter the given state(s). + + :param str network_firewall_policy_id: (required) + Unique Network Firewall Policy identifier + + :param stream bulk_upload_tunnel_inspection_rules_details: (required) + Request details to create the tunnel inspection rule for the network firewall policy Resource. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.network_firewall.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.network_firewall.NetworkFirewallClient.bulk_upload_tunnel_inspection_rules` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.bulk_upload_tunnel_inspection_rules(network_firewall_policy_id, bulk_upload_tunnel_inspection_rules_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + if 'opc-work-request-id' not in operation_result.headers: + return operation_result + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def bulk_upload_url_lists_and_wait_for_state(self, network_firewall_policy_id, bulk_upload_url_lists_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.network_firewall.NetworkFirewallClient.bulk_upload_url_lists` and waits for the :py:class:`~oci.network_firewall.models.WorkRequest` diff --git a/src/oci/redis/models/create_redis_cluster_details.py b/src/oci/redis/models/create_redis_cluster_details.py index 8e2d3ccdcf..606de3131c 100644 --- a/src/oci/redis/models/create_redis_cluster_details.py +++ b/src/oci/redis/models/create_redis_cluster_details.py @@ -249,7 +249,12 @@ def subnet_id(self, subnet_id): def nsg_ids(self): """ Gets the nsg_ids of this CreateRedisClusterDetails. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :return: The nsg_ids of this CreateRedisClusterDetails. @@ -261,7 +266,12 @@ def nsg_ids(self): def nsg_ids(self, nsg_ids): """ Sets the nsg_ids of this CreateRedisClusterDetails. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :param nsg_ids: The nsg_ids of this CreateRedisClusterDetails. diff --git a/src/oci/redis/models/redis_cluster.py b/src/oci/redis/models/redis_cluster.py index fc1e37d580..88d39b0af7 100644 --- a/src/oci/redis/models/redis_cluster.py +++ b/src/oci/redis/models/redis_cluster.py @@ -45,6 +45,10 @@ class RedisCluster(object): #: This constant has a value of "V7_0_5" SOFTWARE_VERSION_V7_0_5 = "V7_0_5" + #: A constant which can be used with the software_version property of a RedisCluster. + #: This constant has a value of "REDIS_7_0" + SOFTWARE_VERSION_REDIS_7_0 = "REDIS_7_0" + def __init__(self, **kwargs): """ Initializes a new RedisCluster object with values from keyword arguments. @@ -98,7 +102,7 @@ def __init__(self, **kwargs): :param software_version: The value to assign to the software_version property of this RedisCluster. - Allowed values for this property are: "V7_0_5", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "V7_0_5", "REDIS_7_0", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type software_version: str @@ -486,7 +490,7 @@ def software_version(self): **[Required]** Gets the software_version of this RedisCluster. The Redis version that the cluster is running. - Allowed values for this property are: "V7_0_5", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "V7_0_5", "REDIS_7_0", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -505,7 +509,7 @@ def software_version(self, software_version): :param software_version: The software_version of this RedisCluster. :type: str """ - allowed_values = ["V7_0_5"] + allowed_values = ["V7_0_5", "REDIS_7_0"] if not value_allowed_none_or_none_sentinel(software_version, allowed_values): software_version = 'UNKNOWN_ENUM_VALUE' self._software_version = software_version @@ -618,7 +622,12 @@ def node_collection(self, node_collection): def nsg_ids(self): """ Gets the nsg_ids of this RedisCluster. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :return: The nsg_ids of this RedisCluster. @@ -630,7 +639,12 @@ def nsg_ids(self): def nsg_ids(self, nsg_ids): """ Sets the nsg_ids of this RedisCluster. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :param nsg_ids: The nsg_ids of this RedisCluster. diff --git a/src/oci/redis/models/redis_cluster_summary.py b/src/oci/redis/models/redis_cluster_summary.py index 503148dcfc..fef57cd86c 100644 --- a/src/oci/redis/models/redis_cluster_summary.py +++ b/src/oci/redis/models/redis_cluster_summary.py @@ -547,7 +547,12 @@ def time_updated(self, time_updated): def nsg_ids(self): """ Gets the nsg_ids of this RedisClusterSummary. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :return: The nsg_ids of this RedisClusterSummary. @@ -559,7 +564,12 @@ def nsg_ids(self): def nsg_ids(self, nsg_ids): """ Sets the nsg_ids of this RedisClusterSummary. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :param nsg_ids: The nsg_ids of this RedisClusterSummary. diff --git a/src/oci/redis/models/update_redis_cluster_details.py b/src/oci/redis/models/update_redis_cluster_details.py index 9cb8e91cbb..f4430f4c77 100644 --- a/src/oci/redis/models/update_redis_cluster_details.py +++ b/src/oci/redis/models/update_redis_cluster_details.py @@ -146,7 +146,12 @@ def node_memory_in_gbs(self, node_memory_in_gbs): def nsg_ids(self): """ Gets the nsg_ids of this UpdateRedisClusterDetails. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :return: The nsg_ids of this UpdateRedisClusterDetails. @@ -158,7 +163,12 @@ def nsg_ids(self): def nsg_ids(self, nsg_ids): """ Sets the nsg_ids of this UpdateRedisClusterDetails. - OCIDs of the NSGs to control access in the customer network + A list of Network Security Group (NSG) `OCIDs`__ + associated with this cluster. For more information, + see `Using an NSG for Redis Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/redis/connecttorediscluster.htm#connecttorediscluster__networksecuritygroup :param nsg_ids: The nsg_ids of this UpdateRedisClusterDetails. diff --git a/src/oci/stack_monitoring/models/baselineable_metric.py b/src/oci/stack_monitoring/models/baselineable_metric.py index 09fe0007d0..ee51c96eef 100644 --- a/src/oci/stack_monitoring/models/baselineable_metric.py +++ b/src/oci/stack_monitoring/models/baselineable_metric.py @@ -28,22 +28,6 @@ def __init__(self, **kwargs): Initializes a new BaselineableMetric object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): - :param created_by: - The value to assign to the created_by property of this BaselineableMetric. - :type created_by: str - - :param last_updated_by: - The value to assign to the last_updated_by property of this BaselineableMetric. - :type last_updated_by: str - - :param time_created: - The value to assign to the time_created property of this BaselineableMetric. - :type time_created: datetime - - :param time_last_updated: - The value to assign to the time_last_updated property of this BaselineableMetric. - :type time_last_updated: datetime - :param id: The value to assign to the id property of this BaselineableMetric. :type id: str @@ -78,10 +62,30 @@ def __init__(self, **kwargs): The value to assign to the resource_group property of this BaselineableMetric. :type resource_group: str + :param resource_type: + The value to assign to the resource_type property of this BaselineableMetric. + :type resource_type: str + :param is_out_of_box: The value to assign to the is_out_of_box property of this BaselineableMetric. :type is_out_of_box: bool + :param created_by: + The value to assign to the created_by property of this BaselineableMetric. + :type created_by: str + + :param last_updated_by: + The value to assign to the last_updated_by property of this BaselineableMetric. + :type last_updated_by: str + + :param time_created: + The value to assign to the time_created property of this BaselineableMetric. + :type time_created: datetime + + :param time_last_updated: + The value to assign to the time_last_updated property of this BaselineableMetric. + :type time_last_updated: datetime + :param freeform_tags: The value to assign to the freeform_tags property of this BaselineableMetric. :type freeform_tags: dict(str, str) @@ -96,10 +100,6 @@ def __init__(self, **kwargs): """ self.swagger_types = { - 'created_by': 'str', - 'last_updated_by': 'str', - 'time_created': 'datetime', - 'time_last_updated': 'datetime', 'id': 'str', 'lifecycle_state': 'str', 'tenancy_id': 'str', @@ -108,17 +108,18 @@ def __init__(self, **kwargs): 'column': 'str', 'namespace': 'str', 'resource_group': 'str', + 'resource_type': 'str', 'is_out_of_box': 'bool', + 'created_by': 'str', + 'last_updated_by': 'str', + 'time_created': 'datetime', + 'time_last_updated': 'datetime', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { - 'created_by': 'createdBy', - 'last_updated_by': 'lastUpdatedBy', - 'time_created': 'timeCreated', - 'time_last_updated': 'timeLastUpdated', 'id': 'id', 'lifecycle_state': 'lifecycleState', 'tenancy_id': 'tenancyId', @@ -127,16 +128,17 @@ def __init__(self, **kwargs): 'column': 'column', 'namespace': 'namespace', 'resource_group': 'resourceGroup', + 'resource_type': 'resourceType', 'is_out_of_box': 'isOutOfBox', + 'created_by': 'createdBy', + 'last_updated_by': 'lastUpdatedBy', + 'time_created': 'timeCreated', + 'time_last_updated': 'timeLastUpdated', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', 'system_tags': 'systemTags' } - self._created_by = None - self._last_updated_by = None - self._time_created = None - self._time_last_updated = None self._id = None self._lifecycle_state = None self._tenancy_id = None @@ -145,107 +147,16 @@ def __init__(self, **kwargs): self._column = None self._namespace = None self._resource_group = None + self._resource_type = None self._is_out_of_box = None + self._created_by = None + self._last_updated_by = None + self._time_created = None + self._time_last_updated = None self._freeform_tags = None self._defined_tags = None self._system_tags = None - @property - def created_by(self): - """ - Gets the created_by of this BaselineableMetric. - Created user id - - - :return: The created_by of this BaselineableMetric. - :rtype: str - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """ - Sets the created_by of this BaselineableMetric. - Created user id - - - :param created_by: The created_by of this BaselineableMetric. - :type: str - """ - self._created_by = created_by - - @property - def last_updated_by(self): - """ - Gets the last_updated_by of this BaselineableMetric. - last Updated user id - - - :return: The last_updated_by of this BaselineableMetric. - :rtype: str - """ - return self._last_updated_by - - @last_updated_by.setter - def last_updated_by(self, last_updated_by): - """ - Sets the last_updated_by of this BaselineableMetric. - last Updated user id - - - :param last_updated_by: The last_updated_by of this BaselineableMetric. - :type: str - """ - self._last_updated_by = last_updated_by - - @property - def time_created(self): - """ - Gets the time_created of this BaselineableMetric. - creation date - - - :return: The time_created of this BaselineableMetric. - :rtype: datetime - """ - return self._time_created - - @time_created.setter - def time_created(self, time_created): - """ - Sets the time_created of this BaselineableMetric. - creation date - - - :param time_created: The time_created of this BaselineableMetric. - :type: datetime - """ - self._time_created = time_created - - @property - def time_last_updated(self): - """ - Gets the time_last_updated of this BaselineableMetric. - last updated time - - - :return: The time_last_updated of this BaselineableMetric. - :rtype: datetime - """ - return self._time_last_updated - - @time_last_updated.setter - def time_last_updated(self, time_last_updated): - """ - Sets the time_last_updated of this BaselineableMetric. - last updated time - - - :param time_last_updated: The time_last_updated of this BaselineableMetric. - :type: datetime - """ - self._time_last_updated = time_last_updated - @property def id(self): """ @@ -444,6 +355,30 @@ def resource_group(self, resource_group): """ self._resource_group = resource_group + @property + def resource_type(self): + """ + Gets the resource_type of this BaselineableMetric. + Resource type of the metric + + + :return: The resource_type of this BaselineableMetric. + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """ + Sets the resource_type of this BaselineableMetric. + Resource type of the metric + + + :param resource_type: The resource_type of this BaselineableMetric. + :type: str + """ + self._resource_type = resource_type + @property def is_out_of_box(self): """ @@ -468,6 +403,102 @@ def is_out_of_box(self, is_out_of_box): """ self._is_out_of_box = is_out_of_box + @property + def created_by(self): + """ + Gets the created_by of this BaselineableMetric. + Created user id + + + :return: The created_by of this BaselineableMetric. + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """ + Sets the created_by of this BaselineableMetric. + Created user id + + + :param created_by: The created_by of this BaselineableMetric. + :type: str + """ + self._created_by = created_by + + @property + def last_updated_by(self): + """ + Gets the last_updated_by of this BaselineableMetric. + last Updated user id + + + :return: The last_updated_by of this BaselineableMetric. + :rtype: str + """ + return self._last_updated_by + + @last_updated_by.setter + def last_updated_by(self, last_updated_by): + """ + Sets the last_updated_by of this BaselineableMetric. + last Updated user id + + + :param last_updated_by: The last_updated_by of this BaselineableMetric. + :type: str + """ + self._last_updated_by = last_updated_by + + @property + def time_created(self): + """ + Gets the time_created of this BaselineableMetric. + creation date + + + :return: The time_created of this BaselineableMetric. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this BaselineableMetric. + creation date + + + :param time_created: The time_created of this BaselineableMetric. + :type: datetime + """ + self._time_created = time_created + + @property + def time_last_updated(self): + """ + Gets the time_last_updated of this BaselineableMetric. + last updated time + + + :return: The time_last_updated of this BaselineableMetric. + :rtype: datetime + """ + return self._time_last_updated + + @time_last_updated.setter + def time_last_updated(self, time_last_updated): + """ + Sets the time_last_updated of this BaselineableMetric. + last updated time + + + :param time_last_updated: The time_last_updated of this BaselineableMetric. + :type: datetime + """ + self._time_last_updated = time_last_updated + @property def freeform_tags(self): """ diff --git a/src/oci/stack_monitoring/models/baselineable_metric_summary.py b/src/oci/stack_monitoring/models/baselineable_metric_summary.py index b9b7002bae..b46d67420c 100644 --- a/src/oci/stack_monitoring/models/baselineable_metric_summary.py +++ b/src/oci/stack_monitoring/models/baselineable_metric_summary.py @@ -62,6 +62,10 @@ def __init__(self, **kwargs): The value to assign to the resource_group property of this BaselineableMetricSummary. :type resource_group: str + :param resource_type: + The value to assign to the resource_type property of this BaselineableMetricSummary. + :type resource_type: str + :param is_out_of_box: The value to assign to the is_out_of_box property of this BaselineableMetricSummary. :type is_out_of_box: bool @@ -88,6 +92,7 @@ def __init__(self, **kwargs): 'column': 'str', 'namespace': 'str', 'resource_group': 'str', + 'resource_type': 'str', 'is_out_of_box': 'bool', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', @@ -103,6 +108,7 @@ def __init__(self, **kwargs): 'column': 'column', 'namespace': 'namespace', 'resource_group': 'resourceGroup', + 'resource_type': 'resourceType', 'is_out_of_box': 'isOutOfBox', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', @@ -117,6 +123,7 @@ def __init__(self, **kwargs): self._column = None self._namespace = None self._resource_group = None + self._resource_type = None self._is_out_of_box = None self._freeform_tags = None self._defined_tags = None @@ -320,6 +327,30 @@ def resource_group(self, resource_group): """ self._resource_group = resource_group + @property + def resource_type(self): + """ + Gets the resource_type of this BaselineableMetricSummary. + Resource type of the metric + + + :return: The resource_type of this BaselineableMetricSummary. + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """ + Sets the resource_type of this BaselineableMetricSummary. + Resource type of the metric + + + :param resource_type: The resource_type of this BaselineableMetricSummary. + :type: str + """ + self._resource_type = resource_type + @property def is_out_of_box(self): """ diff --git a/src/oci/stack_monitoring/models/create_baselineable_metric_details.py b/src/oci/stack_monitoring/models/create_baselineable_metric_details.py index 9b36d8de45..2fce69ff60 100644 --- a/src/oci/stack_monitoring/models/create_baselineable_metric_details.py +++ b/src/oci/stack_monitoring/models/create_baselineable_metric_details.py @@ -40,13 +40,18 @@ def __init__(self, **kwargs): The value to assign to the resource_group property of this CreateBaselineableMetricDetails. :type resource_group: str + :param resource_type: + The value to assign to the resource_type property of this CreateBaselineableMetricDetails. + :type resource_type: str + """ self.swagger_types = { 'compartment_id': 'str', 'name': 'str', 'column': 'str', 'namespace': 'str', - 'resource_group': 'str' + 'resource_group': 'str', + 'resource_type': 'str' } self.attribute_map = { @@ -54,7 +59,8 @@ def __init__(self, **kwargs): 'name': 'name', 'column': 'column', 'namespace': 'namespace', - 'resource_group': 'resourceGroup' + 'resource_group': 'resourceGroup', + 'resource_type': 'resourceType' } self._compartment_id = None @@ -62,6 +68,7 @@ def __init__(self, **kwargs): self._column = None self._namespace = None self._resource_group = None + self._resource_type = None @property def compartment_id(self): @@ -90,7 +97,7 @@ def compartment_id(self, compartment_id): @property def name(self): """ - **[Required]** Gets the name of this CreateBaselineableMetricDetails. + Gets the name of this CreateBaselineableMetricDetails. name of the metric @@ -162,7 +169,7 @@ def namespace(self, namespace): @property def resource_group(self): """ - **[Required]** Gets the resource_group of this CreateBaselineableMetricDetails. + Gets the resource_group of this CreateBaselineableMetricDetails. Resource group of the metric @@ -183,6 +190,30 @@ def resource_group(self, resource_group): """ self._resource_group = resource_group + @property + def resource_type(self): + """ + Gets the resource_type of this CreateBaselineableMetricDetails. + Resource type of the metric + + + :return: The resource_type of this CreateBaselineableMetricDetails. + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """ + Sets the resource_type of this CreateBaselineableMetricDetails. + Resource type of the metric + + + :param resource_type: The resource_type of this CreateBaselineableMetricDetails. + :type: str + """ + self._resource_type = resource_type + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/stack_monitoring/models/update_baselineable_metric_details.py b/src/oci/stack_monitoring/models/update_baselineable_metric_details.py index 599bc8307b..9b1d554292 100644 --- a/src/oci/stack_monitoring/models/update_baselineable_metric_details.py +++ b/src/oci/stack_monitoring/models/update_baselineable_metric_details.py @@ -61,6 +61,10 @@ def __init__(self, **kwargs): The value to assign to the resource_group property of this UpdateBaselineableMetricDetails. :type resource_group: str + :param resource_type: + The value to assign to the resource_type property of this UpdateBaselineableMetricDetails. + :type resource_type: str + :param is_out_of_box: The value to assign to the is_out_of_box property of this UpdateBaselineableMetricDetails. :type is_out_of_box: bool @@ -87,6 +91,7 @@ def __init__(self, **kwargs): 'column': 'str', 'namespace': 'str', 'resource_group': 'str', + 'resource_type': 'str', 'is_out_of_box': 'bool', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))', @@ -102,6 +107,7 @@ def __init__(self, **kwargs): 'column': 'column', 'namespace': 'namespace', 'resource_group': 'resourceGroup', + 'resource_type': 'resourceType', 'is_out_of_box': 'isOutOfBox', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags', @@ -116,6 +122,7 @@ def __init__(self, **kwargs): self._column = None self._namespace = None self._resource_group = None + self._resource_type = None self._is_out_of_box = None self._freeform_tags = None self._defined_tags = None @@ -320,6 +327,30 @@ def resource_group(self, resource_group): """ self._resource_group = resource_group + @property + def resource_type(self): + """ + Gets the resource_type of this UpdateBaselineableMetricDetails. + Resource type of the metric + + + :return: The resource_type of this UpdateBaselineableMetricDetails. + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """ + Sets the resource_type of this UpdateBaselineableMetricDetails. + Resource type of the metric + + + :param resource_type: The resource_type of this UpdateBaselineableMetricDetails. + :type: str + """ + self._resource_type = resource_type + @property def is_out_of_box(self): """ diff --git a/src/oci/stack_monitoring/stack_monitoring_client.py b/src/oci/stack_monitoring/stack_monitoring_client.py index 32e88d7c4b..6be1adbca4 100644 --- a/src/oci/stack_monitoring/stack_monitoring_client.py +++ b/src/oci/stack_monitoring/stack_monitoring_client.py @@ -4032,6 +4032,12 @@ def list_baselineable_metrics(self, **kwargs): :param str resource_group: (optional) Resource Group + :param str resource_type: (optional) + Resource Type + + :param bool is_out_of_box: (optional) + Is the baseline enabled metric defined out of box by Oracle or by end-user + :param str name: (optional) Metric Name @@ -4099,6 +4105,8 @@ def list_baselineable_metrics(self, **kwargs): "retry_strategy", "opc_request_id", "resource_group", + "resource_type", + "is_out_of_box", "name", "metric_namespace", "limit", @@ -4129,6 +4137,8 @@ def list_baselineable_metrics(self, **kwargs): query_params = { "resourceGroup": kwargs.get("resource_group", missing), + "resourceType": kwargs.get("resource_type", missing), + "isOutOfBox": kwargs.get("is_out_of_box", missing), "name": kwargs.get("name", missing), "metricNamespace": kwargs.get("metric_namespace", missing), "limit": kwargs.get("limit", missing), diff --git a/src/oci/version.py b/src/oci/version.py index b6f3a4dee0..c64b758301 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = "2.129.4" +__version__ = "2.130.0"