From 8b40af6a3058e13d471904f43030979baa112364 Mon Sep 17 00:00:00 2001 From: oci-dex-release-bot Date: Tue, 23 Jan 2024 04:18:56 +0000 Subject: [PATCH] Releasing version 2.119.1 --- CHANGELOG.rst | 10 + docs/api/generative_ai.rst | 57 + .../oci.generative_ai.GenerativeAiClient.rst | 8 + ....GenerativeAiClientCompositeOperations.rst | 8 + ...geDedicatedAiClusterCompartmentDetails.rst | 11 + ...odels.ChangeEndpointCompartmentDetails.rst | 11 + ...i.models.ChangeModelCompartmentDetails.rst | 11 + ...tive_ai.models.ContentModerationConfig.rst | 11 + ...models.CreateDedicatedAiClusterDetails.rst | 11 + ...rative_ai.models.CreateEndpointDetails.rst | 11 + ...enerative_ai.models.CreateModelDetails.rst | 11 + .../oci.generative_ai.models.Dataset.rst | 11 + ...enerative_ai.models.DedicatedAiCluster.rst | 11 + ...e_ai.models.DedicatedAiClusterCapacity.rst | 11 + ...ai.models.DedicatedAiClusterCollection.rst | 11 + ...dels.DedicatedAiClusterHostingCapacity.rst | 11 + ...ve_ai.models.DedicatedAiClusterSummary.rst | 11 + .../oci.generative_ai.models.Endpoint.rst | 11 + ...enerative_ai.models.EndpointCollection.rst | 11 + ...i.generative_ai.models.EndpointSummary.rst | 11 + ...i.generative_ai.models.FineTuneDetails.rst | 11 + .../models/oci.generative_ai.models.Model.rst | 11 + ...i.generative_ai.models.ModelCollection.rst | 11 + .../oci.generative_ai.models.ModelMetrics.rst | 11 + .../oci.generative_ai.models.ModelSummary.rst | 11 + ...erative_ai.models.ObjectStorageDataset.rst | 11 + ...enerative_ai.models.TFewTrainingConfig.rst | 11 + ...e_ai.models.TextGenerationModelMetrics.rst | 11 + ...ci.generative_ai.models.TrainingConfig.rst | 11 + ...models.UpdateDedicatedAiClusterDetails.rst | 11 + ...rative_ai.models.UpdateEndpointDetails.rst | 11 + ...enerative_ai.models.UpdateModelDetails.rst | 11 + ...rative_ai.models.VanillaTrainingConfig.rst | 11 + .../oci.generative_ai.models.WorkRequest.rst | 11 + ....generative_ai.models.WorkRequestError.rst | 11 + ...e_ai.models.WorkRequestErrorCollection.rst | 11 + ...nerative_ai.models.WorkRequestLogEntry.rst | 11 + ...i.models.WorkRequestLogEntryCollection.rst | 11 + ...nerative_ai.models.WorkRequestResource.rst | 11 + ...enerative_ai.models.WorkRequestSummary.rst | 11 + ...ai.models.WorkRequestSummaryCollection.rst | 11 + docs/api/generative_ai_inference.rst | 39 + ..._inference.GenerativeAiInferenceClient.rst | 8 + ...veAiInferenceClientCompositeOperations.rst | 8 + ....generative_ai_inference.models.Choice.rst | 11 + ...rence.models.CohereLlmInferenceRequest.rst | 11 + ...ence.models.CohereLlmInferenceResponse.rst | 11 + ..._inference.models.DedicatedServingMode.rst | 11 + ...e_ai_inference.models.EmbedTextDetails.rst | 11 + ...ve_ai_inference.models.EmbedTextResult.rst | 11 + ...i_inference.models.GenerateTextDetails.rst | 11 + ...ai_inference.models.GenerateTextResult.rst | 11 + ...tive_ai_inference.models.GeneratedText.rst | 11 + ...erence.models.LlamaLlmInferenceRequest.rst | 11 + ...rence.models.LlamaLlmInferenceResponse.rst | 11 + ...i_inference.models.LlmInferenceRequest.rst | 11 + ..._inference.models.LlmInferenceResponse.rst | 11 + ...enerative_ai_inference.models.Logprobs.rst | 11 + ...i_inference.models.OnDemandServingMode.rst | 11 + ...rative_ai_inference.models.ServingMode.rst | 11 + ..._inference.models.SummarizeTextDetails.rst | 11 + ...i_inference.models.SummarizeTextResult.rst | 11 + ...ve_ai_inference.models.TokenLikelihood.rst | 11 + docs/api/landing.rst | 4 + docs/api/stack_monitoring.rst | 8 + ...els.ChangeProcessSetCompartmentDetails.rst | 11 + ...itoring.models.CreateProcessSetDetails.rst | 11 + ...oci.stack_monitoring.models.ProcessSet.rst | 11 + ...monitoring.models.ProcessSetCollection.rst | 11 + ...itoring.models.ProcessSetSpecification.rst | 11 + ....models.ProcessSetSpecificationDetails.rst | 11 + ...ck_monitoring.models.ProcessSetSummary.rst | 11 + ...itoring.models.UpdateProcessSetDetails.rst | 11 + src/oci/__init__.py | 4 +- ...vernance_cp_client_composite_operations.py | 3 - ..._management_client_composite_operations.py | 37 +- ...y_detection_client_composite_operations.py | 33 +- ...ce_document_client_composite_operations.py | 22 +- ...ce_language_client_composite_operations.py | 27 +- ...vice_speech_client_composite_operations.py | 2 - ...vice_vision_client_composite_operations.py | 20 +- .../analytics_client_composite_operations.py | 43 +- ...ubscription_client_composite_operations.py | 3 - ...api_gateway_client_composite_operations.py | 27 +- .../deployment_client_composite_operations.py | 12 +- .../gateway_client_composite_operations.py | 12 +- ...subscribers_client_composite_operations.py | 12 +- ...usage_plans_client_composite_operations.py | 12 +- .../apm_domain_client_composite_operations.py | 18 +- ...n_migration_client_composite_operations.py | 27 +- ...gmt_control_client_composite_operations.py | 6 +- .../artifacts_client_composite_operations.py | 15 - .../audit_client_composite_operations.py | 3 +- .../bastion_client_composite_operations.py | 16 +- .../bds/bds_client_composite_operations.py | 102 +- ...in_platform_client_composite_operations.py | 45 +- .../budget_client_composite_operations.py | 5 - ..._management_client_composite_operations.py | 7 - .../discovery_client_composite_operations.py | 15 +- .../inventory_client_composite_operations.py | 17 +- ...b_agent_svc_client_composite_operations.py | 22 +- ...cloud_guard_client_composite_operations.py | 43 +- .../migration_client_composite_operations.py | 69 +- ...at_customer_client_composite_operations.py | 6 - ...iner_engine_client_composite_operations.py | 53 +- ...er_instance_client_composite_operations.py | 24 +- ...lockstorage_client_composite_operations.py | 27 +- .../compute_client_composite_operations.py | 76 +- ..._management_client_composite_operations.py | 28 +- ...ual_network_client_composite_operations.py | 138 +- .../dashboard_client_composite_operations.py | 3 - ...board_group_client_composite_operations.py | 3 - ...ata_catalog_client_composite_operations.py | 80 +- .../data_flow_client_composite_operations.py | 44 +- ...integration_client_composite_operations.py | 34 +- ..._management_client_composite_operations.py | 28 +- ...ta_labeling_client_composite_operations.py | 6 - .../data_safe_client_composite_operations.py | 369 ++- ...ata_science_client_composite_operations.py | 80 +- .../database_client_composite_operations.py | 656 ++-- ..._management_client_composite_operations.py | 78 +- ...e_migration_client_composite_operations.py | 35 +- ...abase_tools_client_composite_operations.py | 28 +- .../devops_client_composite_operations.py | 116 +- ...er_recovery_client_composite_operations.py | 52 +- .../dns/dns_client_composite_operations.py | 18 - ..._export_job_client_composite_operations.py | 3 - ...r_appliance_client_composite_operations.py | 2 - ...entitlement_client_composite_operations.py | 1 - ...sfer_device_client_composite_operations.py | 1 - ...ransfer_job_client_composite_operations.py | 3 - ...fer_package_client_composite_operations.py | 2 - ...m_warehouse_client_composite_operations.py | 12 +- .../email_client_composite_operations.py | 24 +- .../events_client_composite_operations.py | 3 - ...ile_storage_client_composite_operations.py | 25 - ...ware_update_client_composite_operations.py | 53 +- ..._management_client_composite_operations.py | 6 - ...pplications_client_composite_operations.py | 49 +- src/oci/generative_ai/__init__.py | 14 + src/oci/generative_ai/generative_ai_client.py | 2901 +++++++++++++++++ ...nerative_ai_client_composite_operations.py | 421 +++ src/oci/generative_ai/models/__init__.py | 86 + ...edicated_ai_cluster_compartment_details.py | 72 + .../change_endpoint_compartment_details.py | 72 + .../change_model_compartment_details.py | 72 + .../models/content_moderation_config.py | 72 + .../create_dedicated_ai_cluster_details.py | 329 ++ .../models/create_endpoint_details.py | 305 ++ .../models/create_model_details.py | 336 ++ src/oci/generative_ai/models/dataset.py | 105 + .../models/dedicated_ai_cluster.py | 612 ++++ .../models/dedicated_ai_cluster_capacity.py | 101 + .../models/dedicated_ai_cluster_collection.py | 72 + .../dedicated_ai_cluster_hosting_capacity.py | 113 + .../models/dedicated_ai_cluster_summary.py | 556 ++++ src/oci/generative_ai/models/endpoint.py | 533 +++ .../models/endpoint_collection.py | 72 + .../generative_ai/models/endpoint_summary.py | 511 +++ .../generative_ai/models/fine_tune_details.py | 126 + src/oci/generative_ai/models/model.py | 752 +++++ .../generative_ai/models/model_collection.py | 72 + src/oci/generative_ai/models/model_metrics.py | 101 + src/oci/generative_ai/models/model_summary.py | 661 ++++ .../models/object_storage_dataset.py | 144 + .../models/t_few_training_config.py | 93 + .../models/text_generation_model_metrics.py | 113 + .../generative_ai/models/training_config.py | 299 ++ .../update_dedicated_ai_cluster_details.py | 216 ++ .../models/update_endpoint_details.py | 212 ++ .../models/update_model_details.py | 247 ++ .../models/vanilla_training_config.py | 124 + src/oci/generative_ai/models/work_request.py | 438 +++ .../models/work_request_error.py | 146 + .../models/work_request_error_collection.py | 72 + .../models/work_request_log_entry.py | 109 + .../work_request_log_entry_collection.py | 72 + .../models/work_request_resource.py | 238 ++ .../models/work_request_summary.py | 436 +++ .../models/work_request_summary_collection.py | 72 + src/oci/generative_ai_inference/__init__.py | 14 + .../generative_ai_inference_client.py | 419 +++ ...i_inference_client_composite_operations.py | 26 + .../models/__init__.py | 50 + .../generative_ai_inference/models/choice.py | 165 + .../models/cohere_llm_inference_request.py | 510 +++ .../models/cohere_llm_inference_response.py | 144 + .../models/dedicated_serving_mode.py | 82 + .../models/embed_text_details.py | 267 ++ .../models/embed_text_result.py | 196 ++ .../models/generate_text_details.py | 126 + .../models/generate_text_result.py | 130 + .../models/generated_text.py | 204 ++ .../models/llama_llm_inference_request.py | 443 +++ .../models/llama_llm_inference_response.py | 113 + .../models/llm_inference_request.py | 109 + .../models/llm_inference_response.py | 109 + .../models/logprobs.py | 165 + .../models/on_demand_serving_mode.py | 82 + .../models/serving_mode.py | 109 + .../models/summarize_text_details.py | 388 +++ .../models/summarize_text_result.py | 196 ++ .../models/token_likelihood.py | 107 + ...golden_gate_client_composite_operations.py | 90 +- ...rnance_rule_client_composite_operations.py | 21 +- .../identity_client_composite_operations.py | 88 +- ...on_instance_client_composite_operations.py | 27 +- ...ent_service_client_composite_operations.py | 63 +- ...va_download_client_composite_operations.py | 18 +- .../ekm_client_composite_operations.py | 3 - ..._management_client_composite_operations.py | 10 - .../kms_vault_client_composite_operations.py | 5 - ...nse_manager_client_composite_operations.py | 6 - .../quotas_client_composite_operations.py | 5 - ...ad_balancer_client_composite_operations.py | 99 +- .../lockbox_client_composite_operations.py | 12 +- ...g_analytics_client_composite_operations.py | 60 +- ..._management_client_composite_operations.py | 42 +- ...ement_agent_client_composite_operations.py | 8 +- .../dashx_apis_client_composite_operations.py | 8 - ...marketplace_client_composite_operations.py | 6 +- .../models/international_market_price.py | 186 +- src/oci/marketplace/models/pricing_model.py | 186 +- src/oci/marketplace/models/publication.py | 43 +- .../marketplace/models/publication_summary.py | 121 +- ...e_publisher_client_composite_operations.py | 65 +- ...ia_services_client_composite_operations.py | 21 - .../monitoring_client_composite_operations.py | 5 - .../channels_client_composite_operations.py | 15 +- .../db_backups_client_composite_operations.py | 10 +- .../db_system_client_composite_operations.py | 39 +- .../mysqlaas_client_composite_operations.py | 5 +- .../replicas_client_composite_operations.py | 9 +- ...rk_firewall_client_composite_operations.py | 60 +- ...ad_balancer_client_composite_operations.py | 45 +- .../nosql_client_composite_operations.py | 27 +- ...ect_storage_client_composite_operations.py | 6 +- ...ce_instance_client_composite_operations.py | 12 +- .../cluster_client_composite_operations.py | 7 +- .../esxi_host_client_composite_operations.py | 16 +- .../ocvp/sddc_client_composite_operations.py | 19 +- .../management_client_composite_operations.py | 53 +- .../oda/oda_client_composite_operations.py | 25 +- .../odapackage_client_composite_operations.py | 9 +- ..._data_plane_client_composite_operations.py | 2 - ...pa_instance_client_composite_operations.py | 12 +- ...ster_backup_client_composite_operations.py | 6 +- ...rch_cluster_client_composite_operations.py | 21 +- ...ss_requests_client_composite_operations.py | 2 - ..._assignment_client_composite_operations.py | 3 - ...tor_control_client_composite_operations.py | 3 - ...ns_insights_client_composite_operations.py | 168 +- .../optimizer_client_composite_operations.py | 9 +- ..._management_client_composite_operations.py | 66 +- ...environment_client_composite_operations.py | 12 +- ...ed_instance_client_composite_operations.py | 42 +- ...tance_group_client_composite_operations.py | 33 +- ...ent_station_client_composite_operations.py | 9 +- .../onboarding_client_composite_operations.py | 3 - ...heduled_job_client_composite_operations.py | 3 - ...ware_source_client_composite_operations.py | 7 +- .../postgresql_client_composite_operations.py | 43 +- ...queue_admin_client_composite_operations.py | 15 +- ...se_recovery_client_composite_operations.py | 36 +- ...dis_cluster_client_composite_operations.py | 12 +- ...rce_manager_client_composite_operations.py | 23 +- ...over_bundle_client_composite_operations.py | 6 +- ...ver_cluster_client_composite_operations.py | 6 +- ...entitlement_client_composite_operations.py | 3 - .../rover_node_client_composite_operations.py | 3 - ...e_connector_client_composite_operations.py | 18 +- ...ice_catalog_client_composite_operations.py | 15 +- ...ervice_mesh_client_composite_operations.py | 84 +- src/oci/stack_monitoring/models/__init__.py | 16 + .../change_process_set_compartment_details.py | 78 + .../models/create_process_set_details.py | 200 ++ .../models/discovery_details.py | 10 +- .../models/discovery_job_summary.py | 10 +- .../stack_monitoring/models/process_set.py | 424 +++ .../models/process_set_collection.py | 72 + .../models/process_set_specification.py | 72 + .../process_set_specification_details.py | 165 + .../models/process_set_summary.py | 424 +++ .../models/update_process_set_details.py | 165 + .../stack_monitoring_client.py | 727 ++++- ..._monitoring_client_composite_operations.py | 192 +- ...tream_admin_client_composite_operations.py | 9 - .../domain_client_composite_operations.py | 5 +- ..._governance_client_composite_operations.py | 3 - .../governance_client_composite_operations.py | 6 +- .../link_client_composite_operations.py | 3 +- .../orders_client_composite_operations.py | 3 +- ...rganization_client_composite_operations.py | 12 +- ..._invitation_client_composite_operations.py | 5 +- ..._invitation_client_composite_operations.py | 7 +- ...ubscription_client_composite_operations.py | 4 +- .../usageapi_client_composite_operations.py | 3 - .../vaults_client_composite_operations.py | 2 - ...bs_instance_client_composite_operations.py | 12 +- src/oci/version.py | 2 +- ...vb_instance_client_composite_operations.py | 18 +- ..._monitoring_client_composite_operations.py | 6 +- ...ty_scanning_client_composite_operations.py | 51 +- .../waa/waa_client_composite_operations.py | 27 +- .../redirect_client_composite_operations.py | 9 +- .../waas/waas_client_composite_operations.py | 69 +- .../waf/waf_client_composite_operations.py | 36 +- 307 files changed, 22774 insertions(+), 2244 deletions(-) create mode 100644 docs/api/generative_ai.rst create mode 100644 docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClient.rst create mode 100644 docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClientCompositeOperations.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ChangeDedicatedAiClusterCompartmentDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ChangeEndpointCompartmentDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ChangeModelCompartmentDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ContentModerationConfig.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.CreateDedicatedAiClusterDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.CreateEndpointDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.CreateModelDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.Dataset.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiCluster.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCapacity.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCollection.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterHostingCapacity.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterSummary.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.Endpoint.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.EndpointCollection.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.EndpointSummary.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.FineTuneDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.Model.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ModelCollection.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ModelMetrics.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ModelSummary.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.ObjectStorageDataset.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.TFewTrainingConfig.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.TextGenerationModelMetrics.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.TrainingConfig.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.UpdateDedicatedAiClusterDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.UpdateEndpointDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.UpdateModelDetails.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.VanillaTrainingConfig.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequest.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestError.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestErrorCollection.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntry.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntryCollection.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestResource.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummary.rst create mode 100644 docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummaryCollection.rst create mode 100644 docs/api/generative_ai_inference.rst create mode 100644 docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClient.rst create mode 100644 docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClientCompositeOperations.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Choice.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceRequest.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceResponse.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.DedicatedServingMode.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextDetails.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextResult.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextDetails.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextResult.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GeneratedText.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceRequest.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceResponse.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceRequest.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceResponse.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Logprobs.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.OnDemandServingMode.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.ServingMode.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextDetails.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextResult.rst create mode 100644 docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.TokenLikelihood.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.ChangeProcessSetCompartmentDetails.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.CreateProcessSetDetails.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSet.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetCollection.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecification.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecificationDetails.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSummary.rst create mode 100644 docs/api/stack_monitoring/models/oci.stack_monitoring.models.UpdateProcessSetDetails.rst create mode 100644 src/oci/generative_ai/__init__.py create mode 100644 src/oci/generative_ai/generative_ai_client.py create mode 100644 src/oci/generative_ai/generative_ai_client_composite_operations.py create mode 100644 src/oci/generative_ai/models/__init__.py create mode 100644 src/oci/generative_ai/models/change_dedicated_ai_cluster_compartment_details.py create mode 100644 src/oci/generative_ai/models/change_endpoint_compartment_details.py create mode 100644 src/oci/generative_ai/models/change_model_compartment_details.py create mode 100644 src/oci/generative_ai/models/content_moderation_config.py create mode 100644 src/oci/generative_ai/models/create_dedicated_ai_cluster_details.py create mode 100644 src/oci/generative_ai/models/create_endpoint_details.py create mode 100644 src/oci/generative_ai/models/create_model_details.py create mode 100644 src/oci/generative_ai/models/dataset.py create mode 100644 src/oci/generative_ai/models/dedicated_ai_cluster.py create mode 100644 src/oci/generative_ai/models/dedicated_ai_cluster_capacity.py create mode 100644 src/oci/generative_ai/models/dedicated_ai_cluster_collection.py create mode 100644 src/oci/generative_ai/models/dedicated_ai_cluster_hosting_capacity.py create mode 100644 src/oci/generative_ai/models/dedicated_ai_cluster_summary.py create mode 100644 src/oci/generative_ai/models/endpoint.py create mode 100644 src/oci/generative_ai/models/endpoint_collection.py create mode 100644 src/oci/generative_ai/models/endpoint_summary.py create mode 100644 src/oci/generative_ai/models/fine_tune_details.py create mode 100644 src/oci/generative_ai/models/model.py create mode 100644 src/oci/generative_ai/models/model_collection.py create mode 100644 src/oci/generative_ai/models/model_metrics.py create mode 100644 src/oci/generative_ai/models/model_summary.py create mode 100644 src/oci/generative_ai/models/object_storage_dataset.py create mode 100644 src/oci/generative_ai/models/t_few_training_config.py create mode 100644 src/oci/generative_ai/models/text_generation_model_metrics.py create mode 100644 src/oci/generative_ai/models/training_config.py create mode 100644 src/oci/generative_ai/models/update_dedicated_ai_cluster_details.py create mode 100644 src/oci/generative_ai/models/update_endpoint_details.py create mode 100644 src/oci/generative_ai/models/update_model_details.py create mode 100644 src/oci/generative_ai/models/vanilla_training_config.py create mode 100644 src/oci/generative_ai/models/work_request.py create mode 100644 src/oci/generative_ai/models/work_request_error.py create mode 100644 src/oci/generative_ai/models/work_request_error_collection.py create mode 100644 src/oci/generative_ai/models/work_request_log_entry.py create mode 100644 src/oci/generative_ai/models/work_request_log_entry_collection.py create mode 100644 src/oci/generative_ai/models/work_request_resource.py create mode 100644 src/oci/generative_ai/models/work_request_summary.py create mode 100644 src/oci/generative_ai/models/work_request_summary_collection.py create mode 100644 src/oci/generative_ai_inference/__init__.py create mode 100644 src/oci/generative_ai_inference/generative_ai_inference_client.py create mode 100644 src/oci/generative_ai_inference/generative_ai_inference_client_composite_operations.py create mode 100644 src/oci/generative_ai_inference/models/__init__.py create mode 100644 src/oci/generative_ai_inference/models/choice.py create mode 100644 src/oci/generative_ai_inference/models/cohere_llm_inference_request.py create mode 100644 src/oci/generative_ai_inference/models/cohere_llm_inference_response.py create mode 100644 src/oci/generative_ai_inference/models/dedicated_serving_mode.py create mode 100644 src/oci/generative_ai_inference/models/embed_text_details.py create mode 100644 src/oci/generative_ai_inference/models/embed_text_result.py create mode 100644 src/oci/generative_ai_inference/models/generate_text_details.py create mode 100644 src/oci/generative_ai_inference/models/generate_text_result.py create mode 100644 src/oci/generative_ai_inference/models/generated_text.py create mode 100644 src/oci/generative_ai_inference/models/llama_llm_inference_request.py create mode 100644 src/oci/generative_ai_inference/models/llama_llm_inference_response.py create mode 100644 src/oci/generative_ai_inference/models/llm_inference_request.py create mode 100644 src/oci/generative_ai_inference/models/llm_inference_response.py create mode 100644 src/oci/generative_ai_inference/models/logprobs.py create mode 100644 src/oci/generative_ai_inference/models/on_demand_serving_mode.py create mode 100644 src/oci/generative_ai_inference/models/serving_mode.py create mode 100644 src/oci/generative_ai_inference/models/summarize_text_details.py create mode 100644 src/oci/generative_ai_inference/models/summarize_text_result.py create mode 100644 src/oci/generative_ai_inference/models/token_likelihood.py create mode 100644 src/oci/stack_monitoring/models/change_process_set_compartment_details.py create mode 100644 src/oci/stack_monitoring/models/create_process_set_details.py create mode 100644 src/oci/stack_monitoring/models/process_set.py create mode 100644 src/oci/stack_monitoring/models/process_set_collection.py create mode 100644 src/oci/stack_monitoring/models/process_set_specification.py create mode 100644 src/oci/stack_monitoring/models/process_set_specification_details.py create mode 100644 src/oci/stack_monitoring/models/process_set_summary.py create mode 100644 src/oci/stack_monitoring/models/update_process_set_details.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2204b2947..f43fe889d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,16 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.119.1 - 2024-01-23 +==================== + +Added +----- +* Support for the Generative AI service +* Support for additional currencies and countries for paid listings in the Marketplace service +* Support for process sets in the Stack Monitoring service + ==================== 2.119.0 - 2024-01-16 ==================== diff --git a/docs/api/generative_ai.rst b/docs/api/generative_ai.rst new file mode 100644 index 000000000..e81cc1a46 --- /dev/null +++ b/docs/api/generative_ai.rst @@ -0,0 +1,57 @@ +Generative Ai +============= + +.. autosummary:: + :toctree: generative_ai/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.generative_ai.GenerativeAiClient + oci.generative_ai.GenerativeAiClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: generative_ai/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.generative_ai.models.ChangeDedicatedAiClusterCompartmentDetails + oci.generative_ai.models.ChangeEndpointCompartmentDetails + oci.generative_ai.models.ChangeModelCompartmentDetails + oci.generative_ai.models.ContentModerationConfig + oci.generative_ai.models.CreateDedicatedAiClusterDetails + oci.generative_ai.models.CreateEndpointDetails + oci.generative_ai.models.CreateModelDetails + oci.generative_ai.models.Dataset + oci.generative_ai.models.DedicatedAiCluster + oci.generative_ai.models.DedicatedAiClusterCapacity + oci.generative_ai.models.DedicatedAiClusterCollection + oci.generative_ai.models.DedicatedAiClusterHostingCapacity + oci.generative_ai.models.DedicatedAiClusterSummary + oci.generative_ai.models.Endpoint + oci.generative_ai.models.EndpointCollection + oci.generative_ai.models.EndpointSummary + oci.generative_ai.models.FineTuneDetails + oci.generative_ai.models.Model + oci.generative_ai.models.ModelCollection + oci.generative_ai.models.ModelMetrics + oci.generative_ai.models.ModelSummary + oci.generative_ai.models.ObjectStorageDataset + oci.generative_ai.models.TFewTrainingConfig + oci.generative_ai.models.TextGenerationModelMetrics + oci.generative_ai.models.TrainingConfig + oci.generative_ai.models.UpdateDedicatedAiClusterDetails + oci.generative_ai.models.UpdateEndpointDetails + oci.generative_ai.models.UpdateModelDetails + oci.generative_ai.models.VanillaTrainingConfig + oci.generative_ai.models.WorkRequest + oci.generative_ai.models.WorkRequestError + oci.generative_ai.models.WorkRequestErrorCollection + oci.generative_ai.models.WorkRequestLogEntry + oci.generative_ai.models.WorkRequestLogEntryCollection + oci.generative_ai.models.WorkRequestResource + oci.generative_ai.models.WorkRequestSummary + oci.generative_ai.models.WorkRequestSummaryCollection diff --git a/docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClient.rst b/docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClient.rst new file mode 100644 index 000000000..310c01cb0 --- /dev/null +++ b/docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClient.rst @@ -0,0 +1,8 @@ +GenerativeAiClient +================== + +.. currentmodule:: oci.generative_ai + +.. autoclass:: GenerativeAiClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClientCompositeOperations.rst b/docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClientCompositeOperations.rst new file mode 100644 index 000000000..9ef178d9d --- /dev/null +++ b/docs/api/generative_ai/client/oci.generative_ai.GenerativeAiClientCompositeOperations.rst @@ -0,0 +1,8 @@ +GenerativeAiClientCompositeOperations +===================================== + +.. currentmodule:: oci.generative_ai + +.. autoclass:: GenerativeAiClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ChangeDedicatedAiClusterCompartmentDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ChangeDedicatedAiClusterCompartmentDetails.rst new file mode 100644 index 000000000..1b8714a22 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ChangeDedicatedAiClusterCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeDedicatedAiClusterCompartmentDetails +========================================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ChangeDedicatedAiClusterCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ChangeEndpointCompartmentDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ChangeEndpointCompartmentDetails.rst new file mode 100644 index 000000000..de6324374 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ChangeEndpointCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeEndpointCompartmentDetails +================================ + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ChangeEndpointCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ChangeModelCompartmentDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ChangeModelCompartmentDetails.rst new file mode 100644 index 000000000..f85c4424a --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ChangeModelCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeModelCompartmentDetails +============================= + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ChangeModelCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ContentModerationConfig.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ContentModerationConfig.rst new file mode 100644 index 000000000..a3a0d86cf --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ContentModerationConfig.rst @@ -0,0 +1,11 @@ +ContentModerationConfig +======================= + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ContentModerationConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.CreateDedicatedAiClusterDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.CreateDedicatedAiClusterDetails.rst new file mode 100644 index 000000000..ef71a632e --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.CreateDedicatedAiClusterDetails.rst @@ -0,0 +1,11 @@ +CreateDedicatedAiClusterDetails +=============================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: CreateDedicatedAiClusterDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.CreateEndpointDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.CreateEndpointDetails.rst new file mode 100644 index 000000000..3345351ae --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.CreateEndpointDetails.rst @@ -0,0 +1,11 @@ +CreateEndpointDetails +===================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: CreateEndpointDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.CreateModelDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.CreateModelDetails.rst new file mode 100644 index 000000000..c794e90d9 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.CreateModelDetails.rst @@ -0,0 +1,11 @@ +CreateModelDetails +================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: CreateModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.Dataset.rst b/docs/api/generative_ai/models/oci.generative_ai.models.Dataset.rst new file mode 100644 index 000000000..ff0c0ab3f --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.Dataset.rst @@ -0,0 +1,11 @@ +Dataset +======= + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: Dataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiCluster.rst b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiCluster.rst new file mode 100644 index 000000000..704ddfbaa --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiCluster.rst @@ -0,0 +1,11 @@ +DedicatedAiCluster +================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: DedicatedAiCluster + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCapacity.rst b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCapacity.rst new file mode 100644 index 000000000..e5ed37560 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCapacity.rst @@ -0,0 +1,11 @@ +DedicatedAiClusterCapacity +========================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: DedicatedAiClusterCapacity + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCollection.rst b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCollection.rst new file mode 100644 index 000000000..9df22b1e7 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterCollection.rst @@ -0,0 +1,11 @@ +DedicatedAiClusterCollection +============================ + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: DedicatedAiClusterCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterHostingCapacity.rst b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterHostingCapacity.rst new file mode 100644 index 000000000..791427f48 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterHostingCapacity.rst @@ -0,0 +1,11 @@ +DedicatedAiClusterHostingCapacity +================================= + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: DedicatedAiClusterHostingCapacity + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterSummary.rst b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterSummary.rst new file mode 100644 index 000000000..b217d0fd9 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.DedicatedAiClusterSummary.rst @@ -0,0 +1,11 @@ +DedicatedAiClusterSummary +========================= + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: DedicatedAiClusterSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.Endpoint.rst b/docs/api/generative_ai/models/oci.generative_ai.models.Endpoint.rst new file mode 100644 index 000000000..2dc0d5d8c --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.Endpoint.rst @@ -0,0 +1,11 @@ +Endpoint +======== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: Endpoint + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.EndpointCollection.rst b/docs/api/generative_ai/models/oci.generative_ai.models.EndpointCollection.rst new file mode 100644 index 000000000..ffc316c74 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.EndpointCollection.rst @@ -0,0 +1,11 @@ +EndpointCollection +================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: EndpointCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.EndpointSummary.rst b/docs/api/generative_ai/models/oci.generative_ai.models.EndpointSummary.rst new file mode 100644 index 000000000..e7bc0078f --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.EndpointSummary.rst @@ -0,0 +1,11 @@ +EndpointSummary +=============== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: EndpointSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.FineTuneDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.FineTuneDetails.rst new file mode 100644 index 000000000..676c11e48 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.FineTuneDetails.rst @@ -0,0 +1,11 @@ +FineTuneDetails +=============== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: FineTuneDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.Model.rst b/docs/api/generative_ai/models/oci.generative_ai.models.Model.rst new file mode 100644 index 000000000..4ab1cf372 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.Model.rst @@ -0,0 +1,11 @@ +Model +===== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: Model + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ModelCollection.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ModelCollection.rst new file mode 100644 index 000000000..5a2909618 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ModelCollection.rst @@ -0,0 +1,11 @@ +ModelCollection +=============== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ModelCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ModelMetrics.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ModelMetrics.rst new file mode 100644 index 000000000..2e74054a5 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ModelMetrics.rst @@ -0,0 +1,11 @@ +ModelMetrics +============ + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ModelMetrics + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ModelSummary.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ModelSummary.rst new file mode 100644 index 000000000..fe7a401b0 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ModelSummary.rst @@ -0,0 +1,11 @@ +ModelSummary +============ + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ModelSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.ObjectStorageDataset.rst b/docs/api/generative_ai/models/oci.generative_ai.models.ObjectStorageDataset.rst new file mode 100644 index 000000000..8a3b222a3 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.ObjectStorageDataset.rst @@ -0,0 +1,11 @@ +ObjectStorageDataset +==================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: ObjectStorageDataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.TFewTrainingConfig.rst b/docs/api/generative_ai/models/oci.generative_ai.models.TFewTrainingConfig.rst new file mode 100644 index 000000000..c455458d2 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.TFewTrainingConfig.rst @@ -0,0 +1,11 @@ +TFewTrainingConfig +================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: TFewTrainingConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.TextGenerationModelMetrics.rst b/docs/api/generative_ai/models/oci.generative_ai.models.TextGenerationModelMetrics.rst new file mode 100644 index 000000000..ff6a89aa1 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.TextGenerationModelMetrics.rst @@ -0,0 +1,11 @@ +TextGenerationModelMetrics +========================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: TextGenerationModelMetrics + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.TrainingConfig.rst b/docs/api/generative_ai/models/oci.generative_ai.models.TrainingConfig.rst new file mode 100644 index 000000000..ca40c66b1 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.TrainingConfig.rst @@ -0,0 +1,11 @@ +TrainingConfig +============== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: TrainingConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.UpdateDedicatedAiClusterDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.UpdateDedicatedAiClusterDetails.rst new file mode 100644 index 000000000..3bb287881 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.UpdateDedicatedAiClusterDetails.rst @@ -0,0 +1,11 @@ +UpdateDedicatedAiClusterDetails +=============================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: UpdateDedicatedAiClusterDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.UpdateEndpointDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.UpdateEndpointDetails.rst new file mode 100644 index 000000000..8e9b047a1 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.UpdateEndpointDetails.rst @@ -0,0 +1,11 @@ +UpdateEndpointDetails +===================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: UpdateEndpointDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.UpdateModelDetails.rst b/docs/api/generative_ai/models/oci.generative_ai.models.UpdateModelDetails.rst new file mode 100644 index 000000000..dcb54aebd --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.UpdateModelDetails.rst @@ -0,0 +1,11 @@ +UpdateModelDetails +================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: UpdateModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.VanillaTrainingConfig.rst b/docs/api/generative_ai/models/oci.generative_ai.models.VanillaTrainingConfig.rst new file mode 100644 index 000000000..005fdd008 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.VanillaTrainingConfig.rst @@ -0,0 +1,11 @@ +VanillaTrainingConfig +===================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: VanillaTrainingConfig + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequest.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequest.rst new file mode 100644 index 000000000..048a15b34 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequest.rst @@ -0,0 +1,11 @@ +WorkRequest +=========== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestError.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestError.rst new file mode 100644 index 000000000..fdb18d799 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestError.rst @@ -0,0 +1,11 @@ +WorkRequestError +================ + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequestError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestErrorCollection.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestErrorCollection.rst new file mode 100644 index 000000000..0f1419a55 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestErrorCollection.rst @@ -0,0 +1,11 @@ +WorkRequestErrorCollection +========================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequestErrorCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntry.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntry.rst new file mode 100644 index 000000000..ae5517017 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntry.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntry +=================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequestLogEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntryCollection.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntryCollection.rst new file mode 100644 index 000000000..1cfb734cf --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestLogEntryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntryCollection +============================= + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequestLogEntryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestResource.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestResource.rst new file mode 100644 index 000000000..2e5bed86c --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestResource.rst @@ -0,0 +1,11 @@ +WorkRequestResource +=================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequestResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummary.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummary.rst new file mode 100644 index 000000000..914955ab2 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummary.rst @@ -0,0 +1,11 @@ +WorkRequestSummary +================== + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequestSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummaryCollection.rst b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummaryCollection.rst new file mode 100644 index 000000000..f0cc90916 --- /dev/null +++ b/docs/api/generative_ai/models/oci.generative_ai.models.WorkRequestSummaryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestSummaryCollection +============================ + +.. currentmodule:: oci.generative_ai.models + +.. autoclass:: WorkRequestSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference.rst b/docs/api/generative_ai_inference.rst new file mode 100644 index 000000000..0a6cbdc19 --- /dev/null +++ b/docs/api/generative_ai_inference.rst @@ -0,0 +1,39 @@ +Generative Ai Inference +======================= + +.. autosummary:: + :toctree: generative_ai_inference/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.generative_ai_inference.GenerativeAiInferenceClient + oci.generative_ai_inference.GenerativeAiInferenceClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: generative_ai_inference/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.generative_ai_inference.models.Choice + oci.generative_ai_inference.models.CohereLlmInferenceRequest + oci.generative_ai_inference.models.CohereLlmInferenceResponse + oci.generative_ai_inference.models.DedicatedServingMode + oci.generative_ai_inference.models.EmbedTextDetails + oci.generative_ai_inference.models.EmbedTextResult + oci.generative_ai_inference.models.GenerateTextDetails + oci.generative_ai_inference.models.GenerateTextResult + oci.generative_ai_inference.models.GeneratedText + oci.generative_ai_inference.models.LlamaLlmInferenceRequest + oci.generative_ai_inference.models.LlamaLlmInferenceResponse + oci.generative_ai_inference.models.LlmInferenceRequest + oci.generative_ai_inference.models.LlmInferenceResponse + oci.generative_ai_inference.models.Logprobs + oci.generative_ai_inference.models.OnDemandServingMode + oci.generative_ai_inference.models.ServingMode + oci.generative_ai_inference.models.SummarizeTextDetails + oci.generative_ai_inference.models.SummarizeTextResult + oci.generative_ai_inference.models.TokenLikelihood diff --git a/docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClient.rst b/docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClient.rst new file mode 100644 index 000000000..f4f3d9d84 --- /dev/null +++ b/docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClient.rst @@ -0,0 +1,8 @@ +GenerativeAiInferenceClient +=========================== + +.. currentmodule:: oci.generative_ai_inference + +.. autoclass:: GenerativeAiInferenceClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClientCompositeOperations.rst b/docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClientCompositeOperations.rst new file mode 100644 index 000000000..52743a4a0 --- /dev/null +++ b/docs/api/generative_ai_inference/client/oci.generative_ai_inference.GenerativeAiInferenceClientCompositeOperations.rst @@ -0,0 +1,8 @@ +GenerativeAiInferenceClientCompositeOperations +============================================== + +.. currentmodule:: oci.generative_ai_inference + +.. autoclass:: GenerativeAiInferenceClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Choice.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Choice.rst new file mode 100644 index 000000000..7074d2cae --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Choice.rst @@ -0,0 +1,11 @@ +Choice +====== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: Choice + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceRequest.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceRequest.rst new file mode 100644 index 000000000..6d91b75f2 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceRequest.rst @@ -0,0 +1,11 @@ +CohereLlmInferenceRequest +========================= + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: CohereLlmInferenceRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceResponse.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceResponse.rst new file mode 100644 index 000000000..e2e9414b9 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.CohereLlmInferenceResponse.rst @@ -0,0 +1,11 @@ +CohereLlmInferenceResponse +========================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: CohereLlmInferenceResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.DedicatedServingMode.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.DedicatedServingMode.rst new file mode 100644 index 000000000..cea63694a --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.DedicatedServingMode.rst @@ -0,0 +1,11 @@ +DedicatedServingMode +==================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: DedicatedServingMode + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextDetails.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextDetails.rst new file mode 100644 index 000000000..baeea38e1 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextDetails.rst @@ -0,0 +1,11 @@ +EmbedTextDetails +================ + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: EmbedTextDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextResult.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextResult.rst new file mode 100644 index 000000000..b819fc315 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.EmbedTextResult.rst @@ -0,0 +1,11 @@ +EmbedTextResult +=============== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: EmbedTextResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextDetails.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextDetails.rst new file mode 100644 index 000000000..e2d0b8ccc --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextDetails.rst @@ -0,0 +1,11 @@ +GenerateTextDetails +=================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: GenerateTextDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextResult.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextResult.rst new file mode 100644 index 000000000..637a5bb40 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GenerateTextResult.rst @@ -0,0 +1,11 @@ +GenerateTextResult +================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: GenerateTextResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GeneratedText.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GeneratedText.rst new file mode 100644 index 000000000..5cedd8e22 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.GeneratedText.rst @@ -0,0 +1,11 @@ +GeneratedText +============= + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: GeneratedText + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceRequest.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceRequest.rst new file mode 100644 index 000000000..46f1fd352 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceRequest.rst @@ -0,0 +1,11 @@ +LlamaLlmInferenceRequest +======================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: LlamaLlmInferenceRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceResponse.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceResponse.rst new file mode 100644 index 000000000..2798bdf53 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlamaLlmInferenceResponse.rst @@ -0,0 +1,11 @@ +LlamaLlmInferenceResponse +========================= + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: LlamaLlmInferenceResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceRequest.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceRequest.rst new file mode 100644 index 000000000..f716292e6 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceRequest.rst @@ -0,0 +1,11 @@ +LlmInferenceRequest +=================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: LlmInferenceRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceResponse.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceResponse.rst new file mode 100644 index 000000000..ea9f3dacb --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.LlmInferenceResponse.rst @@ -0,0 +1,11 @@ +LlmInferenceResponse +==================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: LlmInferenceResponse + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Logprobs.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Logprobs.rst new file mode 100644 index 000000000..054b25812 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.Logprobs.rst @@ -0,0 +1,11 @@ +Logprobs +======== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: Logprobs + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.OnDemandServingMode.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.OnDemandServingMode.rst new file mode 100644 index 000000000..4bfc00885 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.OnDemandServingMode.rst @@ -0,0 +1,11 @@ +OnDemandServingMode +=================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: OnDemandServingMode + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.ServingMode.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.ServingMode.rst new file mode 100644 index 000000000..7d16873e6 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.ServingMode.rst @@ -0,0 +1,11 @@ +ServingMode +=========== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: ServingMode + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextDetails.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextDetails.rst new file mode 100644 index 000000000..eee7df1e1 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextDetails.rst @@ -0,0 +1,11 @@ +SummarizeTextDetails +==================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: SummarizeTextDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextResult.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextResult.rst new file mode 100644 index 000000000..dea3794e5 --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.SummarizeTextResult.rst @@ -0,0 +1,11 @@ +SummarizeTextResult +=================== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: SummarizeTextResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.TokenLikelihood.rst b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.TokenLikelihood.rst new file mode 100644 index 000000000..6388a5b6c --- /dev/null +++ b/docs/api/generative_ai_inference/models/oci.generative_ai_inference.models.TokenLikelihood.rst @@ -0,0 +1,11 @@ +TokenLikelihood +=============== + +.. currentmodule:: oci.generative_ai_inference.models + +.. autoclass:: TokenLikelihood + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/landing.rst b/docs/api/landing.rst index ddb464f94..5bfc5ef75 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -89,6 +89,8 @@ API Reference * :doc:`Functions Management ` * :doc:`Fusion Applications ` * :doc:`Gateway ` +* :doc:`Generative Ai ` +* :doc:`Generative Ai Inference ` * :doc:`Generic Artifacts Content ` * :doc:`Golden Gate ` * :doc:`Governance ` @@ -302,6 +304,8 @@ API Reference fleet_software_update functions fusion_apps + generative_ai + generative_ai_inference generic_artifacts_content golden_gate governance_rules_control_plane diff --git a/docs/api/stack_monitoring.rst b/docs/api/stack_monitoring.rst index dcbf8c862..af3bc5796 100644 --- a/docs/api/stack_monitoring.rst +++ b/docs/api/stack_monitoring.rst @@ -35,6 +35,7 @@ Stack Monitoring oci.stack_monitoring.models.ChangeMetricExtensionCompartmentDetails oci.stack_monitoring.models.ChangeMonitoredResourceCompartmentDetails oci.stack_monitoring.models.ChangeMonitoredResourceTaskCompartmentDetails + oci.stack_monitoring.models.ChangeProcessSetCompartmentDetails oci.stack_monitoring.models.Config oci.stack_monitoring.models.ConfigCollection oci.stack_monitoring.models.ConfigSummary @@ -49,6 +50,7 @@ Stack Monitoring oci.stack_monitoring.models.CreateMonitoredResourceDetails oci.stack_monitoring.models.CreateMonitoredResourceTaskDetails oci.stack_monitoring.models.CreateMonitoredResourceTypeDetails + oci.stack_monitoring.models.CreateProcessSetDetails oci.stack_monitoring.models.CredentialCollection oci.stack_monitoring.models.CredentialDetails oci.stack_monitoring.models.CredentialProperty @@ -106,6 +108,11 @@ Stack Monitoring oci.stack_monitoring.models.OsCommandUpdateQueryProperties oci.stack_monitoring.models.PlainTextCredentials oci.stack_monitoring.models.PreExistingCredentials + oci.stack_monitoring.models.ProcessSet + oci.stack_monitoring.models.ProcessSetCollection + oci.stack_monitoring.models.ProcessSetSpecification + oci.stack_monitoring.models.ProcessSetSpecificationDetails + oci.stack_monitoring.models.ProcessSetSummary oci.stack_monitoring.models.PropertyDetails oci.stack_monitoring.models.ResourceTypeMetadataDetails oci.stack_monitoring.models.ScriptFileDetails @@ -132,6 +139,7 @@ Stack Monitoring oci.stack_monitoring.models.UpdateMonitoredResourceDetails oci.stack_monitoring.models.UpdateMonitoredResourceTaskDetails oci.stack_monitoring.models.UpdateMonitoredResourceTypeDetails + oci.stack_monitoring.models.UpdateProcessSetDetails oci.stack_monitoring.models.WorkRequest oci.stack_monitoring.models.WorkRequestError oci.stack_monitoring.models.WorkRequestErrorCollection diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ChangeProcessSetCompartmentDetails.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ChangeProcessSetCompartmentDetails.rst new file mode 100644 index 000000000..c76d3fd5a --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ChangeProcessSetCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeProcessSetCompartmentDetails +================================== + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: ChangeProcessSetCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.CreateProcessSetDetails.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.CreateProcessSetDetails.rst new file mode 100644 index 000000000..6c1cc3f8c --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.CreateProcessSetDetails.rst @@ -0,0 +1,11 @@ +CreateProcessSetDetails +======================= + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: CreateProcessSetDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSet.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSet.rst new file mode 100644 index 000000000..603571bbb --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSet.rst @@ -0,0 +1,11 @@ +ProcessSet +========== + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: ProcessSet + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetCollection.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetCollection.rst new file mode 100644 index 000000000..8d40df921 --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetCollection.rst @@ -0,0 +1,11 @@ +ProcessSetCollection +==================== + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: ProcessSetCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecification.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecification.rst new file mode 100644 index 000000000..a39c7434d --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecification.rst @@ -0,0 +1,11 @@ +ProcessSetSpecification +======================= + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: ProcessSetSpecification + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecificationDetails.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecificationDetails.rst new file mode 100644 index 000000000..1c441b9a6 --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSpecificationDetails.rst @@ -0,0 +1,11 @@ +ProcessSetSpecificationDetails +============================== + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: ProcessSetSpecificationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSummary.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSummary.rst new file mode 100644 index 000000000..f9a0f3c23 --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.ProcessSetSummary.rst @@ -0,0 +1,11 @@ +ProcessSetSummary +================= + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: ProcessSetSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/stack_monitoring/models/oci.stack_monitoring.models.UpdateProcessSetDetails.rst b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.UpdateProcessSetDetails.rst new file mode 100644 index 000000000..02c4ffa17 --- /dev/null +++ b/docs/api/stack_monitoring/models/oci.stack_monitoring.models.UpdateProcessSetDetails.rst @@ -0,0 +1,11 @@ +UpdateProcessSetDetails +======================= + +.. currentmodule:: oci.stack_monitoring.models + +.. autoclass:: UpdateProcessSetDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/src/oci/__init__.py b/src/oci/__init__.py index 352d3bbd8..78be9fc81 100644 --- a/src/oci/__init__.py +++ b/src/oci/__init__.py @@ -19,7 +19,7 @@ else: __all__ = [ "BaseClient", "Error", "Request", "Response", "Signer", "config", "constants", "decorators", "exceptions", "regions", "wait_until", "pagination", "auth", "retry", "fips", "circuit_breaker", "alloy", - "access_governance_cp", "adm", "ai_anomaly_detection", "ai_document", "ai_language", "ai_speech", "ai_vision", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "application_migration", "appmgmt_control", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "certificates", "certificates_management", "cims", "cloud_bridge", "cloud_guard", "cloud_migrations", "compute_cloud_at_customer", "compute_instance_agent", "container_engine", "container_instances", "core", "dashboard_service", "data_catalog", "data_flow", "data_integration", "data_labeling_service", "data_labeling_service_dataplane", "data_safe", "data_science", "database", "database_management", "database_migration", "database_tools", "devops", "disaster_recovery", "dns", "dts", "em_warehouse", "email", "events", "file_storage", "fleet_software_update", "functions", "fusion_apps", "generic_artifacts_content", "golden_gate", "governance_rules_control_plane", "healthchecks", "identity", "identity_data_plane", "identity_domains", "integration", "jms", "jms_java_downloads", "key_management", "license_manager", "limits", "load_balancer", "lockbox", "log_analytics", "logging", "loggingingestion", "loggingsearch", "management_agent", "management_dashboard", "marketplace", "marketplace_publisher", "media_services", "monitoring", "mysql", "network_firewall", "network_load_balancer", "nosql", "object_storage", "oce", "oci_control_center", "ocvp", "oda", "onesubscription", "ons", "opa", "opensearch", "operator_access_control", "opsi", "optimizer", "os_management", "os_management_hub", "osp_gateway", "osub_billing_schedule", "osub_organization_subscription", "osub_subscription", "osub_usage", "psql", "queue", "recovery", "redis", "resource_manager", "resource_search", "rover", "sch", "secrets", "service_catalog", "service_manager_proxy", "service_mesh", "stack_monitoring", "streaming", "tenant_manager_control_plane", "threat_intelligence", "usage", "usage_api", "vault", "vbs_inst", "visual_builder", "vn_monitoring", "vulnerability_scanning", "waa", "waas", "waf", "work_requests" + "access_governance_cp", "adm", "ai_anomaly_detection", "ai_document", "ai_language", "ai_speech", "ai_vision", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "application_migration", "appmgmt_control", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "certificates", "certificates_management", "cims", "cloud_bridge", "cloud_guard", "cloud_migrations", "compute_cloud_at_customer", "compute_instance_agent", "container_engine", "container_instances", "core", "dashboard_service", "data_catalog", "data_flow", "data_integration", "data_labeling_service", "data_labeling_service_dataplane", "data_safe", "data_science", "database", "database_management", "database_migration", "database_tools", "devops", "disaster_recovery", "dns", "dts", "em_warehouse", "email", "events", "file_storage", "fleet_software_update", "functions", "fusion_apps", "generative_ai", "generative_ai_inference", "generic_artifacts_content", "golden_gate", "governance_rules_control_plane", "healthchecks", "identity", "identity_data_plane", "identity_domains", "integration", "jms", "jms_java_downloads", "key_management", "license_manager", "limits", "load_balancer", "lockbox", "log_analytics", "logging", "loggingingestion", "loggingsearch", "management_agent", "management_dashboard", "marketplace", "marketplace_publisher", "media_services", "monitoring", "mysql", "network_firewall", "network_load_balancer", "nosql", "object_storage", "oce", "oci_control_center", "ocvp", "oda", "onesubscription", "ons", "opa", "opensearch", "operator_access_control", "opsi", "optimizer", "os_management", "os_management_hub", "osp_gateway", "osub_billing_schedule", "osub_organization_subscription", "osub_subscription", "osub_usage", "psql", "queue", "recovery", "redis", "resource_manager", "resource_search", "rover", "sch", "secrets", "service_catalog", "service_manager_proxy", "service_mesh", "stack_monitoring", "streaming", "tenant_manager_control_plane", "threat_intelligence", "usage", "usage_api", "vault", "vbs_inst", "visual_builder", "vn_monitoring", "vulnerability_scanning", "waa", "waas", "waf", "work_requests" ] if sys.version_info >= (3, 7) and os.getenv("OCI_PYTHON_SDK_LAZY_IMPORTS_DISABLED", "False").lower() != "true": def __getattr__(x): @@ -30,4 +30,4 @@ def __getattr__(x): return importlib.import_module(__name__ + "." + x) raise AttributeError("module " + __name__ + " has no attribute" + x) else: - from . import access_governance_cp, adm, ai_anomaly_detection, ai_document, ai_language, ai_speech, ai_vision, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, application_migration, appmgmt_control, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, certificates, certificates_management, cims, cloud_bridge, cloud_guard, cloud_migrations, compute_cloud_at_customer, compute_instance_agent, container_engine, container_instances, core, dashboard_service, data_catalog, data_flow, data_integration, data_labeling_service, data_labeling_service_dataplane, data_safe, data_science, database, database_management, database_migration, database_tools, devops, disaster_recovery, dns, dts, em_warehouse, email, events, file_storage, fleet_software_update, functions, fusion_apps, generic_artifacts_content, golden_gate, governance_rules_control_plane, healthchecks, identity, identity_data_plane, identity_domains, integration, jms, jms_java_downloads, key_management, license_manager, limits, load_balancer, lockbox, log_analytics, logging, loggingingestion, loggingsearch, management_agent, management_dashboard, marketplace, marketplace_publisher, media_services, monitoring, mysql, network_firewall, network_load_balancer, nosql, object_storage, oce, oci_control_center, ocvp, oda, onesubscription, ons, opa, opensearch, operator_access_control, opsi, optimizer, os_management, os_management_hub, osp_gateway, osub_billing_schedule, osub_organization_subscription, osub_subscription, osub_usage, psql, queue, recovery, redis, resource_manager, resource_search, rover, sch, secrets, service_catalog, service_manager_proxy, service_mesh, stack_monitoring, streaming, tenant_manager_control_plane, threat_intelligence, usage, usage_api, vault, vbs_inst, visual_builder, vn_monitoring, vulnerability_scanning, waa, waas, waf, work_requests + from . import access_governance_cp, adm, ai_anomaly_detection, ai_document, ai_language, ai_speech, ai_vision, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, application_migration, appmgmt_control, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, certificates, certificates_management, cims, cloud_bridge, cloud_guard, cloud_migrations, compute_cloud_at_customer, compute_instance_agent, container_engine, container_instances, core, dashboard_service, data_catalog, data_flow, data_integration, data_labeling_service, data_labeling_service_dataplane, data_safe, data_science, database, database_management, database_migration, database_tools, devops, disaster_recovery, dns, dts, em_warehouse, email, events, file_storage, fleet_software_update, functions, fusion_apps, generative_ai, generative_ai_inference, generic_artifacts_content, golden_gate, governance_rules_control_plane, healthchecks, identity, identity_data_plane, identity_domains, integration, jms, jms_java_downloads, key_management, license_manager, limits, load_balancer, lockbox, log_analytics, logging, loggingingestion, loggingsearch, management_agent, management_dashboard, marketplace, marketplace_publisher, media_services, monitoring, mysql, network_firewall, network_load_balancer, nosql, object_storage, oce, oci_control_center, ocvp, oda, onesubscription, ons, opa, opensearch, operator_access_control, opsi, optimizer, os_management, os_management_hub, osp_gateway, osub_billing_schedule, osub_organization_subscription, osub_subscription, osub_usage, psql, queue, recovery, redis, resource_manager, resource_search, rover, sch, secrets, service_catalog, service_manager_proxy, service_mesh, stack_monitoring, streaming, tenant_manager_control_plane, threat_intelligence, usage, usage_api, vault, vbs_inst, visual_builder, vn_monitoring, vulnerability_scanning, waa, waas, waf, work_requests diff --git a/src/oci/access_governance_cp/access_governance_cp_client_composite_operations.py b/src/oci/access_governance_cp/access_governance_cp_client_composite_operations.py index 9af4474e7..ff1fd9f25 100644 --- a/src/oci/access_governance_cp/access_governance_cp_client_composite_operations.py +++ b/src/oci/access_governance_cp/access_governance_cp_client_composite_operations.py @@ -46,7 +46,6 @@ def create_governance_instance_and_wait_for_state(self, create_governance_instan operation_result = self.client.create_governance_instance(create_governance_instance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] governance_instance_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_governance_instance_and_wait_for_state(self, governance_instance_id, if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_governance_instance_and_wait_for_state(self, update_governance_instan operation_result = self.client.update_governance_instance(update_governance_instance_details, governance_instance_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] governance_instance_id = operation_result.data.id diff --git a/src/oci/adm/application_dependency_management_client_composite_operations.py b/src/oci/adm/application_dependency_management_client_composite_operations.py index 4269a0d18..d8cd9e1be 100644 --- a/src/oci/adm/application_dependency_management_client_composite_operations.py +++ b/src/oci/adm/application_dependency_management_client_composite_operations.py @@ -48,8 +48,9 @@ def activate_remediation_recipe_and_wait_for_state(self, remediation_recipe_id, operation_result = self.client.activate_remediation_recipe(remediation_recipe_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: @@ -86,7 +87,6 @@ def cancel_remediation_run_and_wait_for_state(self, remediation_run_id, wait_for operation_result = self.client.cancel_remediation_run(remediation_run_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] remediation_run_id = operation_result.data.id @@ -134,8 +134,9 @@ def change_knowledge_base_compartment_and_wait_for_state(self, knowledge_base_id operation_result = self.client.change_knowledge_base_compartment(knowledge_base_id, change_knowledge_base_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: @@ -177,8 +178,9 @@ def change_remediation_recipe_compartment_and_wait_for_state(self, remediation_r operation_result = self.client.change_remediation_recipe_compartment(remediation_recipe_id, change_remediation_recipe_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: @@ -215,8 +217,9 @@ def create_knowledge_base_and_wait_for_state(self, create_knowledge_base_details operation_result = self.client.create_knowledge_base(create_knowledge_base_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: @@ -253,8 +256,9 @@ def create_remediation_recipe_and_wait_for_state(self, create_remediation_recipe operation_result = self.client.create_remediation_recipe(create_remediation_recipe_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: @@ -291,7 +295,6 @@ def create_remediation_run_and_wait_for_state(self, create_remediation_run_detai operation_result = self.client.create_remediation_run(create_remediation_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] remediation_run_id = operation_result.data.id @@ -334,7 +337,6 @@ def create_vulnerability_audit_and_wait_for_state(self, create_vulnerability_aud operation_result = self.client.create_vulnerability_audit(create_vulnerability_audit_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vulnerability_audit_id = operation_result.data.id @@ -379,8 +381,9 @@ def deactivate_remediation_recipe_and_wait_for_state(self, remediation_recipe_id operation_result = self.client.deactivate_remediation_recipe(remediation_recipe_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: @@ -427,8 +430,9 @@ def delete_knowledge_base_and_wait_for_state(self, knowledge_base_id, wait_for_s 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: @@ -475,8 +479,9 @@ def delete_remediation_recipe_and_wait_for_state(self, remediation_recipe_id, wa 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: @@ -522,7 +527,6 @@ def delete_remediation_run_and_wait_for_state(self, remediation_run_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -582,7 +586,6 @@ def delete_vulnerability_audit_and_wait_for_state(self, vulnerability_audit_id, if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -638,8 +641,9 @@ def update_knowledge_base_and_wait_for_state(self, knowledge_base_id, update_kno operation_result = self.client.update_knowledge_base(knowledge_base_id, update_knowledge_base_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: @@ -681,8 +685,9 @@ def update_remediation_recipe_and_wait_for_state(self, remediation_recipe_id, up operation_result = self.client.update_remediation_recipe(remediation_recipe_id, update_remediation_recipe_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: @@ -722,7 +727,6 @@ def update_remediation_run_and_wait_for_state(self, remediation_run_id, update_r operation_result = self.client.update_remediation_run(remediation_run_id, update_remediation_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] remediation_run_id = operation_result.data.id @@ -768,7 +772,6 @@ def update_vulnerability_audit_and_wait_for_state(self, vulnerability_audit_id, operation_result = self.client.update_vulnerability_audit(vulnerability_audit_id, update_vulnerability_audit_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vulnerability_audit_id = operation_result.data.id diff --git a/src/oci/ai_anomaly_detection/anomaly_detection_client_composite_operations.py b/src/oci/ai_anomaly_detection/anomaly_detection_client_composite_operations.py index 8611597a7..86b651139 100644 --- a/src/oci/ai_anomaly_detection/anomaly_detection_client_composite_operations.py +++ b/src/oci/ai_anomaly_detection/anomaly_detection_client_composite_operations.py @@ -49,8 +49,9 @@ def change_ai_private_endpoint_compartment_and_wait_for_state(self, ai_private_e operation_result = self.client.change_ai_private_endpoint_compartment(ai_private_endpoint_id, change_ai_private_endpoint_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: @@ -90,7 +91,6 @@ def change_data_asset_compartment_and_wait_for_state(self, data_asset_id, change operation_result = self.client.change_data_asset_compartment(data_asset_id, change_data_asset_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_asset_id = operation_result.data.id @@ -133,8 +133,9 @@ def create_ai_private_endpoint_and_wait_for_state(self, create_ai_private_endpoi operation_result = self.client.create_ai_private_endpoint(create_ai_private_endpoint_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: @@ -171,7 +172,6 @@ def create_data_asset_and_wait_for_state(self, create_data_asset_details, wait_f operation_result = self.client.create_data_asset(create_data_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_asset_id = operation_result.data.id @@ -222,7 +222,6 @@ def create_detect_anomaly_job_and_wait_for_state(self, create_detect_anomaly_job operation_result = self.client.create_detect_anomaly_job(create_detect_anomaly_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] detect_anomaly_job_id = operation_result.data.id @@ -265,8 +264,9 @@ def create_model_and_wait_for_state(self, create_model_details, wait_for_states= operation_result = self.client.create_model(create_model_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: @@ -303,7 +303,6 @@ def create_project_and_wait_for_state(self, create_project_details, wait_for_sta operation_result = self.client.create_project(create_project_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] project_id = operation_result.data.id @@ -354,8 +353,9 @@ def delete_ai_private_endpoint_and_wait_for_state(self, ai_private_endpoint_id, 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: @@ -401,7 +401,6 @@ def delete_data_asset_and_wait_for_state(self, data_asset_id, wait_for_states=[] if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -461,7 +460,6 @@ def delete_detect_anomaly_job_and_wait_for_state(self, detect_anomaly_job_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -520,8 +518,9 @@ def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operatio 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: @@ -566,8 +565,9 @@ def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], oper 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: @@ -607,8 +607,9 @@ def update_ai_private_endpoint_and_wait_for_state(self, ai_private_endpoint_id, operation_result = self.client.update_ai_private_endpoint(ai_private_endpoint_id, update_ai_private_endpoint_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: @@ -648,7 +649,6 @@ def update_data_asset_and_wait_for_state(self, data_asset_id, update_data_asset_ operation_result = self.client.update_data_asset(data_asset_id, update_data_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_asset_id = operation_result.data.id @@ -694,7 +694,6 @@ def update_detect_anomaly_job_and_wait_for_state(self, detect_anomaly_job_id, up operation_result = self.client.update_detect_anomaly_job(detect_anomaly_job_id, update_detect_anomaly_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] detect_anomaly_job_id = operation_result.data.id @@ -740,8 +739,9 @@ def update_model_and_wait_for_state(self, model_id, update_model_details, wait_f operation_result = self.client.update_model(model_id, update_model_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: @@ -781,7 +781,6 @@ def update_project_and_wait_for_state(self, project_id, update_project_details, operation_result = self.client.update_project(project_id, update_project_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] project_id = operation_result.data.id diff --git a/src/oci/ai_document/ai_service_document_client_composite_operations.py b/src/oci/ai_document/ai_service_document_client_composite_operations.py index 3df99043d..b382c5a1e 100644 --- a/src/oci/ai_document/ai_service_document_client_composite_operations.py +++ b/src/oci/ai_document/ai_service_document_client_composite_operations.py @@ -46,8 +46,9 @@ def create_model_and_wait_for_state(self, create_model_details, wait_for_states= operation_result = self.client.create_model(create_model_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: @@ -84,7 +85,6 @@ def create_processor_job_and_wait_for_state(self, create_processor_job_details, operation_result = self.client.create_processor_job(create_processor_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] processor_job_id = operation_result.data.id @@ -127,8 +127,9 @@ def create_project_and_wait_for_state(self, create_project_details, wait_for_sta operation_result = self.client.create_project(create_project_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: @@ -173,8 +174,9 @@ def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operatio 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: @@ -219,8 +221,9 @@ def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], oper 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: @@ -260,8 +263,9 @@ def patch_model_and_wait_for_state(self, model_id, patch_model_details, wait_for operation_result = self.client.patch_model(model_id, patch_model_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: @@ -301,8 +305,9 @@ def update_model_and_wait_for_state(self, model_id, update_model_details, wait_f operation_result = self.client.update_model(model_id, update_model_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: @@ -342,8 +347,9 @@ def update_project_and_wait_for_state(self, project_id, update_project_details, operation_result = self.client.update_project(project_id, update_project_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: diff --git a/src/oci/ai_language/ai_service_language_client_composite_operations.py b/src/oci/ai_language/ai_service_language_client_composite_operations.py index 178315580..5283d9ae6 100644 --- a/src/oci/ai_language/ai_service_language_client_composite_operations.py +++ b/src/oci/ai_language/ai_service_language_client_composite_operations.py @@ -46,8 +46,9 @@ def create_endpoint_and_wait_for_state(self, create_endpoint_details, wait_for_s operation_result = self.client.create_endpoint(create_endpoint_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: @@ -84,8 +85,9 @@ def create_model_and_wait_for_state(self, create_model_details, wait_for_states= operation_result = self.client.create_model(create_model_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: @@ -122,8 +124,9 @@ def create_project_and_wait_for_state(self, create_project_details, wait_for_sta operation_result = self.client.create_project(create_project_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: @@ -168,8 +171,9 @@ def delete_endpoint_and_wait_for_state(self, endpoint_id, wait_for_states=[], op 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: @@ -214,8 +218,9 @@ def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operatio 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: @@ -260,8 +265,9 @@ def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], oper 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: @@ -301,8 +307,9 @@ def update_endpoint_and_wait_for_state(self, endpoint_id, update_endpoint_detail operation_result = self.client.update_endpoint(endpoint_id, update_endpoint_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: @@ -342,8 +349,9 @@ def update_model_and_wait_for_state(self, model_id, update_model_details, wait_f operation_result = self.client.update_model(model_id, update_model_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: @@ -383,8 +391,9 @@ def update_project_and_wait_for_state(self, project_id, update_project_details, operation_result = self.client.update_project(project_id, update_project_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: 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 b1fff4aac..2e3cea92b 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 @@ -46,7 +46,6 @@ def create_transcription_job_and_wait_for_state(self, create_transcription_job_d operation_result = self.client.create_transcription_job(create_transcription_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] transcription_job_id = operation_result.data.id @@ -92,7 +91,6 @@ def update_transcription_job_and_wait_for_state(self, transcription_job_id, upda operation_result = self.client.update_transcription_job(transcription_job_id, update_transcription_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] transcription_job_id = operation_result.data.id diff --git a/src/oci/ai_vision/ai_service_vision_client_composite_operations.py b/src/oci/ai_vision/ai_service_vision_client_composite_operations.py index c2b01192b..d440593d4 100644 --- a/src/oci/ai_vision/ai_service_vision_client_composite_operations.py +++ b/src/oci/ai_vision/ai_service_vision_client_composite_operations.py @@ -46,7 +46,6 @@ def create_document_job_and_wait_for_state(self, create_document_job_details, wa operation_result = self.client.create_document_job(create_document_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] document_job_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_image_job_and_wait_for_state(self, create_image_job_details, wait_for operation_result = self.client.create_image_job(create_image_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_job_id = operation_result.data.id @@ -132,8 +130,9 @@ def create_model_and_wait_for_state(self, create_model_details, wait_for_states= operation_result = self.client.create_model(create_model_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: @@ -170,8 +169,9 @@ def create_project_and_wait_for_state(self, create_project_details, wait_for_sta operation_result = self.client.create_project(create_project_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: @@ -216,8 +216,9 @@ def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operatio 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: @@ -262,8 +263,9 @@ def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], oper 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: @@ -303,8 +305,9 @@ def update_model_and_wait_for_state(self, model_id, update_model_details, wait_f operation_result = self.client.update_model(model_id, update_model_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: @@ -344,8 +347,9 @@ def update_project_and_wait_for_state(self, project_id, update_project_details, operation_result = self.client.update_project(project_id, update_project_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: diff --git a/src/oci/analytics/analytics_client_composite_operations.py b/src/oci/analytics/analytics_client_composite_operations.py index e36ff68b0..bbdfb57a6 100644 --- a/src/oci/analytics/analytics_client_composite_operations.py +++ b/src/oci/analytics/analytics_client_composite_operations.py @@ -49,8 +49,9 @@ def change_analytics_instance_compartment_and_wait_for_state(self, analytics_ins operation_result = self.client.change_analytics_instance_compartment(analytics_instance_id, change_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: @@ -90,8 +91,9 @@ def change_analytics_instance_network_endpoint_and_wait_for_state(self, analytic operation_result = self.client.change_analytics_instance_network_endpoint(analytics_instance_id, change_analytics_instance_network_endpoint_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: @@ -128,8 +130,9 @@ def create_analytics_instance_and_wait_for_state(self, create_analytics_instance operation_result = self.client.create_analytics_instance(create_analytics_instance_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: @@ -169,8 +172,9 @@ def create_private_access_channel_and_wait_for_state(self, analytics_instance_id operation_result = self.client.create_private_access_channel(analytics_instance_id, create_private_access_channel_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: @@ -210,8 +214,9 @@ def create_vanity_url_and_wait_for_state(self, analytics_instance_id, create_van operation_result = self.client.create_vanity_url(analytics_instance_id, create_vanity_url_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: @@ -256,8 +261,9 @@ def delete_analytics_instance_and_wait_for_state(self, analytics_instance_id, wa 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: @@ -305,8 +311,9 @@ def delete_private_access_channel_and_wait_for_state(self, private_access_channe 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: @@ -354,8 +361,9 @@ def delete_vanity_url_and_wait_for_state(self, analytics_instance_id, vanity_url 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: @@ -395,8 +403,9 @@ def scale_analytics_instance_and_wait_for_state(self, analytics_instance_id, sca operation_result = self.client.scale_analytics_instance(analytics_instance_id, scale_analytics_instance_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: @@ -436,8 +445,9 @@ def set_kms_key_and_wait_for_state(self, analytics_instance_id, set_kms_key_deta operation_result = self.client.set_kms_key(analytics_instance_id, set_kms_key_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: @@ -474,8 +484,9 @@ def start_analytics_instance_and_wait_for_state(self, analytics_instance_id, wai operation_result = self.client.start_analytics_instance(analytics_instance_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: @@ -512,8 +523,9 @@ def stop_analytics_instance_and_wait_for_state(self, analytics_instance_id, wait operation_result = self.client.stop_analytics_instance(analytics_instance_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: @@ -554,7 +566,6 @@ def update_analytics_instance_and_wait_for_state(self, analytics_instance_id, up operation_result = self.client.update_analytics_instance(analytics_instance_id, update_analytics_instance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] analytics_instance_id = operation_result.data.id @@ -603,8 +614,9 @@ def update_private_access_channel_and_wait_for_state(self, private_access_channe operation_result = self.client.update_private_access_channel(private_access_channel_key, analytics_instance_id, update_private_access_channel_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: @@ -647,8 +659,9 @@ def update_vanity_url_and_wait_for_state(self, analytics_instance_id, vanity_url operation_result = self.client.update_vanity_url(analytics_instance_id, vanity_url_key, update_vanity_url_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: diff --git a/src/oci/announcements_service/announcement_subscription_client_composite_operations.py b/src/oci/announcements_service/announcement_subscription_client_composite_operations.py index 3fffde547..b48bda752 100644 --- a/src/oci/announcements_service/announcement_subscription_client_composite_operations.py +++ b/src/oci/announcements_service/announcement_subscription_client_composite_operations.py @@ -46,7 +46,6 @@ def create_announcement_subscription_and_wait_for_state(self, create_announcemen operation_result = self.client.create_announcement_subscription(create_announcement_subscription_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] announcement_subscription_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_announcement_subscription_and_wait_for_state(self, announcement_subsc if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_announcement_subscription_and_wait_for_state(self, announcement_subsc operation_result = self.client.update_announcement_subscription(announcement_subscription_id, update_announcement_subscription_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] announcement_subscription_id = operation_result.data.id diff --git a/src/oci/apigateway/api_gateway_client_composite_operations.py b/src/oci/apigateway/api_gateway_client_composite_operations.py index 11c6fdb37..901dcb12e 100644 --- a/src/oci/apigateway/api_gateway_client_composite_operations.py +++ b/src/oci/apigateway/api_gateway_client_composite_operations.py @@ -49,8 +49,9 @@ def change_api_compartment_and_wait_for_state(self, api_id, change_api_compartme operation_result = self.client.change_api_compartment(api_id, change_api_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: @@ -87,8 +88,9 @@ def create_api_and_wait_for_state(self, create_api_details, wait_for_states=[], operation_result = self.client.create_api(create_api_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: @@ -125,8 +127,9 @@ def create_certificate_and_wait_for_state(self, create_certificate_details, wait operation_result = self.client.create_certificate(create_certificate_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: @@ -163,8 +166,9 @@ def create_sdk_and_wait_for_state(self, create_sdk_details, wait_for_states=[], operation_result = self.client.create_sdk(create_sdk_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: @@ -209,8 +213,9 @@ def delete_api_and_wait_for_state(self, api_id, wait_for_states=[], operation_kw 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: @@ -255,8 +260,9 @@ def delete_certificate_and_wait_for_state(self, certificate_id, wait_for_states= 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: @@ -301,8 +307,9 @@ def delete_sdk_and_wait_for_state(self, sdk_id, wait_for_states=[], operation_kw 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: @@ -342,8 +349,9 @@ def update_api_and_wait_for_state(self, api_id, update_api_details, wait_for_sta operation_result = self.client.update_api(api_id, update_api_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: @@ -383,8 +391,9 @@ def update_certificate_and_wait_for_state(self, certificate_id, update_certifica operation_result = self.client.update_certificate(certificate_id, update_certificate_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: diff --git a/src/oci/apigateway/deployment_client_composite_operations.py b/src/oci/apigateway/deployment_client_composite_operations.py index 9b8efb95a..7ee16de0b 100644 --- a/src/oci/apigateway/deployment_client_composite_operations.py +++ b/src/oci/apigateway/deployment_client_composite_operations.py @@ -49,8 +49,9 @@ def change_deployment_compartment_and_wait_for_state(self, deployment_id, change operation_result = self.client.change_deployment_compartment(deployment_id, change_deployment_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: @@ -87,8 +88,9 @@ def create_deployment_and_wait_for_state(self, create_deployment_details, wait_f operation_result = self.client.create_deployment(create_deployment_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: @@ -133,8 +135,9 @@ def delete_deployment_and_wait_for_state(self, deployment_id, wait_for_states=[] 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: @@ -174,8 +177,9 @@ def update_deployment_and_wait_for_state(self, deployment_id, update_deployment_ operation_result = self.client.update_deployment(deployment_id, update_deployment_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: diff --git a/src/oci/apigateway/gateway_client_composite_operations.py b/src/oci/apigateway/gateway_client_composite_operations.py index 99401f507..e4a54461f 100644 --- a/src/oci/apigateway/gateway_client_composite_operations.py +++ b/src/oci/apigateway/gateway_client_composite_operations.py @@ -49,8 +49,9 @@ def change_gateway_compartment_and_wait_for_state(self, gateway_id, change_gatew operation_result = self.client.change_gateway_compartment(gateway_id, change_gateway_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: @@ -87,8 +88,9 @@ def create_gateway_and_wait_for_state(self, create_gateway_details, wait_for_sta operation_result = self.client.create_gateway(create_gateway_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: @@ -133,8 +135,9 @@ def delete_gateway_and_wait_for_state(self, gateway_id, wait_for_states=[], oper 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: @@ -174,8 +177,9 @@ def update_gateway_and_wait_for_state(self, gateway_id, update_gateway_details, operation_result = self.client.update_gateway(gateway_id, update_gateway_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: diff --git a/src/oci/apigateway/subscribers_client_composite_operations.py b/src/oci/apigateway/subscribers_client_composite_operations.py index d544f4543..069269c0c 100644 --- a/src/oci/apigateway/subscribers_client_composite_operations.py +++ b/src/oci/apigateway/subscribers_client_composite_operations.py @@ -49,8 +49,9 @@ def change_subscriber_compartment_and_wait_for_state(self, subscriber_id, change operation_result = self.client.change_subscriber_compartment(subscriber_id, change_subscriber_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: @@ -87,8 +88,9 @@ def create_subscriber_and_wait_for_state(self, create_subscriber_details, wait_f operation_result = self.client.create_subscriber(create_subscriber_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: @@ -133,8 +135,9 @@ def delete_subscriber_and_wait_for_state(self, subscriber_id, wait_for_states=[] 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: @@ -174,8 +177,9 @@ def update_subscriber_and_wait_for_state(self, subscriber_id, update_subscriber_ operation_result = self.client.update_subscriber(subscriber_id, update_subscriber_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: diff --git a/src/oci/apigateway/usage_plans_client_composite_operations.py b/src/oci/apigateway/usage_plans_client_composite_operations.py index 8884c707e..1924cb9cf 100644 --- a/src/oci/apigateway/usage_plans_client_composite_operations.py +++ b/src/oci/apigateway/usage_plans_client_composite_operations.py @@ -49,8 +49,9 @@ def change_usage_plan_compartment_and_wait_for_state(self, usage_plan_id, change operation_result = self.client.change_usage_plan_compartment(usage_plan_id, change_usage_plan_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: @@ -87,8 +88,9 @@ def create_usage_plan_and_wait_for_state(self, create_usage_plan_details, wait_f operation_result = self.client.create_usage_plan(create_usage_plan_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: @@ -133,8 +135,9 @@ def delete_usage_plan_and_wait_for_state(self, usage_plan_id, wait_for_states=[] 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: @@ -174,8 +177,9 @@ def update_usage_plan_and_wait_for_state(self, usage_plan_id, update_usage_plan_ operation_result = self.client.update_usage_plan(usage_plan_id, update_usage_plan_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: diff --git a/src/oci/apm_control_plane/apm_domain_client_composite_operations.py b/src/oci/apm_control_plane/apm_domain_client_composite_operations.py index 66d4c43bc..43d819926 100644 --- a/src/oci/apm_control_plane/apm_domain_client_composite_operations.py +++ b/src/oci/apm_control_plane/apm_domain_client_composite_operations.py @@ -49,8 +49,9 @@ def change_apm_domain_compartment_and_wait_for_state(self, apm_domain_id, change operation_result = self.client.change_apm_domain_compartment(apm_domain_id, change_apm_domain_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: @@ -87,8 +88,9 @@ def create_apm_domain_and_wait_for_state(self, create_apm_domain_details, wait_f operation_result = self.client.create_apm_domain(create_apm_domain_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: @@ -133,8 +135,9 @@ def delete_apm_domain_and_wait_for_state(self, apm_domain_id, wait_for_states=[] 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: @@ -174,8 +177,9 @@ def generate_data_keys_and_wait_for_state(self, generate_data_keys_list_details, operation_result = self.client.generate_data_keys(generate_data_keys_list_details, apm_domain_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: @@ -215,8 +219,9 @@ def remove_data_keys_and_wait_for_state(self, apm_domain_id, remove_data_keys_li operation_result = self.client.remove_data_keys(apm_domain_id, remove_data_keys_list_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: @@ -256,8 +261,9 @@ def update_apm_domain_and_wait_for_state(self, apm_domain_id, update_apm_domain_ operation_result = self.client.update_apm_domain(apm_domain_id, update_apm_domain_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: diff --git a/src/oci/application_migration/application_migration_client_composite_operations.py b/src/oci/application_migration/application_migration_client_composite_operations.py index ea8797f54..0ad5e60c6 100644 --- a/src/oci/application_migration/application_migration_client_composite_operations.py +++ b/src/oci/application_migration/application_migration_client_composite_operations.py @@ -51,8 +51,9 @@ def change_migration_compartment_and_wait_for_state(self, migration_id, change_m operation_result = self.client.change_migration_compartment(migration_id, change_migration_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: @@ -94,8 +95,9 @@ def change_source_compartment_and_wait_for_state(self, source_id, change_source_ operation_result = self.client.change_source_compartment(source_id, change_source_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: @@ -132,8 +134,9 @@ def create_migration_and_wait_for_state(self, create_migration_details, wait_for operation_result = self.client.create_migration(create_migration_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: @@ -170,8 +173,9 @@ def create_source_and_wait_for_state(self, create_source_details, wait_for_state operation_result = self.client.create_source(create_source_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: @@ -218,8 +222,9 @@ def delete_migration_and_wait_for_state(self, migration_id, wait_for_states=[], 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: @@ -266,8 +271,9 @@ def delete_source_and_wait_for_state(self, source_id, wait_for_states=[], operat 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: @@ -306,8 +312,9 @@ def migrate_application_and_wait_for_state(self, migration_id, wait_for_states=[ operation_result = self.client.migrate_application(migration_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: @@ -349,8 +356,9 @@ def update_migration_and_wait_for_state(self, migration_id, update_migration_det operation_result = self.client.update_migration(migration_id, update_migration_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: @@ -392,8 +400,9 @@ def update_source_and_wait_for_state(self, source_id, update_source_details, wai operation_result = self.client.update_source(source_id, update_source_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: diff --git a/src/oci/appmgmt_control/appmgmt_control_client_composite_operations.py b/src/oci/appmgmt_control/appmgmt_control_client_composite_operations.py index 449a1cced..d97ecf4eb 100644 --- a/src/oci/appmgmt_control/appmgmt_control_client_composite_operations.py +++ b/src/oci/appmgmt_control/appmgmt_control_client_composite_operations.py @@ -46,8 +46,9 @@ def activate_monitoring_plugin_and_wait_for_state(self, monitored_instance_id, w operation_result = self.client.activate_monitoring_plugin(monitored_instance_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: @@ -84,8 +85,9 @@ def publish_top_processes_metrics_and_wait_for_state(self, monitored_instance_id operation_result = self.client.publish_top_processes_metrics(monitored_instance_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: diff --git a/src/oci/artifacts/artifacts_client_composite_operations.py b/src/oci/artifacts/artifacts_client_composite_operations.py index bfb28b258..c0d5a0645 100644 --- a/src/oci/artifacts/artifacts_client_composite_operations.py +++ b/src/oci/artifacts/artifacts_client_composite_operations.py @@ -46,7 +46,6 @@ def create_container_image_signature_and_wait_for_state(self, create_container_i operation_result = self.client.create_container_image_signature(create_container_image_signature_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_signature_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_container_repository_and_wait_for_state(self, create_container_reposi operation_result = self.client.create_container_repository(create_container_repository_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] repository_id = operation_result.data.id @@ -132,7 +130,6 @@ def create_repository_and_wait_for_state(self, create_repository_details, wait_f operation_result = self.client.create_repository(create_repository_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] repository_id = operation_result.data.id @@ -188,7 +185,6 @@ def delete_container_image_and_wait_for_state(self, image_id, wait_for_states=[] if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -252,7 +248,6 @@ def delete_container_image_signature_and_wait_for_state(self, image_signature_id if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -316,7 +311,6 @@ def delete_container_repository_and_wait_for_state(self, repository_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -380,7 +374,6 @@ def delete_generic_artifact_and_wait_for_state(self, artifact_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -444,7 +437,6 @@ def delete_repository_and_wait_for_state(self, repository_id, wait_for_states=[] if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -502,7 +494,6 @@ def remove_container_version_and_wait_for_state(self, image_id, remove_container operation_result = self.client.remove_container_version(image_id, remove_container_version_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_id = operation_result.data.id @@ -552,7 +543,6 @@ def restore_container_image_and_wait_for_state(self, image_id, restore_container operation_result = self.client.restore_container_image(image_id, restore_container_image_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_id = operation_result.data.id @@ -602,7 +592,6 @@ def update_container_image_and_wait_for_state(self, image_id, update_container_i operation_result = self.client.update_container_image(image_id, update_container_image_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_id = operation_result.data.id @@ -652,7 +641,6 @@ def update_container_image_signature_and_wait_for_state(self, image_signature_id operation_result = self.client.update_container_image_signature(image_signature_id, update_container_image_signature_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_signature_id = operation_result.data.id @@ -702,7 +690,6 @@ def update_container_repository_and_wait_for_state(self, repository_id, update_c operation_result = self.client.update_container_repository(repository_id, update_container_repository_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] repository_id = operation_result.data.id @@ -754,7 +741,6 @@ def update_generic_artifact_and_wait_for_state(self, artifact_id, update_generic operation_result = self.client.update_generic_artifact(artifact_id, update_generic_artifact_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] artifact_id = operation_result.data.id @@ -804,7 +790,6 @@ def update_repository_and_wait_for_state(self, repository_id, update_repository_ operation_result = self.client.update_repository(repository_id, update_repository_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] repository_id = operation_result.data.id diff --git a/src/oci/audit/audit_client_composite_operations.py b/src/oci/audit/audit_client_composite_operations.py index 81062db37..2f4ce312b 100644 --- a/src/oci/audit/audit_client_composite_operations.py +++ b/src/oci/audit/audit_client_composite_operations.py @@ -49,8 +49,9 @@ def update_configuration_and_wait_for_state(self, compartment_id, update_configu operation_result = self.client.update_configuration(compartment_id, update_configuration_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: diff --git a/src/oci/bastion/bastion_client_composite_operations.py b/src/oci/bastion/bastion_client_composite_operations.py index 630e3e81d..e4fde3a3a 100644 --- a/src/oci/bastion/bastion_client_composite_operations.py +++ b/src/oci/bastion/bastion_client_composite_operations.py @@ -46,8 +46,9 @@ def create_bastion_and_wait_for_state(self, create_bastion_details, wait_for_sta operation_result = self.client.create_bastion(create_bastion_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: @@ -84,8 +85,9 @@ def create_session_and_wait_for_state(self, create_session_details, wait_for_sta operation_result = self.client.create_session(create_session_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: @@ -130,8 +132,9 @@ def delete_bastion_and_wait_for_state(self, bastion_id, wait_for_states=[], oper 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: @@ -176,8 +179,9 @@ def delete_session_and_wait_for_state(self, session_id, wait_for_states=[], oper 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: @@ -217,8 +221,9 @@ def update_bastion_and_wait_for_state(self, bastion_id, update_bastion_details, operation_result = self.client.update_bastion(bastion_id, update_bastion_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: @@ -258,7 +263,6 @@ def update_session_and_wait_for_state(self, session_id, update_session_details, operation_result = self.client.update_session(session_id, update_session_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] session_id = operation_result.data.id diff --git a/src/oci/bds/bds_client_composite_operations.py b/src/oci/bds/bds_client_composite_operations.py index 41783a5cb..b25b3b3c9 100644 --- a/src/oci/bds/bds_client_composite_operations.py +++ b/src/oci/bds/bds_client_composite_operations.py @@ -52,8 +52,9 @@ def activate_bds_metastore_configuration_and_wait_for_state(self, bds_instance_i operation_result = self.client.activate_bds_metastore_configuration(bds_instance_id, metastore_config_id, activate_bds_metastore_configuration_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: @@ -93,8 +94,9 @@ def add_auto_scaling_configuration_and_wait_for_state(self, bds_instance_id, add operation_result = self.client.add_auto_scaling_configuration(bds_instance_id, add_auto_scaling_configuration_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: @@ -134,8 +136,9 @@ def add_block_storage_and_wait_for_state(self, bds_instance_id, add_block_storag operation_result = self.client.add_block_storage(bds_instance_id, add_block_storage_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: @@ -175,8 +178,9 @@ def add_cloud_sql_and_wait_for_state(self, bds_instance_id, add_cloud_sql_detail operation_result = self.client.add_cloud_sql(bds_instance_id, add_cloud_sql_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: @@ -216,8 +220,9 @@ def add_kafka_and_wait_for_state(self, bds_instance_id, add_kafka_details, wait_ operation_result = self.client.add_kafka(bds_instance_id, add_kafka_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: @@ -257,8 +262,9 @@ def add_master_nodes_and_wait_for_state(self, bds_instance_id, add_master_nodes_ operation_result = self.client.add_master_nodes(bds_instance_id, add_master_nodes_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: @@ -298,8 +304,9 @@ def add_utility_nodes_and_wait_for_state(self, bds_instance_id, add_utility_node operation_result = self.client.add_utility_nodes(bds_instance_id, add_utility_nodes_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: @@ -339,8 +346,9 @@ def add_worker_nodes_and_wait_for_state(self, bds_instance_id, add_worker_nodes_ operation_result = self.client.add_worker_nodes(bds_instance_id, add_worker_nodes_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: @@ -380,8 +388,9 @@ def change_bds_instance_compartment_and_wait_for_state(self, bds_instance_id, ch operation_result = self.client.change_bds_instance_compartment(bds_instance_id, change_bds_instance_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: @@ -421,8 +430,9 @@ def change_shape_and_wait_for_state(self, bds_instance_id, change_shape_details, operation_result = self.client.change_shape(bds_instance_id, change_shape_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: @@ -462,8 +472,9 @@ def create_bds_api_key_and_wait_for_state(self, bds_instance_id, create_bds_api_ operation_result = self.client.create_bds_api_key(bds_instance_id, create_bds_api_key_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: @@ -500,8 +511,9 @@ def create_bds_instance_and_wait_for_state(self, create_bds_instance_details, wa operation_result = self.client.create_bds_instance(create_bds_instance_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: @@ -541,8 +553,9 @@ def create_bds_metastore_configuration_and_wait_for_state(self, bds_instance_id, operation_result = self.client.create_bds_metastore_configuration(bds_instance_id, create_bds_metastore_configuration_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: @@ -590,8 +603,9 @@ def delete_bds_api_key_and_wait_for_state(self, bds_instance_id, api_key_id, wai 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: @@ -636,8 +650,9 @@ def delete_bds_instance_and_wait_for_state(self, bds_instance_id, wait_for_state 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: @@ -685,8 +700,9 @@ def delete_bds_metastore_configuration_and_wait_for_state(self, bds_instance_id, 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: @@ -726,8 +742,9 @@ def disable_certificate_and_wait_for_state(self, bds_instance_id, disable_certif operation_result = self.client.disable_certificate(bds_instance_id, disable_certificate_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: @@ -767,8 +784,9 @@ def enable_certificate_and_wait_for_state(self, bds_instance_id, enable_certific operation_result = self.client.enable_certificate(bds_instance_id, enable_certificate_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: @@ -808,8 +826,9 @@ def execute_bootstrap_script_and_wait_for_state(self, bds_instance_id, execute_b operation_result = self.client.execute_bootstrap_script(bds_instance_id, execute_bootstrap_script_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: @@ -849,8 +868,9 @@ def install_os_patch_and_wait_for_state(self, bds_instance_id, install_os_patch_ operation_result = self.client.install_os_patch(bds_instance_id, install_os_patch_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: @@ -890,8 +910,9 @@ def install_patch_and_wait_for_state(self, bds_instance_id, install_patch_detail operation_result = self.client.install_patch(bds_instance_id, install_patch_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: @@ -934,8 +955,9 @@ def remove_auto_scaling_configuration_and_wait_for_state(self, bds_instance_id, operation_result = self.client.remove_auto_scaling_configuration(bds_instance_id, auto_scaling_configuration_id, remove_auto_scaling_configuration_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: @@ -975,8 +997,9 @@ def remove_cloud_sql_and_wait_for_state(self, bds_instance_id, remove_cloud_sql_ operation_result = self.client.remove_cloud_sql(bds_instance_id, remove_cloud_sql_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: @@ -1016,8 +1039,9 @@ def remove_kafka_and_wait_for_state(self, bds_instance_id, remove_kafka_details, operation_result = self.client.remove_kafka(bds_instance_id, remove_kafka_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: @@ -1057,8 +1081,9 @@ def remove_node_and_wait_for_state(self, bds_instance_id, remove_node_details, w operation_result = self.client.remove_node(bds_instance_id, remove_node_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: @@ -1098,8 +1123,9 @@ def renew_certificate_and_wait_for_state(self, bds_instance_id, renew_certificat operation_result = self.client.renew_certificate(bds_instance_id, renew_certificate_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: @@ -1139,8 +1165,9 @@ def restart_node_and_wait_for_state(self, bds_instance_id, restart_node_details, operation_result = self.client.restart_node(bds_instance_id, restart_node_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: @@ -1180,8 +1207,9 @@ def start_bds_instance_and_wait_for_state(self, bds_instance_id, start_bds_insta operation_result = self.client.start_bds_instance(bds_instance_id, start_bds_instance_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: @@ -1221,8 +1249,9 @@ def stop_bds_instance_and_wait_for_state(self, bds_instance_id, stop_bds_instanc operation_result = self.client.stop_bds_instance(bds_instance_id, stop_bds_instance_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: @@ -1265,8 +1294,9 @@ def test_bds_metastore_configuration_and_wait_for_state(self, bds_instance_id, m operation_result = self.client.test_bds_metastore_configuration(bds_instance_id, metastore_config_id, test_bds_metastore_configuration_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: @@ -1309,8 +1339,9 @@ def test_bds_object_storage_connection_and_wait_for_state(self, bds_instance_id, operation_result = self.client.test_bds_object_storage_connection(bds_instance_id, api_key_id, test_bds_object_storage_connection_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: @@ -1353,8 +1384,9 @@ def update_auto_scaling_configuration_and_wait_for_state(self, bds_instance_id, operation_result = self.client.update_auto_scaling_configuration(bds_instance_id, auto_scaling_configuration_id, update_auto_scaling_configuration_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: @@ -1394,8 +1426,9 @@ def update_bds_instance_and_wait_for_state(self, bds_instance_id, update_bds_ins operation_result = self.client.update_bds_instance(bds_instance_id, update_bds_instance_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: @@ -1438,8 +1471,9 @@ def update_bds_metastore_configuration_and_wait_for_state(self, bds_instance_id, operation_result = self.client.update_bds_metastore_configuration(bds_instance_id, metastore_config_id, update_bds_metastore_configuration_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: diff --git a/src/oci/blockchain/blockchain_platform_client_composite_operations.py b/src/oci/blockchain/blockchain_platform_client_composite_operations.py index 6b7134ad8..12aeffb7c 100644 --- a/src/oci/blockchain/blockchain_platform_client_composite_operations.py +++ b/src/oci/blockchain/blockchain_platform_client_composite_operations.py @@ -49,8 +49,9 @@ def change_blockchain_platform_compartment_and_wait_for_state(self, blockchain_p operation_result = self.client.change_blockchain_platform_compartment(blockchain_platform_id, change_blockchain_platform_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: @@ -87,8 +88,9 @@ def create_blockchain_platform_and_wait_for_state(self, create_blockchain_platfo operation_result = self.client.create_blockchain_platform(create_blockchain_platform_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: @@ -128,8 +130,9 @@ def create_osn_and_wait_for_state(self, blockchain_platform_id, create_osn_detai operation_result = self.client.create_osn(blockchain_platform_id, create_osn_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: @@ -169,8 +172,9 @@ def create_peer_and_wait_for_state(self, blockchain_platform_id, create_peer_det operation_result = self.client.create_peer(blockchain_platform_id, create_peer_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: @@ -215,8 +219,9 @@ def delete_blockchain_platform_and_wait_for_state(self, blockchain_platform_id, 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: @@ -264,8 +269,9 @@ def delete_osn_and_wait_for_state(self, blockchain_platform_id, osn_id, wait_for 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: @@ -313,8 +319,9 @@ def delete_peer_and_wait_for_state(self, blockchain_platform_id, peer_id, wait_f 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: @@ -359,8 +366,9 @@ def delete_work_request_and_wait_for_state(self, work_request_id, wait_for_state 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: @@ -400,8 +408,9 @@ def scale_blockchain_platform_and_wait_for_state(self, blockchain_platform_id, s operation_result = self.client.scale_blockchain_platform(blockchain_platform_id, scale_blockchain_platform_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: @@ -438,8 +447,9 @@ def start_blockchain_platform_and_wait_for_state(self, blockchain_platform_id, w operation_result = self.client.start_blockchain_platform(blockchain_platform_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: @@ -476,8 +486,9 @@ def stop_blockchain_platform_and_wait_for_state(self, blockchain_platform_id, wa operation_result = self.client.stop_blockchain_platform(blockchain_platform_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: @@ -517,8 +528,9 @@ def update_blockchain_platform_and_wait_for_state(self, update_blockchain_platfo operation_result = self.client.update_blockchain_platform(update_blockchain_platform_details, blockchain_platform_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: @@ -561,8 +573,9 @@ def update_osn_and_wait_for_state(self, blockchain_platform_id, osn_id, update_o operation_result = self.client.update_osn(blockchain_platform_id, osn_id, update_osn_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: @@ -605,8 +618,9 @@ def update_peer_and_wait_for_state(self, blockchain_platform_id, peer_id, update operation_result = self.client.update_peer(blockchain_platform_id, peer_id, update_peer_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: @@ -646,8 +660,9 @@ def upgrade_blockchain_platform_and_wait_for_state(self, upgrade_blockchain_plat operation_result = self.client.upgrade_blockchain_platform(upgrade_blockchain_platform_details, blockchain_platform_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: diff --git a/src/oci/budget/budget_client_composite_operations.py b/src/oci/budget/budget_client_composite_operations.py index 902519d79..dd1992355 100644 --- a/src/oci/budget/budget_client_composite_operations.py +++ b/src/oci/budget/budget_client_composite_operations.py @@ -49,7 +49,6 @@ def create_alert_rule_and_wait_for_state(self, budget_id, create_alert_rule_deta operation_result = self.client.create_alert_rule(budget_id, create_alert_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] alert_rule_id = operation_result.data.id @@ -92,7 +91,6 @@ def create_budget_and_wait_for_state(self, create_budget_details, wait_for_state operation_result = self.client.create_budget(create_budget_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] budget_id = operation_result.data.id @@ -144,7 +142,6 @@ def delete_budget_and_wait_for_state(self, budget_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -201,7 +198,6 @@ def update_alert_rule_and_wait_for_state(self, budget_id, alert_rule_id, update_ operation_result = self.client.update_alert_rule(budget_id, alert_rule_id, update_alert_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] alert_rule_id = operation_result.data.id @@ -247,7 +243,6 @@ def update_budget_and_wait_for_state(self, budget_id, update_budget_details, wai operation_result = self.client.update_budget(budget_id, update_budget_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] budget_id = operation_result.data.id diff --git a/src/oci/certificates_management/certificates_management_client_composite_operations.py b/src/oci/certificates_management/certificates_management_client_composite_operations.py index fe5947555..07e8e41cd 100644 --- a/src/oci/certificates_management/certificates_management_client_composite_operations.py +++ b/src/oci/certificates_management/certificates_management_client_composite_operations.py @@ -46,7 +46,6 @@ def create_ca_bundle_and_wait_for_state(self, create_ca_bundle_details, wait_for operation_result = self.client.create_ca_bundle(create_ca_bundle_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ca_bundle_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_certificate_and_wait_for_state(self, create_certificate_details, wait operation_result = self.client.create_certificate(create_certificate_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] certificate_id = operation_result.data.id @@ -132,7 +130,6 @@ def create_certificate_authority_and_wait_for_state(self, create_certificate_aut operation_result = self.client.create_certificate_authority(create_certificate_authority_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] certificate_authority_id = operation_result.data.id @@ -184,7 +181,6 @@ def delete_ca_bundle_and_wait_for_state(self, ca_bundle_id, wait_for_states=[], if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -238,7 +234,6 @@ def update_ca_bundle_and_wait_for_state(self, ca_bundle_id, update_ca_bundle_det operation_result = self.client.update_ca_bundle(ca_bundle_id, update_ca_bundle_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ca_bundle_id = operation_result.data.id @@ -284,7 +279,6 @@ def update_certificate_and_wait_for_state(self, certificate_id, update_certifica operation_result = self.client.update_certificate(certificate_id, update_certificate_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] certificate_id = operation_result.data.id @@ -330,7 +324,6 @@ def update_certificate_authority_and_wait_for_state(self, certificate_authority_ operation_result = self.client.update_certificate_authority(certificate_authority_id, update_certificate_authority_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] certificate_authority_id = operation_result.data.id diff --git a/src/oci/cloud_bridge/discovery_client_composite_operations.py b/src/oci/cloud_bridge/discovery_client_composite_operations.py index e197b9976..dcb3386dd 100644 --- a/src/oci/cloud_bridge/discovery_client_composite_operations.py +++ b/src/oci/cloud_bridge/discovery_client_composite_operations.py @@ -46,8 +46,9 @@ def create_asset_source_and_wait_for_state(self, create_asset_source_details, wa operation_result = self.client.create_asset_source(create_asset_source_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: @@ -84,7 +85,6 @@ def create_discovery_schedule_and_wait_for_state(self, create_discovery_schedule operation_result = self.client.create_discovery_schedule(create_discovery_schedule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] discovery_schedule_id = operation_result.data.id @@ -137,8 +137,9 @@ def delete_asset_source_and_wait_for_state(self, asset_source_id, wait_for_state 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: @@ -186,7 +187,6 @@ def delete_discovery_schedule_and_wait_for_state(self, discovery_schedule_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -239,8 +239,9 @@ def refresh_asset_source_and_wait_for_state(self, asset_source_id, wait_for_stat operation_result = self.client.refresh_asset_source(asset_source_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: @@ -282,8 +283,9 @@ def update_asset_source_and_wait_for_state(self, asset_source_id, update_asset_s operation_result = self.client.update_asset_source(asset_source_id, update_asset_source_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: @@ -325,7 +327,6 @@ def update_discovery_schedule_and_wait_for_state(self, update_discovery_schedule operation_result = self.client.update_discovery_schedule(update_discovery_schedule_details, discovery_schedule_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] discovery_schedule_id = operation_result.data.id diff --git a/src/oci/cloud_bridge/inventory_client_composite_operations.py b/src/oci/cloud_bridge/inventory_client_composite_operations.py index 7c4b80c86..c122c6426 100644 --- a/src/oci/cloud_bridge/inventory_client_composite_operations.py +++ b/src/oci/cloud_bridge/inventory_client_composite_operations.py @@ -49,7 +49,6 @@ def change_asset_tags_and_wait_for_state(self, asset_id, change_asset_tags_detai operation_result = self.client.change_asset_tags(asset_id, change_asset_tags_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] asset_id = operation_result.data.id @@ -92,7 +91,6 @@ def create_asset_and_wait_for_state(self, create_asset_details, wait_for_states= operation_result = self.client.create_asset(create_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] asset_id = operation_result.data.id @@ -135,8 +133,9 @@ def create_inventory_and_wait_for_state(self, create_inventory_details, wait_for operation_result = self.client.create_inventory(create_inventory_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: @@ -182,7 +181,6 @@ def delete_asset_and_wait_for_state(self, asset_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -241,8 +239,9 @@ def delete_inventory_and_wait_for_state(self, inventory_id, wait_for_states=[], 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: @@ -279,8 +278,9 @@ def get_inventory_and_wait_for_state(self, inventory_id, wait_for_states=[], ope operation_result = self.client.get_inventory(inventory_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: @@ -320,8 +320,9 @@ def import_inventory_and_wait_for_state(self, import_inventory_details, inventor operation_result = self.client.import_inventory(import_inventory_details, inventory_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: @@ -361,7 +362,6 @@ def update_asset_and_wait_for_state(self, asset_id, update_asset_details, wait_f operation_result = self.client.update_asset(asset_id, update_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] asset_id = operation_result.data.id @@ -407,7 +407,6 @@ def update_inventory_and_wait_for_state(self, inventory_id, update_inventory_det operation_result = self.client.update_inventory(inventory_id, update_inventory_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] inventory_id = operation_result.data.id diff --git a/src/oci/cloud_bridge/ocb_agent_svc_client_composite_operations.py b/src/oci/cloud_bridge/ocb_agent_svc_client_composite_operations.py index c9b40a5f9..a2a7aa47b 100644 --- a/src/oci/cloud_bridge/ocb_agent_svc_client_composite_operations.py +++ b/src/oci/cloud_bridge/ocb_agent_svc_client_composite_operations.py @@ -49,7 +49,6 @@ def add_agent_dependency_and_wait_for_state(self, environment_id, add_agent_depe operation_result = self.client.add_agent_dependency(environment_id, add_agent_dependency_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] environment_id = operation_result.data.id @@ -95,8 +94,9 @@ def change_agent_compartment_and_wait_for_state(self, agent_id, change_agent_com operation_result = self.client.change_agent_compartment(agent_id, change_agent_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: @@ -136,8 +136,9 @@ def change_environment_compartment_and_wait_for_state(self, environment_id, chan operation_result = self.client.change_environment_compartment(environment_id, change_environment_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: @@ -174,7 +175,6 @@ def create_agent_and_wait_for_state(self, create_agent_details, wait_for_states= operation_result = self.client.create_agent(create_agent_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] agent_id = operation_result.data.id @@ -217,8 +217,9 @@ def create_agent_dependency_and_wait_for_state(self, create_agent_dependency_det operation_result = self.client.create_agent_dependency(create_agent_dependency_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: @@ -255,7 +256,6 @@ def create_environment_and_wait_for_state(self, create_environment_details, wait operation_result = self.client.create_environment(create_environment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] environment_id = operation_result.data.id @@ -307,7 +307,6 @@ def delete_agent_and_wait_for_state(self, agent_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -367,7 +366,6 @@ def delete_agent_dependency_and_wait_for_state(self, agent_dependency_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -427,7 +425,6 @@ def delete_environment_and_wait_for_state(self, environment_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -481,7 +478,6 @@ def remove_agent_dependency_and_wait_for_state(self, environment_id, remove_agen operation_result = self.client.remove_agent_dependency(environment_id, remove_agent_dependency_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] environment_id = operation_result.data.id @@ -527,7 +523,6 @@ def update_agent_and_wait_for_state(self, agent_id, update_agent_details, wait_f operation_result = self.client.update_agent(agent_id, update_agent_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] agent_id = operation_result.data.id @@ -573,8 +568,9 @@ def update_agent_dependency_and_wait_for_state(self, agent_dependency_id, update operation_result = self.client.update_agent_dependency(agent_dependency_id, update_agent_dependency_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: @@ -614,7 +610,6 @@ def update_environment_and_wait_for_state(self, environment_id, update_environme operation_result = self.client.update_environment(environment_id, update_environment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] environment_id = operation_result.data.id @@ -663,7 +658,6 @@ def update_plugin_and_wait_for_state(self, agent_id, plugin_name, update_plugin_ operation_result = self.client.update_plugin(agent_id, plugin_name, update_plugin_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] agent_id = operation_result.data.id diff --git a/src/oci/cloud_guard/cloud_guard_client_composite_operations.py b/src/oci/cloud_guard/cloud_guard_client_composite_operations.py index 48853cf90..1325a0cfc 100644 --- a/src/oci/cloud_guard/cloud_guard_client_composite_operations.py +++ b/src/oci/cloud_guard/cloud_guard_client_composite_operations.py @@ -49,7 +49,6 @@ def add_compartment_and_wait_for_state(self, security_zone_id, add_compartment_d operation_result = self.client.add_compartment(security_zone_id, add_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_zone_id = operation_result.data.id @@ -95,8 +94,9 @@ def change_data_source_compartment_and_wait_for_state(self, data_source_id, chan operation_result = self.client.change_data_source_compartment(data_source_id, change_data_source_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: @@ -133,7 +133,6 @@ def create_data_mask_rule_and_wait_for_state(self, create_data_mask_rule_details operation_result = self.client.create_data_mask_rule(create_data_mask_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_mask_rule_id = operation_result.data.id @@ -176,8 +175,9 @@ def create_data_source_and_wait_for_state(self, create_data_source_details, wait operation_result = self.client.create_data_source(create_data_source_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: @@ -214,7 +214,6 @@ def create_detector_recipe_and_wait_for_state(self, create_detector_recipe_detai operation_result = self.client.create_detector_recipe(create_detector_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] detector_recipe_id = operation_result.data.id @@ -260,7 +259,6 @@ def create_detector_recipe_detector_rule_and_wait_for_state(self, detector_recip operation_result = self.client.create_detector_recipe_detector_rule(detector_recipe_id, create_detector_recipe_detector_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] detector_recipe_id = operation_result.data.id @@ -303,7 +301,6 @@ def create_managed_list_and_wait_for_state(self, create_managed_list_details, wa operation_result = self.client.create_managed_list(create_managed_list_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_list_id = operation_result.data.id @@ -346,7 +343,6 @@ def create_responder_recipe_and_wait_for_state(self, create_responder_recipe_det operation_result = self.client.create_responder_recipe(create_responder_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] responder_recipe_id = operation_result.data.id @@ -389,7 +385,6 @@ def create_security_recipe_and_wait_for_state(self, create_security_recipe_detai operation_result = self.client.create_security_recipe(create_security_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_recipe_id = operation_result.data.id @@ -432,7 +427,6 @@ def create_security_zone_and_wait_for_state(self, create_security_zone_details, operation_result = self.client.create_security_zone(create_security_zone_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_zone_id = operation_result.data.id @@ -475,7 +469,6 @@ def create_target_and_wait_for_state(self, create_target_details, wait_for_state operation_result = self.client.create_target(create_target_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] target_id = operation_result.data.id @@ -521,7 +514,6 @@ def create_target_detector_recipe_and_wait_for_state(self, target_id, attach_tar operation_result = self.client.create_target_detector_recipe(target_id, attach_target_detector_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] target_id = operation_result.data.id @@ -573,7 +565,6 @@ def delete_data_mask_rule_and_wait_for_state(self, data_mask_rule_id, wait_for_s if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -632,8 +623,9 @@ def delete_data_source_and_wait_for_state(self, data_source_id, wait_for_states= 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: @@ -679,7 +671,6 @@ def delete_detector_recipe_and_wait_for_state(self, detector_recipe_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -739,7 +730,6 @@ def delete_managed_list_and_wait_for_state(self, managed_list_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -799,7 +789,6 @@ def delete_responder_recipe_and_wait_for_state(self, responder_recipe_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -859,7 +848,6 @@ def delete_security_recipe_and_wait_for_state(self, security_recipe_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -919,7 +907,6 @@ def delete_security_zone_and_wait_for_state(self, security_zone_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -979,7 +966,6 @@ def delete_target_and_wait_for_state(self, target_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1033,7 +1019,6 @@ def remove_compartment_and_wait_for_state(self, security_zone_id, remove_compart operation_result = self.client.remove_compartment(security_zone_id, remove_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_zone_id = operation_result.data.id @@ -1079,7 +1064,6 @@ def update_data_mask_rule_and_wait_for_state(self, data_mask_rule_id, update_dat operation_result = self.client.update_data_mask_rule(data_mask_rule_id, update_data_mask_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_mask_rule_id = operation_result.data.id @@ -1125,8 +1109,9 @@ def update_data_source_and_wait_for_state(self, data_source_id, update_data_sour operation_result = self.client.update_data_source(data_source_id, update_data_source_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: @@ -1166,7 +1151,6 @@ def update_detector_recipe_and_wait_for_state(self, detector_recipe_id, update_d operation_result = self.client.update_detector_recipe(detector_recipe_id, update_detector_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] detector_recipe_id = operation_result.data.id @@ -1215,7 +1199,6 @@ def update_detector_recipe_detector_rule_and_wait_for_state(self, detector_recip operation_result = self.client.update_detector_recipe_detector_rule(detector_recipe_id, detector_rule_id, update_detector_recipe_detector_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] detector_recipe_id = operation_result.data.id @@ -1261,7 +1244,6 @@ def update_managed_list_and_wait_for_state(self, managed_list_id, update_managed operation_result = self.client.update_managed_list(managed_list_id, update_managed_list_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_list_id = operation_result.data.id @@ -1307,7 +1289,6 @@ def update_problem_status_and_wait_for_state(self, problem_id, update_problem_st operation_result = self.client.update_problem_status(problem_id, update_problem_status_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] problem_id = operation_result.data.id @@ -1353,7 +1334,6 @@ def update_responder_recipe_and_wait_for_state(self, responder_recipe_id, update operation_result = self.client.update_responder_recipe(responder_recipe_id, update_responder_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] responder_recipe_id = operation_result.data.id @@ -1402,7 +1382,6 @@ def update_responder_recipe_responder_rule_and_wait_for_state(self, responder_re operation_result = self.client.update_responder_recipe_responder_rule(responder_recipe_id, responder_rule_id, update_responder_recipe_responder_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] responder_recipe_id = operation_result.data.id @@ -1448,7 +1427,6 @@ def update_security_recipe_and_wait_for_state(self, security_recipe_id, update_s operation_result = self.client.update_security_recipe(security_recipe_id, update_security_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_recipe_id = operation_result.data.id @@ -1494,7 +1472,6 @@ def update_security_zone_and_wait_for_state(self, security_zone_id, update_secur operation_result = self.client.update_security_zone(security_zone_id, update_security_zone_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_zone_id = operation_result.data.id @@ -1540,7 +1517,6 @@ def update_target_and_wait_for_state(self, target_id, update_target_details, wai operation_result = self.client.update_target(target_id, update_target_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] target_id = operation_result.data.id @@ -1589,7 +1565,6 @@ def update_target_detector_recipe_and_wait_for_state(self, target_id, target_det operation_result = self.client.update_target_detector_recipe(target_id, target_detector_recipe_id, update_target_detector_recipe_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] target_id = operation_result.data.id @@ -1641,7 +1616,6 @@ def update_target_detector_recipe_detector_rule_and_wait_for_state(self, target_ operation_result = self.client.update_target_detector_recipe_detector_rule(target_id, target_detector_recipe_id, detector_rule_id, update_target_detector_recipe_detector_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] target_id = operation_result.data.id @@ -1693,7 +1667,6 @@ def update_target_responder_recipe_responder_rule_and_wait_for_state(self, targe operation_result = self.client.update_target_responder_recipe_responder_rule(target_id, target_responder_recipe_id, responder_rule_id, update_target_responder_recipe_responder_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] target_id = operation_result.data.id diff --git a/src/oci/cloud_migrations/migration_client_composite_operations.py b/src/oci/cloud_migrations/migration_client_composite_operations.py index 09b98daba..9e82cb52d 100644 --- a/src/oci/cloud_migrations/migration_client_composite_operations.py +++ b/src/oci/cloud_migrations/migration_client_composite_operations.py @@ -49,8 +49,9 @@ def change_migration_compartment_and_wait_for_state(self, migration_id, change_m operation_result = self.client.change_migration_compartment(migration_id, change_migration_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: @@ -90,8 +91,9 @@ def change_migration_plan_compartment_and_wait_for_state(self, migration_plan_id operation_result = self.client.change_migration_plan_compartment(migration_plan_id, change_migration_plan_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: @@ -131,8 +133,9 @@ def change_replication_schedule_compartment_and_wait_for_state(self, replication operation_result = self.client.change_replication_schedule_compartment(replication_schedule_id, change_replication_schedule_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: @@ -169,7 +172,6 @@ def create_migration_and_wait_for_state(self, create_migration_details, wait_for operation_result = self.client.create_migration(create_migration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] migration_id = operation_result.data.id @@ -212,8 +214,9 @@ def create_migration_asset_and_wait_for_state(self, create_migration_asset_detai operation_result = self.client.create_migration_asset(create_migration_asset_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: @@ -250,8 +253,9 @@ def create_migration_plan_and_wait_for_state(self, create_migration_plan_details operation_result = self.client.create_migration_plan(create_migration_plan_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: @@ -288,8 +292,9 @@ def create_replication_schedule_and_wait_for_state(self, create_replication_sche operation_result = self.client.create_replication_schedule(create_replication_schedule_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: @@ -326,8 +331,9 @@ def create_target_asset_and_wait_for_state(self, create_target_asset_details, wa operation_result = self.client.create_target_asset(create_target_asset_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: @@ -372,8 +378,9 @@ def delete_migration_and_wait_for_state(self, migration_id, wait_for_states=[], 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: @@ -418,8 +425,9 @@ def delete_migration_asset_and_wait_for_state(self, migration_asset_id, wait_for 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: @@ -464,8 +472,9 @@ def delete_migration_plan_and_wait_for_state(self, migration_plan_id, wait_for_s 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: @@ -510,8 +519,9 @@ def delete_replication_schedule_and_wait_for_state(self, replication_schedule_id 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: @@ -556,8 +566,9 @@ def delete_target_asset_and_wait_for_state(self, target_asset_id, wait_for_state 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: @@ -594,8 +605,9 @@ def execute_migration_plan_and_wait_for_state(self, migration_plan_id, wait_for_ operation_result = self.client.execute_migration_plan(migration_plan_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: @@ -635,8 +647,9 @@ def import_migration_plan_and_wait_for_state(self, migration_plan_id, import_mig operation_result = self.client.import_migration_plan(migration_plan_id, import_migration_plan_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: @@ -673,8 +686,9 @@ def refresh_migration_and_wait_for_state(self, migration_id, wait_for_states=[], operation_result = self.client.refresh_migration(migration_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: @@ -711,8 +725,9 @@ def refresh_migration_asset_and_wait_for_state(self, migration_asset_id, wait_fo operation_result = self.client.refresh_migration_asset(migration_asset_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: @@ -749,8 +764,9 @@ def refresh_migration_plan_and_wait_for_state(self, migration_plan_id, wait_for_ operation_result = self.client.refresh_migration_plan(migration_plan_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: @@ -787,8 +803,9 @@ def start_asset_replication_and_wait_for_state(self, migration_asset_id, wait_fo operation_result = self.client.start_asset_replication(migration_asset_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: @@ -825,8 +842,9 @@ def start_migration_replication_and_wait_for_state(self, migration_id, wait_for_ operation_result = self.client.start_migration_replication(migration_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: @@ -866,7 +884,6 @@ def update_migration_and_wait_for_state(self, migration_id, update_migration_det operation_result = self.client.update_migration(migration_id, update_migration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] migration_id = operation_result.data.id @@ -912,7 +929,6 @@ def update_migration_asset_and_wait_for_state(self, migration_asset_id, update_m operation_result = self.client.update_migration_asset(migration_asset_id, update_migration_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] migration_asset_id = operation_result.data.id @@ -958,8 +974,9 @@ def update_migration_plan_and_wait_for_state(self, migration_plan_id, update_mig operation_result = self.client.update_migration_plan(migration_plan_id, update_migration_plan_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: @@ -999,8 +1016,9 @@ def update_replication_schedule_and_wait_for_state(self, replication_schedule_id operation_result = self.client.update_replication_schedule(replication_schedule_id, update_replication_schedule_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: @@ -1040,8 +1058,9 @@ def update_target_asset_and_wait_for_state(self, target_asset_id, update_target_ operation_result = self.client.update_target_asset(target_asset_id, update_target_asset_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: diff --git a/src/oci/compute_cloud_at_customer/compute_cloud_at_customer_client_composite_operations.py b/src/oci/compute_cloud_at_customer/compute_cloud_at_customer_client_composite_operations.py index 8ecb11b4a..2edbbe291 100644 --- a/src/oci/compute_cloud_at_customer/compute_cloud_at_customer_client_composite_operations.py +++ b/src/oci/compute_cloud_at_customer/compute_cloud_at_customer_client_composite_operations.py @@ -46,7 +46,6 @@ def create_ccc_infrastructure_and_wait_for_state(self, create_ccc_infrastructure operation_result = self.client.create_ccc_infrastructure(create_ccc_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ccc_infrastructure_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_ccc_upgrade_schedule_and_wait_for_state(self, create_ccc_upgrade_sche operation_result = self.client.create_ccc_upgrade_schedule(create_ccc_upgrade_schedule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ccc_upgrade_schedule_id = operation_result.data.id @@ -144,7 +142,6 @@ def delete_ccc_infrastructure_and_wait_for_state(self, ccc_infrastructure_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -207,7 +204,6 @@ def delete_ccc_upgrade_schedule_and_wait_for_state(self, ccc_upgrade_schedule_id if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -264,7 +260,6 @@ def update_ccc_infrastructure_and_wait_for_state(self, ccc_infrastructure_id, up operation_result = self.client.update_ccc_infrastructure(ccc_infrastructure_id, update_ccc_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ccc_infrastructure_id = operation_result.data.id @@ -313,7 +308,6 @@ def update_ccc_upgrade_schedule_and_wait_for_state(self, ccc_upgrade_schedule_id operation_result = self.client.update_ccc_upgrade_schedule(ccc_upgrade_schedule_id, update_ccc_upgrade_schedule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ccc_upgrade_schedule_id = operation_result.data.id diff --git a/src/oci/container_engine/container_engine_client_composite_operations.py b/src/oci/container_engine/container_engine_client_composite_operations.py index 485e4d302..f206532a2 100644 --- a/src/oci/container_engine/container_engine_client_composite_operations.py +++ b/src/oci/container_engine/container_engine_client_composite_operations.py @@ -49,8 +49,9 @@ def cluster_migrate_to_native_vcn_and_wait_for_state(self, cluster_id, cluster_m operation_result = self.client.cluster_migrate_to_native_vcn(cluster_id, cluster_migrate_to_native_vcn_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: @@ -87,8 +88,9 @@ def complete_credential_rotation_and_wait_for_state(self, cluster_id, wait_for_s operation_result = self.client.complete_credential_rotation(cluster_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: @@ -125,8 +127,9 @@ def create_cluster_and_wait_for_state(self, create_cluster_details, wait_for_sta operation_result = self.client.create_cluster(create_cluster_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: @@ -163,8 +166,9 @@ def create_node_pool_and_wait_for_state(self, create_node_pool_details, wait_for operation_result = self.client.create_node_pool(create_node_pool_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: @@ -201,8 +205,9 @@ def create_virtual_node_pool_and_wait_for_state(self, create_virtual_node_pool_d operation_result = self.client.create_virtual_node_pool(create_virtual_node_pool_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: @@ -242,7 +247,6 @@ def create_workload_mapping_and_wait_for_state(self, cluster_id, create_workload operation_result = self.client.create_workload_mapping(cluster_id, create_workload_mapping_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] workload_mapping_id = operation_result.data.id @@ -293,8 +297,9 @@ def delete_cluster_and_wait_for_state(self, cluster_id, wait_for_states=[], oper 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: @@ -342,8 +347,9 @@ def delete_node_and_wait_for_state(self, node_pool_id, node_id, wait_for_states= 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: @@ -388,8 +394,9 @@ def delete_node_pool_and_wait_for_state(self, node_pool_id, wait_for_states=[], 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: @@ -434,8 +441,9 @@ def delete_virtual_node_pool_and_wait_for_state(self, virtual_node_pool_id, wait 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: @@ -486,8 +494,9 @@ def disable_addon_and_wait_for_state(self, cluster_id, addon_name, is_remove_exi 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: @@ -527,8 +536,9 @@ def install_addon_and_wait_for_state(self, cluster_id, install_addon_details, wa operation_result = self.client.install_addon(cluster_id, install_addon_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: @@ -568,8 +578,9 @@ def start_credential_rotation_and_wait_for_state(self, cluster_id, start_credent operation_result = self.client.start_credential_rotation(cluster_id, start_credential_rotation_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: @@ -612,8 +623,9 @@ def update_addon_and_wait_for_state(self, cluster_id, addon_name, update_addon_d operation_result = self.client.update_addon(cluster_id, addon_name, update_addon_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: @@ -653,8 +665,9 @@ def update_cluster_and_wait_for_state(self, cluster_id, update_cluster_details, operation_result = self.client.update_cluster(cluster_id, update_cluster_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: @@ -694,8 +707,9 @@ def update_cluster_endpoint_config_and_wait_for_state(self, cluster_id, update_c operation_result = self.client.update_cluster_endpoint_config(cluster_id, update_cluster_endpoint_config_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: @@ -735,8 +749,9 @@ def update_node_pool_and_wait_for_state(self, node_pool_id, update_node_pool_det operation_result = self.client.update_node_pool(node_pool_id, update_node_pool_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: @@ -776,8 +791,9 @@ def update_virtual_node_pool_and_wait_for_state(self, virtual_node_pool_id, upda operation_result = self.client.update_virtual_node_pool(virtual_node_pool_id, update_virtual_node_pool_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: @@ -820,7 +836,6 @@ def update_workload_mapping_and_wait_for_state(self, cluster_id, workload_mappin operation_result = self.client.update_workload_mapping(cluster_id, workload_mapping_id, update_workload_mapping_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] workload_mapping_id = operation_result.data.id diff --git a/src/oci/container_instances/container_instance_client_composite_operations.py b/src/oci/container_instances/container_instance_client_composite_operations.py index 74b565eb8..2f5c0c86b 100644 --- a/src/oci/container_instances/container_instance_client_composite_operations.py +++ b/src/oci/container_instances/container_instance_client_composite_operations.py @@ -51,8 +51,9 @@ def change_container_instance_compartment_and_wait_for_state(self, container_ins operation_result = self.client.change_container_instance_compartment(container_instance_id, change_container_instance_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: @@ -89,8 +90,9 @@ def create_container_instance_and_wait_for_state(self, create_container_instance operation_result = self.client.create_container_instance(create_container_instance_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: @@ -137,8 +139,9 @@ def delete_container_instance_and_wait_for_state(self, container_instance_id, wa 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: @@ -177,8 +180,9 @@ def restart_container_instance_and_wait_for_state(self, container_instance_id, w operation_result = self.client.restart_container_instance(container_instance_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: @@ -217,8 +221,9 @@ def start_container_instance_and_wait_for_state(self, container_instance_id, wai operation_result = self.client.start_container_instance(container_instance_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: @@ -257,8 +262,9 @@ def stop_container_instance_and_wait_for_state(self, container_instance_id, wait operation_result = self.client.stop_container_instance(container_instance_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: @@ -300,8 +306,9 @@ def update_container_and_wait_for_state(self, container_id, update_container_det operation_result = self.client.update_container(container_id, update_container_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: @@ -343,8 +350,9 @@ def update_container_instance_and_wait_for_state(self, container_instance_id, up operation_result = self.client.update_container_instance(container_instance_id, update_container_instance_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: diff --git a/src/oci/core/blockstorage_client_composite_operations.py b/src/oci/core/blockstorage_client_composite_operations.py index 8a145cec2..efa6e33a2 100644 --- a/src/oci/core/blockstorage_client_composite_operations.py +++ b/src/oci/core/blockstorage_client_composite_operations.py @@ -54,8 +54,9 @@ def copy_boot_volume_backup_and_wait_for_work_request(self, boot_volume_backup_i operation_result = self.client.copy_boot_volume_backup(boot_volume_backup_id, copy_boot_volume_backup_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, @@ -91,7 +92,6 @@ def copy_boot_volume_backup_and_wait_for_state(self, boot_volume_backup_id, copy operation_result = self.client.copy_boot_volume_backup(boot_volume_backup_id, copy_boot_volume_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] boot_volume_backup_id = operation_result.data.id @@ -138,8 +138,9 @@ def copy_volume_backup_and_wait_for_work_request(self, volume_backup_id, copy_vo operation_result = self.client.copy_volume_backup(volume_backup_id, copy_volume_backup_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, @@ -175,7 +176,6 @@ def copy_volume_backup_and_wait_for_state(self, volume_backup_id, copy_volume_ba operation_result = self.client.copy_volume_backup(volume_backup_id, copy_volume_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_backup_id = operation_result.data.id @@ -221,7 +221,6 @@ def copy_volume_group_backup_and_wait_for_state(self, volume_group_backup_id, co operation_result = self.client.copy_volume_group_backup(volume_group_backup_id, copy_volume_group_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_group_backup_id = operation_result.data.id @@ -264,7 +263,6 @@ def create_boot_volume_and_wait_for_state(self, create_boot_volume_details, wait operation_result = self.client.create_boot_volume(create_boot_volume_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] boot_volume_id = operation_result.data.id @@ -307,7 +305,6 @@ def create_boot_volume_backup_and_wait_for_state(self, create_boot_volume_backup operation_result = self.client.create_boot_volume_backup(create_boot_volume_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] boot_volume_backup_id = operation_result.data.id @@ -350,7 +347,6 @@ def create_volume_and_wait_for_state(self, create_volume_details, wait_for_state operation_result = self.client.create_volume(create_volume_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_id = operation_result.data.id @@ -393,7 +389,6 @@ def create_volume_backup_and_wait_for_state(self, create_volume_backup_details, operation_result = self.client.create_volume_backup(create_volume_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_backup_id = operation_result.data.id @@ -436,7 +431,6 @@ def create_volume_group_and_wait_for_state(self, create_volume_group_details, wa operation_result = self.client.create_volume_group(create_volume_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_group_id = operation_result.data.id @@ -479,7 +473,6 @@ def create_volume_group_backup_and_wait_for_state(self, create_volume_group_back operation_result = self.client.create_volume_group_backup(create_volume_group_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_group_backup_id = operation_result.data.id @@ -531,7 +524,6 @@ def delete_boot_volume_and_wait_for_state(self, boot_volume_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -591,7 +583,6 @@ def delete_boot_volume_backup_and_wait_for_state(self, boot_volume_backup_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -651,7 +642,6 @@ def delete_volume_and_wait_for_state(self, volume_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -711,7 +701,6 @@ def delete_volume_backup_and_wait_for_state(self, volume_backup_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -771,7 +760,6 @@ def delete_volume_group_and_wait_for_state(self, volume_group_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -831,7 +819,6 @@ def delete_volume_group_backup_and_wait_for_state(self, volume_group_backup_id, if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -885,7 +872,6 @@ def update_boot_volume_and_wait_for_state(self, boot_volume_id, update_boot_volu operation_result = self.client.update_boot_volume(boot_volume_id, update_boot_volume_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] boot_volume_id = operation_result.data.id @@ -931,7 +917,6 @@ def update_boot_volume_backup_and_wait_for_state(self, boot_volume_backup_id, up operation_result = self.client.update_boot_volume_backup(boot_volume_backup_id, update_boot_volume_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] boot_volume_backup_id = operation_result.data.id @@ -977,7 +962,6 @@ def update_volume_and_wait_for_state(self, volume_id, update_volume_details, wai operation_result = self.client.update_volume(volume_id, update_volume_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_id = operation_result.data.id @@ -1023,7 +1007,6 @@ def update_volume_backup_and_wait_for_state(self, volume_backup_id, update_volum operation_result = self.client.update_volume_backup(volume_backup_id, update_volume_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_backup_id = operation_result.data.id @@ -1069,7 +1052,6 @@ def update_volume_group_and_wait_for_state(self, volume_group_id, update_volume_ operation_result = self.client.update_volume_group(volume_group_id, update_volume_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_group_id = operation_result.data.id @@ -1115,7 +1097,6 @@ def update_volume_group_backup_and_wait_for_state(self, volume_group_backup_id, operation_result = self.client.update_volume_group_backup(volume_group_backup_id, update_volume_group_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_group_backup_id = operation_result.data.id diff --git a/src/oci/core/compute_client_composite_operations.py b/src/oci/core/compute_client_composite_operations.py index f537d9f3b..f04f421ad 100644 --- a/src/oci/core/compute_client_composite_operations.py +++ b/src/oci/core/compute_client_composite_operations.py @@ -50,7 +50,6 @@ def attach_boot_volume_and_wait_for_state(self, attach_boot_volume_details, wait operation_result = self.client.attach_boot_volume(attach_boot_volume_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] boot_volume_attachment_id = operation_result.data.id @@ -93,7 +92,6 @@ def attach_vnic_and_wait_for_state(self, attach_vnic_details, wait_for_states=[] operation_result = self.client.attach_vnic(attach_vnic_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vnic_attachment_id = operation_result.data.id @@ -136,7 +134,6 @@ def attach_volume_and_wait_for_state(self, attach_volume_details, wait_for_state operation_result = self.client.attach_volume(attach_volume_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_attachment_id = operation_result.data.id @@ -179,7 +176,6 @@ def capture_console_history_and_wait_for_state(self, capture_console_history_det operation_result = self.client.capture_console_history(capture_console_history_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_console_history_id = operation_result.data.id @@ -226,8 +222,9 @@ def change_compute_capacity_reservation_compartment_and_wait_for_work_request(se operation_result = self.client.change_compute_capacity_reservation_compartment(capacity_reservation_id, change_compute_capacity_reservation_compartment_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, @@ -266,8 +263,9 @@ def change_compute_capacity_topology_compartment_and_wait_for_work_request(self, operation_result = self.client.change_compute_capacity_topology_compartment(compute_capacity_topology_id, change_compute_capacity_topology_compartment_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, @@ -304,8 +302,9 @@ def change_dedicated_vm_host_compartment_and_wait_for_work_request(self, dedicat operation_result = self.client.change_dedicated_vm_host_compartment(dedicated_vm_host_id, change_dedicated_vm_host_compartment_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, @@ -344,8 +343,9 @@ def change_instance_compartment_and_wait_for_work_request(self, instance_id, cha operation_result = self.client.change_instance_compartment(instance_id, change_instance_compartment_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, @@ -381,8 +381,9 @@ def create_compute_capacity_reservation_and_wait_for_work_request(self, create_c operation_result = self.client.create_compute_capacity_reservation(create_compute_capacity_reservation_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, @@ -417,7 +418,6 @@ def create_compute_capacity_reservation_and_wait_for_state(self, create_compute_ operation_result = self.client.create_compute_capacity_reservation(create_compute_capacity_reservation_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] capacity_reservation_id = operation_result.data.id @@ -461,8 +461,9 @@ def create_compute_capacity_topology_and_wait_for_work_request(self, create_comp operation_result = self.client.create_compute_capacity_topology(create_compute_capacity_topology_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, @@ -495,7 +496,6 @@ def create_compute_capacity_topology_and_wait_for_state(self, create_compute_cap operation_result = self.client.create_compute_capacity_topology(create_compute_capacity_topology_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] compute_capacity_topology_id = operation_result.data.id @@ -551,7 +551,6 @@ def create_compute_cluster_and_wait_for_state(self, create_compute_cluster_detai operation_result = self.client.create_compute_cluster(create_compute_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] compute_cluster_id = operation_result.data.id @@ -595,8 +594,9 @@ def create_dedicated_vm_host_and_wait_for_work_request(self, create_dedicated_vm operation_result = self.client.create_dedicated_vm_host(create_dedicated_vm_host_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, @@ -629,7 +629,6 @@ def create_dedicated_vm_host_and_wait_for_state(self, create_dedicated_vm_host_d operation_result = self.client.create_dedicated_vm_host(create_dedicated_vm_host_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dedicated_vm_host_id = operation_result.data.id @@ -673,8 +672,9 @@ def create_image_and_wait_for_work_request(self, create_image_details, work_requ operation_result = self.client.create_image(create_image_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, @@ -707,7 +707,6 @@ def create_image_and_wait_for_state(self, create_image_details, wait_for_states= operation_result = self.client.create_image(create_image_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_id = operation_result.data.id @@ -750,7 +749,6 @@ def create_instance_console_connection_and_wait_for_state(self, create_instance_ operation_result = self.client.create_instance_console_connection(create_instance_console_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_console_connection_id = operation_result.data.id @@ -794,8 +792,9 @@ def delete_compute_capacity_reservation_and_wait_for_work_request(self, capacity operation_result = self.client.delete_compute_capacity_reservation(capacity_reservation_id, **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, @@ -831,8 +830,9 @@ def delete_compute_capacity_topology_and_wait_for_work_request(self, compute_cap operation_result = self.client.delete_compute_capacity_topology(compute_capacity_topology_id, **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, @@ -879,7 +879,6 @@ def delete_compute_cluster_and_wait_for_state(self, compute_cluster_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -939,7 +938,6 @@ def delete_console_history_and_wait_for_state(self, instance_console_history_id, if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -991,8 +989,9 @@ def delete_dedicated_vm_host_and_wait_for_work_request(self, dedicated_vm_host_i operation_result = self.client.delete_dedicated_vm_host(dedicated_vm_host_id, **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, @@ -1036,7 +1035,6 @@ def delete_image_and_wait_for_state(self, image_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1096,7 +1094,6 @@ def delete_instance_console_connection_and_wait_for_state(self, instance_console if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1156,7 +1153,6 @@ def detach_boot_volume_and_wait_for_state(self, boot_volume_attachment_id, wait_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1216,7 +1212,6 @@ def detach_vnic_and_wait_for_state(self, vnic_attachment_id, wait_for_states=[], if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1276,7 +1271,6 @@ def detach_volume_and_wait_for_state(self, volume_attachment_id, wait_for_states if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1333,8 +1327,9 @@ def export_image_and_wait_for_work_request(self, image_id, export_image_details, operation_result = self.client.export_image(image_id, export_image_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, @@ -1372,7 +1367,6 @@ def export_image_and_wait_for_state(self, image_id, export_image_details, wait_f operation_result = self.client.export_image(image_id, export_image_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_id = operation_result.data.id @@ -1422,7 +1416,6 @@ def instance_action_and_wait_for_state(self, instance_id, action, wait_for_state operation_result = self.client.instance_action(instance_id, action, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_id = operation_result.data.id @@ -1466,8 +1459,9 @@ def launch_instance_and_wait_for_work_request(self, launch_instance_details, wor operation_result = self.client.launch_instance(launch_instance_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, @@ -1500,7 +1494,6 @@ def launch_instance_and_wait_for_state(self, launch_instance_details, wait_for_s operation_result = self.client.launch_instance(launch_instance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_id = operation_result.data.id @@ -1554,7 +1547,6 @@ def terminate_instance_and_wait_for_state(self, instance_id, wait_for_states=[], if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1609,8 +1601,9 @@ def update_compute_capacity_reservation_and_wait_for_work_request(self, capacity operation_result = self.client.update_compute_capacity_reservation(capacity_reservation_id, update_compute_capacity_reservation_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, @@ -1649,8 +1642,9 @@ def update_compute_capacity_topology_and_wait_for_work_request(self, compute_cap operation_result = self.client.update_compute_capacity_topology(compute_capacity_topology_id, update_compute_capacity_topology_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, @@ -1691,7 +1685,6 @@ def update_compute_cluster_and_wait_for_state(self, compute_cluster_id, update_c operation_result = self.client.update_compute_cluster(compute_cluster_id, update_compute_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] compute_cluster_id = operation_result.data.id @@ -1737,7 +1730,6 @@ def update_console_history_and_wait_for_state(self, instance_console_history_id, operation_result = self.client.update_console_history(instance_console_history_id, update_console_history_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_console_history_id = operation_result.data.id @@ -1783,7 +1775,6 @@ def update_dedicated_vm_host_and_wait_for_state(self, dedicated_vm_host_id, upda operation_result = self.client.update_dedicated_vm_host(dedicated_vm_host_id, update_dedicated_vm_host_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dedicated_vm_host_id = operation_result.data.id @@ -1831,7 +1822,6 @@ def update_image_and_wait_for_state(self, image_id, update_image_details, wait_f operation_result = self.client.update_image(image_id, update_image_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] image_id = operation_result.data.id @@ -1880,8 +1870,9 @@ def update_instance_and_wait_for_work_request(self, instance_id, update_instance operation_result = self.client.update_instance(instance_id, update_instance_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, @@ -1919,7 +1910,6 @@ def update_instance_and_wait_for_state(self, instance_id, update_instance_detail operation_result = self.client.update_instance(instance_id, update_instance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_id = operation_result.data.id @@ -1965,7 +1955,6 @@ def update_instance_console_connection_and_wait_for_state(self, instance_console operation_result = self.client.update_instance_console_connection(instance_console_connection_id, update_instance_console_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_console_connection_id = operation_result.data.id @@ -2011,7 +2000,6 @@ def update_volume_attachment_and_wait_for_state(self, volume_attachment_id, upda operation_result = self.client.update_volume_attachment(volume_attachment_id, update_volume_attachment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] volume_attachment_id = operation_result.data.id diff --git a/src/oci/core/compute_management_client_composite_operations.py b/src/oci/core/compute_management_client_composite_operations.py index 67d80efae..e8b137a13 100644 --- a/src/oci/core/compute_management_client_composite_operations.py +++ b/src/oci/core/compute_management_client_composite_operations.py @@ -56,8 +56,9 @@ def attach_instance_pool_instance_and_wait_for_work_request(self, instance_pool_ operation_result = self.client.attach_instance_pool_instance(instance_pool_id, attach_instance_pool_instance_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, @@ -95,7 +96,6 @@ def attach_instance_pool_instance_and_wait_for_state(self, instance_pool_id, att operation_result = self.client.attach_instance_pool_instance(instance_pool_id, attach_instance_pool_instance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -143,7 +143,6 @@ def attach_load_balancer_and_wait_for_state(self, instance_pool_id, attach_load_ operation_result = self.client.attach_load_balancer(instance_pool_id, attach_load_balancer_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -187,8 +186,9 @@ def create_cluster_network_and_wait_for_work_request(self, create_cluster_networ operation_result = self.client.create_cluster_network(create_cluster_network_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, @@ -221,7 +221,6 @@ def create_cluster_network_and_wait_for_state(self, create_cluster_network_detai operation_result = self.client.create_cluster_network(create_cluster_network_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cluster_network_id = operation_result.data.id @@ -264,7 +263,6 @@ def create_instance_pool_and_wait_for_state(self, create_instance_pool_details, operation_result = self.client.create_instance_pool(create_instance_pool_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -313,8 +311,9 @@ def detach_instance_pool_instance_and_wait_for_work_request(self, instance_pool_ operation_result = self.client.detach_instance_pool_instance(instance_pool_id, detach_instance_pool_instance_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, @@ -352,7 +351,6 @@ def detach_load_balancer_and_wait_for_state(self, instance_pool_id, detach_load_ operation_result = self.client.detach_load_balancer(instance_pool_id, detach_load_balancer_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -399,8 +397,9 @@ def launch_instance_configuration_and_wait_for_work_request(self, instance_confi operation_result = self.client.launch_instance_configuration(instance_configuration_id, instance_configuration, **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, @@ -435,7 +434,6 @@ def reset_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_stat operation_result = self.client.reset_instance_pool(instance_pool_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -480,7 +478,6 @@ def softreset_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_ operation_result = self.client.softreset_instance_pool(instance_pool_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -525,7 +522,6 @@ def softstop_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_s operation_result = self.client.softstop_instance_pool(instance_pool_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -570,7 +566,6 @@ def start_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_stat operation_result = self.client.start_instance_pool(instance_pool_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -615,7 +610,6 @@ def stop_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_state operation_result = self.client.stop_instance_pool(instance_pool_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id @@ -661,8 +655,9 @@ def terminate_cluster_network_and_wait_for_work_request(self, cluster_network_id operation_result = self.client.terminate_cluster_network(cluster_network_id, **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, @@ -706,7 +701,6 @@ def terminate_instance_pool_and_wait_for_state(self, instance_pool_id, wait_for_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -762,7 +756,6 @@ def update_cluster_network_and_wait_for_state(self, cluster_network_id, update_c operation_result = self.client.update_cluster_network(cluster_network_id, update_cluster_network_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cluster_network_id = operation_result.data.id @@ -810,7 +803,6 @@ def update_instance_pool_and_wait_for_state(self, instance_pool_id, update_insta operation_result = self.client.update_instance_pool(instance_pool_id, update_instance_pool_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] instance_pool_id = operation_result.data.id diff --git a/src/oci/core/virtual_network_client_composite_operations.py b/src/oci/core/virtual_network_client_composite_operations.py index 08be5f30a..1669d9c9d 100644 --- a/src/oci/core/virtual_network_client_composite_operations.py +++ b/src/oci/core/virtual_network_client_composite_operations.py @@ -56,8 +56,9 @@ def add_ipv6_subnet_cidr_and_wait_for_work_request(self, subnet_id, add_subnet_i operation_result = self.client.add_ipv6_subnet_cidr(subnet_id, add_subnet_ipv6_cidr_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, @@ -93,8 +94,9 @@ def add_ipv6_vcn_cidr_and_wait_for_work_request(self, vcn_id, work_request_state operation_result = self.client.add_ipv6_vcn_cidr(vcn_id, **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, @@ -132,7 +134,6 @@ def add_public_ip_pool_capacity_and_wait_for_state(self, public_ip_pool_id, add_ operation_result = self.client.add_public_ip_pool_capacity(public_ip_pool_id, add_public_ip_pool_capacity_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] public_ip_pool_id = operation_result.data.id @@ -181,8 +182,9 @@ def add_vcn_cidr_and_wait_for_work_request(self, vcn_id, add_vcn_cidr_details, w operation_result = self.client.add_vcn_cidr(vcn_id, add_vcn_cidr_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, @@ -220,7 +222,6 @@ def attach_service_id_and_wait_for_state(self, service_gateway_id, attach_servic operation_result = self.client.attach_service_id(service_gateway_id, attach_service_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] service_gateway_id = operation_result.data.id @@ -269,8 +270,9 @@ def change_capture_filter_compartment_and_wait_for_work_request(self, capture_fi operation_result = self.client.change_capture_filter_compartment(capture_filter_id, change_capture_filter_compartment_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, @@ -309,8 +311,9 @@ def change_drg_compartment_and_wait_for_work_request(self, drg_id, change_drg_co operation_result = self.client.change_drg_compartment(drg_id, change_drg_compartment_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, @@ -349,8 +352,9 @@ def change_subnet_compartment_and_wait_for_work_request(self, subnet_id, change_ operation_result = self.client.change_subnet_compartment(subnet_id, change_subnet_compartment_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, @@ -389,8 +393,9 @@ def change_vcn_compartment_and_wait_for_work_request(self, vcn_id, change_vcn_co operation_result = self.client.change_vcn_compartment(vcn_id, change_vcn_compartment_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, @@ -429,8 +434,9 @@ def change_vlan_compartment_and_wait_for_work_request(self, vlan_id, change_vlan operation_result = self.client.change_vlan_compartment(vlan_id, change_vlan_compartment_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, @@ -469,8 +475,9 @@ def change_vtap_compartment_and_wait_for_work_request(self, vtap_id, change_vtap operation_result = self.client.change_vtap_compartment(vtap_id, change_vtap_compartment_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, @@ -503,7 +510,6 @@ def create_byoip_range_and_wait_for_state(self, create_byoip_range_details, wait operation_result = self.client.create_byoip_range(create_byoip_range_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] byoip_range_id = operation_result.data.id @@ -546,7 +552,6 @@ def create_capture_filter_and_wait_for_state(self, create_capture_filter_details operation_result = self.client.create_capture_filter(create_capture_filter_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] capture_filter_id = operation_result.data.id @@ -589,7 +594,6 @@ def create_cross_connect_and_wait_for_state(self, create_cross_connect_details, operation_result = self.client.create_cross_connect(create_cross_connect_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cross_connect_id = operation_result.data.id @@ -632,7 +636,6 @@ def create_cross_connect_group_and_wait_for_state(self, create_cross_connect_gro operation_result = self.client.create_cross_connect_group(create_cross_connect_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cross_connect_group_id = operation_result.data.id @@ -675,7 +678,6 @@ def create_dhcp_options_and_wait_for_state(self, create_dhcp_details, wait_for_s operation_result = self.client.create_dhcp_options(create_dhcp_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dhcp_id = operation_result.data.id @@ -718,7 +720,6 @@ def create_drg_and_wait_for_state(self, create_drg_details, wait_for_states=[], operation_result = self.client.create_drg(create_drg_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_id = operation_result.data.id @@ -761,7 +762,6 @@ def create_drg_attachment_and_wait_for_state(self, create_drg_attachment_details operation_result = self.client.create_drg_attachment(create_drg_attachment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_attachment_id = operation_result.data.id @@ -804,7 +804,6 @@ def create_drg_route_distribution_and_wait_for_state(self, create_drg_route_dist operation_result = self.client.create_drg_route_distribution(create_drg_route_distribution_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_route_distribution_id = operation_result.data.id @@ -847,7 +846,6 @@ def create_drg_route_table_and_wait_for_state(self, create_drg_route_table_detai operation_result = self.client.create_drg_route_table(create_drg_route_table_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_route_table_id = operation_result.data.id @@ -890,7 +888,6 @@ def create_internet_gateway_and_wait_for_state(self, create_internet_gateway_det operation_result = self.client.create_internet_gateway(create_internet_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ig_id = operation_result.data.id @@ -933,7 +930,6 @@ def create_ip_sec_connection_and_wait_for_state(self, create_ip_sec_connection_d operation_result = self.client.create_ip_sec_connection(create_ip_sec_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ipsc_id = operation_result.data.id @@ -976,7 +972,6 @@ def create_ipv6_and_wait_for_state(self, create_ipv6_details, wait_for_states=[] operation_result = self.client.create_ipv6(create_ipv6_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ipv6_id = operation_result.data.id @@ -1019,7 +1014,6 @@ def create_local_peering_gateway_and_wait_for_state(self, create_local_peering_g operation_result = self.client.create_local_peering_gateway(create_local_peering_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] local_peering_gateway_id = operation_result.data.id @@ -1062,7 +1056,6 @@ def create_nat_gateway_and_wait_for_state(self, create_nat_gateway_details, wait operation_result = self.client.create_nat_gateway(create_nat_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] nat_gateway_id = operation_result.data.id @@ -1105,7 +1098,6 @@ def create_network_security_group_and_wait_for_state(self, create_network_securi operation_result = self.client.create_network_security_group(create_network_security_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] network_security_group_id = operation_result.data.id @@ -1148,7 +1140,6 @@ def create_public_ip_and_wait_for_state(self, create_public_ip_details, wait_for operation_result = self.client.create_public_ip(create_public_ip_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] public_ip_id = operation_result.data.id @@ -1191,7 +1182,6 @@ def create_public_ip_pool_and_wait_for_state(self, create_public_ip_pool_details operation_result = self.client.create_public_ip_pool(create_public_ip_pool_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] public_ip_pool_id = operation_result.data.id @@ -1234,7 +1224,6 @@ def create_remote_peering_connection_and_wait_for_state(self, create_remote_peer operation_result = self.client.create_remote_peering_connection(create_remote_peering_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] remote_peering_connection_id = operation_result.data.id @@ -1277,7 +1266,6 @@ def create_route_table_and_wait_for_state(self, create_route_table_details, wait operation_result = self.client.create_route_table(create_route_table_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rt_id = operation_result.data.id @@ -1320,7 +1308,6 @@ def create_security_list_and_wait_for_state(self, create_security_list_details, operation_result = self.client.create_security_list(create_security_list_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_list_id = operation_result.data.id @@ -1363,7 +1350,6 @@ def create_service_gateway_and_wait_for_state(self, create_service_gateway_detai operation_result = self.client.create_service_gateway(create_service_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] service_gateway_id = operation_result.data.id @@ -1406,7 +1392,6 @@ def create_subnet_and_wait_for_state(self, create_subnet_details, wait_for_state operation_result = self.client.create_subnet(create_subnet_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] subnet_id = operation_result.data.id @@ -1449,7 +1434,6 @@ def create_vcn_and_wait_for_state(self, create_vcn_details, wait_for_states=[], operation_result = self.client.create_vcn(create_vcn_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vcn_id = operation_result.data.id @@ -1492,7 +1476,6 @@ def create_virtual_circuit_and_wait_for_state(self, create_virtual_circuit_detai operation_result = self.client.create_virtual_circuit(create_virtual_circuit_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] virtual_circuit_id = operation_result.data.id @@ -1535,7 +1518,6 @@ def create_vlan_and_wait_for_state(self, create_vlan_details, wait_for_states=[] operation_result = self.client.create_vlan(create_vlan_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vlan_id = operation_result.data.id @@ -1578,7 +1560,6 @@ def create_vtap_and_wait_for_state(self, create_vtap_details, wait_for_states=[] operation_result = self.client.create_vtap(create_vtap_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vtap_id = operation_result.data.id @@ -1624,8 +1605,9 @@ def delete_byoip_range_and_wait_for_work_request(self, byoip_range_id, work_requ operation_result = self.client.delete_byoip_range(byoip_range_id, **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, @@ -1669,7 +1651,6 @@ def delete_capture_filter_and_wait_for_state(self, capture_filter_id, wait_for_s if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1731,7 +1712,6 @@ def delete_cross_connect_and_wait_for_state(self, cross_connect_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1793,7 +1773,6 @@ def delete_cross_connect_group_and_wait_for_state(self, cross_connect_group_id, if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1855,7 +1834,6 @@ def delete_dhcp_options_and_wait_for_state(self, dhcp_id, wait_for_states=[], op if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1917,7 +1895,6 @@ def delete_drg_and_wait_for_state(self, drg_id, wait_for_states=[], operation_kw if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1979,7 +1956,6 @@ def delete_drg_attachment_and_wait_for_state(self, drg_attachment_id, wait_for_s if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2041,7 +2017,6 @@ def delete_drg_route_distribution_and_wait_for_state(self, drg_route_distributio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2103,7 +2078,6 @@ def delete_drg_route_table_and_wait_for_state(self, drg_route_table_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2165,7 +2139,6 @@ def delete_internet_gateway_and_wait_for_state(self, ig_id, wait_for_states=[], if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2227,7 +2200,6 @@ def delete_ip_sec_connection_and_wait_for_state(self, ipsc_id, wait_for_states=[ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2289,7 +2261,6 @@ def delete_ipv6_and_wait_for_state(self, ipv6_id, wait_for_states=[], operation_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2351,7 +2322,6 @@ def delete_local_peering_gateway_and_wait_for_state(self, local_peering_gateway_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2413,7 +2383,6 @@ def delete_nat_gateway_and_wait_for_state(self, nat_gateway_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2475,7 +2444,6 @@ def delete_network_security_group_and_wait_for_state(self, network_security_grou if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2537,7 +2505,6 @@ def delete_public_ip_and_wait_for_state(self, public_ip_id, wait_for_states=[], if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2599,7 +2566,6 @@ def delete_public_ip_pool_and_wait_for_state(self, public_ip_pool_id, wait_for_s if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2661,7 +2627,6 @@ def delete_remote_peering_connection_and_wait_for_state(self, remote_peering_con if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2723,7 +2688,6 @@ def delete_route_table_and_wait_for_state(self, rt_id, wait_for_states=[], opera if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2785,7 +2749,6 @@ def delete_security_list_and_wait_for_state(self, security_list_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2847,7 +2810,6 @@ def delete_service_gateway_and_wait_for_state(self, service_gateway_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2909,7 +2871,6 @@ def delete_subnet_and_wait_for_state(self, subnet_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2971,7 +2932,6 @@ def delete_vcn_and_wait_for_state(self, vcn_id, wait_for_states=[], operation_kw if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -3033,7 +2993,6 @@ def delete_virtual_circuit_and_wait_for_state(self, virtual_circuit_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -3095,7 +3054,6 @@ def delete_vlan_and_wait_for_state(self, vlan_id, wait_for_states=[], operation_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -3149,8 +3107,9 @@ def delete_vtap_and_wait_for_work_request(self, vtap_id, work_request_states=[], operation_result = self.client.delete_vtap(vtap_id, **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, @@ -3188,7 +3147,6 @@ def detach_service_id_and_wait_for_state(self, service_gateway_id, detach_servic operation_result = self.client.detach_service_id(service_gateway_id, detach_service_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] service_gateway_id = operation_result.data.id @@ -3237,8 +3195,9 @@ def modify_vcn_cidr_and_wait_for_work_request(self, vcn_id, modify_vcn_cidr_deta operation_result = self.client.modify_vcn_cidr(vcn_id, modify_vcn_cidr_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, @@ -3273,7 +3232,6 @@ def remove_export_drg_route_distribution_and_wait_for_state(self, drg_attachment operation_result = self.client.remove_export_drg_route_distribution(drg_attachment_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_attachment_id = operation_result.data.id @@ -3318,7 +3276,6 @@ def remove_import_drg_route_distribution_and_wait_for_state(self, drg_route_tabl operation_result = self.client.remove_import_drg_route_distribution(drg_route_table_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_route_table_id = operation_result.data.id @@ -3367,8 +3324,9 @@ def remove_ipv6_subnet_cidr_and_wait_for_work_request(self, subnet_id, remove_su operation_result = self.client.remove_ipv6_subnet_cidr(subnet_id, remove_subnet_ipv6_cidr_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, @@ -3404,8 +3362,9 @@ def remove_ipv6_vcn_cidr_and_wait_for_work_request(self, vcn_id, work_request_st operation_result = self.client.remove_ipv6_vcn_cidr(vcn_id, **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, @@ -3443,7 +3402,6 @@ def remove_public_ip_pool_capacity_and_wait_for_state(self, public_ip_pool_id, r operation_result = self.client.remove_public_ip_pool_capacity(public_ip_pool_id, remove_public_ip_pool_capacity_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] public_ip_pool_id = operation_result.data.id @@ -3492,8 +3450,9 @@ def remove_vcn_cidr_and_wait_for_work_request(self, vcn_id, remove_vcn_cidr_deta operation_result = self.client.remove_vcn_cidr(vcn_id, remove_vcn_cidr_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, @@ -3531,7 +3490,6 @@ def update_byoip_range_and_wait_for_state(self, byoip_range_id, update_byoip_ran operation_result = self.client.update_byoip_range(byoip_range_id, update_byoip_range_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] byoip_range_id = operation_result.data.id @@ -3579,7 +3537,6 @@ def update_capture_filter_and_wait_for_state(self, capture_filter_id, update_cap operation_result = self.client.update_capture_filter(capture_filter_id, update_capture_filter_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] capture_filter_id = operation_result.data.id @@ -3627,7 +3584,6 @@ def update_cross_connect_and_wait_for_state(self, cross_connect_id, update_cross operation_result = self.client.update_cross_connect(cross_connect_id, update_cross_connect_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cross_connect_id = operation_result.data.id @@ -3675,7 +3631,6 @@ def update_cross_connect_group_and_wait_for_state(self, cross_connect_group_id, operation_result = self.client.update_cross_connect_group(cross_connect_group_id, update_cross_connect_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cross_connect_group_id = operation_result.data.id @@ -3723,7 +3678,6 @@ def update_dhcp_options_and_wait_for_state(self, dhcp_id, update_dhcp_details, w operation_result = self.client.update_dhcp_options(dhcp_id, update_dhcp_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dhcp_id = operation_result.data.id @@ -3771,7 +3725,6 @@ def update_drg_and_wait_for_state(self, drg_id, update_drg_details, wait_for_sta operation_result = self.client.update_drg(drg_id, update_drg_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_id = operation_result.data.id @@ -3819,7 +3772,6 @@ def update_drg_attachment_and_wait_for_state(self, drg_attachment_id, update_drg operation_result = self.client.update_drg_attachment(drg_attachment_id, update_drg_attachment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_attachment_id = operation_result.data.id @@ -3867,7 +3819,6 @@ def update_drg_route_distribution_and_wait_for_state(self, drg_route_distributio operation_result = self.client.update_drg_route_distribution(drg_route_distribution_id, update_drg_route_distribution_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_route_distribution_id = operation_result.data.id @@ -3915,7 +3866,6 @@ def update_drg_route_table_and_wait_for_state(self, drg_route_table_id, update_d operation_result = self.client.update_drg_route_table(drg_route_table_id, update_drg_route_table_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] drg_route_table_id = operation_result.data.id @@ -3963,7 +3913,6 @@ def update_internet_gateway_and_wait_for_state(self, ig_id, update_internet_gate operation_result = self.client.update_internet_gateway(ig_id, update_internet_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ig_id = operation_result.data.id @@ -4011,7 +3960,6 @@ def update_ip_sec_connection_and_wait_for_state(self, ipsc_id, update_ip_sec_con operation_result = self.client.update_ip_sec_connection(ipsc_id, update_ip_sec_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ipsc_id = operation_result.data.id @@ -4064,7 +4012,6 @@ def update_ip_sec_connection_tunnel_and_wait_for_state(self, ipsc_id, tunnel_id, operation_result = self.client.update_ip_sec_connection_tunnel(ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ipsc_id = operation_result.data.id @@ -4112,7 +4059,6 @@ def update_ipv6_and_wait_for_state(self, ipv6_id, update_ipv6_details, wait_for_ operation_result = self.client.update_ipv6(ipv6_id, update_ipv6_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ipv6_id = operation_result.data.id @@ -4160,7 +4106,6 @@ def update_local_peering_gateway_and_wait_for_state(self, local_peering_gateway_ operation_result = self.client.update_local_peering_gateway(local_peering_gateway_id, update_local_peering_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] local_peering_gateway_id = operation_result.data.id @@ -4208,7 +4153,6 @@ def update_nat_gateway_and_wait_for_state(self, nat_gateway_id, update_nat_gatew operation_result = self.client.update_nat_gateway(nat_gateway_id, update_nat_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] nat_gateway_id = operation_result.data.id @@ -4256,7 +4200,6 @@ def update_network_security_group_and_wait_for_state(self, network_security_grou operation_result = self.client.update_network_security_group(network_security_group_id, update_network_security_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] network_security_group_id = operation_result.data.id @@ -4304,7 +4247,6 @@ def update_public_ip_and_wait_for_state(self, public_ip_id, update_public_ip_det operation_result = self.client.update_public_ip(public_ip_id, update_public_ip_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] public_ip_id = operation_result.data.id @@ -4352,7 +4294,6 @@ def update_public_ip_pool_and_wait_for_state(self, public_ip_pool_id, update_pub operation_result = self.client.update_public_ip_pool(public_ip_pool_id, update_public_ip_pool_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] public_ip_pool_id = operation_result.data.id @@ -4400,7 +4341,6 @@ def update_remote_peering_connection_and_wait_for_state(self, remote_peering_con operation_result = self.client.update_remote_peering_connection(remote_peering_connection_id, update_remote_peering_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] remote_peering_connection_id = operation_result.data.id @@ -4448,7 +4388,6 @@ def update_route_table_and_wait_for_state(self, rt_id, update_route_table_detail operation_result = self.client.update_route_table(rt_id, update_route_table_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rt_id = operation_result.data.id @@ -4496,7 +4435,6 @@ def update_security_list_and_wait_for_state(self, security_list_id, update_secur operation_result = self.client.update_security_list(security_list_id, update_security_list_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] security_list_id = operation_result.data.id @@ -4544,7 +4482,6 @@ def update_service_gateway_and_wait_for_state(self, service_gateway_id, update_s operation_result = self.client.update_service_gateway(service_gateway_id, update_service_gateway_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] service_gateway_id = operation_result.data.id @@ -4592,7 +4529,6 @@ def update_subnet_and_wait_for_state(self, subnet_id, update_subnet_details, wai operation_result = self.client.update_subnet(subnet_id, update_subnet_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] subnet_id = operation_result.data.id @@ -4640,7 +4576,6 @@ def update_vcn_and_wait_for_state(self, vcn_id, update_vcn_details, wait_for_sta operation_result = self.client.update_vcn(vcn_id, update_vcn_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vcn_id = operation_result.data.id @@ -4688,7 +4623,6 @@ def update_virtual_circuit_and_wait_for_state(self, virtual_circuit_id, update_v operation_result = self.client.update_virtual_circuit(virtual_circuit_id, update_virtual_circuit_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] virtual_circuit_id = operation_result.data.id @@ -4736,7 +4670,6 @@ def update_vlan_and_wait_for_state(self, vlan_id, update_vlan_details, wait_for_ operation_result = self.client.update_vlan(vlan_id, update_vlan_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vlan_id = operation_result.data.id @@ -4784,7 +4717,6 @@ def update_vnic_and_wait_for_state(self, vnic_id, update_vnic_details, wait_for_ operation_result = self.client.update_vnic(vnic_id, update_vnic_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vnic_id = operation_result.data.id @@ -4833,8 +4765,9 @@ def update_vtap_and_wait_for_work_request(self, vtap_id, update_vtap_details, wo operation_result = self.client.update_vtap(vtap_id, update_vtap_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, @@ -4872,7 +4805,6 @@ def update_vtap_and_wait_for_state(self, vtap_id, update_vtap_details, wait_for_ operation_result = self.client.update_vtap(vtap_id, update_vtap_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vtap_id = operation_result.data.id @@ -4918,8 +4850,9 @@ def upgrade_drg_and_wait_for_work_request(self, drg_id, work_request_states=[], operation_result = self.client.upgrade_drg(drg_id, **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, @@ -4955,8 +4888,9 @@ def validate_byoip_range_and_wait_for_work_request(self, byoip_range_id, work_re operation_result = self.client.validate_byoip_range(byoip_range_id, **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, diff --git a/src/oci/dashboard_service/dashboard_client_composite_operations.py b/src/oci/dashboard_service/dashboard_client_composite_operations.py index 12fec4411..09f2886d4 100644 --- a/src/oci/dashboard_service/dashboard_client_composite_operations.py +++ b/src/oci/dashboard_service/dashboard_client_composite_operations.py @@ -46,7 +46,6 @@ def create_dashboard_and_wait_for_state(self, create_dashboard_details, wait_for operation_result = self.client.create_dashboard(create_dashboard_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dashboard_id = operation_result.data.id @@ -100,7 +99,6 @@ def delete_dashboard_and_wait_for_state(self, dashboard_id, wait_for_states=[], if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -156,7 +154,6 @@ def update_dashboard_and_wait_for_state(self, dashboard_id, update_dashboard_det operation_result = self.client.update_dashboard(dashboard_id, update_dashboard_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dashboard_id = operation_result.data.id diff --git a/src/oci/dashboard_service/dashboard_group_client_composite_operations.py b/src/oci/dashboard_service/dashboard_group_client_composite_operations.py index a0e849232..5d14a205b 100644 --- a/src/oci/dashboard_service/dashboard_group_client_composite_operations.py +++ b/src/oci/dashboard_service/dashboard_group_client_composite_operations.py @@ -46,7 +46,6 @@ def create_dashboard_group_and_wait_for_state(self, create_dashboard_group_detai operation_result = self.client.create_dashboard_group(create_dashboard_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dashboard_group_id = operation_result.data.id @@ -100,7 +99,6 @@ def delete_dashboard_group_and_wait_for_state(self, dashboard_group_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -156,7 +154,6 @@ def update_dashboard_group_and_wait_for_state(self, dashboard_group_id, update_d operation_result = self.client.update_dashboard_group(dashboard_group_id, update_dashboard_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dashboard_group_id = operation_result.data.id diff --git a/src/oci/data_catalog/data_catalog_client_composite_operations.py b/src/oci/data_catalog/data_catalog_client_composite_operations.py index 62e74c91f..10d73815f 100644 --- a/src/oci/data_catalog/data_catalog_client_composite_operations.py +++ b/src/oci/data_catalog/data_catalog_client_composite_operations.py @@ -49,7 +49,6 @@ def add_catalog_lock_and_wait_for_state(self, catalog_id, add_resource_lock_deta operation_result = self.client.add_catalog_lock(catalog_id, add_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -95,7 +94,6 @@ def add_catalog_private_endpoint_lock_and_wait_for_state(self, catalog_private_e operation_result = self.client.add_catalog_private_endpoint_lock(catalog_private_endpoint_id, add_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_private_endpoint_id = operation_result.data.id @@ -144,7 +142,6 @@ def add_data_selector_patterns_and_wait_for_state(self, catalog_id, data_asset_k operation_result = self.client.add_data_selector_patterns(catalog_id, data_asset_key, data_selector_pattern_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -190,7 +187,6 @@ def add_metastore_lock_and_wait_for_state(self, metastore_id, add_resource_lock_ operation_result = self.client.add_metastore_lock(metastore_id, add_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] metastore_id = operation_result.data.id @@ -239,7 +235,6 @@ def associate_custom_property_and_wait_for_state(self, catalog_id, type_key, ass operation_result = self.client.associate_custom_property(catalog_id, type_key, associate_custom_property_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -285,8 +280,9 @@ def attach_catalog_private_endpoint_and_wait_for_state(self, attach_catalog_priv operation_result = self.client.attach_catalog_private_endpoint(attach_catalog_private_endpoint_details, catalog_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: @@ -326,8 +322,9 @@ def change_catalog_compartment_and_wait_for_state(self, change_catalog_compartme operation_result = self.client.change_catalog_compartment(change_catalog_compartment_details, catalog_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: @@ -367,8 +364,9 @@ def change_catalog_private_endpoint_compartment_and_wait_for_state(self, change_ operation_result = self.client.change_catalog_private_endpoint_compartment(change_catalog_private_endpoint_compartment_details, catalog_private_endpoint_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: @@ -408,8 +406,9 @@ def change_metastore_compartment_and_wait_for_state(self, change_metastore_compa operation_result = self.client.change_metastore_compartment(change_metastore_compartment_details, metastore_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: @@ -455,7 +454,6 @@ def create_attribute_and_wait_for_state(self, catalog_id, data_asset_key, entity operation_result = self.client.create_attribute(catalog_id, data_asset_key, entity_key, create_attribute_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -510,7 +508,6 @@ def create_attribute_tag_and_wait_for_state(self, catalog_id, data_asset_key, en operation_result = self.client.create_attribute_tag(catalog_id, data_asset_key, entity_key, attribute_key, create_attribute_tag_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -553,8 +550,9 @@ def create_catalog_and_wait_for_state(self, create_catalog_details, wait_for_sta operation_result = self.client.create_catalog(create_catalog_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: @@ -591,8 +589,9 @@ def create_catalog_private_endpoint_and_wait_for_state(self, create_catalog_priv operation_result = self.client.create_catalog_private_endpoint(create_catalog_private_endpoint_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: @@ -635,7 +634,6 @@ def create_connection_and_wait_for_state(self, catalog_id, data_asset_key, creat operation_result = self.client.create_connection(catalog_id, data_asset_key, create_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -684,7 +682,6 @@ def create_custom_property_and_wait_for_state(self, catalog_id, namespace_id, cr operation_result = self.client.create_custom_property(catalog_id, namespace_id, create_custom_property_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -730,7 +727,6 @@ def create_data_asset_and_wait_for_state(self, catalog_id, create_data_asset_det operation_result = self.client.create_data_asset(catalog_id, create_data_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -779,7 +775,6 @@ def create_data_asset_tag_and_wait_for_state(self, catalog_id, data_asset_key, c operation_result = self.client.create_data_asset_tag(catalog_id, data_asset_key, create_data_asset_tag_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -828,7 +823,6 @@ def create_entity_and_wait_for_state(self, catalog_id, data_asset_key, create_en operation_result = self.client.create_entity(catalog_id, data_asset_key, create_entity_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -880,7 +874,6 @@ def create_entity_tag_and_wait_for_state(self, catalog_id, data_asset_key, entit operation_result = self.client.create_entity_tag(catalog_id, data_asset_key, entity_key, create_entity_tag_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -929,7 +922,6 @@ def create_folder_and_wait_for_state(self, catalog_id, data_asset_key, create_fo operation_result = self.client.create_folder(catalog_id, data_asset_key, create_folder_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -981,7 +973,6 @@ def create_folder_tag_and_wait_for_state(self, catalog_id, data_asset_key, folde operation_result = self.client.create_folder_tag(catalog_id, data_asset_key, folder_key, create_folder_tag_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1027,7 +1018,6 @@ def create_glossary_and_wait_for_state(self, catalog_id, create_glossary_details operation_result = self.client.create_glossary(catalog_id, create_glossary_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1073,7 +1063,6 @@ def create_job_and_wait_for_state(self, catalog_id, create_job_details, wait_for operation_result = self.client.create_job(catalog_id, create_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1119,7 +1108,6 @@ def create_job_definition_and_wait_for_state(self, catalog_id, create_job_defini operation_result = self.client.create_job_definition(catalog_id, create_job_definition_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1168,7 +1156,6 @@ def create_job_execution_and_wait_for_state(self, catalog_id, job_key, create_jo operation_result = self.client.create_job_execution(catalog_id, job_key, create_job_execution_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1211,8 +1198,9 @@ def create_metastore_and_wait_for_state(self, create_metastore_details, wait_for operation_result = self.client.create_metastore(create_metastore_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: @@ -1252,7 +1240,6 @@ def create_namespace_and_wait_for_state(self, catalog_id, create_namespace_detai operation_result = self.client.create_namespace(catalog_id, create_namespace_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] namespace_id = operation_result.data.id @@ -1298,7 +1285,6 @@ def create_pattern_and_wait_for_state(self, catalog_id, create_pattern_details, operation_result = self.client.create_pattern(catalog_id, create_pattern_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1347,7 +1333,6 @@ def create_term_and_wait_for_state(self, catalog_id, glossary_key, create_term_d operation_result = self.client.create_term(catalog_id, glossary_key, create_term_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1399,7 +1384,6 @@ def create_term_relationship_and_wait_for_state(self, catalog_id, glossary_key, operation_result = self.client.create_term_relationship(catalog_id, glossary_key, term_key, create_term_relationship_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1450,8 +1434,9 @@ def delete_catalog_and_wait_for_state(self, catalog_id, wait_for_states=[], oper 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: @@ -1496,8 +1481,9 @@ def delete_catalog_private_endpoint_and_wait_for_state(self, catalog_private_end 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: @@ -1542,8 +1528,9 @@ def delete_metastore_and_wait_for_state(self, metastore_id, wait_for_states=[], 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: @@ -1583,8 +1570,9 @@ def detach_catalog_private_endpoint_and_wait_for_state(self, detach_catalog_priv operation_result = self.client.detach_catalog_private_endpoint(detach_catalog_private_endpoint_details, catalog_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: @@ -1627,7 +1615,6 @@ def disassociate_custom_property_and_wait_for_state(self, catalog_id, type_key, operation_result = self.client.disassociate_custom_property(catalog_id, type_key, disassociate_custom_property_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1673,7 +1660,6 @@ def remove_catalog_lock_and_wait_for_state(self, catalog_id, remove_resource_loc operation_result = self.client.remove_catalog_lock(catalog_id, remove_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1719,7 +1705,6 @@ def remove_catalog_private_endpoint_lock_and_wait_for_state(self, catalog_privat operation_result = self.client.remove_catalog_private_endpoint_lock(catalog_private_endpoint_id, remove_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_private_endpoint_id = operation_result.data.id @@ -1768,7 +1753,6 @@ def remove_data_selector_patterns_and_wait_for_state(self, catalog_id, data_asse operation_result = self.client.remove_data_selector_patterns(catalog_id, data_asset_key, data_selector_pattern_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1814,7 +1798,6 @@ def remove_metastore_lock_and_wait_for_state(self, metastore_id, remove_resource operation_result = self.client.remove_metastore_lock(metastore_id, remove_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] metastore_id = operation_result.data.id @@ -1869,7 +1852,6 @@ def update_attribute_and_wait_for_state(self, catalog_id, data_asset_key, entity operation_result = self.client.update_attribute(catalog_id, data_asset_key, entity_key, attribute_key, update_attribute_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1915,7 +1897,6 @@ def update_catalog_and_wait_for_state(self, catalog_id, update_catalog_details, operation_result = self.client.update_catalog(catalog_id, update_catalog_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -1961,8 +1942,9 @@ def update_catalog_private_endpoint_and_wait_for_state(self, catalog_private_end operation_result = self.client.update_catalog_private_endpoint(catalog_private_endpoint_id, update_catalog_private_endpoint_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: @@ -2008,7 +1990,6 @@ def update_connection_and_wait_for_state(self, catalog_id, data_asset_key, conne operation_result = self.client.update_connection(catalog_id, data_asset_key, connection_key, update_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2060,7 +2041,6 @@ def update_custom_property_and_wait_for_state(self, catalog_id, namespace_id, cu operation_result = self.client.update_custom_property(catalog_id, namespace_id, custom_property_key, update_custom_property_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2109,7 +2089,6 @@ def update_data_asset_and_wait_for_state(self, catalog_id, data_asset_key, updat operation_result = self.client.update_data_asset(catalog_id, data_asset_key, update_data_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2161,7 +2140,6 @@ def update_entity_and_wait_for_state(self, catalog_id, data_asset_key, entity_ke operation_result = self.client.update_entity(catalog_id, data_asset_key, entity_key, update_entity_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2213,7 +2191,6 @@ def update_folder_and_wait_for_state(self, catalog_id, data_asset_key, folder_ke operation_result = self.client.update_folder(catalog_id, data_asset_key, folder_key, update_folder_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2262,7 +2239,6 @@ def update_glossary_and_wait_for_state(self, catalog_id, glossary_key, update_gl operation_result = self.client.update_glossary(catalog_id, glossary_key, update_glossary_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2311,7 +2287,6 @@ def update_job_and_wait_for_state(self, catalog_id, job_key, update_job_details, operation_result = self.client.update_job(catalog_id, job_key, update_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2360,7 +2335,6 @@ def update_job_definition_and_wait_for_state(self, catalog_id, job_definition_ke operation_result = self.client.update_job_definition(catalog_id, job_definition_key, update_job_definition_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2406,7 +2380,6 @@ def update_metastore_and_wait_for_state(self, metastore_id, update_metastore_det operation_result = self.client.update_metastore(metastore_id, update_metastore_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] metastore_id = operation_result.data.id @@ -2455,7 +2428,6 @@ def update_namespace_and_wait_for_state(self, catalog_id, namespace_id, update_n operation_result = self.client.update_namespace(catalog_id, namespace_id, update_namespace_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] namespace_id = operation_result.data.id @@ -2504,7 +2476,6 @@ def update_pattern_and_wait_for_state(self, catalog_id, pattern_key, update_patt operation_result = self.client.update_pattern(catalog_id, pattern_key, update_pattern_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2556,7 +2527,6 @@ def update_term_and_wait_for_state(self, catalog_id, glossary_key, term_key, upd operation_result = self.client.update_term(catalog_id, glossary_key, term_key, update_term_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2611,7 +2581,6 @@ def update_term_relationship_and_wait_for_state(self, catalog_id, glossary_key, operation_result = self.client.update_term_relationship(catalog_id, glossary_key, term_key, term_relationship_key, update_term_relationship_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id @@ -2663,7 +2632,6 @@ def upload_credentials_and_wait_for_state(self, catalog_id, data_asset_key, conn operation_result = self.client.upload_credentials(catalog_id, data_asset_key, connection_key, upload_credentials_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] catalog_id = operation_result.data.id diff --git a/src/oci/data_flow/data_flow_client_composite_operations.py b/src/oci/data_flow/data_flow_client_composite_operations.py index 7408ce698..a0eaf1b1f 100644 --- a/src/oci/data_flow/data_flow_client_composite_operations.py +++ b/src/oci/data_flow/data_flow_client_composite_operations.py @@ -49,8 +49,9 @@ def change_private_endpoint_compartment_and_wait_for_state(self, private_endpoin operation_result = self.client.change_private_endpoint_compartment(private_endpoint_id, change_private_endpoint_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: @@ -90,8 +91,9 @@ def change_sql_endpoint_compartment_and_wait_for_state(self, sql_endpoint_id, ch operation_result = self.client.change_sql_endpoint_compartment(sql_endpoint_id, change_sql_endpoint_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: @@ -128,7 +130,6 @@ def create_application_and_wait_for_state(self, create_application_details, wait operation_result = self.client.create_application(create_application_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] application_id = operation_result.data.id @@ -171,8 +172,9 @@ def create_pool_and_wait_for_state(self, create_pool_details, wait_for_states=[] operation_result = self.client.create_pool(create_pool_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: @@ -209,8 +211,9 @@ def create_private_endpoint_and_wait_for_state(self, create_private_endpoint_det operation_result = self.client.create_private_endpoint(create_private_endpoint_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: @@ -247,7 +250,6 @@ def create_run_and_wait_for_state(self, create_run_details, wait_for_states=[], operation_result = self.client.create_run(create_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] run_id = operation_result.data.id @@ -290,8 +292,9 @@ def create_sql_endpoint_and_wait_for_state(self, create_sql_endpoint_details, wa operation_result = self.client.create_sql_endpoint(create_sql_endpoint_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: @@ -331,7 +334,6 @@ def create_statement_and_wait_for_state(self, create_statement_details, run_id, operation_result = self.client.create_statement(create_statement_details, run_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] statement_id = operation_result.data.id @@ -383,7 +385,6 @@ def delete_application_and_wait_for_state(self, application_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -443,7 +444,6 @@ def delete_pool_and_wait_for_state(self, pool_id, wait_for_states=[], operation_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -502,8 +502,9 @@ def delete_private_endpoint_and_wait_for_state(self, private_endpoint_id, wait_f 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: @@ -549,7 +550,6 @@ def delete_run_and_wait_for_state(self, run_id, wait_for_states=[], operation_kw if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -608,8 +608,9 @@ def delete_sql_endpoint_and_wait_for_state(self, sql_endpoint_id, wait_for_state 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: @@ -646,8 +647,9 @@ def start_pool_and_wait_for_state(self, pool_id, wait_for_states=[], operation_k operation_result = self.client.start_pool(pool_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: @@ -684,8 +686,9 @@ def stop_pool_and_wait_for_state(self, pool_id, wait_for_states=[], operation_kw operation_result = self.client.stop_pool(pool_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: @@ -725,7 +728,6 @@ def update_application_and_wait_for_state(self, update_application_details, appl operation_result = self.client.update_application(update_application_details, application_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] application_id = operation_result.data.id @@ -771,8 +773,9 @@ def update_pool_and_wait_for_state(self, update_pool_details, pool_id, wait_for_ operation_result = self.client.update_pool(update_pool_details, pool_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: @@ -812,8 +815,9 @@ def update_private_endpoint_and_wait_for_state(self, update_private_endpoint_det operation_result = self.client.update_private_endpoint(update_private_endpoint_details, private_endpoint_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: @@ -853,7 +857,6 @@ def update_run_and_wait_for_state(self, update_run_details, run_id, wait_for_sta operation_result = self.client.update_run(update_run_details, run_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] run_id = operation_result.data.id @@ -899,8 +902,9 @@ def update_sql_endpoint_and_wait_for_state(self, update_sql_endpoint_details, sq operation_result = self.client.update_sql_endpoint(update_sql_endpoint_details, sql_endpoint_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: diff --git a/src/oci/data_integration/data_integration_client_composite_operations.py b/src/oci/data_integration/data_integration_client_composite_operations.py index 237582c14..848a34afe 100644 --- a/src/oci/data_integration/data_integration_client_composite_operations.py +++ b/src/oci/data_integration/data_integration_client_composite_operations.py @@ -49,8 +49,9 @@ def change_compartment_and_wait_for_state(self, workspace_id, change_compartment operation_result = self.client.change_compartment(workspace_id, change_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: @@ -93,8 +94,9 @@ def change_dis_application_compartment_and_wait_for_state(self, workspace_id, di operation_result = self.client.change_dis_application_compartment(workspace_id, dis_application_id, change_dis_application_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: @@ -134,7 +136,6 @@ def create_application_and_wait_for_state(self, workspace_id, create_application operation_result = self.client.create_application(workspace_id, create_application_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] workspace_id = operation_result.data.id @@ -180,8 +181,9 @@ def create_copy_object_request_and_wait_for_state(self, workspace_id, create_cop operation_result = self.client.create_copy_object_request(workspace_id, create_copy_object_request_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: @@ -221,7 +223,6 @@ def create_dis_application_and_wait_for_state(self, workspace_id, create_dis_app operation_result = self.client.create_dis_application(workspace_id, create_dis_application_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dis_application_id = operation_result.data.id @@ -267,8 +268,9 @@ def create_export_request_and_wait_for_state(self, workspace_id, create_export_r operation_result = self.client.create_export_request(workspace_id, create_export_request_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: @@ -308,8 +310,9 @@ def create_import_request_and_wait_for_state(self, workspace_id, create_import_r operation_result = self.client.create_import_request(workspace_id, create_import_request_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: @@ -346,8 +349,9 @@ def create_workspace_and_wait_for_state(self, create_workspace_details, wait_for operation_result = self.client.create_workspace(create_workspace_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: @@ -392,8 +396,9 @@ def delete_workspace_and_wait_for_state(self, workspace_id, wait_for_states=[], 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: @@ -430,8 +435,9 @@ def start_workspace_and_wait_for_state(self, workspace_id, wait_for_states=[], o operation_result = self.client.start_workspace(workspace_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: @@ -468,8 +474,9 @@ def stop_workspace_and_wait_for_state(self, workspace_id, wait_for_states=[], op operation_result = self.client.stop_workspace(workspace_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: @@ -512,7 +519,6 @@ def update_application_and_wait_for_state(self, workspace_id, application_key, u operation_result = self.client.update_application(workspace_id, application_key, update_application_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] workspace_id = operation_result.data.id @@ -561,7 +567,6 @@ def update_dis_application_and_wait_for_state(self, workspace_id, dis_applicatio operation_result = self.client.update_dis_application(workspace_id, dis_application_id, update_dis_application_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dis_application_id = operation_result.data.id @@ -607,8 +612,9 @@ def update_workspace_and_wait_for_state(self, workspace_id, update_workspace_det operation_result = self.client.update_workspace(workspace_id, update_workspace_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: diff --git a/src/oci/data_labeling_service/data_labeling_management_client_composite_operations.py b/src/oci/data_labeling_service/data_labeling_management_client_composite_operations.py index 12cb43636..8c8d1ddf1 100644 --- a/src/oci/data_labeling_service/data_labeling_management_client_composite_operations.py +++ b/src/oci/data_labeling_service/data_labeling_management_client_composite_operations.py @@ -49,8 +49,9 @@ def add_dataset_labels_and_wait_for_state(self, dataset_id, add_dataset_labels_d operation_result = self.client.add_dataset_labels(dataset_id, add_dataset_labels_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: @@ -90,8 +91,9 @@ def change_dataset_compartment_and_wait_for_state(self, dataset_id, change_datas operation_result = self.client.change_dataset_compartment(dataset_id, change_dataset_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: @@ -128,8 +130,9 @@ def create_dataset_and_wait_for_state(self, create_dataset_details, wait_for_sta operation_result = self.client.create_dataset(create_dataset_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: @@ -174,8 +177,9 @@ def delete_dataset_and_wait_for_state(self, dataset_id, wait_for_states=[], oper 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: @@ -215,8 +219,9 @@ def generate_dataset_records_and_wait_for_state(self, dataset_id, generate_datas operation_result = self.client.generate_dataset_records(dataset_id, generate_dataset_records_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: @@ -256,8 +261,9 @@ def import_pre_annotated_data_and_wait_for_state(self, dataset_id, import_pre_an operation_result = self.client.import_pre_annotated_data(dataset_id, import_pre_annotated_data_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: @@ -297,8 +303,9 @@ def remove_dataset_labels_and_wait_for_state(self, dataset_id, remove_dataset_la operation_result = self.client.remove_dataset_labels(dataset_id, remove_dataset_labels_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: @@ -338,8 +345,9 @@ def rename_dataset_labels_and_wait_for_state(self, dataset_id, rename_dataset_la operation_result = self.client.rename_dataset_labels(dataset_id, rename_dataset_labels_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: @@ -379,8 +387,9 @@ def snapshot_dataset_and_wait_for_state(self, dataset_id, snapshot_dataset_detai operation_result = self.client.snapshot_dataset(dataset_id, snapshot_dataset_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: @@ -420,7 +429,6 @@ def update_dataset_and_wait_for_state(self, dataset_id, update_dataset_details, operation_result = self.client.update_dataset(dataset_id, update_dataset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dataset_id = operation_result.data.id diff --git a/src/oci/data_labeling_service_dataplane/data_labeling_client_composite_operations.py b/src/oci/data_labeling_service_dataplane/data_labeling_client_composite_operations.py index 5c2b16e18..bd05d8170 100644 --- a/src/oci/data_labeling_service_dataplane/data_labeling_client_composite_operations.py +++ b/src/oci/data_labeling_service_dataplane/data_labeling_client_composite_operations.py @@ -46,7 +46,6 @@ def create_annotation_and_wait_for_state(self, create_annotation_details, wait_f operation_result = self.client.create_annotation(create_annotation_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] annotation_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_record_and_wait_for_state(self, create_record_details, wait_for_state operation_result = self.client.create_record(create_record_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] record_id = operation_result.data.id @@ -141,7 +139,6 @@ def delete_annotation_and_wait_for_state(self, annotation_id, wait_for_states=[] if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -201,7 +198,6 @@ def delete_record_and_wait_for_state(self, record_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -255,7 +251,6 @@ def update_annotation_and_wait_for_state(self, annotation_id, update_annotation_ operation_result = self.client.update_annotation(annotation_id, update_annotation_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] annotation_id = operation_result.data.id @@ -301,7 +296,6 @@ def update_record_and_wait_for_state(self, record_id, update_record_details, wai operation_result = self.client.update_record(record_id, update_record_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] record_id = operation_result.data.id 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 d2d94f943..70a577329 100644 --- a/src/oci/data_safe/data_safe_client_composite_operations.py +++ b/src/oci/data_safe/data_safe_client_composite_operations.py @@ -49,8 +49,9 @@ def activate_target_database_and_wait_for_state(self, activate_target_database_d operation_result = self.client.activate_target_database(activate_target_database_details, target_database_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: @@ -87,8 +88,9 @@ def add_masking_columns_from_sdm_and_wait_for_state(self, masking_policy_id, wai operation_result = self.client.add_masking_columns_from_sdm(masking_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: @@ -125,8 +127,9 @@ def alerts_update_and_wait_for_state(self, alerts_update_details, wait_for_state operation_result = self.client.alerts_update(alerts_update_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: @@ -166,8 +169,9 @@ def apply_discovery_job_results_and_wait_for_state(self, sensitive_data_model_id operation_result = self.client.apply_discovery_job_results(sensitive_data_model_id, apply_discovery_job_results_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: @@ -207,8 +211,9 @@ def apply_sdm_masking_policy_difference_and_wait_for_state(self, masking_policy_ operation_result = self.client.apply_sdm_masking_policy_difference(masking_policy_id, apply_sdm_masking_policy_difference_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: @@ -248,8 +253,9 @@ def calculate_audit_volume_available_and_wait_for_state(self, audit_profile_id, operation_result = self.client.calculate_audit_volume_available(audit_profile_id, calculate_audit_volume_available_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: @@ -289,8 +295,9 @@ def calculate_audit_volume_collected_and_wait_for_state(self, audit_profile_id, operation_result = self.client.calculate_audit_volume_collected(audit_profile_id, calculate_audit_volume_collected_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: @@ -330,8 +337,9 @@ def change_audit_archive_retrieval_compartment_and_wait_for_state(self, audit_ar operation_result = self.client.change_audit_archive_retrieval_compartment(audit_archive_retrieval_id, change_audit_archive_retrieval_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: @@ -371,8 +379,9 @@ def change_audit_policy_compartment_and_wait_for_state(self, audit_policy_id, ch operation_result = self.client.change_audit_policy_compartment(audit_policy_id, change_audit_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: @@ -412,8 +421,9 @@ def change_audit_profile_compartment_and_wait_for_state(self, audit_profile_id, operation_result = self.client.change_audit_profile_compartment(audit_profile_id, change_audit_profile_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: @@ -453,8 +463,9 @@ def change_data_safe_private_endpoint_compartment_and_wait_for_state(self, data_ operation_result = self.client.change_data_safe_private_endpoint_compartment(data_safe_private_endpoint_id, change_data_safe_private_endpoint_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: @@ -494,8 +505,9 @@ def change_database_security_config_compartment_and_wait_for_state(self, databas operation_result = self.client.change_database_security_config_compartment(database_security_config_id, change_database_security_config_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: @@ -535,8 +547,9 @@ def change_report_compartment_and_wait_for_state(self, report_id, change_report_ operation_result = self.client.change_report_compartment(report_id, change_report_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: @@ -576,8 +589,9 @@ def change_report_definition_compartment_and_wait_for_state(self, report_definit operation_result = self.client.change_report_definition_compartment(report_definition_id, change_report_definition_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: @@ -617,8 +631,9 @@ def change_retention_and_wait_for_state(self, audit_profile_id, change_retention operation_result = self.client.change_retention(audit_profile_id, change_retention_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: @@ -658,8 +673,9 @@ def change_security_policy_compartment_and_wait_for_state(self, security_policy_ operation_result = self.client.change_security_policy_compartment(security_policy_id, change_security_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: @@ -699,8 +715,9 @@ def change_security_policy_deployment_compartment_and_wait_for_state(self, secur operation_result = self.client.change_security_policy_deployment_compartment(security_policy_deployment_id, change_security_policy_deployment_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: @@ -740,8 +757,9 @@ def change_sql_collection_compartment_and_wait_for_state(self, sql_collection_id operation_result = self.client.change_sql_collection_compartment(sql_collection_id, change_sql_collection_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: @@ -781,8 +799,9 @@ def change_sql_firewall_policy_compartment_and_wait_for_state(self, sql_firewall operation_result = self.client.change_sql_firewall_policy_compartment(sql_firewall_policy_id, change_sql_firewall_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: @@ -822,8 +841,9 @@ def compare_security_assessment_and_wait_for_state(self, security_assessment_id, operation_result = self.client.compare_security_assessment(security_assessment_id, compare_security_assessment_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: @@ -863,8 +883,9 @@ def compare_user_assessment_and_wait_for_state(self, user_assessment_id, compare operation_result = self.client.compare_user_assessment(user_assessment_id, compare_user_assessment_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: @@ -901,8 +922,9 @@ def create_audit_archive_retrieval_and_wait_for_state(self, create_audit_archive operation_result = self.client.create_audit_archive_retrieval(create_audit_archive_retrieval_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: @@ -939,8 +961,9 @@ def create_data_safe_private_endpoint_and_wait_for_state(self, create_data_safe_ operation_result = self.client.create_data_safe_private_endpoint(create_data_safe_private_endpoint_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: @@ -977,8 +1000,9 @@ def create_discovery_job_and_wait_for_state(self, create_discovery_job_details, operation_result = self.client.create_discovery_job(create_discovery_job_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: @@ -1015,8 +1039,9 @@ def create_library_masking_format_and_wait_for_state(self, create_library_maskin operation_result = self.client.create_library_masking_format(create_library_masking_format_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: @@ -1056,8 +1081,9 @@ def create_masking_column_and_wait_for_state(self, create_masking_column_details operation_result = self.client.create_masking_column(create_masking_column_details, masking_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: @@ -1094,8 +1120,9 @@ def create_masking_policy_and_wait_for_state(self, create_masking_policy_details operation_result = self.client.create_masking_policy(create_masking_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: @@ -1132,8 +1159,9 @@ def create_on_prem_connector_and_wait_for_state(self, create_on_prem_connector_d operation_result = self.client.create_on_prem_connector(create_on_prem_connector_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: @@ -1173,8 +1201,9 @@ def create_peer_target_database_and_wait_for_state(self, target_database_id, cre operation_result = self.client.create_peer_target_database(target_database_id, create_peer_target_database_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: @@ -1211,8 +1240,9 @@ def create_report_definition_and_wait_for_state(self, create_report_definition_d operation_result = self.client.create_report_definition(create_report_definition_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: @@ -1249,8 +1279,9 @@ def create_sdm_masking_policy_difference_and_wait_for_state(self, create_sdm_mas operation_result = self.client.create_sdm_masking_policy_difference(create_sdm_masking_policy_difference_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: @@ -1287,8 +1318,9 @@ def create_security_assessment_and_wait_for_state(self, create_security_assessme operation_result = self.client.create_security_assessment(create_security_assessment_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: @@ -1328,8 +1360,9 @@ def create_sensitive_column_and_wait_for_state(self, sensitive_data_model_id, cr operation_result = self.client.create_sensitive_column(sensitive_data_model_id, create_sensitive_column_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: @@ -1366,8 +1399,9 @@ def create_sensitive_data_model_and_wait_for_state(self, create_sensitive_data_m operation_result = self.client.create_sensitive_data_model(create_sensitive_data_model_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: @@ -1404,8 +1438,9 @@ def create_sensitive_type_and_wait_for_state(self, create_sensitive_type_details operation_result = self.client.create_sensitive_type(create_sensitive_type_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: @@ -1442,8 +1477,9 @@ def create_sql_collection_and_wait_for_state(self, create_sql_collection_details operation_result = self.client.create_sql_collection(create_sql_collection_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: @@ -1480,8 +1516,9 @@ def create_target_alert_policy_association_and_wait_for_state(self, create_targe operation_result = self.client.create_target_alert_policy_association(create_target_alert_policy_association_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: @@ -1518,8 +1555,9 @@ def create_target_database_and_wait_for_state(self, create_target_database_detai operation_result = self.client.create_target_database(create_target_database_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: @@ -1556,8 +1594,9 @@ def create_user_assessment_and_wait_for_state(self, create_user_assessment_detai operation_result = self.client.create_user_assessment(create_user_assessment_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: @@ -1594,8 +1633,9 @@ def deactivate_target_database_and_wait_for_state(self, target_database_id, wait operation_result = self.client.deactivate_target_database(target_database_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: @@ -1640,8 +1680,9 @@ def delete_audit_archive_retrieval_and_wait_for_state(self, audit_archive_retrie 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: @@ -1686,8 +1727,9 @@ def delete_audit_trail_and_wait_for_state(self, audit_trail_id, wait_for_states= 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: @@ -1732,8 +1774,9 @@ def delete_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private 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: @@ -1778,8 +1821,9 @@ def delete_discovery_job_and_wait_for_state(self, discovery_job_id, wait_for_sta 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: @@ -1825,7 +1869,6 @@ def delete_library_masking_format_and_wait_for_state(self, library_masking_forma if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1884,8 +1927,9 @@ def delete_masking_policy_and_wait_for_state(self, masking_policy_id, wait_for_s 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: @@ -1930,8 +1974,9 @@ def delete_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, wait 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: @@ -1979,8 +2024,9 @@ def delete_peer_target_database_and_wait_for_state(self, target_database_id, pee 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: @@ -2025,8 +2071,9 @@ def delete_report_definition_and_wait_for_state(self, report_definition_id, wait 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: @@ -2071,8 +2118,9 @@ def delete_sdm_masking_policy_difference_and_wait_for_state(self, sdm_masking_po 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: @@ -2117,8 +2165,9 @@ def delete_security_assessment_and_wait_for_state(self, security_assessment_id, 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: @@ -2163,8 +2212,9 @@ def delete_sensitive_data_model_and_wait_for_state(self, sensitive_data_model_id 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: @@ -2210,7 +2260,6 @@ def delete_sensitive_type_and_wait_for_state(self, sensitive_type_id, wait_for_s if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -2269,8 +2318,9 @@ def delete_sql_collection_and_wait_for_state(self, sql_collection_id, wait_for_s 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: @@ -2315,8 +2365,9 @@ def delete_sql_firewall_policy_and_wait_for_state(self, sql_firewall_policy_id, 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: @@ -2361,8 +2412,9 @@ def delete_target_alert_policy_association_and_wait_for_state(self, target_alert 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: @@ -2407,8 +2459,9 @@ def delete_target_database_and_wait_for_state(self, target_database_id, wait_for 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: @@ -2453,8 +2506,9 @@ def delete_user_assessment_and_wait_for_state(self, user_assessment_id, wait_for 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: @@ -2491,8 +2545,9 @@ def discover_audit_trails_and_wait_for_state(self, audit_profile_id, wait_for_st operation_result = self.client.discover_audit_trails(audit_profile_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: @@ -2529,8 +2584,9 @@ def enable_data_safe_configuration_and_wait_for_state(self, enable_data_safe_con operation_result = self.client.enable_data_safe_configuration(enable_data_safe_configuration_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: @@ -2570,8 +2626,9 @@ def generate_discovery_report_for_download_and_wait_for_state(self, sensitive_da operation_result = self.client.generate_discovery_report_for_download(sensitive_data_model_id, generate_discovery_report_for_download_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: @@ -2611,8 +2668,9 @@ def generate_masking_policy_for_download_and_wait_for_state(self, masking_policy operation_result = self.client.generate_masking_policy_for_download(masking_policy_id, generate_masking_policy_for_download_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: @@ -2652,8 +2710,9 @@ def generate_masking_report_for_download_and_wait_for_state(self, masking_policy operation_result = self.client.generate_masking_report_for_download(masking_policy_id, generate_masking_report_for_download_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: @@ -2693,8 +2752,9 @@ def generate_report_and_wait_for_state(self, report_definition_id, generate_repo operation_result = self.client.generate_report(report_definition_id, generate_report_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: @@ -2734,8 +2794,9 @@ def generate_security_assessment_report_and_wait_for_state(self, security_assess operation_result = self.client.generate_security_assessment_report(security_assessment_id, generate_security_assessment_report_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: @@ -2775,8 +2836,9 @@ def generate_sensitive_data_model_for_download_and_wait_for_state(self, sensitiv operation_result = self.client.generate_sensitive_data_model_for_download(sensitive_data_model_id, generate_sensitive_data_model_for_download_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: @@ -2813,8 +2875,9 @@ def generate_sql_firewall_policy_and_wait_for_state(self, sql_collection_id, wai operation_result = self.client.generate_sql_firewall_policy(sql_collection_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: @@ -2854,8 +2917,9 @@ def generate_user_assessment_report_and_wait_for_state(self, user_assessment_id, operation_result = self.client.generate_user_assessment_report(user_assessment_id, generate_user_assessment_report_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: @@ -2895,8 +2959,9 @@ def mask_data_and_wait_for_state(self, masking_policy_id, mask_data_details, wai operation_result = self.client.mask_data(masking_policy_id, mask_data_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: @@ -2936,8 +3001,9 @@ def modify_global_settings_and_wait_for_state(self, modify_global_settings_detai operation_result = self.client.modify_global_settings(modify_global_settings_details, compartment_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: @@ -2974,8 +3040,9 @@ def patch_alerts_and_wait_for_state(self, patch_alerts_details, wait_for_states= operation_result = self.client.patch_alerts(patch_alerts_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: @@ -3015,8 +3082,9 @@ def patch_discovery_job_results_and_wait_for_state(self, discovery_job_id, patch operation_result = self.client.patch_discovery_job_results(discovery_job_id, patch_discovery_job_result_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: @@ -3056,8 +3124,9 @@ def patch_masking_columns_and_wait_for_state(self, masking_policy_id, patch_mask operation_result = self.client.patch_masking_columns(masking_policy_id, patch_masking_columns_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: @@ -3097,8 +3166,9 @@ def patch_sdm_masking_policy_difference_columns_and_wait_for_state(self, sdm_mas operation_result = self.client.patch_sdm_masking_policy_difference_columns(sdm_masking_policy_difference_id, patch_sdm_masking_policy_difference_columns_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: @@ -3138,8 +3208,9 @@ def patch_sensitive_columns_and_wait_for_state(self, sensitive_data_model_id, pa operation_result = self.client.patch_sensitive_columns(sensitive_data_model_id, patch_sensitive_column_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: @@ -3176,8 +3247,9 @@ def patch_target_alert_policy_association_and_wait_for_state(self, patch_target_ operation_result = self.client.patch_target_alert_policy_association(patch_target_alert_policy_association_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: @@ -3217,8 +3289,9 @@ def provision_audit_policy_and_wait_for_state(self, provision_audit_policy_detai operation_result = self.client.provision_audit_policy(provision_audit_policy_details, audit_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: @@ -3255,8 +3328,9 @@ def purge_sql_collection_logs_and_wait_for_state(self, sql_collection_id, wait_f operation_result = self.client.purge_sql_collection_logs(sql_collection_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: @@ -3293,8 +3367,9 @@ def refresh_database_security_configuration_and_wait_for_state(self, database_se operation_result = self.client.refresh_database_security_configuration(database_security_config_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: @@ -3334,8 +3409,9 @@ def refresh_security_assessment_and_wait_for_state(self, security_assessment_id, operation_result = self.client.refresh_security_assessment(security_assessment_id, run_security_assessment_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: @@ -3372,8 +3448,9 @@ def refresh_sql_collection_log_insights_and_wait_for_state(self, sql_collection_ operation_result = self.client.refresh_sql_collection_log_insights(sql_collection_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: @@ -3410,8 +3487,9 @@ def refresh_target_database_and_wait_for_state(self, target_database_id, wait_fo operation_result = self.client.refresh_target_database(target_database_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: @@ -3451,8 +3529,9 @@ def refresh_user_assessment_and_wait_for_state(self, user_assessment_id, run_use operation_result = self.client.refresh_user_assessment(user_assessment_id, run_user_assessment_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: @@ -3489,8 +3568,9 @@ def remove_schedule_report_and_wait_for_state(self, report_definition_id, wait_f operation_result = self.client.remove_schedule_report(report_definition_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: @@ -3527,8 +3607,9 @@ def resume_audit_trail_and_wait_for_state(self, audit_trail_id, wait_for_states= operation_result = self.client.resume_audit_trail(audit_trail_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: @@ -3565,8 +3646,9 @@ def retrieve_audit_policies_and_wait_for_state(self, audit_policy_id, wait_for_s operation_result = self.client.retrieve_audit_policies(audit_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: @@ -3606,8 +3688,9 @@ def schedule_report_and_wait_for_state(self, report_definition_id, schedule_repo operation_result = self.client.schedule_report(report_definition_id, schedule_report_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: @@ -3644,8 +3727,9 @@ def set_security_assessment_baseline_and_wait_for_state(self, security_assessmen operation_result = self.client.set_security_assessment_baseline(security_assessment_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: @@ -3682,8 +3766,9 @@ def set_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, wa operation_result = self.client.set_user_assessment_baseline(user_assessment_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: @@ -3723,8 +3808,9 @@ def start_audit_trail_and_wait_for_state(self, start_audit_trail_details, audit_ operation_result = self.client.start_audit_trail(start_audit_trail_details, audit_trail_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: @@ -3761,8 +3847,9 @@ def start_sql_collection_and_wait_for_state(self, sql_collection_id, wait_for_st operation_result = self.client.start_sql_collection(sql_collection_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: @@ -3799,8 +3886,9 @@ def stop_audit_trail_and_wait_for_state(self, audit_trail_id, wait_for_states=[] operation_result = self.client.stop_audit_trail(audit_trail_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: @@ -3837,8 +3925,9 @@ def stop_sql_collection_and_wait_for_state(self, sql_collection_id, wait_for_sta operation_result = self.client.stop_sql_collection(sql_collection_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: @@ -3875,8 +3964,9 @@ def unset_security_assessment_baseline_and_wait_for_state(self, security_assessm operation_result = self.client.unset_security_assessment_baseline(security_assessment_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: @@ -3913,8 +4003,9 @@ def unset_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, operation_result = self.client.unset_user_assessment_baseline(user_assessment_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: @@ -3954,7 +4045,6 @@ def update_alert_and_wait_for_state(self, alert_id, update_alert_details, wait_f operation_result = self.client.update_alert(alert_id, update_alert_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] alert_id = operation_result.data.id @@ -4000,8 +4090,9 @@ def update_audit_archive_retrieval_and_wait_for_state(self, audit_archive_retrie operation_result = self.client.update_audit_archive_retrieval(audit_archive_retrieval_id, update_audit_archive_retrieval_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: @@ -4041,8 +4132,9 @@ def update_audit_policy_and_wait_for_state(self, audit_policy_id, update_audit_p operation_result = self.client.update_audit_policy(audit_policy_id, update_audit_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: @@ -4082,8 +4174,9 @@ def update_audit_profile_and_wait_for_state(self, audit_profile_id, update_audit operation_result = self.client.update_audit_profile(audit_profile_id, update_audit_profile_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: @@ -4123,8 +4216,9 @@ def update_audit_trail_and_wait_for_state(self, audit_trail_id, update_audit_tra operation_result = self.client.update_audit_trail(audit_trail_id, update_audit_trail_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: @@ -4164,8 +4258,9 @@ def update_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private operation_result = self.client.update_data_safe_private_endpoint(data_safe_private_endpoint_id, update_data_safe_private_endpoint_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: @@ -4205,8 +4300,9 @@ def update_database_security_config_and_wait_for_state(self, database_security_c operation_result = self.client.update_database_security_config(database_security_config_id, update_database_security_config_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: @@ -4249,8 +4345,9 @@ def update_finding_and_wait_for_state(self, security_assessment_id, finding_key, operation_result = self.client.update_finding(security_assessment_id, finding_key, update_finding_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: @@ -4290,8 +4387,9 @@ def update_library_masking_format_and_wait_for_state(self, library_masking_forma operation_result = self.client.update_library_masking_format(library_masking_format_id, update_library_masking_format_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: @@ -4334,8 +4432,9 @@ def update_masking_column_and_wait_for_state(self, masking_column_key, masking_p operation_result = self.client.update_masking_column(masking_column_key, masking_policy_id, update_masking_column_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: @@ -4375,8 +4474,9 @@ def update_masking_policy_and_wait_for_state(self, masking_policy_id, update_mas operation_result = self.client.update_masking_policy(masking_policy_id, update_masking_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: @@ -4416,8 +4516,9 @@ def update_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, upda operation_result = self.client.update_on_prem_connector(on_prem_connector_id, update_on_prem_connector_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: @@ -4457,8 +4558,9 @@ def update_on_prem_connector_wallet_and_wait_for_state(self, update_on_prem_conn operation_result = self.client.update_on_prem_connector_wallet(update_on_prem_connector_wallet_details, on_prem_connector_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: @@ -4501,8 +4603,9 @@ def update_peer_target_database_and_wait_for_state(self, target_database_id, pee operation_result = self.client.update_peer_target_database(target_database_id, peer_target_database_id, update_peer_target_database_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: @@ -4542,8 +4645,9 @@ def update_report_and_wait_for_state(self, report_id, update_report_details, wai operation_result = self.client.update_report(report_id, update_report_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: @@ -4583,8 +4687,9 @@ def update_report_definition_and_wait_for_state(self, report_definition_id, upda operation_result = self.client.update_report_definition(report_definition_id, update_report_definition_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: @@ -4624,8 +4729,9 @@ def update_sdm_masking_policy_difference_and_wait_for_state(self, sdm_masking_po operation_result = self.client.update_sdm_masking_policy_difference(sdm_masking_policy_difference_id, update_sdm_masking_policy_difference_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: @@ -4665,8 +4771,9 @@ def update_security_assessment_and_wait_for_state(self, security_assessment_id, operation_result = self.client.update_security_assessment(security_assessment_id, update_security_assessment_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: @@ -4706,8 +4813,9 @@ def update_security_policy_and_wait_for_state(self, security_policy_id, update_s operation_result = self.client.update_security_policy(security_policy_id, update_security_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: @@ -4747,8 +4855,9 @@ def update_security_policy_deployment_and_wait_for_state(self, security_policy_d operation_result = self.client.update_security_policy_deployment(security_policy_deployment_id, update_security_policy_deployment_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: @@ -4791,8 +4900,9 @@ def update_sensitive_column_and_wait_for_state(self, sensitive_data_model_id, se operation_result = self.client.update_sensitive_column(sensitive_data_model_id, sensitive_column_key, update_sensitive_column_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: @@ -4832,8 +4942,9 @@ def update_sensitive_data_model_and_wait_for_state(self, sensitive_data_model_id operation_result = self.client.update_sensitive_data_model(sensitive_data_model_id, update_sensitive_data_model_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: @@ -4873,8 +4984,9 @@ def update_sensitive_type_and_wait_for_state(self, sensitive_type_id, update_sen operation_result = self.client.update_sensitive_type(sensitive_type_id, update_sensitive_type_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: @@ -4914,8 +5026,9 @@ def update_sql_collection_and_wait_for_state(self, sql_collection_id, update_sql operation_result = self.client.update_sql_collection(sql_collection_id, update_sql_collection_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: @@ -4955,8 +5068,9 @@ def update_sql_firewall_policy_and_wait_for_state(self, sql_firewall_policy_id, operation_result = self.client.update_sql_firewall_policy(sql_firewall_policy_id, update_sql_firewall_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: @@ -4996,8 +5110,9 @@ def update_target_alert_policy_association_and_wait_for_state(self, target_alert operation_result = self.client.update_target_alert_policy_association(target_alert_policy_association_id, update_target_alert_policy_association_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: @@ -5037,8 +5152,9 @@ def update_target_database_and_wait_for_state(self, target_database_id, update_t operation_result = self.client.update_target_database(target_database_id, update_target_database_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: @@ -5078,8 +5194,9 @@ def update_user_assessment_and_wait_for_state(self, user_assessment_id, update_u operation_result = self.client.update_user_assessment(user_assessment_id, update_user_assessment_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: @@ -5119,8 +5236,9 @@ def upload_masking_policy_and_wait_for_state(self, upload_masking_policy_details operation_result = self.client.upload_masking_policy(upload_masking_policy_details, masking_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: @@ -5160,8 +5278,9 @@ def upload_sensitive_data_model_and_wait_for_state(self, sensitive_data_model_id operation_result = self.client.upload_sensitive_data_model(sensitive_data_model_id, upload_sensitive_data_model_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: diff --git a/src/oci/data_science/data_science_client_composite_operations.py b/src/oci/data_science/data_science_client_composite_operations.py index 1c0a9c903..d735c88da 100644 --- a/src/oci/data_science/data_science_client_composite_operations.py +++ b/src/oci/data_science/data_science_client_composite_operations.py @@ -48,7 +48,6 @@ def activate_model_and_wait_for_state(self, model_id, wait_for_states=[], operat operation_result = self.client.activate_model(model_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] model_id = operation_result.data.id @@ -93,8 +92,9 @@ def activate_model_deployment_and_wait_for_state(self, model_deployment_id, wait operation_result = self.client.activate_model_deployment(model_deployment_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: @@ -133,8 +133,9 @@ def activate_notebook_session_and_wait_for_state(self, notebook_session_id, wait operation_result = self.client.activate_notebook_session(notebook_session_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: @@ -174,8 +175,9 @@ def change_data_science_private_endpoint_compartment_and_wait_for_state(self, da operation_result = self.client.change_data_science_private_endpoint_compartment(data_science_private_endpoint_id, change_data_science_private_endpoint_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: @@ -217,8 +219,9 @@ def change_model_version_set_compartment_and_wait_for_state(self, model_version_ operation_result = self.client.change_model_version_set_compartment(model_version_set_id, change_model_version_set_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: @@ -255,8 +258,9 @@ def create_data_science_private_endpoint_and_wait_for_state(self, create_data_sc operation_result = self.client.create_data_science_private_endpoint(create_data_science_private_endpoint_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: @@ -293,7 +297,6 @@ def create_job_and_wait_for_state(self, create_job_details, wait_for_states=[], operation_result = self.client.create_job(create_job_details, **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 @@ -336,7 +339,6 @@ def create_job_run_and_wait_for_state(self, create_job_run_details, wait_for_sta operation_result = self.client.create_job_run(create_job_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] job_run_id = operation_result.data.id @@ -379,7 +381,6 @@ def create_model_and_wait_for_state(self, create_model_details, wait_for_states= operation_result = self.client.create_model(create_model_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] model_id = operation_result.data.id @@ -422,8 +423,9 @@ def create_model_deployment_and_wait_for_state(self, create_model_deployment_det operation_result = self.client.create_model_deployment(create_model_deployment_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: @@ -460,7 +462,6 @@ def create_model_version_set_and_wait_for_state(self, create_model_version_set_d operation_result = self.client.create_model_version_set(create_model_version_set_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] model_version_set_id = operation_result.data.id @@ -503,8 +504,9 @@ def create_notebook_session_and_wait_for_state(self, create_notebook_session_det operation_result = self.client.create_notebook_session(create_notebook_session_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: @@ -541,7 +543,6 @@ def create_pipeline_and_wait_for_state(self, create_pipeline_details, wait_for_s operation_result = self.client.create_pipeline(create_pipeline_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pipeline_id = operation_result.data.id @@ -584,7 +585,6 @@ def create_pipeline_run_and_wait_for_state(self, create_pipeline_run_details, wa operation_result = self.client.create_pipeline_run(create_pipeline_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pipeline_run_id = operation_result.data.id @@ -627,7 +627,6 @@ def create_project_and_wait_for_state(self, create_project_details, wait_for_sta operation_result = self.client.create_project(create_project_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] project_id = operation_result.data.id @@ -672,7 +671,6 @@ def deactivate_model_and_wait_for_state(self, model_id, wait_for_states=[], oper operation_result = self.client.deactivate_model(model_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] model_id = operation_result.data.id @@ -717,8 +715,9 @@ def deactivate_model_deployment_and_wait_for_state(self, model_deployment_id, wa operation_result = self.client.deactivate_model_deployment(model_deployment_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: @@ -757,8 +756,9 @@ def deactivate_notebook_session_and_wait_for_state(self, notebook_session_id, wa operation_result = self.client.deactivate_notebook_session(notebook_session_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: @@ -803,8 +803,9 @@ def delete_data_science_private_endpoint_and_wait_for_state(self, data_science_p 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: @@ -851,8 +852,9 @@ def delete_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kw 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: @@ -900,7 +902,6 @@ def delete_job_run_and_wait_for_state(self, job_run_id, wait_for_states=[], oper if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -962,7 +963,6 @@ def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1023,8 +1023,9 @@ def delete_model_deployment_and_wait_for_state(self, model_deployment_id, wait_f 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: @@ -1071,8 +1072,9 @@ def delete_model_version_set_and_wait_for_state(self, model_version_set_id, wait 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: @@ -1119,8 +1121,9 @@ def delete_notebook_session_and_wait_for_state(self, notebook_session_id, wait_f 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: @@ -1167,8 +1170,9 @@ def delete_pipeline_and_wait_for_state(self, pipeline_id, wait_for_states=[], op 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: @@ -1216,7 +1220,6 @@ def delete_pipeline_run_and_wait_for_state(self, pipeline_run_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1277,8 +1280,9 @@ def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], oper 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: @@ -1320,8 +1324,9 @@ def export_model_artifact_and_wait_for_state(self, model_id, export_model_artifa operation_result = self.client.export_model_artifact(model_id, export_model_artifact_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: @@ -1363,8 +1368,9 @@ def import_model_artifact_and_wait_for_state(self, model_id, import_model_artifa operation_result = self.client.import_model_artifact(model_id, import_model_artifact_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: @@ -1404,8 +1410,9 @@ def update_data_science_private_endpoint_and_wait_for_state(self, data_science_p operation_result = self.client.update_data_science_private_endpoint(data_science_private_endpoint_id, update_data_science_private_endpoint_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: @@ -1447,7 +1454,6 @@ def update_job_and_wait_for_state(self, job_id, update_job_details, wait_for_sta operation_result = self.client.update_job(job_id, update_job_details, **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 @@ -1495,7 +1501,6 @@ def update_job_run_and_wait_for_state(self, job_run_id, update_job_run_details, operation_result = self.client.update_job_run(job_run_id, update_job_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] job_run_id = operation_result.data.id @@ -1543,7 +1548,6 @@ def update_model_and_wait_for_state(self, model_id, update_model_details, wait_f operation_result = self.client.update_model(model_id, update_model_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] model_id = operation_result.data.id @@ -1594,8 +1598,9 @@ def update_model_deployment_and_wait_for_state(self, model_deployment_id, update operation_result = self.client.update_model_deployment(model_deployment_id, update_model_deployment_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: @@ -1637,7 +1642,6 @@ def update_model_version_set_and_wait_for_state(self, model_version_set_id, upda operation_result = self.client.update_model_version_set(model_version_set_id, update_model_version_set_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] model_version_set_id = operation_result.data.id @@ -1686,7 +1690,6 @@ def update_notebook_session_and_wait_for_state(self, notebook_session_id, update operation_result = self.client.update_notebook_session(notebook_session_id, update_notebook_session_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] notebook_session_id = operation_result.data.id @@ -1734,7 +1737,6 @@ def update_pipeline_and_wait_for_state(self, pipeline_id, update_pipeline_detail operation_result = self.client.update_pipeline(pipeline_id, update_pipeline_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pipeline_id = operation_result.data.id @@ -1782,7 +1784,6 @@ def update_pipeline_run_and_wait_for_state(self, pipeline_run_id, update_pipelin operation_result = self.client.update_pipeline_run(pipeline_run_id, update_pipeline_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pipeline_run_id = operation_result.data.id @@ -1830,7 +1831,6 @@ def update_project_and_wait_for_state(self, project_id, update_project_details, operation_result = self.client.update_project(project_id, update_project_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] project_id = operation_result.data.id diff --git a/src/oci/database/database_client_composite_operations.py b/src/oci/database/database_client_composite_operations.py index df5fb744a..0f2210c61 100644 --- a/src/oci/database/database_client_composite_operations.py +++ b/src/oci/database/database_client_composite_operations.py @@ -56,8 +56,9 @@ def activate_exadata_infrastructure_and_wait_for_work_request(self, exadata_infr operation_result = self.client.activate_exadata_infrastructure(exadata_infrastructure_id, activate_exadata_infrastructure_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, @@ -95,7 +96,6 @@ def activate_exadata_infrastructure_and_wait_for_state(self, exadata_infrastruct operation_result = self.client.activate_exadata_infrastructure(exadata_infrastructure_id, activate_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] exadata_infrastructure_id = operation_result.data.id @@ -141,8 +141,9 @@ def add_storage_capacity_cloud_exadata_infrastructure_and_wait_for_work_request( operation_result = self.client.add_storage_capacity_cloud_exadata_infrastructure(cloud_exadata_infrastructure_id, **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, @@ -177,7 +178,6 @@ def add_storage_capacity_cloud_exadata_infrastructure_and_wait_for_state(self, c operation_result = self.client.add_storage_capacity_cloud_exadata_infrastructure(cloud_exadata_infrastructure_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_exadata_infrastructure_id = operation_result.data.id @@ -223,8 +223,9 @@ def add_storage_capacity_exadata_infrastructure_and_wait_for_work_request(self, operation_result = self.client.add_storage_capacity_exadata_infrastructure(exadata_infrastructure_id, **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, @@ -259,7 +260,6 @@ def add_storage_capacity_exadata_infrastructure_and_wait_for_state(self, exadata operation_result = self.client.add_storage_capacity_exadata_infrastructure(exadata_infrastructure_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] exadata_infrastructure_id = operation_result.data.id @@ -308,8 +308,9 @@ def add_virtual_machine_to_cloud_vm_cluster_and_wait_for_work_request(self, add_ operation_result = self.client.add_virtual_machine_to_cloud_vm_cluster(add_virtual_machine_to_cloud_vm_cluster_details, cloud_vm_cluster_id, **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, @@ -347,7 +348,6 @@ def add_virtual_machine_to_cloud_vm_cluster_and_wait_for_state(self, add_virtual operation_result = self.client.add_virtual_machine_to_cloud_vm_cluster(add_virtual_machine_to_cloud_vm_cluster_details, cloud_vm_cluster_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_vm_cluster_id = operation_result.data.id @@ -396,8 +396,9 @@ def add_virtual_machine_to_vm_cluster_and_wait_for_work_request(self, add_virtua operation_result = self.client.add_virtual_machine_to_vm_cluster(add_virtual_machine_to_vm_cluster_details, vm_cluster_id, **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, @@ -435,7 +436,6 @@ def add_virtual_machine_to_vm_cluster_and_wait_for_state(self, add_virtual_machi operation_result = self.client.add_virtual_machine_to_vm_cluster(add_virtual_machine_to_vm_cluster_details, vm_cluster_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_id = operation_result.data.id @@ -484,8 +484,9 @@ def autonomous_database_manual_refresh_and_wait_for_work_request(self, autonomou operation_result = self.client.autonomous_database_manual_refresh(autonomous_database_id, autonomous_database_manual_refresh_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, @@ -523,7 +524,6 @@ def autonomous_database_manual_refresh_and_wait_for_state(self, autonomous_datab operation_result = self.client.autonomous_database_manual_refresh(autonomous_database_id, autonomous_database_manual_refresh_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -569,8 +569,9 @@ def cancel_backup_and_wait_for_work_request(self, backup_id, work_request_states operation_result = self.client.cancel_backup(backup_id, **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, @@ -609,8 +610,9 @@ def change_autonomous_container_database_compartment_and_wait_for_work_request(s operation_result = self.client.change_autonomous_container_database_compartment(change_compartment_details, autonomous_container_database_id, **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, @@ -649,8 +651,9 @@ def change_autonomous_database_compartment_and_wait_for_work_request(self, chang operation_result = self.client.change_autonomous_database_compartment(change_compartment_details, autonomous_database_id, **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, @@ -689,8 +692,9 @@ def change_autonomous_exadata_infrastructure_compartment_and_wait_for_work_reque operation_result = self.client.change_autonomous_exadata_infrastructure_compartment(change_compartment_details, autonomous_exadata_infrastructure_id, **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, @@ -729,8 +733,9 @@ def change_autonomous_vm_cluster_compartment_and_wait_for_work_request(self, cha operation_result = self.client.change_autonomous_vm_cluster_compartment(change_autonomous_vm_cluster_compartment_details, autonomous_vm_cluster_id, **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, @@ -769,8 +774,9 @@ def change_backup_destination_compartment_and_wait_for_work_request(self, change operation_result = self.client.change_backup_destination_compartment(change_compartment_details, backup_destination_id, **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, @@ -809,8 +815,9 @@ def change_cloud_autonomous_vm_cluster_compartment_and_wait_for_work_request(sel operation_result = self.client.change_cloud_autonomous_vm_cluster_compartment(change_cloud_autonomous_vm_cluster_compartment_details, cloud_autonomous_vm_cluster_id, **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, @@ -849,8 +856,9 @@ def change_cloud_exadata_infrastructure_compartment_and_wait_for_work_request(se operation_result = self.client.change_cloud_exadata_infrastructure_compartment(change_cloud_exadata_infrastructure_compartment_details, cloud_exadata_infrastructure_id, **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, @@ -889,8 +897,9 @@ def change_cloud_vm_cluster_compartment_and_wait_for_work_request(self, change_c operation_result = self.client.change_cloud_vm_cluster_compartment(change_cloud_vm_cluster_compartment_details, cloud_vm_cluster_id, **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, @@ -929,8 +938,9 @@ def change_database_software_image_compartment_and_wait_for_work_request(self, c operation_result = self.client.change_database_software_image_compartment(change_compartment_details, database_software_image_id, **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, @@ -969,8 +979,9 @@ def change_dataguard_role_and_wait_for_work_request(self, change_dataguard_role_ operation_result = self.client.change_dataguard_role(change_dataguard_role_details, autonomous_container_database_id, **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, @@ -1008,7 +1019,6 @@ def change_dataguard_role_and_wait_for_state(self, change_dataguard_role_details operation_result = self.client.change_dataguard_role(change_dataguard_role_details, autonomous_container_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_id = operation_result.data.id @@ -1064,8 +1074,9 @@ def change_db_system_compartment_and_wait_for_work_request(self, change_compartm operation_result = self.client.change_db_system_compartment(change_compartment_details, db_system_id, **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, @@ -1104,8 +1115,9 @@ def change_disaster_recovery_configuration_and_wait_for_work_request(self, auton operation_result = self.client.change_disaster_recovery_configuration(autonomous_database_id, change_disaster_recovery_configuration_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, @@ -1143,7 +1155,6 @@ def change_disaster_recovery_configuration_and_wait_for_state(self, autonomous_d operation_result = self.client.change_disaster_recovery_configuration(autonomous_database_id, change_disaster_recovery_configuration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -1192,8 +1203,9 @@ def change_exadata_infrastructure_compartment_and_wait_for_work_request(self, ch operation_result = self.client.change_exadata_infrastructure_compartment(change_exadata_infrastructure_compartment_details, exadata_infrastructure_id, **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, @@ -1232,8 +1244,9 @@ def change_external_container_database_compartment_and_wait_for_work_request(sel operation_result = self.client.change_external_container_database_compartment(change_compartment_details, external_container_database_id, **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, @@ -1272,8 +1285,9 @@ def change_external_non_container_database_compartment_and_wait_for_work_request operation_result = self.client.change_external_non_container_database_compartment(change_compartment_details, external_non_container_database_id, **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, @@ -1314,8 +1328,9 @@ def change_external_pluggable_database_compartment_and_wait_for_work_request(sel operation_result = self.client.change_external_pluggable_database_compartment(change_compartment_details, external_pluggable_database_id, **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, @@ -1354,8 +1369,9 @@ def change_key_store_compartment_and_wait_for_work_request(self, change_key_stor operation_result = self.client.change_key_store_compartment(change_key_store_compartment_details, key_store_id, **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, @@ -1394,8 +1410,9 @@ def change_key_store_type_and_wait_for_work_request(self, database_id, change_ke operation_result = self.client.change_key_store_type(database_id, change_key_store_type_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, @@ -1434,8 +1451,9 @@ def change_oneoff_patch_compartment_and_wait_for_work_request(self, change_compa operation_result = self.client.change_oneoff_patch_compartment(change_compartment_details, oneoff_patch_id, **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, @@ -1474,8 +1492,9 @@ def change_vm_cluster_compartment_and_wait_for_work_request(self, change_vm_clus operation_result = self.client.change_vm_cluster_compartment(change_vm_cluster_compartment_details, vm_cluster_id, **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, @@ -1512,8 +1531,9 @@ def check_external_database_connector_connection_status_and_wait_for_work_reques operation_result = self.client.check_external_database_connector_connection_status(external_database_connector_id, **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, @@ -1552,8 +1572,9 @@ def complete_external_backup_job_and_wait_for_work_request(self, backup_id, comp operation_result = self.client.complete_external_backup_job(backup_id, complete_external_backup_job_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, @@ -1594,8 +1615,9 @@ def configure_autonomous_database_vault_key_and_wait_for_work_request(self, auto operation_result = self.client.configure_autonomous_database_vault_key(autonomous_database_id, configure_autonomous_database_vault_key_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, @@ -1634,8 +1656,9 @@ def configure_saas_admin_user_and_wait_for_work_request(self, autonomous_databas operation_result = self.client.configure_saas_admin_user(autonomous_database_id, configure_saas_admin_user_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, @@ -1673,7 +1696,6 @@ def configure_saas_admin_user_and_wait_for_state(self, autonomous_database_id, c operation_result = self.client.configure_saas_admin_user(autonomous_database_id, configure_saas_admin_user_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -1722,8 +1744,9 @@ def convert_to_pdb_and_wait_for_work_request(self, database_id, convert_to_pdb_d operation_result = self.client.convert_to_pdb(database_id, convert_to_pdb_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, @@ -1761,7 +1784,6 @@ def convert_to_pdb_and_wait_for_state(self, database_id, convert_to_pdb_details, operation_result = self.client.convert_to_pdb(database_id, convert_to_pdb_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -1810,8 +1832,9 @@ def convert_to_regular_pluggable_database_and_wait_for_work_request(self, conver operation_result = self.client.convert_to_regular_pluggable_database(convert_to_regular_pluggable_database_details, pluggable_database_id, **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, @@ -1849,7 +1872,6 @@ def convert_to_regular_pluggable_database_and_wait_for_state(self, convert_to_re operation_result = self.client.convert_to_regular_pluggable_database(convert_to_regular_pluggable_database_details, pluggable_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -1893,8 +1915,9 @@ def create_application_vip_and_wait_for_work_request(self, create_application_vi operation_result = self.client.create_application_vip(create_application_vip_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, @@ -1927,7 +1950,6 @@ def create_application_vip_and_wait_for_state(self, create_application_vip_detai operation_result = self.client.create_application_vip(create_application_vip_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] application_vip_id = operation_result.data.id @@ -1971,8 +1993,9 @@ def create_autonomous_container_database_and_wait_for_work_request(self, create_ operation_result = self.client.create_autonomous_container_database(create_autonomous_container_database_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, @@ -2005,7 +2028,6 @@ def create_autonomous_container_database_and_wait_for_state(self, create_autonom operation_result = self.client.create_autonomous_container_database(create_autonomous_container_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_id = operation_result.data.id @@ -2054,8 +2076,9 @@ def create_autonomous_container_database_dataguard_association_and_wait_for_work operation_result = self.client.create_autonomous_container_database_dataguard_association(autonomous_container_database_id, create_autonomous_container_database_dataguard_association_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, @@ -2093,7 +2116,6 @@ def create_autonomous_container_database_dataguard_association_and_wait_for_stat operation_result = self.client.create_autonomous_container_database_dataguard_association(autonomous_container_database_id, create_autonomous_container_database_dataguard_association_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_dataguard_association_id = operation_result.data.id @@ -2137,8 +2159,9 @@ def create_autonomous_database_and_wait_for_work_request(self, create_autonomous operation_result = self.client.create_autonomous_database(create_autonomous_database_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, @@ -2171,7 +2194,6 @@ def create_autonomous_database_and_wait_for_state(self, create_autonomous_databa operation_result = self.client.create_autonomous_database(create_autonomous_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -2215,8 +2237,9 @@ def create_autonomous_database_backup_and_wait_for_work_request(self, create_aut operation_result = self.client.create_autonomous_database_backup(create_autonomous_database_backup_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, @@ -2249,7 +2272,6 @@ def create_autonomous_database_backup_and_wait_for_state(self, create_autonomous operation_result = self.client.create_autonomous_database_backup(create_autonomous_database_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_backup_id = operation_result.data.id @@ -2293,8 +2315,9 @@ def create_autonomous_vm_cluster_and_wait_for_work_request(self, create_autonomo operation_result = self.client.create_autonomous_vm_cluster(create_autonomous_vm_cluster_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, @@ -2327,7 +2350,6 @@ def create_autonomous_vm_cluster_and_wait_for_state(self, create_autonomous_vm_c operation_result = self.client.create_autonomous_vm_cluster(create_autonomous_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_vm_cluster_id = operation_result.data.id @@ -2371,8 +2393,9 @@ def create_backup_and_wait_for_work_request(self, create_backup_details, work_re operation_result = self.client.create_backup(create_backup_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, @@ -2405,7 +2428,6 @@ def create_backup_and_wait_for_state(self, create_backup_details, wait_for_state operation_result = self.client.create_backup(create_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] backup_id = operation_result.data.id @@ -2448,7 +2470,6 @@ def create_backup_destination_and_wait_for_state(self, create_backup_destination operation_result = self.client.create_backup_destination(create_backup_destination_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] backup_destination_id = operation_result.data.id @@ -2492,8 +2513,9 @@ def create_cloud_autonomous_vm_cluster_and_wait_for_work_request(self, create_cl operation_result = self.client.create_cloud_autonomous_vm_cluster(create_cloud_autonomous_vm_cluster_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, @@ -2526,7 +2548,6 @@ def create_cloud_autonomous_vm_cluster_and_wait_for_state(self, create_cloud_aut operation_result = self.client.create_cloud_autonomous_vm_cluster(create_cloud_autonomous_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_autonomous_vm_cluster_id = operation_result.data.id @@ -2572,8 +2593,9 @@ def create_cloud_exadata_infrastructure_and_wait_for_work_request(self, create_c operation_result = self.client.create_cloud_exadata_infrastructure(create_cloud_exadata_infrastructure_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, @@ -2608,7 +2630,6 @@ def create_cloud_exadata_infrastructure_and_wait_for_state(self, create_cloud_ex operation_result = self.client.create_cloud_exadata_infrastructure(create_cloud_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_exadata_infrastructure_id = operation_result.data.id @@ -2654,8 +2675,9 @@ def create_cloud_vm_cluster_and_wait_for_work_request(self, create_cloud_vm_clus operation_result = self.client.create_cloud_vm_cluster(create_cloud_vm_cluster_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, @@ -2690,7 +2712,6 @@ def create_cloud_vm_cluster_and_wait_for_state(self, create_cloud_vm_cluster_det operation_result = self.client.create_cloud_vm_cluster(create_cloud_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_vm_cluster_id = operation_result.data.id @@ -2739,8 +2760,9 @@ def create_console_connection_and_wait_for_work_request(self, create_console_con operation_result = self.client.create_console_connection(create_console_connection_details, db_node_id, **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, @@ -2778,7 +2800,6 @@ def create_console_connection_and_wait_for_state(self, create_console_connection operation_result = self.client.create_console_connection(create_console_connection_details, db_node_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] console_connection_id = operation_result.data.id @@ -2827,8 +2848,9 @@ def create_console_history_and_wait_for_work_request(self, create_console_histor operation_result = self.client.create_console_history(create_console_history_details, db_node_id, **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, @@ -2866,7 +2888,6 @@ def create_console_history_and_wait_for_state(self, create_console_history_detai operation_result = self.client.create_console_history(create_console_history_details, db_node_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] console_history_id = operation_result.data.id @@ -2915,8 +2936,9 @@ def create_data_guard_association_and_wait_for_work_request(self, database_id, c operation_result = self.client.create_data_guard_association(database_id, create_data_guard_association_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, @@ -2954,7 +2976,6 @@ def create_data_guard_association_and_wait_for_state(self, database_id, create_d operation_result = self.client.create_data_guard_association(database_id, create_data_guard_association_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_guard_association_id = operation_result.data.id @@ -2998,8 +3019,9 @@ def create_database_and_wait_for_work_request(self, create_new_database_details, operation_result = self.client.create_database(create_new_database_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, @@ -3032,7 +3054,6 @@ def create_database_and_wait_for_state(self, create_new_database_details, wait_f operation_result = self.client.create_database(create_new_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -3076,8 +3097,9 @@ def create_database_software_image_and_wait_for_work_request(self, create_databa operation_result = self.client.create_database_software_image(create_database_software_image_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, @@ -3110,7 +3132,6 @@ def create_database_software_image_and_wait_for_state(self, create_database_soft operation_result = self.client.create_database_software_image(create_database_software_image_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_software_image_id = operation_result.data.id @@ -3154,8 +3175,9 @@ def create_db_home_and_wait_for_work_request(self, create_db_home_with_db_system operation_result = self.client.create_db_home(create_db_home_with_db_system_id_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, @@ -3188,7 +3210,6 @@ def create_db_home_and_wait_for_state(self, create_db_home_with_db_system_id_det operation_result = self.client.create_db_home(create_db_home_with_db_system_id_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_home_id = operation_result.data.id @@ -3232,8 +3253,9 @@ def create_exadata_infrastructure_and_wait_for_work_request(self, create_exadata operation_result = self.client.create_exadata_infrastructure(create_exadata_infrastructure_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, @@ -3266,7 +3288,6 @@ def create_exadata_infrastructure_and_wait_for_state(self, create_exadata_infras operation_result = self.client.create_exadata_infrastructure(create_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] exadata_infrastructure_id = operation_result.data.id @@ -3310,8 +3331,9 @@ def create_external_backup_job_and_wait_for_work_request(self, create_external_b operation_result = self.client.create_external_backup_job(create_external_backup_job_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, @@ -3345,8 +3367,9 @@ def create_external_container_database_and_wait_for_work_request(self, create_ex operation_result = self.client.create_external_container_database(create_external_container_database_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, @@ -3379,7 +3402,6 @@ def create_external_container_database_and_wait_for_state(self, create_external_ operation_result = self.client.create_external_container_database(create_external_container_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_container_database_id = operation_result.data.id @@ -3423,8 +3445,9 @@ def create_external_database_connector_and_wait_for_work_request(self, create_ex operation_result = self.client.create_external_database_connector(create_external_database_connector_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, @@ -3457,7 +3480,6 @@ def create_external_database_connector_and_wait_for_state(self, create_external_ operation_result = self.client.create_external_database_connector(create_external_database_connector_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_database_connector_id = operation_result.data.id @@ -3501,8 +3523,9 @@ def create_external_non_container_database_and_wait_for_work_request(self, creat operation_result = self.client.create_external_non_container_database(create_external_non_container_database_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, @@ -3535,7 +3558,6 @@ def create_external_non_container_database_and_wait_for_state(self, create_exter operation_result = self.client.create_external_non_container_database(create_external_non_container_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_non_container_database_id = operation_result.data.id @@ -3579,8 +3601,9 @@ def create_external_pluggable_database_and_wait_for_work_request(self, create_ex operation_result = self.client.create_external_pluggable_database(create_external_pluggable_database_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, @@ -3613,7 +3636,6 @@ def create_external_pluggable_database_and_wait_for_state(self, create_external_ operation_result = self.client.create_external_pluggable_database(create_external_pluggable_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_pluggable_database_id = operation_result.data.id @@ -3656,7 +3678,6 @@ def create_key_store_and_wait_for_state(self, create_key_store_details, wait_for operation_result = self.client.create_key_store(create_key_store_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_store_id = operation_result.data.id @@ -3699,7 +3720,6 @@ def create_maintenance_run_and_wait_for_state(self, create_maintenance_run_detai operation_result = self.client.create_maintenance_run(create_maintenance_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] maintenance_run_id = operation_result.data.id @@ -3743,8 +3763,9 @@ def create_oneoff_patch_and_wait_for_work_request(self, create_oneoff_patch_deta operation_result = self.client.create_oneoff_patch(create_oneoff_patch_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, @@ -3777,7 +3798,6 @@ def create_oneoff_patch_and_wait_for_state(self, create_oneoff_patch_details, wa operation_result = self.client.create_oneoff_patch(create_oneoff_patch_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] oneoff_patch_id = operation_result.data.id @@ -3821,8 +3841,9 @@ def create_pluggable_database_and_wait_for_work_request(self, create_pluggable_d operation_result = self.client.create_pluggable_database(create_pluggable_database_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, @@ -3855,7 +3876,6 @@ def create_pluggable_database_and_wait_for_state(self, create_pluggable_database operation_result = self.client.create_pluggable_database(create_pluggable_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -3900,8 +3920,9 @@ def create_vm_cluster_and_wait_for_work_request(self, create_vm_cluster_details, operation_result = self.client.create_vm_cluster(create_vm_cluster_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, @@ -3935,7 +3956,6 @@ def create_vm_cluster_and_wait_for_state(self, create_vm_cluster_details, wait_f operation_result = self.client.create_vm_cluster(create_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_id = operation_result.data.id @@ -3984,8 +4004,9 @@ def create_vm_cluster_network_and_wait_for_work_request(self, exadata_infrastruc operation_result = self.client.create_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_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, @@ -4023,7 +4044,6 @@ def create_vm_cluster_network_and_wait_for_state(self, exadata_infrastructure_id operation_result = self.client.create_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_network_id = operation_result.data.id @@ -4074,8 +4094,9 @@ def db_node_action_and_wait_for_work_request(self, db_node_id, action, work_requ operation_result = self.client.db_node_action(db_node_id, action, **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, @@ -4115,7 +4136,6 @@ def db_node_action_and_wait_for_state(self, db_node_id, action, wait_for_states= operation_result = self.client.db_node_action(db_node_id, action, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_node_id = operation_result.data.id @@ -4161,8 +4181,9 @@ def delete_application_vip_and_wait_for_work_request(self, application_vip_id, w operation_result = self.client.delete_application_vip(application_vip_id, **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, @@ -4198,8 +4219,9 @@ def delete_autonomous_database_and_wait_for_work_request(self, autonomous_databa operation_result = self.client.delete_autonomous_database(autonomous_database_id, **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, @@ -4235,8 +4257,9 @@ def delete_autonomous_database_backup_and_wait_for_work_request(self, autonomous operation_result = self.client.delete_autonomous_database_backup(autonomous_database_backup_id, **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, @@ -4272,8 +4295,9 @@ def delete_autonomous_vm_cluster_and_wait_for_work_request(self, autonomous_vm_c operation_result = self.client.delete_autonomous_vm_cluster(autonomous_vm_cluster_id, **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, @@ -4309,8 +4333,9 @@ def delete_backup_and_wait_for_work_request(self, backup_id, work_request_states operation_result = self.client.delete_backup(backup_id, **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, @@ -4354,7 +4379,6 @@ def delete_backup_destination_and_wait_for_state(self, backup_destination_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -4408,8 +4432,9 @@ def delete_cloud_autonomous_vm_cluster_and_wait_for_work_request(self, cloud_aut operation_result = self.client.delete_cloud_autonomous_vm_cluster(cloud_autonomous_vm_cluster_id, **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, @@ -4445,8 +4470,9 @@ def delete_cloud_exadata_infrastructure_and_wait_for_work_request(self, cloud_ex operation_result = self.client.delete_cloud_exadata_infrastructure(cloud_exadata_infrastructure_id, **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, @@ -4482,8 +4508,9 @@ def delete_cloud_vm_cluster_and_wait_for_work_request(self, cloud_vm_cluster_id, operation_result = self.client.delete_cloud_vm_cluster(cloud_vm_cluster_id, **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, @@ -4522,8 +4549,9 @@ def delete_console_connection_and_wait_for_work_request(self, db_node_id, consol operation_result = self.client.delete_console_connection(db_node_id, console_connection_id, **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, @@ -4562,8 +4590,9 @@ def delete_console_history_and_wait_for_work_request(self, db_node_id, console_h operation_result = self.client.delete_console_history(db_node_id, console_history_id, **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, @@ -4599,8 +4628,9 @@ def delete_database_and_wait_for_work_request(self, database_id, work_request_st operation_result = self.client.delete_database(database_id, **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, @@ -4636,8 +4666,9 @@ def delete_database_software_image_and_wait_for_work_request(self, database_soft operation_result = self.client.delete_database_software_image(database_software_image_id, **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, @@ -4673,8 +4704,9 @@ def delete_db_home_and_wait_for_work_request(self, db_home_id, work_request_stat operation_result = self.client.delete_db_home(db_home_id, **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, @@ -4710,8 +4742,9 @@ def delete_exadata_infrastructure_and_wait_for_work_request(self, exadata_infras operation_result = self.client.delete_exadata_infrastructure(exadata_infrastructure_id, **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, @@ -4747,8 +4780,9 @@ def delete_external_container_database_and_wait_for_work_request(self, external_ operation_result = self.client.delete_external_container_database(external_container_database_id, **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, @@ -4785,8 +4819,9 @@ def delete_external_database_connector_and_wait_for_work_request(self, external_ operation_result = self.client.delete_external_database_connector(external_database_connector_id, **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, @@ -4822,8 +4857,9 @@ def delete_external_non_container_database_and_wait_for_work_request(self, exter operation_result = self.client.delete_external_non_container_database(external_non_container_database_id, **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, @@ -4859,8 +4895,9 @@ def delete_external_pluggable_database_and_wait_for_work_request(self, external_ operation_result = self.client.delete_external_pluggable_database(external_pluggable_database_id, **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, @@ -4904,7 +4941,6 @@ def delete_key_store_and_wait_for_state(self, key_store_id, wait_for_states=[], if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -4958,8 +4994,9 @@ def delete_oneoff_patch_and_wait_for_work_request(self, oneoff_patch_id, work_re operation_result = self.client.delete_oneoff_patch(oneoff_patch_id, **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, @@ -4995,8 +5032,9 @@ def delete_pluggable_database_and_wait_for_work_request(self, pluggable_database operation_result = self.client.delete_pluggable_database(pluggable_database_id, **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, @@ -5032,8 +5070,9 @@ def delete_vm_cluster_and_wait_for_work_request(self, vm_cluster_id, work_reques operation_result = self.client.delete_vm_cluster(vm_cluster_id, **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, @@ -5074,8 +5113,9 @@ def delete_vm_cluster_network_and_wait_for_work_request(self, exadata_infrastruc operation_result = self.client.delete_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, **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, @@ -5111,8 +5151,9 @@ def deregister_autonomous_database_data_safe_and_wait_for_work_request(self, aut operation_result = self.client.deregister_autonomous_database_data_safe(autonomous_database_id, **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, @@ -5148,8 +5189,9 @@ def disable_autonomous_database_management_and_wait_for_work_request(self, auton operation_result = self.client.disable_autonomous_database_management(autonomous_database_id, **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, @@ -5185,8 +5227,9 @@ def disable_autonomous_database_operations_insights_and_wait_for_work_request(se operation_result = self.client.disable_autonomous_database_operations_insights(autonomous_database_id, **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, @@ -5222,8 +5265,9 @@ def disable_database_management_and_wait_for_work_request(self, database_id, wor operation_result = self.client.disable_database_management(database_id, **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, @@ -5258,7 +5302,6 @@ def disable_database_management_and_wait_for_state(self, database_id, wait_for_s operation_result = self.client.disable_database_management(database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -5304,8 +5347,9 @@ def disable_external_container_database_database_management_and_wait_for_work_re operation_result = self.client.disable_external_container_database_database_management(external_container_database_id, **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, @@ -5341,8 +5385,9 @@ def disable_external_container_database_stack_monitoring_and_wait_for_work_reque operation_result = self.client.disable_external_container_database_stack_monitoring(external_container_database_id, **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, @@ -5378,8 +5423,9 @@ def disable_external_non_container_database_database_management_and_wait_for_wor operation_result = self.client.disable_external_non_container_database_database_management(external_non_container_database_id, **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, @@ -5415,8 +5461,9 @@ def disable_external_non_container_database_operations_insights_and_wait_for_wor operation_result = self.client.disable_external_non_container_database_operations_insights(external_non_container_database_id, **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, @@ -5452,8 +5499,9 @@ def disable_external_non_container_database_stack_monitoring_and_wait_for_work_r operation_result = self.client.disable_external_non_container_database_stack_monitoring(external_non_container_database_id, **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, @@ -5489,8 +5537,9 @@ def disable_external_pluggable_database_database_management_and_wait_for_work_re operation_result = self.client.disable_external_pluggable_database_database_management(external_pluggable_database_id, **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, @@ -5526,8 +5575,9 @@ def disable_external_pluggable_database_operations_insights_and_wait_for_work_re operation_result = self.client.disable_external_pluggable_database_operations_insights(external_pluggable_database_id, **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, @@ -5563,8 +5613,9 @@ def disable_external_pluggable_database_stack_monitoring_and_wait_for_work_reque operation_result = self.client.disable_external_pluggable_database_stack_monitoring(external_pluggable_database_id, **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, @@ -5600,8 +5651,9 @@ def disable_pluggable_database_management_and_wait_for_work_request(self, plugga operation_result = self.client.disable_pluggable_database_management(pluggable_database_id, **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, @@ -5636,7 +5688,6 @@ def disable_pluggable_database_management_and_wait_for_state(self, pluggable_dat operation_result = self.client.disable_pluggable_database_management(pluggable_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -5682,8 +5733,9 @@ def enable_autonomous_database_management_and_wait_for_work_request(self, autono operation_result = self.client.enable_autonomous_database_management(autonomous_database_id, **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, @@ -5719,8 +5771,9 @@ def enable_autonomous_database_operations_insights_and_wait_for_work_request(sel operation_result = self.client.enable_autonomous_database_operations_insights(autonomous_database_id, **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, @@ -5759,8 +5812,9 @@ def enable_database_management_and_wait_for_work_request(self, database_id, enab operation_result = self.client.enable_database_management(database_id, enable_database_management_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, @@ -5798,7 +5852,6 @@ def enable_database_management_and_wait_for_state(self, database_id, enable_data operation_result = self.client.enable_database_management(database_id, enable_database_management_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -5847,8 +5900,9 @@ def enable_external_container_database_database_management_and_wait_for_work_req operation_result = self.client.enable_external_container_database_database_management(external_container_database_id, enable_external_container_database_database_management_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, @@ -5887,8 +5941,9 @@ def enable_external_container_database_stack_monitoring_and_wait_for_work_reques operation_result = self.client.enable_external_container_database_stack_monitoring(external_container_database_id, enable_external_container_database_stack_monitoring_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, @@ -5927,8 +5982,9 @@ def enable_external_non_container_database_database_management_and_wait_for_work operation_result = self.client.enable_external_non_container_database_database_management(external_non_container_database_id, enable_external_non_container_database_database_management_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, @@ -5967,8 +6023,9 @@ def enable_external_non_container_database_operations_insights_and_wait_for_work operation_result = self.client.enable_external_non_container_database_operations_insights(external_non_container_database_id, enable_external_non_container_database_operations_insights_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, @@ -6007,8 +6064,9 @@ def enable_external_non_container_database_stack_monitoring_and_wait_for_work_re operation_result = self.client.enable_external_non_container_database_stack_monitoring(external_non_container_database_id, enable_external_non_container_database_stack_monitoring_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, @@ -6047,8 +6105,9 @@ def enable_external_pluggable_database_database_management_and_wait_for_work_req operation_result = self.client.enable_external_pluggable_database_database_management(external_pluggable_database_id, enable_external_pluggable_database_database_management_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, @@ -6087,8 +6146,9 @@ def enable_external_pluggable_database_operations_insights_and_wait_for_work_req operation_result = self.client.enable_external_pluggable_database_operations_insights(external_pluggable_database_id, enable_external_pluggable_database_operations_insights_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, @@ -6127,8 +6187,9 @@ def enable_external_pluggable_database_stack_monitoring_and_wait_for_work_reques operation_result = self.client.enable_external_pluggable_database_stack_monitoring(external_pluggable_database_id, enable_external_pluggable_database_stack_monitoring_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, @@ -6167,8 +6228,9 @@ def enable_pluggable_database_management_and_wait_for_work_request(self, pluggab operation_result = self.client.enable_pluggable_database_management(pluggable_database_id, enable_pluggable_database_management_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, @@ -6206,7 +6268,6 @@ def enable_pluggable_database_management_and_wait_for_state(self, pluggable_data operation_result = self.client.enable_pluggable_database_management(pluggable_database_id, enable_pluggable_database_management_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -6252,8 +6313,9 @@ def fail_over_autonomous_database_and_wait_for_work_request(self, autonomous_dat operation_result = self.client.fail_over_autonomous_database(autonomous_database_id, **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, @@ -6288,7 +6350,6 @@ def fail_over_autonomous_database_and_wait_for_state(self, autonomous_database_i operation_result = self.client.fail_over_autonomous_database(autonomous_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -6339,8 +6400,9 @@ def failover_autonomous_container_database_dataguard_association_and_wait_for_wo operation_result = self.client.failover_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, **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, @@ -6380,7 +6442,6 @@ def failover_autonomous_container_database_dataguard_association_and_wait_for_st operation_result = self.client.failover_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_dataguard_association_id = operation_result.data.id @@ -6434,8 +6495,9 @@ def failover_data_guard_association_and_wait_for_work_request(self, database_id, operation_result = self.client.failover_data_guard_association(database_id, data_guard_association_id, failover_data_guard_association_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, @@ -6478,7 +6540,6 @@ def failover_data_guard_association_and_wait_for_state(self, database_id, data_g operation_result = self.client.failover_data_guard_association(database_id, data_guard_association_id, failover_data_guard_association_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_guard_association_id = operation_result.data.id @@ -6522,8 +6583,9 @@ def launch_autonomous_exadata_infrastructure_and_wait_for_work_request(self, lau operation_result = self.client.launch_autonomous_exadata_infrastructure(launch_autonomous_exadata_infrastructure_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, @@ -6556,7 +6618,6 @@ def launch_autonomous_exadata_infrastructure_and_wait_for_state(self, launch_aut operation_result = self.client.launch_autonomous_exadata_infrastructure(launch_autonomous_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_exadata_infrastructure_id = operation_result.data.id @@ -6607,8 +6668,9 @@ def launch_db_system_and_wait_for_work_request(self, launch_db_system_details, w operation_result = self.client.launch_db_system(launch_db_system_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, @@ -6648,7 +6710,6 @@ def launch_db_system_and_wait_for_state(self, launch_db_system_details, wait_for operation_result = self.client.launch_db_system(launch_db_system_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_system_id = operation_result.data.id @@ -6697,8 +6758,9 @@ def local_clone_pluggable_database_and_wait_for_work_request(self, local_clone_p operation_result = self.client.local_clone_pluggable_database(local_clone_pluggable_database_details, pluggable_database_id, **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, @@ -6736,7 +6798,6 @@ def local_clone_pluggable_database_and_wait_for_state(self, local_clone_pluggabl operation_result = self.client.local_clone_pluggable_database(local_clone_pluggable_database_details, pluggable_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -6782,8 +6843,9 @@ def migrate_exadata_db_system_resource_model_and_wait_for_work_request(self, db_ operation_result = self.client.migrate_exadata_db_system_resource_model(db_system_id, **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, @@ -6822,8 +6884,9 @@ def migrate_vault_key_and_wait_for_work_request(self, database_id, migrate_vault operation_result = self.client.migrate_vault_key(database_id, migrate_vault_key_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, @@ -6861,7 +6924,6 @@ def migrate_vault_key_and_wait_for_state(self, database_id, migrate_vault_key_de operation_result = self.client.migrate_vault_key(database_id, migrate_vault_key_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -6910,8 +6972,9 @@ def modify_database_management_and_wait_for_work_request(self, database_id, modi operation_result = self.client.modify_database_management(database_id, modify_database_management_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, @@ -6949,7 +7012,6 @@ def modify_database_management_and_wait_for_state(self, database_id, modify_data operation_result = self.client.modify_database_management(database_id, modify_database_management_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -6998,8 +7060,9 @@ def modify_pluggable_database_management_and_wait_for_work_request(self, pluggab operation_result = self.client.modify_pluggable_database_management(pluggable_database_id, modify_pluggable_database_management_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, @@ -7037,7 +7100,6 @@ def modify_pluggable_database_management_and_wait_for_state(self, pluggable_data operation_result = self.client.modify_pluggable_database_management(pluggable_database_id, modify_pluggable_database_management_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -7083,8 +7145,9 @@ def refresh_pluggable_database_and_wait_for_work_request(self, pluggable_databas operation_result = self.client.refresh_pluggable_database(pluggable_database_id, **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, @@ -7119,7 +7182,6 @@ def refresh_pluggable_database_and_wait_for_state(self, pluggable_database_id, w operation_result = self.client.refresh_pluggable_database(pluggable_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -7165,8 +7227,9 @@ def register_autonomous_database_data_safe_and_wait_for_work_request(self, auton operation_result = self.client.register_autonomous_database_data_safe(autonomous_database_id, **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, @@ -7207,8 +7270,9 @@ def reinstate_autonomous_container_database_dataguard_association_and_wait_for_w operation_result = self.client.reinstate_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, **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, @@ -7248,7 +7312,6 @@ def reinstate_autonomous_container_database_dataguard_association_and_wait_for_s operation_result = self.client.reinstate_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_dataguard_association_id = operation_result.data.id @@ -7302,8 +7365,9 @@ def reinstate_data_guard_association_and_wait_for_work_request(self, database_id operation_result = self.client.reinstate_data_guard_association(database_id, data_guard_association_id, reinstate_data_guard_association_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, @@ -7346,7 +7410,6 @@ def reinstate_data_guard_association_and_wait_for_state(self, database_id, data_ operation_result = self.client.reinstate_data_guard_association(database_id, data_guard_association_id, reinstate_data_guard_association_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_guard_association_id = operation_result.data.id @@ -7395,8 +7458,9 @@ def remote_clone_pluggable_database_and_wait_for_work_request(self, remote_clone operation_result = self.client.remote_clone_pluggable_database(remote_clone_pluggable_database_details, pluggable_database_id, **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, @@ -7434,7 +7498,6 @@ def remote_clone_pluggable_database_and_wait_for_state(self, remote_clone_plugga operation_result = self.client.remote_clone_pluggable_database(remote_clone_pluggable_database_details, pluggable_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -7483,8 +7546,9 @@ def remove_virtual_machine_from_cloud_vm_cluster_and_wait_for_work_request(self, operation_result = self.client.remove_virtual_machine_from_cloud_vm_cluster(remove_virtual_machine_from_cloud_vm_cluster_details, cloud_vm_cluster_id, **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, @@ -7522,7 +7586,6 @@ def remove_virtual_machine_from_cloud_vm_cluster_and_wait_for_state(self, remove operation_result = self.client.remove_virtual_machine_from_cloud_vm_cluster(remove_virtual_machine_from_cloud_vm_cluster_details, cloud_vm_cluster_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_vm_cluster_id = operation_result.data.id @@ -7571,8 +7634,9 @@ def remove_virtual_machine_from_vm_cluster_and_wait_for_work_request(self, remov operation_result = self.client.remove_virtual_machine_from_vm_cluster(remove_virtual_machine_from_vm_cluster_details, vm_cluster_id, **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, @@ -7610,7 +7674,6 @@ def remove_virtual_machine_from_vm_cluster_and_wait_for_state(self, remove_virtu operation_result = self.client.remove_virtual_machine_from_vm_cluster(remove_virtual_machine_from_vm_cluster_details, vm_cluster_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_id = operation_result.data.id @@ -7664,8 +7727,9 @@ def resize_vm_cluster_network_and_wait_for_work_request(self, exadata_infrastruc operation_result = self.client.resize_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, resize_vm_cluster_network_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, @@ -7708,7 +7772,6 @@ def resize_vm_cluster_network_and_wait_for_state(self, exadata_infrastructure_id operation_result = self.client.resize_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, resize_vm_cluster_network_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_network_id = operation_result.data.id @@ -7754,8 +7817,9 @@ def restart_autonomous_container_database_and_wait_for_work_request(self, autono operation_result = self.client.restart_autonomous_container_database(autonomous_container_database_id, **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, @@ -7790,7 +7854,6 @@ def restart_autonomous_container_database_and_wait_for_state(self, autonomous_co operation_result = self.client.restart_autonomous_container_database(autonomous_container_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_id = operation_result.data.id @@ -7836,8 +7899,9 @@ def restart_autonomous_database_and_wait_for_work_request(self, autonomous_datab operation_result = self.client.restart_autonomous_database(autonomous_database_id, **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, @@ -7872,7 +7936,6 @@ def restart_autonomous_database_and_wait_for_state(self, autonomous_database_id, operation_result = self.client.restart_autonomous_database(autonomous_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -7921,8 +7984,9 @@ def restore_autonomous_database_and_wait_for_work_request(self, autonomous_datab operation_result = self.client.restore_autonomous_database(autonomous_database_id, restore_autonomous_database_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, @@ -7960,7 +8024,6 @@ def restore_autonomous_database_and_wait_for_state(self, autonomous_database_id, operation_result = self.client.restore_autonomous_database(autonomous_database_id, restore_autonomous_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -8009,8 +8072,9 @@ def restore_database_and_wait_for_work_request(self, database_id, restore_databa operation_result = self.client.restore_database(database_id, restore_database_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, @@ -8048,7 +8112,6 @@ def restore_database_and_wait_for_state(self, database_id, restore_database_deta operation_result = self.client.restore_database(database_id, restore_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -8094,8 +8157,9 @@ def rotate_autonomous_container_database_encryption_key_and_wait_for_work_reques operation_result = self.client.rotate_autonomous_container_database_encryption_key(autonomous_container_database_id, **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, @@ -8130,7 +8194,6 @@ def rotate_autonomous_container_database_encryption_key_and_wait_for_state(self, operation_result = self.client.rotate_autonomous_container_database_encryption_key(autonomous_container_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_id = operation_result.data.id @@ -8176,8 +8239,9 @@ def rotate_autonomous_database_encryption_key_and_wait_for_work_request(self, au operation_result = self.client.rotate_autonomous_database_encryption_key(autonomous_database_id, **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, @@ -8212,7 +8276,6 @@ def rotate_autonomous_database_encryption_key_and_wait_for_state(self, autonomou operation_result = self.client.rotate_autonomous_database_encryption_key(autonomous_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -8261,8 +8324,9 @@ def rotate_autonomous_vm_cluster_ords_certs_and_wait_for_work_request(self, rota operation_result = self.client.rotate_autonomous_vm_cluster_ords_certs(rotate_autonomous_vm_cluster_ords_certs_details, autonomous_vm_cluster_id, **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, @@ -8301,8 +8365,9 @@ def rotate_autonomous_vm_cluster_ssl_certs_and_wait_for_work_request(self, rotat operation_result = self.client.rotate_autonomous_vm_cluster_ssl_certs(rotate_autonomous_vm_cluster_ssl_certs_details, autonomous_vm_cluster_id, **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, @@ -8338,8 +8403,9 @@ def rotate_cloud_autonomous_vm_cluster_ords_certs_and_wait_for_work_request(self operation_result = self.client.rotate_cloud_autonomous_vm_cluster_ords_certs(cloud_autonomous_vm_cluster_id, **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, @@ -8375,8 +8441,9 @@ def rotate_cloud_autonomous_vm_cluster_ssl_certs_and_wait_for_work_request(self, operation_result = self.client.rotate_cloud_autonomous_vm_cluster_ssl_certs(cloud_autonomous_vm_cluster_id, **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, @@ -8412,8 +8479,9 @@ def rotate_ords_certs_and_wait_for_work_request(self, autonomous_exadata_infrast operation_result = self.client.rotate_ords_certs(autonomous_exadata_infrastructure_id, **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, @@ -8449,8 +8517,9 @@ def rotate_pluggable_database_encryption_key_and_wait_for_work_request(self, plu operation_result = self.client.rotate_pluggable_database_encryption_key(pluggable_database_id, **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, @@ -8486,8 +8555,9 @@ def rotate_ssl_certs_and_wait_for_work_request(self, autonomous_exadata_infrastr operation_result = self.client.rotate_ssl_certs(autonomous_exadata_infrastructure_id, **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, @@ -8523,8 +8593,9 @@ def rotate_vault_key_and_wait_for_work_request(self, database_id, work_request_s operation_result = self.client.rotate_vault_key(database_id, **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, @@ -8559,7 +8630,6 @@ def rotate_vault_key_and_wait_for_state(self, database_id, wait_for_states=[], o operation_result = self.client.rotate_vault_key(database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -8611,8 +8681,9 @@ def scan_external_container_database_pluggable_databases_and_wait_for_work_reque operation_result = self.client.scan_external_container_database_pluggable_databases(external_container_database_id, external_database_connector_id, **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, @@ -8648,8 +8719,9 @@ def shrink_autonomous_database_and_wait_for_work_request(self, autonomous_databa operation_result = self.client.shrink_autonomous_database(autonomous_database_id, **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, @@ -8684,7 +8756,6 @@ def shrink_autonomous_database_and_wait_for_state(self, autonomous_database_id, operation_result = self.client.shrink_autonomous_database(autonomous_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -8730,8 +8801,9 @@ def start_autonomous_database_and_wait_for_work_request(self, autonomous_databas operation_result = self.client.start_autonomous_database(autonomous_database_id, **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, @@ -8766,7 +8838,6 @@ def start_autonomous_database_and_wait_for_state(self, autonomous_database_id, w operation_result = self.client.start_autonomous_database(autonomous_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -8812,8 +8883,9 @@ def start_pluggable_database_and_wait_for_work_request(self, pluggable_database_ operation_result = self.client.start_pluggable_database(pluggable_database_id, **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, @@ -8848,7 +8920,6 @@ def start_pluggable_database_and_wait_for_state(self, pluggable_database_id, wai operation_result = self.client.start_pluggable_database(pluggable_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -8894,8 +8965,9 @@ def stop_autonomous_database_and_wait_for_work_request(self, autonomous_database operation_result = self.client.stop_autonomous_database(autonomous_database_id, **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, @@ -8930,7 +9002,6 @@ def stop_autonomous_database_and_wait_for_state(self, autonomous_database_id, wa operation_result = self.client.stop_autonomous_database(autonomous_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -8976,8 +9047,9 @@ def stop_pluggable_database_and_wait_for_work_request(self, pluggable_database_i operation_result = self.client.stop_pluggable_database(pluggable_database_id, **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, @@ -9012,7 +9084,6 @@ def stop_pluggable_database_and_wait_for_state(self, pluggable_database_id, wait operation_result = self.client.stop_pluggable_database(pluggable_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -9063,8 +9134,9 @@ def switchover_autonomous_container_database_dataguard_association_and_wait_for_ operation_result = self.client.switchover_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, **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, @@ -9104,7 +9176,6 @@ def switchover_autonomous_container_database_dataguard_association_and_wait_for_ operation_result = self.client.switchover_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_dataguard_association_id = operation_result.data.id @@ -9150,8 +9221,9 @@ def switchover_autonomous_database_and_wait_for_work_request(self, autonomous_da operation_result = self.client.switchover_autonomous_database(autonomous_database_id, **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, @@ -9186,7 +9258,6 @@ def switchover_autonomous_database_and_wait_for_state(self, autonomous_database_ operation_result = self.client.switchover_autonomous_database(autonomous_database_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -9240,8 +9311,9 @@ def switchover_data_guard_association_and_wait_for_work_request(self, database_i operation_result = self.client.switchover_data_guard_association(database_id, data_guard_association_id, switchover_data_guard_association_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, @@ -9284,7 +9356,6 @@ def switchover_data_guard_association_and_wait_for_state(self, database_id, data operation_result = self.client.switchover_data_guard_association(database_id, data_guard_association_id, switchover_data_guard_association_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_guard_association_id = operation_result.data.id @@ -9330,8 +9401,9 @@ def terminate_autonomous_container_database_and_wait_for_work_request(self, auto operation_result = self.client.terminate_autonomous_container_database(autonomous_container_database_id, **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, @@ -9367,8 +9439,9 @@ def terminate_autonomous_exadata_infrastructure_and_wait_for_work_request(self, operation_result = self.client.terminate_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id, **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, @@ -9404,8 +9477,9 @@ def terminate_db_system_and_wait_for_work_request(self, db_system_id, work_reque operation_result = self.client.terminate_db_system(db_system_id, **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, @@ -9444,8 +9518,9 @@ def update_autonomous_container_database_and_wait_for_work_request(self, autonom operation_result = self.client.update_autonomous_container_database(autonomous_container_database_id, update_autonomous_container_database_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, @@ -9483,7 +9558,6 @@ def update_autonomous_container_database_and_wait_for_state(self, autonomous_con operation_result = self.client.update_autonomous_container_database(autonomous_container_database_id, update_autonomous_container_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_id = operation_result.data.id @@ -9537,8 +9611,9 @@ def update_autonomous_container_database_dataguard_association_and_wait_for_work operation_result = self.client.update_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, update_autonomous_container_database_data_guard_association_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, @@ -9581,7 +9656,6 @@ def update_autonomous_container_database_dataguard_association_and_wait_for_stat operation_result = self.client.update_autonomous_container_database_dataguard_association(autonomous_container_database_id, autonomous_container_database_dataguard_association_id, update_autonomous_container_database_data_guard_association_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_container_database_dataguard_association_id = operation_result.data.id @@ -9630,8 +9704,9 @@ def update_autonomous_database_and_wait_for_work_request(self, autonomous_databa operation_result = self.client.update_autonomous_database(autonomous_database_id, update_autonomous_database_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, @@ -9669,7 +9744,6 @@ def update_autonomous_database_and_wait_for_state(self, autonomous_database_id, operation_result = self.client.update_autonomous_database(autonomous_database_id, update_autonomous_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_id = operation_result.data.id @@ -9718,8 +9792,9 @@ def update_autonomous_database_backup_and_wait_for_work_request(self, autonomous operation_result = self.client.update_autonomous_database_backup(autonomous_database_backup_id, update_autonomous_database_backup_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, @@ -9757,7 +9832,6 @@ def update_autonomous_database_backup_and_wait_for_state(self, autonomous_databa operation_result = self.client.update_autonomous_database_backup(autonomous_database_backup_id, update_autonomous_database_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_database_backup_id = operation_result.data.id @@ -9801,8 +9875,9 @@ def update_autonomous_database_regional_wallet_and_wait_for_work_request(self, u operation_result = self.client.update_autonomous_database_regional_wallet(update_autonomous_database_wallet_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, @@ -9841,8 +9916,9 @@ def update_autonomous_database_wallet_and_wait_for_work_request(self, autonomous operation_result = self.client.update_autonomous_database_wallet(autonomous_database_id, update_autonomous_database_wallet_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, @@ -9881,8 +9957,9 @@ def update_autonomous_exadata_infrastructure_and_wait_for_work_request(self, aut operation_result = self.client.update_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id, update_autonomous_exadata_infrastructures_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, @@ -9920,7 +9997,6 @@ def update_autonomous_exadata_infrastructure_and_wait_for_state(self, autonomous operation_result = self.client.update_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id, update_autonomous_exadata_infrastructures_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_exadata_infrastructure_id = operation_result.data.id @@ -9969,8 +10045,9 @@ def update_autonomous_vm_cluster_and_wait_for_work_request(self, autonomous_vm_c operation_result = self.client.update_autonomous_vm_cluster(autonomous_vm_cluster_id, update_autonomous_vm_cluster_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, @@ -10008,7 +10085,6 @@ def update_autonomous_vm_cluster_and_wait_for_state(self, autonomous_vm_cluster_ operation_result = self.client.update_autonomous_vm_cluster(autonomous_vm_cluster_id, update_autonomous_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] autonomous_vm_cluster_id = operation_result.data.id @@ -10057,7 +10133,6 @@ def update_backup_destination_and_wait_for_state(self, backup_destination_id, up operation_result = self.client.update_backup_destination(backup_destination_id, update_backup_destination_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] backup_destination_id = operation_result.data.id @@ -10106,8 +10181,9 @@ def update_cloud_autonomous_vm_cluster_and_wait_for_work_request(self, cloud_aut operation_result = self.client.update_cloud_autonomous_vm_cluster(cloud_autonomous_vm_cluster_id, update_cloud_autonomous_vm_cluster_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, @@ -10145,7 +10221,6 @@ def update_cloud_autonomous_vm_cluster_and_wait_for_state(self, cloud_autonomous operation_result = self.client.update_cloud_autonomous_vm_cluster(cloud_autonomous_vm_cluster_id, update_cloud_autonomous_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_autonomous_vm_cluster_id = operation_result.data.id @@ -10194,8 +10269,9 @@ def update_cloud_exadata_infrastructure_and_wait_for_work_request(self, cloud_ex operation_result = self.client.update_cloud_exadata_infrastructure(cloud_exadata_infrastructure_id, update_cloud_exadata_infrastructure_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, @@ -10233,7 +10309,6 @@ def update_cloud_exadata_infrastructure_and_wait_for_state(self, cloud_exadata_i operation_result = self.client.update_cloud_exadata_infrastructure(cloud_exadata_infrastructure_id, update_cloud_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_exadata_infrastructure_id = operation_result.data.id @@ -10282,8 +10357,9 @@ def update_cloud_vm_cluster_and_wait_for_work_request(self, cloud_vm_cluster_id, operation_result = self.client.update_cloud_vm_cluster(cloud_vm_cluster_id, update_cloud_vm_cluster_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, @@ -10321,7 +10397,6 @@ def update_cloud_vm_cluster_and_wait_for_state(self, cloud_vm_cluster_id, update operation_result = self.client.update_cloud_vm_cluster(cloud_vm_cluster_id, update_cloud_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cloud_vm_cluster_id = operation_result.data.id @@ -10370,8 +10445,9 @@ def update_cloud_vm_cluster_iorm_config_and_wait_for_work_request(self, cloud_vm operation_result = self.client.update_cloud_vm_cluster_iorm_config(cloud_vm_cluster_id, cloud_vm_cluster_iorm_config_update_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, @@ -10413,8 +10489,9 @@ def update_console_connection_and_wait_for_work_request(self, db_node_id, consol operation_result = self.client.update_console_connection(db_node_id, console_connection_id, update_console_connection_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, @@ -10455,7 +10532,6 @@ def update_console_connection_and_wait_for_state(self, db_node_id, console_conne operation_result = self.client.update_console_connection(db_node_id, console_connection_id, update_console_connection_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] console_connection_id = operation_result.data.id @@ -10507,8 +10583,9 @@ def update_console_history_and_wait_for_work_request(self, db_node_id, console_h operation_result = self.client.update_console_history(db_node_id, console_history_id, update_console_history_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, @@ -10549,7 +10626,6 @@ def update_console_history_and_wait_for_state(self, db_node_id, console_history_ operation_result = self.client.update_console_history(db_node_id, console_history_id, update_console_history_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] console_history_id = operation_result.data.id @@ -10603,8 +10679,9 @@ def update_data_guard_association_and_wait_for_work_request(self, database_id, d operation_result = self.client.update_data_guard_association(database_id, data_guard_association_id, update_data_guard_association_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, @@ -10647,7 +10724,6 @@ def update_data_guard_association_and_wait_for_state(self, database_id, data_gua operation_result = self.client.update_data_guard_association(database_id, data_guard_association_id, update_data_guard_association_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] data_guard_association_id = operation_result.data.id @@ -10696,8 +10772,9 @@ def update_database_and_wait_for_work_request(self, database_id, update_database operation_result = self.client.update_database(database_id, update_database_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, @@ -10735,7 +10812,6 @@ def update_database_and_wait_for_state(self, database_id, update_database_detail operation_result = self.client.update_database(database_id, update_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -10783,7 +10859,6 @@ def update_database_software_image_and_wait_for_state(self, database_software_im operation_result = self.client.update_database_software_image(database_software_image_id, update_database_software_image_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_software_image_id = operation_result.data.id @@ -10832,8 +10907,9 @@ def update_db_home_and_wait_for_work_request(self, db_home_id, update_db_home_de operation_result = self.client.update_db_home(db_home_id, update_db_home_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, @@ -10871,7 +10947,6 @@ def update_db_home_and_wait_for_state(self, db_home_id, update_db_home_details, operation_result = self.client.update_db_home(db_home_id, update_db_home_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_home_id = operation_result.data.id @@ -10920,8 +10995,9 @@ def update_db_node_and_wait_for_work_request(self, db_node_id, update_db_node_de operation_result = self.client.update_db_node(db_node_id, update_db_node_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, @@ -10959,7 +11035,6 @@ def update_db_node_and_wait_for_state(self, db_node_id, update_db_node_details, operation_result = self.client.update_db_node(db_node_id, update_db_node_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_node_id = operation_result.data.id @@ -11008,8 +11083,9 @@ def update_db_system_and_wait_for_work_request(self, db_system_id, update_db_sys operation_result = self.client.update_db_system(db_system_id, update_db_system_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, @@ -11047,7 +11123,6 @@ def update_db_system_and_wait_for_state(self, db_system_id, update_db_system_det operation_result = self.client.update_db_system(db_system_id, update_db_system_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_system_id = operation_result.data.id @@ -11096,8 +11171,9 @@ def update_exadata_infrastructure_and_wait_for_work_request(self, exadata_infras operation_result = self.client.update_exadata_infrastructure(exadata_infrastructure_id, update_exadata_infrastructure_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, @@ -11135,7 +11211,6 @@ def update_exadata_infrastructure_and_wait_for_state(self, exadata_infrastructur operation_result = self.client.update_exadata_infrastructure(exadata_infrastructure_id, update_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] exadata_infrastructure_id = operation_result.data.id @@ -11184,8 +11259,9 @@ def update_exadata_iorm_config_and_wait_for_work_request(self, db_system_id, exa operation_result = self.client.update_exadata_iorm_config(db_system_id, exadata_iorm_config_update_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, @@ -11223,7 +11299,6 @@ def update_exadata_iorm_config_and_wait_for_state(self, db_system_id, exadata_io operation_result = self.client.update_exadata_iorm_config(db_system_id, exadata_iorm_config_update_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_system_id = operation_result.data.id @@ -11273,8 +11348,9 @@ def update_external_container_database_and_wait_for_work_request(self, external_ operation_result = self.client.update_external_container_database(external_container_database_id, update_external_container_database_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, @@ -11313,7 +11389,6 @@ def update_external_container_database_and_wait_for_state(self, external_contain operation_result = self.client.update_external_container_database(external_container_database_id, update_external_container_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_container_database_id = operation_result.data.id @@ -11363,8 +11438,9 @@ def update_external_database_connector_and_wait_for_work_request(self, external_ operation_result = self.client.update_external_database_connector(external_database_connector_id, update_external_database_connector_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, @@ -11403,7 +11479,6 @@ def update_external_database_connector_and_wait_for_state(self, external_databas operation_result = self.client.update_external_database_connector(external_database_connector_id, update_external_database_connector_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_database_connector_id = operation_result.data.id @@ -11452,8 +11527,9 @@ def update_external_non_container_database_and_wait_for_work_request(self, exter operation_result = self.client.update_external_non_container_database(external_non_container_database_id, update_external_non_container_database_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, @@ -11491,7 +11567,6 @@ def update_external_non_container_database_and_wait_for_state(self, external_non operation_result = self.client.update_external_non_container_database(external_non_container_database_id, update_external_non_container_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_non_container_database_id = operation_result.data.id @@ -11540,8 +11615,9 @@ def update_external_pluggable_database_and_wait_for_work_request(self, external_ operation_result = self.client.update_external_pluggable_database(external_pluggable_database_id, update_external_pluggable_database_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, @@ -11579,7 +11655,6 @@ def update_external_pluggable_database_and_wait_for_state(self, external_pluggab operation_result = self.client.update_external_pluggable_database(external_pluggable_database_id, update_external_pluggable_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_pluggable_database_id = operation_result.data.id @@ -11627,7 +11702,6 @@ def update_key_store_and_wait_for_state(self, key_store_id, update_key_store_det operation_result = self.client.update_key_store(key_store_id, update_key_store_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_store_id = operation_result.data.id @@ -11673,7 +11747,6 @@ def update_maintenance_run_and_wait_for_state(self, maintenance_run_id, update_m operation_result = self.client.update_maintenance_run(maintenance_run_id, update_maintenance_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] maintenance_run_id = operation_result.data.id @@ -11721,7 +11794,6 @@ def update_oneoff_patch_and_wait_for_state(self, oneoff_patch_id, update_oneoff_ operation_result = self.client.update_oneoff_patch(oneoff_patch_id, update_oneoff_patch_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] oneoff_patch_id = operation_result.data.id @@ -11770,8 +11842,9 @@ def update_pluggable_database_and_wait_for_work_request(self, pluggable_database operation_result = self.client.update_pluggable_database(pluggable_database_id, update_pluggable_database_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, @@ -11809,7 +11882,6 @@ def update_pluggable_database_and_wait_for_state(self, pluggable_database_id, up operation_result = self.client.update_pluggable_database(pluggable_database_id, update_pluggable_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] pluggable_database_id = operation_result.data.id @@ -11858,8 +11930,9 @@ def update_vm_cluster_and_wait_for_work_request(self, vm_cluster_id, update_vm_c operation_result = self.client.update_vm_cluster(vm_cluster_id, update_vm_cluster_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, @@ -11897,7 +11970,6 @@ def update_vm_cluster_and_wait_for_state(self, vm_cluster_id, update_vm_cluster_ operation_result = self.client.update_vm_cluster(vm_cluster_id, update_vm_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_id = operation_result.data.id @@ -11951,8 +12023,9 @@ def update_vm_cluster_network_and_wait_for_work_request(self, exadata_infrastruc operation_result = self.client.update_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, update_vm_cluster_network_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, @@ -11995,7 +12068,6 @@ def update_vm_cluster_network_and_wait_for_state(self, exadata_infrastructure_id operation_result = self.client.update_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, update_vm_cluster_network_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_network_id = operation_result.data.id @@ -12044,8 +12116,9 @@ def upgrade_database_and_wait_for_work_request(self, database_id, upgrade_databa operation_result = self.client.upgrade_database(database_id, upgrade_database_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, @@ -12083,7 +12156,6 @@ def upgrade_database_and_wait_for_state(self, database_id, upgrade_database_deta operation_result = self.client.upgrade_database(database_id, upgrade_database_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_id = operation_result.data.id @@ -12132,8 +12204,9 @@ def upgrade_db_system_and_wait_for_work_request(self, db_system_id, upgrade_db_s operation_result = self.client.upgrade_db_system(db_system_id, upgrade_db_system_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, @@ -12171,7 +12244,6 @@ def upgrade_db_system_and_wait_for_state(self, db_system_id, upgrade_db_system_d operation_result = self.client.upgrade_db_system(db_system_id, upgrade_db_system_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_system_id = operation_result.data.id @@ -12222,8 +12294,9 @@ def validate_vm_cluster_network_and_wait_for_work_request(self, exadata_infrastr operation_result = self.client.validate_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, **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, @@ -12263,7 +12336,6 @@ def validate_vm_cluster_network_and_wait_for_state(self, exadata_infrastructure_ operation_result = self.client.validate_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vm_cluster_network_id = operation_result.data.id diff --git a/src/oci/database_management/db_management_client_composite_operations.py b/src/oci/database_management/db_management_client_composite_operations.py index e54f8b67e..4283bd380 100644 --- a/src/oci/database_management/db_management_client_composite_operations.py +++ b/src/oci/database_management/db_management_client_composite_operations.py @@ -53,8 +53,9 @@ def change_external_db_system_compartment_and_wait_for_state(self, external_db_s operation_result = self.client.change_external_db_system_compartment(external_db_system_id, change_external_db_system_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: @@ -96,8 +97,9 @@ def change_external_exadata_infrastructure_compartment_and_wait_for_state(self, operation_result = self.client.change_external_exadata_infrastructure_compartment(external_exadata_infrastructure_id, change_external_exadata_infrastructure_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: @@ -136,7 +138,6 @@ def check_external_db_system_connector_connection_status_and_wait_for_state(self operation_result = self.client.check_external_db_system_connector_connection_status(external_db_system_connector_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_db_system_connector_id = operation_result.data.id @@ -179,8 +180,9 @@ def create_db_management_private_endpoint_and_wait_for_state(self, create_db_man operation_result = self.client.create_db_management_private_endpoint(create_db_management_private_endpoint_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: @@ -217,8 +219,9 @@ def create_external_db_system_and_wait_for_state(self, create_external_db_system operation_result = self.client.create_external_db_system(create_external_db_system_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: @@ -255,7 +258,6 @@ def create_external_db_system_connector_and_wait_for_state(self, create_external operation_result = self.client.create_external_db_system_connector(create_external_db_system_connector_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_db_system_connector_id = operation_result.data.id @@ -298,8 +300,9 @@ def create_external_db_system_discovery_and_wait_for_state(self, create_external operation_result = self.client.create_external_db_system_discovery(create_external_db_system_discovery_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: @@ -336,7 +339,6 @@ def create_external_exadata_infrastructure_and_wait_for_state(self, create_exter operation_result = self.client.create_external_exadata_infrastructure(create_external_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_exadata_infrastructure_id = operation_result.data.id @@ -379,7 +381,6 @@ def create_external_exadata_storage_connector_and_wait_for_state(self, create_ex operation_result = self.client.create_external_exadata_storage_connector(create_external_exadata_storage_connector_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_exadata_storage_connector_id = operation_result.data.id @@ -422,7 +423,6 @@ def create_job_and_wait_for_state(self, create_job_details, wait_for_states=[], operation_result = self.client.create_job(create_job_details, **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 @@ -465,7 +465,6 @@ def create_managed_database_group_and_wait_for_state(self, create_managed_databa operation_result = self.client.create_managed_database_group(create_managed_database_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_database_group_id = operation_result.data.id @@ -518,8 +517,9 @@ def delete_db_management_private_endpoint_and_wait_for_state(self, db_management 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: @@ -566,8 +566,9 @@ def delete_external_db_system_and_wait_for_state(self, external_db_system_id, wa 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: @@ -615,7 +616,6 @@ def delete_external_db_system_connector_and_wait_for_state(self, external_db_sys if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -677,7 +677,6 @@ def delete_external_db_system_discovery_and_wait_for_state(self, external_db_sys if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -738,8 +737,9 @@ def delete_external_exadata_infrastructure_and_wait_for_state(self, external_exa 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: @@ -787,7 +787,6 @@ def delete_external_exadata_storage_connector_and_wait_for_state(self, external_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -847,7 +846,6 @@ def delete_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kw if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -909,7 +907,6 @@ def delete_managed_database_group_and_wait_for_state(self, managed_database_grou if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -962,8 +959,9 @@ def disable_external_db_system_database_management_and_wait_for_state(self, exte operation_result = self.client.disable_external_db_system_database_management(external_db_system_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: @@ -1002,8 +1000,9 @@ def disable_external_db_system_stack_monitoring_and_wait_for_state(self, externa operation_result = self.client.disable_external_db_system_stack_monitoring(external_db_system_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: @@ -1042,8 +1041,9 @@ def disable_external_exadata_infrastructure_management_and_wait_for_state(self, operation_result = self.client.disable_external_exadata_infrastructure_management(external_exadata_infrastructure_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: @@ -1085,8 +1085,9 @@ def enable_external_db_system_database_management_and_wait_for_state(self, exter operation_result = self.client.enable_external_db_system_database_management(external_db_system_id, enable_external_db_system_database_management_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: @@ -1128,8 +1129,9 @@ def enable_external_db_system_stack_monitoring_and_wait_for_state(self, external operation_result = self.client.enable_external_db_system_stack_monitoring(external_db_system_id, enable_external_db_system_stack_monitoring_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: @@ -1171,8 +1173,9 @@ def enable_external_exadata_infrastructure_management_and_wait_for_state(self, e operation_result = self.client.enable_external_exadata_infrastructure_management(external_exadata_infrastructure_id, enable_external_exadata_infrastructure_management_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: @@ -1214,7 +1217,6 @@ def update_db_management_private_endpoint_and_wait_for_state(self, db_management operation_result = self.client.update_db_management_private_endpoint(db_management_private_endpoint_id, update_db_management_private_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] db_management_private_endpoint_id = operation_result.data.id @@ -1262,8 +1264,9 @@ def update_external_asm_and_wait_for_state(self, external_asm_id, update_externa operation_result = self.client.update_external_asm(external_asm_id, update_external_asm_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: @@ -1305,8 +1308,9 @@ def update_external_cluster_and_wait_for_state(self, external_cluster_id, update operation_result = self.client.update_external_cluster(external_cluster_id, update_external_cluster_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: @@ -1348,8 +1352,9 @@ def update_external_cluster_instance_and_wait_for_state(self, external_cluster_i operation_result = self.client.update_external_cluster_instance(external_cluster_instance_id, update_external_cluster_instance_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: @@ -1391,8 +1396,9 @@ def update_external_db_node_and_wait_for_state(self, external_db_node_id, update operation_result = self.client.update_external_db_node(external_db_node_id, update_external_db_node_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: @@ -1434,7 +1440,6 @@ def update_external_db_system_and_wait_for_state(self, external_db_system_id, up operation_result = self.client.update_external_db_system(external_db_system_id, update_external_db_system_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_db_system_id = operation_result.data.id @@ -1482,8 +1487,9 @@ def update_external_db_system_connector_and_wait_for_state(self, external_db_sys operation_result = self.client.update_external_db_system_connector(external_db_system_connector_id, update_external_db_system_connector_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: @@ -1525,7 +1531,6 @@ def update_external_db_system_discovery_and_wait_for_state(self, external_db_sys operation_result = self.client.update_external_db_system_discovery(external_db_system_discovery_id, update_external_db_system_discovery_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_db_system_discovery_id = operation_result.data.id @@ -1573,7 +1578,6 @@ def update_external_exadata_infrastructure_and_wait_for_state(self, external_exa operation_result = self.client.update_external_exadata_infrastructure(external_exadata_infrastructure_id, update_external_exadata_infrastructure_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_exadata_infrastructure_id = operation_result.data.id @@ -1621,7 +1625,6 @@ def update_external_exadata_storage_connector_and_wait_for_state(self, external_ operation_result = self.client.update_external_exadata_storage_connector(external_exadata_storage_connector_id, update_external_exadata_storage_connector_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] external_exadata_storage_connector_id = operation_result.data.id @@ -1669,8 +1672,9 @@ def update_external_listener_and_wait_for_state(self, external_listener_id, upda operation_result = self.client.update_external_listener(external_listener_id, update_external_listener_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: @@ -1710,7 +1714,6 @@ def update_job_and_wait_for_state(self, job_id, update_job_details, wait_for_sta operation_result = self.client.update_job(job_id, update_job_details, **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 @@ -1758,7 +1761,6 @@ def update_managed_database_group_and_wait_for_state(self, managed_database_grou operation_result = self.client.update_managed_database_group(managed_database_group_id, update_managed_database_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_database_group_id = operation_result.data.id 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 e140801dc..f05d3f065 100644 --- a/src/oci/database_migration/database_migration_client_composite_operations.py +++ b/src/oci/database_migration/database_migration_client_composite_operations.py @@ -46,7 +46,6 @@ def abort_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kwa operation_result = self.client.abort_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 @@ -92,8 +91,9 @@ def clone_migration_and_wait_for_state(self, migration_id, clone_migration_detai operation_result = self.client.clone_migration(migration_id, clone_migration_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: @@ -130,8 +130,9 @@ def create_connection_and_wait_for_state(self, create_connection_details, wait_f operation_result = self.client.create_connection(create_connection_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: @@ -168,8 +169,9 @@ def create_migration_and_wait_for_state(self, create_migration_details, wait_for operation_result = self.client.create_migration(create_migration_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: @@ -214,8 +216,9 @@ def delete_agent_and_wait_for_state(self, agent_id, wait_for_states=[], operatio 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: @@ -260,8 +263,9 @@ def delete_connection_and_wait_for_state(self, connection_id, wait_for_states=[] 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: @@ -307,7 +311,6 @@ def delete_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kw if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -366,8 +369,9 @@ def delete_migration_and_wait_for_state(self, migration_id, wait_for_states=[], 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: @@ -404,8 +408,9 @@ def evaluate_migration_and_wait_for_state(self, migration_id, wait_for_states=[] operation_result = self.client.evaluate_migration(migration_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: @@ -442,7 +447,6 @@ def resume_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kw operation_result = self.client.resume_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 @@ -485,8 +489,9 @@ def start_migration_and_wait_for_state(self, migration_id, wait_for_states=[], o operation_result = self.client.start_migration(migration_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: @@ -526,7 +531,6 @@ def update_agent_and_wait_for_state(self, agent_id, update_agent_details, wait_f operation_result = self.client.update_agent(agent_id, update_agent_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] agent_id = operation_result.data.id @@ -572,8 +576,9 @@ def update_connection_and_wait_for_state(self, connection_id, update_connection_ operation_result = self.client.update_connection(connection_id, update_connection_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: @@ -613,7 +618,6 @@ def update_job_and_wait_for_state(self, job_id, update_job_details, wait_for_sta operation_result = self.client.update_job(job_id, update_job_details, **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 @@ -659,8 +663,9 @@ def update_migration_and_wait_for_state(self, migration_id, update_migration_det operation_result = self.client.update_migration(migration_id, update_migration_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: diff --git a/src/oci/database_tools/database_tools_client_composite_operations.py b/src/oci/database_tools/database_tools_client_composite_operations.py index e5012c582..95271f834 100644 --- a/src/oci/database_tools/database_tools_client_composite_operations.py +++ b/src/oci/database_tools/database_tools_client_composite_operations.py @@ -51,7 +51,6 @@ def add_database_tools_connection_lock_and_wait_for_state(self, database_tools_c operation_result = self.client.add_database_tools_connection_lock(database_tools_connection_id, add_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_tools_connection_id = operation_result.data.id @@ -99,7 +98,6 @@ def add_database_tools_private_endpoint_lock_and_wait_for_state(self, database_t operation_result = self.client.add_database_tools_private_endpoint_lock(database_tools_private_endpoint_id, add_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_tools_private_endpoint_id = operation_result.data.id @@ -147,8 +145,9 @@ def change_database_tools_connection_compartment_and_wait_for_state(self, databa operation_result = self.client.change_database_tools_connection_compartment(database_tools_connection_id, change_database_tools_connection_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: @@ -190,8 +189,9 @@ def change_database_tools_private_endpoint_compartment_and_wait_for_state(self, operation_result = self.client.change_database_tools_private_endpoint_compartment(database_tools_private_endpoint_id, change_database_tools_private_endpoint_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: @@ -228,8 +228,9 @@ def create_database_tools_connection_and_wait_for_state(self, create_database_to operation_result = self.client.create_database_tools_connection(create_database_tools_connection_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: @@ -266,8 +267,9 @@ def create_database_tools_private_endpoint_and_wait_for_state(self, create_datab operation_result = self.client.create_database_tools_private_endpoint(create_database_tools_private_endpoint_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: @@ -314,8 +316,9 @@ def delete_database_tools_connection_and_wait_for_state(self, database_tools_con 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: @@ -362,8 +365,9 @@ def delete_database_tools_private_endpoint_and_wait_for_state(self, database_too 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: @@ -405,7 +409,6 @@ def remove_database_tools_connection_lock_and_wait_for_state(self, database_tool operation_result = self.client.remove_database_tools_connection_lock(database_tools_connection_id, remove_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_tools_connection_id = operation_result.data.id @@ -453,7 +456,6 @@ def remove_database_tools_private_endpoint_lock_and_wait_for_state(self, databas operation_result = self.client.remove_database_tools_private_endpoint_lock(database_tools_private_endpoint_id, remove_resource_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] database_tools_private_endpoint_id = operation_result.data.id @@ -501,8 +503,9 @@ def update_database_tools_connection_and_wait_for_state(self, database_tools_con operation_result = self.client.update_database_tools_connection(database_tools_connection_id, update_database_tools_connection_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: @@ -544,8 +547,9 @@ def update_database_tools_private_endpoint_and_wait_for_state(self, database_too operation_result = self.client.update_database_tools_private_endpoint(database_tools_private_endpoint_id, update_database_tools_private_endpoint_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: diff --git a/src/oci/devops/devops_client_composite_operations.py b/src/oci/devops/devops_client_composite_operations.py index db9fafc60..6c12a3d18 100644 --- a/src/oci/devops/devops_client_composite_operations.py +++ b/src/oci/devops/devops_client_composite_operations.py @@ -49,7 +49,6 @@ def approve_deployment_and_wait_for_state(self, deployment_id, approve_deploymen operation_result = self.client.approve_deployment(deployment_id, approve_deployment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] deployment_id = operation_result.data.id @@ -95,7 +94,6 @@ def cancel_build_run_and_wait_for_state(self, cancel_build_run_details, build_ru operation_result = self.client.cancel_build_run(cancel_build_run_details, build_run_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] build_run_id = operation_result.data.id @@ -141,7 +139,6 @@ def cancel_deployment_and_wait_for_state(self, deployment_id, cancel_deployment_ operation_result = self.client.cancel_deployment(deployment_id, cancel_deployment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] deployment_id = operation_result.data.id @@ -184,8 +181,9 @@ def cancel_scheduled_cascading_project_deletion_and_wait_for_state(self, project operation_result = self.client.cancel_scheduled_cascading_project_deletion(project_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: @@ -225,8 +223,9 @@ def change_project_compartment_and_wait_for_state(self, project_id, change_proje operation_result = self.client.change_project_compartment(project_id, change_project_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: @@ -263,8 +262,9 @@ def create_build_pipeline_and_wait_for_state(self, create_build_pipeline_details operation_result = self.client.create_build_pipeline(create_build_pipeline_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: @@ -301,8 +301,9 @@ def create_build_pipeline_stage_and_wait_for_state(self, create_build_pipeline_s operation_result = self.client.create_build_pipeline_stage(create_build_pipeline_stage_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: @@ -339,7 +340,6 @@ def create_build_run_and_wait_for_state(self, create_build_run_details, wait_for operation_result = self.client.create_build_run(create_build_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] build_run_id = operation_result.data.id @@ -382,8 +382,9 @@ def create_connection_and_wait_for_state(self, create_connection_details, wait_f operation_result = self.client.create_connection(create_connection_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: @@ -420,8 +421,9 @@ def create_deploy_artifact_and_wait_for_state(self, create_deploy_artifact_detai operation_result = self.client.create_deploy_artifact(create_deploy_artifact_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: @@ -458,8 +460,9 @@ def create_deploy_environment_and_wait_for_state(self, create_deploy_environment operation_result = self.client.create_deploy_environment(create_deploy_environment_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: @@ -496,8 +499,9 @@ def create_deploy_pipeline_and_wait_for_state(self, create_deploy_pipeline_detai operation_result = self.client.create_deploy_pipeline(create_deploy_pipeline_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: @@ -534,8 +538,9 @@ def create_deploy_stage_and_wait_for_state(self, create_deploy_stage_details, wa operation_result = self.client.create_deploy_stage(create_deploy_stage_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: @@ -572,7 +577,6 @@ def create_deployment_and_wait_for_state(self, create_deployment_details, wait_f operation_result = self.client.create_deployment(create_deployment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] deployment_id = operation_result.data.id @@ -615,8 +619,9 @@ def create_project_and_wait_for_state(self, create_project_details, wait_for_sta operation_result = self.client.create_project(create_project_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: @@ -653,8 +658,9 @@ def create_repository_and_wait_for_state(self, create_repository_details, wait_f operation_result = self.client.create_repository(create_repository_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: @@ -691,8 +697,9 @@ def create_trigger_and_wait_for_state(self, create_trigger_details, wait_for_sta operation_result = self.client.create_trigger(create_trigger_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: @@ -737,8 +744,9 @@ def delete_build_pipeline_and_wait_for_state(self, build_pipeline_id, wait_for_s 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: @@ -783,8 +791,9 @@ def delete_build_pipeline_stage_and_wait_for_state(self, build_pipeline_stage_id 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: @@ -829,8 +838,9 @@ def delete_connection_and_wait_for_state(self, connection_id, wait_for_states=[] 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: @@ -875,8 +885,9 @@ def delete_deploy_artifact_and_wait_for_state(self, deploy_artifact_id, wait_for 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: @@ -921,8 +932,9 @@ def delete_deploy_environment_and_wait_for_state(self, deploy_environment_id, wa 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: @@ -967,8 +979,9 @@ def delete_deploy_pipeline_and_wait_for_state(self, deploy_pipeline_id, wait_for 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: @@ -1013,8 +1026,9 @@ def delete_deploy_stage_and_wait_for_state(self, deploy_stage_id, wait_for_state 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: @@ -1059,8 +1073,9 @@ def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], oper 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: @@ -1108,8 +1123,9 @@ def delete_ref_and_wait_for_state(self, repository_id, ref_name, wait_for_states 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: @@ -1154,8 +1170,9 @@ def delete_repository_and_wait_for_state(self, repository_id, wait_for_states=[] 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: @@ -1200,8 +1217,9 @@ def delete_trigger_and_wait_for_state(self, trigger_id, wait_for_states=[], oper 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: @@ -1238,8 +1256,9 @@ def mirror_repository_and_wait_for_state(self, repository_id, wait_for_states=[] operation_result = self.client.mirror_repository(repository_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: @@ -1282,8 +1301,9 @@ def put_repository_ref_and_wait_for_state(self, repository_id, ref_name, put_rep operation_result = self.client.put_repository_ref(repository_id, ref_name, put_repository_ref_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: @@ -1320,8 +1340,9 @@ def schedule_cascading_project_deletion_and_wait_for_state(self, project_id, wai operation_result = self.client.schedule_cascading_project_deletion(project_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: @@ -1361,8 +1382,9 @@ def update_build_pipeline_and_wait_for_state(self, build_pipeline_id, update_bui operation_result = self.client.update_build_pipeline(build_pipeline_id, update_build_pipeline_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: @@ -1402,8 +1424,9 @@ def update_build_pipeline_stage_and_wait_for_state(self, build_pipeline_stage_id operation_result = self.client.update_build_pipeline_stage(build_pipeline_stage_id, update_build_pipeline_stage_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: @@ -1443,7 +1466,6 @@ def update_build_run_and_wait_for_state(self, build_run_id, update_build_run_det operation_result = self.client.update_build_run(build_run_id, update_build_run_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] build_run_id = operation_result.data.id @@ -1489,8 +1511,9 @@ def update_connection_and_wait_for_state(self, connection_id, update_connection_ operation_result = self.client.update_connection(connection_id, update_connection_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: @@ -1530,8 +1553,9 @@ def update_deploy_artifact_and_wait_for_state(self, deploy_artifact_id, update_d operation_result = self.client.update_deploy_artifact(deploy_artifact_id, update_deploy_artifact_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: @@ -1571,8 +1595,9 @@ def update_deploy_environment_and_wait_for_state(self, deploy_environment_id, up operation_result = self.client.update_deploy_environment(deploy_environment_id, update_deploy_environment_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: @@ -1612,8 +1637,9 @@ def update_deploy_pipeline_and_wait_for_state(self, deploy_pipeline_id, update_d operation_result = self.client.update_deploy_pipeline(deploy_pipeline_id, update_deploy_pipeline_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: @@ -1653,8 +1679,9 @@ def update_deploy_stage_and_wait_for_state(self, deploy_stage_id, update_deploy_ operation_result = self.client.update_deploy_stage(deploy_stage_id, update_deploy_stage_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: @@ -1694,7 +1721,6 @@ def update_deployment_and_wait_for_state(self, deployment_id, update_deployment_ operation_result = self.client.update_deployment(deployment_id, update_deployment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] deployment_id = operation_result.data.id @@ -1740,8 +1766,9 @@ def update_project_and_wait_for_state(self, project_id, update_project_details, operation_result = self.client.update_project(project_id, update_project_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: @@ -1781,8 +1808,9 @@ def update_repository_and_wait_for_state(self, repository_id, update_repository_ operation_result = self.client.update_repository(repository_id, update_repository_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: @@ -1822,8 +1850,9 @@ def update_trigger_and_wait_for_state(self, trigger_id, update_trigger_details, operation_result = self.client.update_trigger(trigger_id, update_trigger_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: @@ -1860,7 +1889,6 @@ def validate_connection_and_wait_for_state(self, connection_id, wait_for_states= operation_result = self.client.validate_connection(connection_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] connection_id = operation_result.data.id diff --git a/src/oci/disaster_recovery/disaster_recovery_client_composite_operations.py b/src/oci/disaster_recovery/disaster_recovery_client_composite_operations.py index 8d84361a6..db229f43c 100644 --- a/src/oci/disaster_recovery/disaster_recovery_client_composite_operations.py +++ b/src/oci/disaster_recovery/disaster_recovery_client_composite_operations.py @@ -51,8 +51,9 @@ def associate_dr_protection_group_and_wait_for_state(self, associate_dr_protecti operation_result = self.client.associate_dr_protection_group(associate_dr_protection_group_details, dr_protection_group_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: @@ -94,8 +95,9 @@ def cancel_dr_plan_execution_and_wait_for_state(self, cancel_dr_plan_execution_d operation_result = self.client.cancel_dr_plan_execution(cancel_dr_plan_execution_details, dr_plan_execution_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: @@ -137,8 +139,9 @@ def change_dr_protection_group_compartment_and_wait_for_state(self, change_dr_pr operation_result = self.client.change_dr_protection_group_compartment(change_dr_protection_group_compartment_details, dr_protection_group_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: @@ -175,8 +178,9 @@ def create_dr_plan_and_wait_for_state(self, create_dr_plan_details, wait_for_sta operation_result = self.client.create_dr_plan(create_dr_plan_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: @@ -213,8 +217,9 @@ def create_dr_plan_execution_and_wait_for_state(self, create_dr_plan_execution_d operation_result = self.client.create_dr_plan_execution(create_dr_plan_execution_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: @@ -251,8 +256,9 @@ def create_dr_protection_group_and_wait_for_state(self, create_dr_protection_gro operation_result = self.client.create_dr_protection_group(create_dr_protection_group_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: @@ -300,7 +306,6 @@ def delete_dr_plan_and_wait_for_state(self, dr_plan_id, wait_for_states=[], oper if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -361,8 +366,9 @@ def delete_dr_plan_execution_and_wait_for_state(self, dr_plan_execution_id, wait 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: @@ -409,8 +415,9 @@ def delete_dr_protection_group_and_wait_for_state(self, dr_protection_group_id, 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: @@ -452,8 +459,9 @@ def disassociate_dr_protection_group_and_wait_for_state(self, disassociate_dr_pr operation_result = self.client.disassociate_dr_protection_group(disassociate_dr_protection_group_details, dr_protection_group_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: @@ -495,8 +503,9 @@ def ignore_dr_plan_execution_and_wait_for_state(self, ignore_dr_plan_execution_d operation_result = self.client.ignore_dr_plan_execution(ignore_dr_plan_execution_details, dr_plan_execution_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: @@ -538,8 +547,9 @@ def pause_dr_plan_execution_and_wait_for_state(self, pause_dr_plan_execution_det operation_result = self.client.pause_dr_plan_execution(pause_dr_plan_execution_details, dr_plan_execution_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: @@ -581,8 +591,9 @@ def resume_dr_plan_execution_and_wait_for_state(self, resume_dr_plan_execution_d operation_result = self.client.resume_dr_plan_execution(resume_dr_plan_execution_details, dr_plan_execution_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: @@ -624,8 +635,9 @@ def retry_dr_plan_execution_and_wait_for_state(self, retry_dr_plan_execution_det operation_result = self.client.retry_dr_plan_execution(retry_dr_plan_execution_details, dr_plan_execution_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: @@ -667,8 +679,9 @@ def update_dr_plan_and_wait_for_state(self, update_dr_plan_details, dr_plan_id, operation_result = self.client.update_dr_plan(update_dr_plan_details, dr_plan_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: @@ -710,8 +723,9 @@ def update_dr_plan_execution_and_wait_for_state(self, update_dr_plan_execution_d operation_result = self.client.update_dr_plan_execution(update_dr_plan_execution_details, dr_plan_execution_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: @@ -753,8 +767,9 @@ def update_dr_protection_group_and_wait_for_state(self, update_dr_protection_gro operation_result = self.client.update_dr_protection_group(update_dr_protection_group_details, dr_protection_group_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: @@ -796,8 +811,9 @@ def update_dr_protection_group_role_and_wait_for_state(self, update_dr_protectio operation_result = self.client.update_dr_protection_group_role(update_dr_protection_group_role_details, dr_protection_group_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: diff --git a/src/oci/dns/dns_client_composite_operations.py b/src/oci/dns/dns_client_composite_operations.py index 28ee1fd34..22fb9f2a0 100644 --- a/src/oci/dns/dns_client_composite_operations.py +++ b/src/oci/dns/dns_client_composite_operations.py @@ -49,7 +49,6 @@ def create_resolver_endpoint_and_wait_for_state(self, resolver_id, create_resolv operation_result = self.client.create_resolver_endpoint(resolver_id, create_resolver_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] resolver_id = operation_result.data.id @@ -92,7 +91,6 @@ def create_steering_policy_and_wait_for_state(self, create_steering_policy_detai operation_result = self.client.create_steering_policy(create_steering_policy_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] steering_policy_id = operation_result.data.id @@ -135,7 +133,6 @@ def create_steering_policy_attachment_and_wait_for_state(self, create_steering_p operation_result = self.client.create_steering_policy_attachment(create_steering_policy_attachment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] steering_policy_attachment_id = operation_result.data.id @@ -178,7 +175,6 @@ def create_tsig_key_and_wait_for_state(self, create_tsig_key_details, wait_for_s operation_result = self.client.create_tsig_key(create_tsig_key_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tsig_key_id = operation_result.data.id @@ -221,7 +217,6 @@ def create_view_and_wait_for_state(self, create_view_details, wait_for_states=[] operation_result = self.client.create_view(create_view_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] view_id = operation_result.data.id @@ -264,7 +259,6 @@ def create_zone_and_wait_for_state(self, create_zone_details, wait_for_states=[] operation_result = self.client.create_zone(create_zone_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] zone_name_or_id = operation_result.data.id @@ -316,7 +310,6 @@ def delete_steering_policy_and_wait_for_state(self, steering_policy_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -376,7 +369,6 @@ def delete_steering_policy_attachment_and_wait_for_state(self, steering_policy_a if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -436,7 +428,6 @@ def delete_tsig_key_and_wait_for_state(self, tsig_key_id, wait_for_states=[], op if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -496,7 +487,6 @@ def delete_view_and_wait_for_state(self, view_id, wait_for_states=[], operation_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -556,7 +546,6 @@ def delete_zone_and_wait_for_state(self, zone_name_or_id, wait_for_states=[], op if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -610,7 +599,6 @@ def update_resolver_and_wait_for_state(self, resolver_id, update_resolver_detail operation_result = self.client.update_resolver(resolver_id, update_resolver_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] resolver_id = operation_result.data.id @@ -659,7 +647,6 @@ def update_resolver_endpoint_and_wait_for_state(self, resolver_id, resolver_endp operation_result = self.client.update_resolver_endpoint(resolver_id, resolver_endpoint_name, update_resolver_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] resolver_id = operation_result.data.id @@ -705,7 +692,6 @@ def update_steering_policy_and_wait_for_state(self, steering_policy_id, update_s operation_result = self.client.update_steering_policy(steering_policy_id, update_steering_policy_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] steering_policy_id = operation_result.data.id @@ -751,7 +737,6 @@ def update_steering_policy_attachment_and_wait_for_state(self, steering_policy_a operation_result = self.client.update_steering_policy_attachment(steering_policy_attachment_id, update_steering_policy_attachment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] steering_policy_attachment_id = operation_result.data.id @@ -797,7 +782,6 @@ def update_tsig_key_and_wait_for_state(self, tsig_key_id, update_tsig_key_detail operation_result = self.client.update_tsig_key(tsig_key_id, update_tsig_key_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tsig_key_id = operation_result.data.id @@ -843,7 +827,6 @@ def update_view_and_wait_for_state(self, view_id, update_view_details, wait_for_ operation_result = self.client.update_view(view_id, update_view_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] view_id = operation_result.data.id @@ -889,7 +872,6 @@ def update_zone_and_wait_for_state(self, zone_name_or_id, update_zone_details, w operation_result = self.client.update_zone(zone_name_or_id, update_zone_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] zone_name_or_id = operation_result.data.id diff --git a/src/oci/dts/appliance_export_job_client_composite_operations.py b/src/oci/dts/appliance_export_job_client_composite_operations.py index 86c283aae..421b66839 100644 --- a/src/oci/dts/appliance_export_job_client_composite_operations.py +++ b/src/oci/dts/appliance_export_job_client_composite_operations.py @@ -46,7 +46,6 @@ def create_appliance_export_job_and_wait_for_state(self, create_appliance_export operation_result = self.client.create_appliance_export_job(create_appliance_export_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] appliance_export_job_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_appliance_export_job_and_wait_for_state(self, appliance_export_job_id if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_appliance_export_job_and_wait_for_state(self, appliance_export_job_id operation_result = self.client.update_appliance_export_job(appliance_export_job_id, update_appliance_export_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] appliance_export_job_id = operation_result.data.id diff --git a/src/oci/dts/transfer_appliance_client_composite_operations.py b/src/oci/dts/transfer_appliance_client_composite_operations.py index a989ac42b..1dc082ca8 100644 --- a/src/oci/dts/transfer_appliance_client_composite_operations.py +++ b/src/oci/dts/transfer_appliance_client_composite_operations.py @@ -46,7 +46,6 @@ def create_transfer_appliance_and_wait_for_state(self, id, wait_for_states=[], o operation_result = self.client.create_transfer_appliance(id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id @@ -95,7 +94,6 @@ def update_transfer_appliance_and_wait_for_state(self, id, transfer_appliance_la operation_result = self.client.update_transfer_appliance(id, transfer_appliance_label, update_transfer_appliance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id diff --git a/src/oci/dts/transfer_appliance_entitlement_client_composite_operations.py b/src/oci/dts/transfer_appliance_entitlement_client_composite_operations.py index bd37e3bde..5b1bc4694 100644 --- a/src/oci/dts/transfer_appliance_entitlement_client_composite_operations.py +++ b/src/oci/dts/transfer_appliance_entitlement_client_composite_operations.py @@ -46,7 +46,6 @@ def create_transfer_appliance_entitlement_and_wait_for_state(self, create_transf operation_result = self.client.create_transfer_appliance_entitlement(create_transfer_appliance_entitlement_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id diff --git a/src/oci/dts/transfer_device_client_composite_operations.py b/src/oci/dts/transfer_device_client_composite_operations.py index 9393590b2..e7605f6cd 100644 --- a/src/oci/dts/transfer_device_client_composite_operations.py +++ b/src/oci/dts/transfer_device_client_composite_operations.py @@ -52,7 +52,6 @@ def update_transfer_device_and_wait_for_state(self, id, transfer_device_label, u operation_result = self.client.update_transfer_device(id, transfer_device_label, update_transfer_device_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id diff --git a/src/oci/dts/transfer_job_client_composite_operations.py b/src/oci/dts/transfer_job_client_composite_operations.py index 3d4ebe525..7e57c3f5d 100644 --- a/src/oci/dts/transfer_job_client_composite_operations.py +++ b/src/oci/dts/transfer_job_client_composite_operations.py @@ -46,7 +46,6 @@ def create_transfer_job_and_wait_for_state(self, create_transfer_job_details, wa operation_result = self.client.create_transfer_job(create_transfer_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_transfer_job_and_wait_for_state(self, id, wait_for_states=[], operati if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_transfer_job_and_wait_for_state(self, id, update_transfer_job_details operation_result = self.client.update_transfer_job(id, update_transfer_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id diff --git a/src/oci/dts/transfer_package_client_composite_operations.py b/src/oci/dts/transfer_package_client_composite_operations.py index 023b10383..21dbb8854 100644 --- a/src/oci/dts/transfer_package_client_composite_operations.py +++ b/src/oci/dts/transfer_package_client_composite_operations.py @@ -46,7 +46,6 @@ def create_transfer_package_and_wait_for_state(self, id, wait_for_states=[], ope operation_result = self.client.create_transfer_package(id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id @@ -95,7 +94,6 @@ def update_transfer_package_and_wait_for_state(self, id, transfer_package_label, operation_result = self.client.update_transfer_package(id, transfer_package_label, update_transfer_package_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] id = operation_result.data.id diff --git a/src/oci/em_warehouse/em_warehouse_client_composite_operations.py b/src/oci/em_warehouse/em_warehouse_client_composite_operations.py index 829b3e87a..8c147af5a 100644 --- a/src/oci/em_warehouse/em_warehouse_client_composite_operations.py +++ b/src/oci/em_warehouse/em_warehouse_client_composite_operations.py @@ -49,8 +49,9 @@ def change_em_warehouse_compartment_and_wait_for_state(self, em_warehouse_id, ch operation_result = self.client.change_em_warehouse_compartment(em_warehouse_id, change_em_warehouse_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: @@ -87,8 +88,9 @@ def create_em_warehouse_and_wait_for_state(self, create_em_warehouse_details, wa operation_result = self.client.create_em_warehouse(create_em_warehouse_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: @@ -133,8 +135,9 @@ def delete_em_warehouse_and_wait_for_state(self, em_warehouse_id, wait_for_state 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: @@ -174,8 +177,9 @@ def update_em_warehouse_and_wait_for_state(self, em_warehouse_id, update_em_ware operation_result = self.client.update_em_warehouse(em_warehouse_id, update_em_warehouse_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: diff --git a/src/oci/email/email_client_composite_operations.py b/src/oci/email/email_client_composite_operations.py index f670d284a..0235966c2 100644 --- a/src/oci/email/email_client_composite_operations.py +++ b/src/oci/email/email_client_composite_operations.py @@ -51,8 +51,9 @@ def change_email_domain_compartment_and_wait_for_state(self, email_domain_id, ch operation_result = self.client.change_email_domain_compartment(email_domain_id, change_email_domain_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: @@ -89,8 +90,9 @@ def create_dkim_and_wait_for_state(self, create_dkim_details, wait_for_states=[] operation_result = self.client.create_dkim(create_dkim_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: @@ -127,8 +129,9 @@ def create_email_domain_and_wait_for_state(self, create_email_domain_details, wa operation_result = self.client.create_email_domain(create_email_domain_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: @@ -165,7 +168,6 @@ def create_sender_and_wait_for_state(self, create_sender_details, wait_for_state operation_result = self.client.create_sender(create_sender_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] sender_id = operation_result.data.id @@ -218,8 +220,9 @@ def delete_dkim_and_wait_for_state(self, dkim_id, wait_for_states=[], operation_ 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: @@ -266,8 +269,9 @@ def delete_email_domain_and_wait_for_state(self, email_domain_id, wait_for_state 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: @@ -313,7 +317,6 @@ def delete_sender_and_wait_for_state(self, sender_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -369,8 +372,9 @@ def update_dkim_and_wait_for_state(self, dkim_id, update_dkim_details, wait_for_ operation_result = self.client.update_dkim(dkim_id, update_dkim_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: @@ -412,8 +416,9 @@ def update_email_domain_and_wait_for_state(self, email_domain_id, update_email_d operation_result = self.client.update_email_domain(email_domain_id, update_email_domain_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: @@ -453,7 +458,6 @@ def update_sender_and_wait_for_state(self, sender_id, update_sender_details, wai operation_result = self.client.update_sender(sender_id, update_sender_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] sender_id = operation_result.data.id diff --git a/src/oci/events/events_client_composite_operations.py b/src/oci/events/events_client_composite_operations.py index b18dcc2ce..a0bc4b4d8 100644 --- a/src/oci/events/events_client_composite_operations.py +++ b/src/oci/events/events_client_composite_operations.py @@ -46,7 +46,6 @@ def create_rule_and_wait_for_state(self, create_rule_details, wait_for_states=[] operation_result = self.client.create_rule(create_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rule_id = operation_result.data.id @@ -100,7 +99,6 @@ def delete_rule_and_wait_for_state(self, rule_id, wait_for_states=[], operation_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -156,7 +154,6 @@ def update_rule_and_wait_for_state(self, rule_id, update_rule_details, wait_for_ operation_result = self.client.update_rule(rule_id, update_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rule_id = operation_result.data.id diff --git a/src/oci/file_storage/file_storage_client_composite_operations.py b/src/oci/file_storage/file_storage_client_composite_operations.py index c777f2554..cd5b78b86 100644 --- a/src/oci/file_storage/file_storage_client_composite_operations.py +++ b/src/oci/file_storage/file_storage_client_composite_operations.py @@ -46,7 +46,6 @@ def create_export_and_wait_for_state(self, create_export_details, wait_for_state operation_result = self.client.create_export(create_export_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] export_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_file_system_and_wait_for_state(self, create_file_system_details, wait operation_result = self.client.create_file_system(create_file_system_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] file_system_id = operation_result.data.id @@ -132,7 +130,6 @@ def create_filesystem_snapshot_policy_and_wait_for_state(self, create_filesystem operation_result = self.client.create_filesystem_snapshot_policy(create_filesystem_snapshot_policy_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] filesystem_snapshot_policy_id = operation_result.data.id @@ -175,7 +172,6 @@ def create_mount_target_and_wait_for_state(self, create_mount_target_details, wa operation_result = self.client.create_mount_target(create_mount_target_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] mount_target_id = operation_result.data.id @@ -218,7 +214,6 @@ def create_outbound_connector_and_wait_for_state(self, create_outbound_connector operation_result = self.client.create_outbound_connector(create_outbound_connector_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] outbound_connector_id = operation_result.data.id @@ -261,7 +256,6 @@ def create_replication_and_wait_for_state(self, create_replication_details, wait operation_result = self.client.create_replication(create_replication_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] replication_id = operation_result.data.id @@ -304,7 +298,6 @@ def create_snapshot_and_wait_for_state(self, create_snapshot_details, wait_for_s operation_result = self.client.create_snapshot(create_snapshot_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] snapshot_id = operation_result.data.id @@ -358,7 +351,6 @@ def delete_export_and_wait_for_state(self, export_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -420,7 +412,6 @@ def delete_file_system_and_wait_for_state(self, file_system_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -482,7 +473,6 @@ def delete_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snapsh if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -544,7 +534,6 @@ def delete_mount_target_and_wait_for_state(self, mount_target_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -606,7 +595,6 @@ def delete_outbound_connector_and_wait_for_state(self, outbound_connector_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -668,7 +656,6 @@ def delete_replication_and_wait_for_state(self, replication_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -730,7 +717,6 @@ def delete_replication_target_and_wait_for_state(self, replication_target_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -792,7 +778,6 @@ def delete_snapshot_and_wait_for_state(self, snapshot_id, wait_for_states=[], op if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -845,7 +830,6 @@ def pause_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snapsho operation_result = self.client.pause_filesystem_snapshot_policy(filesystem_snapshot_policy_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] filesystem_snapshot_policy_id = operation_result.data.id @@ -890,7 +874,6 @@ def unpause_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snaps operation_result = self.client.unpause_filesystem_snapshot_policy(filesystem_snapshot_policy_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] filesystem_snapshot_policy_id = operation_result.data.id @@ -938,7 +921,6 @@ def update_export_and_wait_for_state(self, export_id, update_export_details, wai operation_result = self.client.update_export(export_id, update_export_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] export_id = operation_result.data.id @@ -986,7 +968,6 @@ def update_export_set_and_wait_for_state(self, export_set_id, update_export_set_ operation_result = self.client.update_export_set(export_set_id, update_export_set_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] export_set_id = operation_result.data.id @@ -1034,7 +1015,6 @@ def update_file_system_and_wait_for_state(self, file_system_id, update_file_syst operation_result = self.client.update_file_system(file_system_id, update_file_system_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] file_system_id = operation_result.data.id @@ -1082,7 +1062,6 @@ def update_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snapsh operation_result = self.client.update_filesystem_snapshot_policy(filesystem_snapshot_policy_id, update_filesystem_snapshot_policy_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] filesystem_snapshot_policy_id = operation_result.data.id @@ -1130,7 +1109,6 @@ def update_mount_target_and_wait_for_state(self, mount_target_id, update_mount_t operation_result = self.client.update_mount_target(mount_target_id, update_mount_target_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] mount_target_id = operation_result.data.id @@ -1178,7 +1156,6 @@ def update_outbound_connector_and_wait_for_state(self, outbound_connector_id, up operation_result = self.client.update_outbound_connector(outbound_connector_id, update_outbound_connector_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] outbound_connector_id = operation_result.data.id @@ -1226,7 +1203,6 @@ def update_replication_and_wait_for_state(self, replication_id, update_replicati operation_result = self.client.update_replication(replication_id, update_replication_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] replication_id = operation_result.data.id @@ -1274,7 +1250,6 @@ def update_snapshot_and_wait_for_state(self, snapshot_id, update_snapshot_detail operation_result = self.client.update_snapshot(snapshot_id, update_snapshot_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] snapshot_id = operation_result.data.id 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 862bf91fd..aeeb27100 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 @@ -49,8 +49,9 @@ def add_fsu_collection_targets_and_wait_for_state(self, fsu_collection_id, add_f operation_result = self.client.add_fsu_collection_targets(fsu_collection_id, add_fsu_collection_targets_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: @@ -90,8 +91,9 @@ def change_fsu_action_compartment_and_wait_for_state(self, fsu_action_id, change operation_result = self.client.change_fsu_action_compartment(fsu_action_id, change_fsu_action_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: @@ -131,8 +133,9 @@ def change_fsu_collection_compartment_and_wait_for_state(self, fsu_collection_id operation_result = self.client.change_fsu_collection_compartment(fsu_collection_id, change_fsu_collection_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: @@ -172,8 +175,9 @@ def change_fsu_cycle_compartment_and_wait_for_state(self, fsu_cycle_id, change_f operation_result = self.client.change_fsu_cycle_compartment(fsu_cycle_id, change_fsu_cycle_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: @@ -213,8 +217,9 @@ def clone_fsu_cycle_and_wait_for_state(self, fsu_cycle_id, clone_fsu_cycle_detai operation_result = self.client.clone_fsu_cycle(fsu_cycle_id, clone_fsu_cycle_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: @@ -251,8 +256,9 @@ def create_fsu_action_and_wait_for_state(self, create_fsu_action_details, wait_f operation_result = self.client.create_fsu_action(create_fsu_action_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: @@ -289,8 +295,9 @@ def create_fsu_collection_and_wait_for_state(self, create_fsu_collection_details operation_result = self.client.create_fsu_collection(create_fsu_collection_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: @@ -327,8 +334,9 @@ def create_fsu_cycle_and_wait_for_state(self, create_fsu_cycle_details, wait_for operation_result = self.client.create_fsu_cycle(create_fsu_cycle_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: @@ -365,8 +373,9 @@ def create_fsu_discovery_and_wait_for_state(self, create_fsu_discovery_details, operation_result = self.client.create_fsu_discovery(create_fsu_discovery_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: @@ -411,8 +420,9 @@ def delete_fsu_action_and_wait_for_state(self, fsu_action_id, wait_for_states=[] 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: @@ -457,8 +467,9 @@ def delete_fsu_collection_and_wait_for_state(self, fsu_collection_id, wait_for_s 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: @@ -503,8 +514,9 @@ def delete_fsu_cycle_and_wait_for_state(self, fsu_cycle_id, wait_for_states=[], 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: @@ -549,8 +561,9 @@ def delete_fsu_discovery_and_wait_for_state(self, fsu_discovery_id, wait_for_sta 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: @@ -596,7 +609,6 @@ def delete_fsu_job_and_wait_for_state(self, fsu_job_id, wait_for_states=[], oper if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -650,8 +662,9 @@ def remove_fsu_collection_targets_and_wait_for_state(self, fsu_collection_id, re operation_result = self.client.remove_fsu_collection_targets(fsu_collection_id, remove_fsu_collection_targets_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: @@ -691,8 +704,9 @@ def update_fsu_action_and_wait_for_state(self, fsu_action_id, update_fsu_action_ operation_result = self.client.update_fsu_action(fsu_action_id, update_fsu_action_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: @@ -732,8 +746,9 @@ def update_fsu_collection_and_wait_for_state(self, fsu_collection_id, update_fsu operation_result = self.client.update_fsu_collection(fsu_collection_id, update_fsu_collection_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: @@ -773,8 +788,9 @@ def update_fsu_cycle_and_wait_for_state(self, fsu_cycle_id, update_fsu_cycle_det operation_result = self.client.update_fsu_cycle(fsu_cycle_id, update_fsu_cycle_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: @@ -814,7 +830,6 @@ def update_fsu_job_and_wait_for_state(self, fsu_job_id, update_fsu_job_details, operation_result = self.client.update_fsu_job(fsu_job_id, update_fsu_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] fsu_job_id = operation_result.data.id diff --git a/src/oci/functions/functions_management_client_composite_operations.py b/src/oci/functions/functions_management_client_composite_operations.py index ed57af7d7..c4a426297 100644 --- a/src/oci/functions/functions_management_client_composite_operations.py +++ b/src/oci/functions/functions_management_client_composite_operations.py @@ -46,7 +46,6 @@ def create_application_and_wait_for_state(self, create_application_details, wait operation_result = self.client.create_application(create_application_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] application_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_function_and_wait_for_state(self, create_function_details, wait_for_s operation_result = self.client.create_function(create_function_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] function_id = operation_result.data.id @@ -143,7 +141,6 @@ def delete_application_and_wait_for_state(self, application_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -205,7 +202,6 @@ def delete_function_and_wait_for_state(self, function_id, wait_for_states=[], op if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -261,7 +257,6 @@ def update_application_and_wait_for_state(self, application_id, update_applicati operation_result = self.client.update_application(application_id, update_application_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] application_id = operation_result.data.id @@ -309,7 +304,6 @@ def update_function_and_wait_for_state(self, function_id, update_function_detail operation_result = self.client.update_function(function_id, update_function_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] function_id = operation_result.data.id diff --git a/src/oci/fusion_apps/fusion_applications_client_composite_operations.py b/src/oci/fusion_apps/fusion_applications_client_composite_operations.py index 57dd5deb3..178338525 100644 --- a/src/oci/fusion_apps/fusion_applications_client_composite_operations.py +++ b/src/oci/fusion_apps/fusion_applications_client_composite_operations.py @@ -49,8 +49,9 @@ def change_fusion_environment_compartment_and_wait_for_state(self, fusion_enviro operation_result = self.client.change_fusion_environment_compartment(fusion_environment_id, change_fusion_environment_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: @@ -90,8 +91,9 @@ def change_fusion_environment_family_compartment_and_wait_for_state(self, fusion operation_result = self.client.change_fusion_environment_family_compartment(fusion_environment_family_id, change_fusion_environment_family_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: @@ -131,8 +133,9 @@ def create_data_masking_activity_and_wait_for_state(self, fusion_environment_id, operation_result = self.client.create_data_masking_activity(fusion_environment_id, create_data_masking_activity_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: @@ -169,8 +172,9 @@ def create_fusion_environment_and_wait_for_state(self, create_fusion_environment operation_result = self.client.create_fusion_environment(create_fusion_environment_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: @@ -210,8 +214,9 @@ def create_fusion_environment_admin_user_and_wait_for_state(self, create_fusion_ operation_result = self.client.create_fusion_environment_admin_user(create_fusion_environment_admin_user_details, fusion_environment_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: @@ -248,8 +253,9 @@ def create_fusion_environment_family_and_wait_for_state(self, create_fusion_envi operation_result = self.client.create_fusion_environment_family(create_fusion_environment_family_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: @@ -289,8 +295,9 @@ def create_refresh_activity_and_wait_for_state(self, fusion_environment_id, crea operation_result = self.client.create_refresh_activity(fusion_environment_id, create_refresh_activity_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: @@ -330,8 +337,9 @@ def create_service_attachment_and_wait_for_state(self, create_service_attachment operation_result = self.client.create_service_attachment(create_service_attachment_details, fusion_environment_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: @@ -376,8 +384,9 @@ def delete_fusion_environment_and_wait_for_state(self, fusion_environment_id, wa 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: @@ -425,8 +434,9 @@ def delete_fusion_environment_admin_user_and_wait_for_state(self, admin_username 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: @@ -471,8 +481,9 @@ def delete_fusion_environment_family_and_wait_for_state(self, fusion_environment 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: @@ -520,8 +531,9 @@ def delete_refresh_activity_and_wait_for_state(self, fusion_environment_id, refr 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: @@ -569,8 +581,9 @@ def delete_service_attachment_and_wait_for_state(self, fusion_environment_id, se 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: @@ -613,8 +626,9 @@ def reset_fusion_environment_password_and_wait_for_state(self, reset_fusion_envi operation_result = self.client.reset_fusion_environment_password(reset_fusion_environment_password_details, fusion_environment_id, admin_username, **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: @@ -654,8 +668,9 @@ def update_fusion_environment_and_wait_for_state(self, fusion_environment_id, up operation_result = self.client.update_fusion_environment(fusion_environment_id, update_fusion_environment_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: @@ -695,8 +710,9 @@ def update_fusion_environment_family_and_wait_for_state(self, fusion_environment operation_result = self.client.update_fusion_environment_family(fusion_environment_family_id, update_fusion_environment_family_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: @@ -739,7 +755,6 @@ def update_refresh_activity_and_wait_for_state(self, fusion_environment_id, refr operation_result = self.client.update_refresh_activity(fusion_environment_id, refresh_activity_id, update_refresh_activity_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] refresh_activity_id = operation_result.data.id diff --git a/src/oci/generative_ai/__init__.py b/src/oci/generative_ai/__init__.py new file mode 100644 index 000000000..dc5333773 --- /dev/null +++ b/src/oci/generative_ai/__init__.py @@ -0,0 +1,14 @@ +# 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: 20231130 + +from __future__ import absolute_import + + +from .generative_ai_client import GenerativeAiClient +from .generative_ai_client_composite_operations import GenerativeAiClientCompositeOperations +from . import models + +__all__ = ["GenerativeAiClient", "GenerativeAiClientCompositeOperations", "models"] diff --git a/src/oci/generative_ai/generative_ai_client.py b/src/oci/generative_ai/generative_ai_client.py new file mode 100644 index 000000000..b0a05710f --- /dev/null +++ b/src/oci/generative_ai/generative_ai_client.py @@ -0,0 +1,2901 @@ +# 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: 20231130 + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # noqa: F401 +from oci.base_client import BaseClient +from oci.config import get_config_value_or_default, validate_config +from oci.signer import Signer +from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from oci.exceptions import InvalidAlloyConfig +from oci.alloy import OCI_SDK_ENABLED_SERVICES_SET +from .models import generative_ai_type_mapping +missing = Sentinel("Missing") + + +class GenerativeAiClient(object): + """ + OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings. + + Use the Generative AI service management API to create and manage [dedicated AI clusters](#/en/generative-ai/latest/DedicatedAiCluster/), [endpoints](#/en/generative-ai/latest/Endpoint/), [custom models](#/en/generative-ai/latest/Model/), and [work requests](#/en/generative-ai/latest/WorkRequest/) in the Generative AI service. For example, create a custom model by fine-tuning an out-of-the-box model using your own data, on a fine-tuning dedicated AI cluster. Then, create a hosting dedicated AI cluster with an endpoint to host your custom model. + + To access your custom model endpoints, or to try the out-of-the-box models to generate text, summarize, and create text embeddings see the [Generative AI Inference API](/#/en/generative-ai-inference/latest/). + + To learn more about the service, see the [Generative AI documentation](/iaas/Content/generative-ai/home.htm). + """ + + def __init__(self, config, **kwargs): + """ + Creates a new service client + + :param dict config: + Configuration keys and values as per `SDK and Tool Configuration `__. + The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config + the dict using :py:meth:`~oci.config.validate_config` + + :param str service_endpoint: (optional) + The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is + not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit + need to specify a service endpoint. + + :param timeout: (optional) + The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided + as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If + a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. + :type timeout: float or tuple(float, float) + + :param signer: (optional) + The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values + provided in the config parameter. + + One use case for this parameter is for `Instance Principals authentication `__ + by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument + :type signer: :py:class:`~oci.signer.AbstractBaseSigner` + + :param obj retry_strategy: (optional) + A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. + Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. + Any value provided at the operation level will override whatever is specified at the client level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + :param obj circuit_breaker_strategy: (optional) + A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). + This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. + The specifics of circuit breaker strategy are described `here `__. + + :param function circuit_breaker_callback: (optional) + Callback function to receive any exceptions triggerred by the circuit breaker. + + :param bool client_level_realm_specific_endpoint_template_enabled: (optional) + A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None. + + :param allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not + allow control characters to be in the response object. + """ + if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("generative_ai"): + raise InvalidAlloyConfig("The Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service") + + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + + elif AUTHENTICATION_TYPE_FIELD_NAME in config: + signer = get_signer_from_authentication_type(config) + + else: + signer = Signer( + tenancy=config["tenancy"], + user=config["user"], + fingerprint=config["fingerprint"], + private_key_file_location=config.get("key_file"), + pass_phrase=get_config_value_or_default(config, "pass_phrase"), + private_key_content=config.get("key_content") + ) + + base_client_init_kwargs = { + 'regional_client': True, + 'service_endpoint': kwargs.get('service_endpoint'), + 'base_path': '/20231130', + 'service_endpoint_template': 'https://generativeai.{region}.oci.{secondLevelDomain}', + 'service_endpoint_template_per_realm': { }, # noqa: E201 E202 + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY), + 'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled') + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + if base_client_init_kwargs.get('circuit_breaker_strategy') is None: + base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY + if 'allow_control_chars' in kwargs: + base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars') + self.base_client = BaseClient("generative_ai", config, signer, generative_ai_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def change_dedicated_ai_cluster_compartment(self, dedicated_ai_cluster_id, change_dedicated_ai_cluster_compartment_details, **kwargs): + """ + Moves a dedicated AI cluster into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str dedicated_ai_cluster_id: (required) + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.generative_ai.models.ChangeDedicatedAiClusterCompartmentDetails change_dedicated_ai_cluster_compartment_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) + Unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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 running 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 removed 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_dedicated_ai_cluster_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['dedicatedAiClusterId'] + resource_path = "/dedicatedAiClusters/{dedicatedAiClusterId}/actions/changeCompartment" + method = "POST" + operation_name = "change_dedicated_ai_cluster_compartment" + api_reference_link = "" + + # 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_dedicated_ai_cluster_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "dedicatedAiClusterId": dedicated_ai_cluster_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, + body=change_dedicated_ai_cluster_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_dedicated_ai_cluster_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_endpoint_compartment(self, endpoint_id, change_endpoint_compartment_details, **kwargs): + """ + Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str endpoint_id: (required) + The `OCID`__ of the endpoint. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.generative_ai.models.ChangeEndpointCompartmentDetails change_endpoint_compartment_details: (required) + The endpoint 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) + Unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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 running 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 removed 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_endpoint_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['endpointId'] + resource_path = "/endpoints/{endpointId}/actions/changeCompartment" + method = "POST" + operation_name = "change_endpoint_compartment" + api_reference_link = "" + + # 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_endpoint_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "endpointId": 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), + "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_endpoint_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_endpoint_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_model_compartment(self, model_id, change_model_compartment_details, **kwargs): + """ + Moves a custom model into a different compartment. For information about moving resources between compartments, see `Moving Resources to a Different Compartment`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str model_id: (required) + The model OCID + + :param oci.generative_ai.models.ChangeModelCompartmentDetails change_model_compartment_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) + Unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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 running 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 removed 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_model_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId'] + resource_path = "/models/{modelId}/actions/changeCompartment" + method = "POST" + operation_name = "change_model_compartment" + api_reference_link = "" + + # 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_model_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelId": model_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, + body=change_model_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_model_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 create_dedicated_ai_cluster(self, create_dedicated_ai_cluster_details, **kwargs): + """ + Creates a dedicated AI cluster. + + + :param oci.generative_ai.models.CreateDedicatedAiClusterDetails create_dedicated_ai_cluster_details: (required) + Details for the new dedicated AI cluster. + + :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 running 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 removed 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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.DedicatedAiCluster` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_dedicated_ai_cluster API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/dedicatedAiClusters" + method = "POST" + operation_name = "create_dedicated_ai_cluster" + 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_dedicated_ai_cluster 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_dedicated_ai_cluster_details, + response_type="DedicatedAiCluster", + 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_dedicated_ai_cluster_details, + response_type="DedicatedAiCluster", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def create_endpoint(self, create_endpoint_details, **kwargs): + """ + Creates an endpoint. + + The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the endpoint creation progress. + + + :param oci.generative_ai.models.CreateEndpointDetails create_endpoint_details: (required) + Details for the new 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 + server error without risk of running 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 removed 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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.Endpoint` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/endpoints" + method = "POST" + operation_name = "create_endpoint" + 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_endpoint 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_endpoint_details, + response_type="Endpoint", + 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_endpoint_details, + response_type="Endpoint", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def create_model(self, create_model_details, **kwargs): + """ + Creates a custom model by fine-tuning a base model with your own dataset. You can create a new custom models or create a new version of existing custom model.. + + The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the model creation progress. + + + :param oci.generative_ai.models.CreateModelDetails create_model_details: (required) + Details for the new model. + + :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 running 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 removed 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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.Model` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_model API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/models" + method = "POST" + operation_name = "create_model" + 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_model 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_model_details, + response_type="Model", + 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_model_details, + response_type="Model", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def delete_dedicated_ai_cluster(self, dedicated_ai_cluster_id, **kwargs): + """ + Deletes a dedicated AI cluster. + + You can only delete clusters without attached resources. Before you delete a hosting dedicated AI cluster, you must delete the endpoints associated to that cluster. Before you delete a fine-tuning dedicated AI cluster, you must delete the custom model on that cluster. The delete action permanently deletes the cluster. This action can't be undone. + + + :param str dedicated_ai_cluster_id: (required) + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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 Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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_dedicated_ai_cluster API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['dedicatedAiClusterId'] + resource_path = "/dedicatedAiClusters/{dedicatedAiClusterId}" + method = "DELETE" + operation_name = "delete_dedicated_ai_cluster" + api_reference_link = "" + + # 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_dedicated_ai_cluster got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "dedicatedAiClusterId": dedicated_ai_cluster_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_endpoint(self, endpoint_id, **kwargs): + """ + Deletes an endpoint. + + + :param str endpoint_id: (required) + The `OCID`__ of the endpoint. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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 Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['endpointId'] + resource_path = "/endpoints/{endpointId}" + method = "DELETE" + operation_name = "delete_endpoint" + api_reference_link = "" + + # 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_endpoint got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "endpointId": 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_model(self, model_id, **kwargs): + """ + Deletes a custom model. A model shouldn't be deleted if there's one or more active endpoints associated with that model. + + + :param str model_id: (required) + The model 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) + Unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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_model API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId'] + resource_path = "/models/{modelId}" + method = "DELETE" + operation_name = "delete_model" + api_reference_link = "" + + # 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_model got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelId": model_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 get_dedicated_ai_cluster(self, dedicated_ai_cluster_id, **kwargs): + """ + Gets information about a dedicated AI cluster. + + + :param str dedicated_ai_cluster_id: (required) + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.DedicatedAiCluster` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_dedicated_ai_cluster API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['dedicatedAiClusterId'] + resource_path = "/dedicatedAiClusters/{dedicatedAiClusterId}" + method = "GET" + operation_name = "get_dedicated_ai_cluster" + api_reference_link = "" + + # 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_dedicated_ai_cluster got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "dedicatedAiClusterId": dedicated_ai_cluster_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="DedicatedAiCluster", + 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="DedicatedAiCluster", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_endpoint(self, endpoint_id, **kwargs): + """ + Gets information about an endpoint. + + + :param str endpoint_id: (required) + The `OCID`__ of the endpoint. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.Endpoint` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['endpointId'] + resource_path = "/endpoints/{endpointId}" + method = "GET" + operation_name = "get_endpoint" + api_reference_link = "" + + # 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_endpoint got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "endpointId": 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", + "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="Endpoint", + 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="Endpoint", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_model(self, model_id, **kwargs): + """ + Gets information about a custom model. + + + :param str model_id: (required) + The model OCID + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.Model` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_model API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId'] + resource_path = "/models/{modelId}" + method = "GET" + operation_name = "get_model" + api_reference_link = "" + + # 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_model got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelId": model_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="Model", + 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="Model", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_work_request(self, work_request_id, **kwargs): + """ + Gets the details of a work request. + + + :param str work_request_id: (required) + The `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + + :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 = "" + + # 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_dedicated_ai_clusters(self, compartment_id, **kwargs): + """ + Lists the dedicated AI clusters in a specific compartment. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment in which to list resources. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str lifecycle_state: (optional) + A filter to return only the dedicated AI clusters that their lifecycle state matches the given lifecycle state. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION" + + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. + + :param str id: (optional) + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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`__. + + __ 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_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. You can provide only one sort order. Default order for `timeCreated` + is descending. Default order for `displayName` is ascending. + + Allowed values are: "timeCreated", "displayName", "lifecycleState" + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.DedicatedAiClusterCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_dedicated_ai_clusters API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/dedicatedAiClusters" + method = "GET" + operation_name = "list_dedicated_ai_clusters" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "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_dedicated_ai_clusters got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + 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", "lifecycleState"] + 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": compartment_id, + "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 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, + query_params=query_params, + header_params=header_params, + response_type="DedicatedAiClusterCollection", + 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="DedicatedAiClusterCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_endpoints(self, compartment_id, **kwargs): + """ + Lists the endpoints of a specific compartment. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment in which to list resources. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str lifecycle_state: (optional) + A filter to return only resources that their lifecycle state matches the given lifecycle state. + + Allowed values are: "ACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. + + :param str id: (optional) + The `OCID`__ of the endpoint. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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`__. + + __ 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_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. You can provide only one sort order. Default order for `timeCreated` + is descending. Default order for `displayName` is ascending. + + Allowed values are: "displayName", "timeCreated" + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.EndpointCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_endpoints API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/endpoints" + method = "GET" + operation_name = "list_endpoints" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "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_endpoints got unknown kwargs: {extra_kwargs!r}") + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "CREATING", "UPDATING", "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 }" + ) + + 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 = ["displayName", "timeCreated"] + 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": compartment_id, + "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 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, + query_params=query_params, + header_params=header_params, + response_type="EndpointCollection", + 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="EndpointCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def list_models(self, compartment_id, **kwargs): + """ + Lists the models in a specific compartment. Includes pretrained base models and fine-tuned custom models. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment in which to list resources. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :param str vendor: (optional) + A filter to return only resources that match the entire vendor given. + + :param list[str] capability: (optional) + A filter to return only resources their capability matches the given capability. + + Allowed values are: "TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE" + + :param str lifecycle_state: (optional) + A filter to return only resources their lifecycleState matches the given lifecycleState. + + Allowed values are: "ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. + + :param str id: (optional) + The ID of the model. + + :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`__. + + __ 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_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. You can provide only one sort order. Default order for `timeCreated` is descending. + + Allowed values are: "displayName", "lifecycleState", "timeCreated" + + :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.generative_ai.models.ModelCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_models API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/models" + method = "GET" + operation_name = "list_models" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "vendor", + "capability", + "lifecycle_state", + "display_name", + "id", + "limit", + "page", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_models got unknown kwargs: {extra_kwargs!r}") + + if 'capability' in kwargs: + capability_allowed_values = ["TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE"] + for capability_item in kwargs['capability']: + if capability_item not in capability_allowed_values: + raise ValueError( + f"Invalid value for `capability`, must be one of { capability_allowed_values }" + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "CREATING", "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 }" + ) + + 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 = ["displayName", "lifecycleState", "timeCreated"] + 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 = { + "vendor": kwargs.get("vendor", missing), + "capability": self.base_client.generate_collection_format_param(kwargs.get("capability", missing), 'multi'), + "compartmentId": compartment_id, + "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 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, + query_params=query_params, + header_params=header_params, + response_type="ModelCollection", + 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="ModelCollection", + 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): + """ + Lists the errors for a work request. + + + :param str work_request_id: (required) + The `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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 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`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending. + + Allowed values are: "timestamp" + + :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.generative_ai.models.WorkRequestErrorCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_request_errors API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['workRequestId'] + resource_path = "/workRequests/{workRequestId}/errors" + method = "GET" + operation_name = "list_work_request_errors" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "page", + "limit", + "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_work_request_errors 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') + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timestamp"] + 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 = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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="WorkRequestErrorCollection", + 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="WorkRequestErrorCollection", + 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_logs(self, work_request_id, **kwargs): + """ + Lists the logs for a work request. + + + :param str work_request_id: (required) + The `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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 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`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending. + + Allowed values are: "timestamp" + + :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.generative_ai.models.WorkRequestLogEntryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_request_logs API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['workRequestId'] + resource_path = "/workRequests/{workRequestId}/logs" + method = "GET" + operation_name = "list_work_request_logs" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "page", + "limit", + "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_work_request_logs 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') + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timestamp"] + 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 = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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="WorkRequestLogEntryCollection", + 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="WorkRequestLogEntryCollection", + 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_requests(self, compartment_id, **kwargs): + """ + Lists the work requests in a compartment. + + + :param str compartment_id: (required) + The `OCID`__ of the compartment in which to list resources. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str work_request_id: (optional) + The `OCID`__ of the asynchronous work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str status: (optional) + A filter to return only the resources that match the given lifecycle state. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + + :param str resource_id: (optional) + The `OCID`__ of the resource affected by the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :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. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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 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`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :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 `timeAccepted` is descending. + + Allowed values are: "timeAccepted" + + :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.generative_ai.models.WorkRequestSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_requests API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/workRequests" + method = "GET" + operation_name = "list_work_requests" + api_reference_link = "" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "work_request_id", + "status", + "resource_id", + "opc_request_id", + "page", + "limit", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_work_requests got unknown kwargs: {extra_kwargs!r}") + + if 'status' in kwargs: + status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if kwargs['status'] not in status_allowed_values: + raise ValueError( + f"Invalid value for `status`, must be one of { status_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 = ["timeAccepted"] + 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": compartment_id, + "workRequestId": kwargs.get("work_request_id", missing), + "status": kwargs.get("status", missing), + "resourceId": kwargs.get("resource_id", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", 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 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, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestSummaryCollection", + 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="WorkRequestSummaryCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def update_dedicated_ai_cluster(self, dedicated_ai_cluster_id, update_dedicated_ai_cluster_details, **kwargs): + """ + Updates a dedicated AI cluster. + + + :param str dedicated_ai_cluster_id: (required) + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.generative_ai.models.UpdateDedicatedAiClusterDetails update_dedicated_ai_cluster_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) + Unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.DedicatedAiCluster` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_dedicated_ai_cluster API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['dedicatedAiClusterId'] + resource_path = "/dedicatedAiClusters/{dedicatedAiClusterId}" + method = "PUT" + operation_name = "update_dedicated_ai_cluster" + api_reference_link = "" + + # 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_dedicated_ai_cluster got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "dedicatedAiClusterId": dedicated_ai_cluster_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, + body=update_dedicated_ai_cluster_details, + response_type="DedicatedAiCluster", + 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_dedicated_ai_cluster_details, + response_type="DedicatedAiCluster", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def update_endpoint(self, endpoint_id, update_endpoint_details, **kwargs): + """ + Updates the properties of an endpoint. + + + :param str endpoint_id: (required) + The `OCID`__ of the endpoint. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.generative_ai.models.UpdateEndpointDetails update_endpoint_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) + Unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.Endpoint` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_endpoint API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['endpointId'] + resource_path = "/endpoints/{endpointId}" + method = "PUT" + operation_name = "update_endpoint" + api_reference_link = "" + + # 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_endpoint got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "endpointId": 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, + body=update_endpoint_details, + response_type="Endpoint", + 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_endpoint_details, + response_type="Endpoint", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def update_model(self, model_id, update_model_details, **kwargs): + """ + Updates the properties of a custom model such as name, description, version, freeform tags, and defined tags. + + + :param str model_id: (required) + The model OCID + + :param oci.generative_ai.models.UpdateModelDetails update_model_details: (required) + The model 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) + Unique Oracle-assigned identifier for the request. If you need to contact + Oracle about a particular request, please provide the request ID. + The only valid characters for request IDs are letters, numbers, + underscore, and dash. + + :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.generative_ai.models.Model` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_model API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['modelId'] + resource_path = "/models/{modelId}" + method = "PUT" + operation_name = "update_model" + api_reference_link = "" + + # 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_model got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "modelId": model_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, + body=update_model_details, + response_type="Model", + 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_model_details, + response_type="Model", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) diff --git a/src/oci/generative_ai/generative_ai_client_composite_operations.py b/src/oci/generative_ai/generative_ai_client_composite_operations.py new file mode 100644 index 000000000..94a30cfdc --- /dev/null +++ b/src/oci/generative_ai/generative_ai_client_composite_operations.py @@ -0,0 +1,421 @@ +# 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: 20231130 + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class GenerativeAiClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.generative_ai.GenerativeAiClient` and offers convenience methods + for operations that would otherwise need to be chained together. For example, instead of performing an action + on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource + to enter a given state, you can call a single method in this class to accomplish the same functionality + """ + + def __init__(self, client, **kwargs): + """ + Creates a new GenerativeAiClientCompositeOperations object + + :param GenerativeAiClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_dedicated_ai_cluster_and_wait_for_state(self, create_dedicated_ai_cluster_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.create_dedicated_ai_cluster` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param oci.generative_ai.models.CreateDedicatedAiClusterDetails create_dedicated_ai_cluster_details: (required) + Details for the new dedicated AI cluster. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.create_dedicated_ai_cluster` + + :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_dedicated_ai_cluster(create_dedicated_ai_cluster_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_endpoint_and_wait_for_state(self, create_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.create_endpoint` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param oci.generative_ai.models.CreateEndpointDetails create_endpoint_details: (required) + Details for the new endpoint. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.create_endpoint` + + :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_endpoint(create_endpoint_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_model_and_wait_for_state(self, create_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.create_model` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param oci.generative_ai.models.CreateModelDetails create_model_details: (required) + Details for the new model. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.create_model` + + :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_model(create_model_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_dedicated_ai_cluster_and_wait_for_state(self, dedicated_ai_cluster_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.delete_dedicated_ai_cluster` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param str dedicated_ai_cluster_id: (required) + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.delete_dedicated_ai_cluster` + + :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_dedicated_ai_cluster(dedicated_ai_cluster_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_endpoint_and_wait_for_state(self, endpoint_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.delete_endpoint` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param str endpoint_id: (required) + The `OCID`__ of the endpoint. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.delete_endpoint` + + :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_endpoint(endpoint_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_model_and_wait_for_state(self, model_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.delete_model` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param str model_id: (required) + The model OCID + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.delete_model` + + :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_model(model_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 update_dedicated_ai_cluster_and_wait_for_state(self, dedicated_ai_cluster_id, update_dedicated_ai_cluster_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.update_dedicated_ai_cluster` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param str dedicated_ai_cluster_id: (required) + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.generative_ai.models.UpdateDedicatedAiClusterDetails update_dedicated_ai_cluster_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.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.update_dedicated_ai_cluster` + + :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_dedicated_ai_cluster(dedicated_ai_cluster_id, update_dedicated_ai_cluster_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_endpoint_and_wait_for_state(self, endpoint_id, update_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.update_endpoint` and waits for the :py:class:`~oci.generative_ai.models.WorkRequest` + to enter the given state(s). + + :param str endpoint_id: (required) + The `OCID`__ of the endpoint. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param oci.generative_ai.models.UpdateEndpointDetails update_endpoint_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.generative_ai.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.update_endpoint` + + :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_endpoint(endpoint_id, update_endpoint_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_model_and_wait_for_state(self, model_id, update_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.generative_ai.GenerativeAiClient.update_model` and waits for the :py:class:`~oci.generative_ai.models.Model` acted upon + to enter the given state(s). + + :param str model_id: (required) + The model OCID + + :param oci.generative_ai.models.UpdateModelDetails update_model_details: (required) + The model 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.generative_ai.models.Model.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.generative_ai.GenerativeAiClient.update_model` + + :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_model(model_id, update_model_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + model_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_model(model_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) diff --git a/src/oci/generative_ai/models/__init__.py b/src/oci/generative_ai/models/__init__.py new file mode 100644 index 000000000..bc618976a --- /dev/null +++ b/src/oci/generative_ai/models/__init__.py @@ -0,0 +1,86 @@ +# 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: 20231130 + +from __future__ import absolute_import + +from .change_dedicated_ai_cluster_compartment_details import ChangeDedicatedAiClusterCompartmentDetails +from .change_endpoint_compartment_details import ChangeEndpointCompartmentDetails +from .change_model_compartment_details import ChangeModelCompartmentDetails +from .content_moderation_config import ContentModerationConfig +from .create_dedicated_ai_cluster_details import CreateDedicatedAiClusterDetails +from .create_endpoint_details import CreateEndpointDetails +from .create_model_details import CreateModelDetails +from .dataset import Dataset +from .dedicated_ai_cluster import DedicatedAiCluster +from .dedicated_ai_cluster_capacity import DedicatedAiClusterCapacity +from .dedicated_ai_cluster_collection import DedicatedAiClusterCollection +from .dedicated_ai_cluster_hosting_capacity import DedicatedAiClusterHostingCapacity +from .dedicated_ai_cluster_summary import DedicatedAiClusterSummary +from .endpoint import Endpoint +from .endpoint_collection import EndpointCollection +from .endpoint_summary import EndpointSummary +from .fine_tune_details import FineTuneDetails +from .model import Model +from .model_collection import ModelCollection +from .model_metrics import ModelMetrics +from .model_summary import ModelSummary +from .object_storage_dataset import ObjectStorageDataset +from .t_few_training_config import TFewTrainingConfig +from .text_generation_model_metrics import TextGenerationModelMetrics +from .training_config import TrainingConfig +from .update_dedicated_ai_cluster_details import UpdateDedicatedAiClusterDetails +from .update_endpoint_details import UpdateEndpointDetails +from .update_model_details import UpdateModelDetails +from .vanilla_training_config import VanillaTrainingConfig +from .work_request import WorkRequest +from .work_request_error import WorkRequestError +from .work_request_error_collection import WorkRequestErrorCollection +from .work_request_log_entry import WorkRequestLogEntry +from .work_request_log_entry_collection import WorkRequestLogEntryCollection +from .work_request_resource import WorkRequestResource +from .work_request_summary import WorkRequestSummary +from .work_request_summary_collection import WorkRequestSummaryCollection + +# Maps type names to classes for generative_ai services. +generative_ai_type_mapping = { + "ChangeDedicatedAiClusterCompartmentDetails": ChangeDedicatedAiClusterCompartmentDetails, + "ChangeEndpointCompartmentDetails": ChangeEndpointCompartmentDetails, + "ChangeModelCompartmentDetails": ChangeModelCompartmentDetails, + "ContentModerationConfig": ContentModerationConfig, + "CreateDedicatedAiClusterDetails": CreateDedicatedAiClusterDetails, + "CreateEndpointDetails": CreateEndpointDetails, + "CreateModelDetails": CreateModelDetails, + "Dataset": Dataset, + "DedicatedAiCluster": DedicatedAiCluster, + "DedicatedAiClusterCapacity": DedicatedAiClusterCapacity, + "DedicatedAiClusterCollection": DedicatedAiClusterCollection, + "DedicatedAiClusterHostingCapacity": DedicatedAiClusterHostingCapacity, + "DedicatedAiClusterSummary": DedicatedAiClusterSummary, + "Endpoint": Endpoint, + "EndpointCollection": EndpointCollection, + "EndpointSummary": EndpointSummary, + "FineTuneDetails": FineTuneDetails, + "Model": Model, + "ModelCollection": ModelCollection, + "ModelMetrics": ModelMetrics, + "ModelSummary": ModelSummary, + "ObjectStorageDataset": ObjectStorageDataset, + "TFewTrainingConfig": TFewTrainingConfig, + "TextGenerationModelMetrics": TextGenerationModelMetrics, + "TrainingConfig": TrainingConfig, + "UpdateDedicatedAiClusterDetails": UpdateDedicatedAiClusterDetails, + "UpdateEndpointDetails": UpdateEndpointDetails, + "UpdateModelDetails": UpdateModelDetails, + "VanillaTrainingConfig": VanillaTrainingConfig, + "WorkRequest": WorkRequest, + "WorkRequestError": WorkRequestError, + "WorkRequestErrorCollection": WorkRequestErrorCollection, + "WorkRequestLogEntry": WorkRequestLogEntry, + "WorkRequestLogEntryCollection": WorkRequestLogEntryCollection, + "WorkRequestResource": WorkRequestResource, + "WorkRequestSummary": WorkRequestSummary, + "WorkRequestSummaryCollection": WorkRequestSummaryCollection +} diff --git a/src/oci/generative_ai/models/change_dedicated_ai_cluster_compartment_details.py b/src/oci/generative_ai/models/change_dedicated_ai_cluster_compartment_details.py new file mode 100644 index 000000000..e087ca7dc --- /dev/null +++ b/src/oci/generative_ai/models/change_dedicated_ai_cluster_compartment_details.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: 20231130 + + +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 ChangeDedicatedAiClusterCompartmentDetails(object): + """ + The details to move a dedicated AI cluster to another compartment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeDedicatedAiClusterCompartmentDetails 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 ChangeDedicatedAiClusterCompartmentDetails. + :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 ChangeDedicatedAiClusterCompartmentDetails. + The OCID of the compartment to move the dedicated AI cluster to. + + + :return: The compartment_id of this ChangeDedicatedAiClusterCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeDedicatedAiClusterCompartmentDetails. + The OCID of the compartment to move the dedicated AI cluster to. + + + :param compartment_id: The compartment_id of this ChangeDedicatedAiClusterCompartmentDetails. + :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/generative_ai/models/change_endpoint_compartment_details.py b/src/oci/generative_ai/models/change_endpoint_compartment_details.py new file mode 100644 index 000000000..aeb1df22e --- /dev/null +++ b/src/oci/generative_ai/models/change_endpoint_compartment_details.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: 20231130 + + +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 ChangeEndpointCompartmentDetails(object): + """ + The details to move an endpoint to another compartment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeEndpointCompartmentDetails 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 ChangeEndpointCompartmentDetails. + :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 ChangeEndpointCompartmentDetails. + The OCID of the compartment to move the endpoint to. + + + :return: The compartment_id of this ChangeEndpointCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeEndpointCompartmentDetails. + The OCID of the compartment to move the endpoint to. + + + :param compartment_id: The compartment_id of this ChangeEndpointCompartmentDetails. + :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/generative_ai/models/change_model_compartment_details.py b/src/oci/generative_ai/models/change_model_compartment_details.py new file mode 100644 index 000000000..40ed30dac --- /dev/null +++ b/src/oci/generative_ai/models/change_model_compartment_details.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: 20231130 + + +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 ChangeModelCompartmentDetails(object): + """ + The details to move a custom model to another compartment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeModelCompartmentDetails 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 ChangeModelCompartmentDetails. + :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 ChangeModelCompartmentDetails. + The compartment OCID to create the model in. + + + :return: The compartment_id of this ChangeModelCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeModelCompartmentDetails. + The compartment OCID to create the model in. + + + :param compartment_id: The compartment_id of this ChangeModelCompartmentDetails. + :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/generative_ai/models/content_moderation_config.py b/src/oci/generative_ai/models/content_moderation_config.py new file mode 100644 index 000000000..d908a9f4c --- /dev/null +++ b/src/oci/generative_ai/models/content_moderation_config.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: 20231130 + + +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 ContentModerationConfig(object): + """ + The configuration details, whether to add the content moderation feature to the model. Content moderation removes toxic and biased content from responses. It's recommended to use content moderation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ContentModerationConfig object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_enabled: + The value to assign to the is_enabled property of this ContentModerationConfig. + :type is_enabled: bool + + """ + self.swagger_types = { + 'is_enabled': 'bool' + } + + self.attribute_map = { + 'is_enabled': 'isEnabled' + } + + self._is_enabled = None + + @property + def is_enabled(self): + """ + **[Required]** Gets the is_enabled of this ContentModerationConfig. + Whether to enable the content moderation feature. + + + :return: The is_enabled of this ContentModerationConfig. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this ContentModerationConfig. + Whether to enable the content moderation feature. + + + :param is_enabled: The is_enabled of this ContentModerationConfig. + :type: bool + """ + self._is_enabled = is_enabled + + 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/generative_ai/models/create_dedicated_ai_cluster_details.py b/src/oci/generative_ai/models/create_dedicated_ai_cluster_details.py new file mode 100644 index 000000000..461ad64ee --- /dev/null +++ b/src/oci/generative_ai/models/create_dedicated_ai_cluster_details.py @@ -0,0 +1,329 @@ +# 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: 20231130 + + +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 CreateDedicatedAiClusterDetails(object): + """ + The data to create a dedicated AI cluster. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateDedicatedAiClusterDetails 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 CreateDedicatedAiClusterDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateDedicatedAiClusterDetails. + :type description: str + + :param type: + The value to assign to the type property of this CreateDedicatedAiClusterDetails. + :type type: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateDedicatedAiClusterDetails. + :type compartment_id: str + + :param unit_count: + The value to assign to the unit_count property of this CreateDedicatedAiClusterDetails. + :type unit_count: int + + :param unit_shape: + The value to assign to the unit_shape property of this CreateDedicatedAiClusterDetails. + :type unit_shape: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateDedicatedAiClusterDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateDedicatedAiClusterDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'type': 'str', + 'compartment_id': 'str', + 'unit_count': 'int', + 'unit_shape': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'type': 'type', + 'compartment_id': 'compartmentId', + 'unit_count': 'unitCount', + 'unit_shape': 'unitShape', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._type = None + self._compartment_id = None + self._unit_count = None + self._unit_shape = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateDedicatedAiClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateDedicatedAiClusterDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateDedicatedAiClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateDedicatedAiClusterDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateDedicatedAiClusterDetails. + An optional description of the dedicated AI cluster. + + + :return: The description of this CreateDedicatedAiClusterDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateDedicatedAiClusterDetails. + An optional description of the dedicated AI cluster. + + + :param description: The description of this CreateDedicatedAiClusterDetails. + :type: str + """ + self._description = description + + @property + def type(self): + """ + **[Required]** Gets the type of this CreateDedicatedAiClusterDetails. + The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + + Allowed values are: + - HOSTING + - FINE_TUNING + + + :return: The type of this CreateDedicatedAiClusterDetails. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this CreateDedicatedAiClusterDetails. + The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + + Allowed values are: + - HOSTING + - FINE_TUNING + + + :param type: The type of this CreateDedicatedAiClusterDetails. + :type: str + """ + self._type = type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateDedicatedAiClusterDetails. + The compartment OCID to create the dedicated AI cluster in. + + + :return: The compartment_id of this CreateDedicatedAiClusterDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateDedicatedAiClusterDetails. + The compartment OCID to create the dedicated AI cluster in. + + + :param compartment_id: The compartment_id of this CreateDedicatedAiClusterDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def unit_count(self): + """ + **[Required]** Gets the unit_count of this CreateDedicatedAiClusterDetails. + The number of dedicated units in this AI cluster. + + + :return: The unit_count of this CreateDedicatedAiClusterDetails. + :rtype: int + """ + return self._unit_count + + @unit_count.setter + def unit_count(self, unit_count): + """ + Sets the unit_count of this CreateDedicatedAiClusterDetails. + The number of dedicated units in this AI cluster. + + + :param unit_count: The unit_count of this CreateDedicatedAiClusterDetails. + :type: int + """ + self._unit_count = unit_count + + @property + def unit_shape(self): + """ + **[Required]** Gets the unit_shape of this CreateDedicatedAiClusterDetails. + The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + + Allowed values are: + - LARGE_COHERE + - SMALL_COHERE + - EMBED_COHERE + - LLAMA2_70 + + + :return: The unit_shape of this CreateDedicatedAiClusterDetails. + :rtype: str + """ + return self._unit_shape + + @unit_shape.setter + def unit_shape(self, unit_shape): + """ + Sets the unit_shape of this CreateDedicatedAiClusterDetails. + The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + + Allowed values are: + - LARGE_COHERE + - SMALL_COHERE + - EMBED_COHERE + - LLAMA2_70 + + + :param unit_shape: The unit_shape of this CreateDedicatedAiClusterDetails. + :type: str + """ + self._unit_shape = unit_shape + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateDedicatedAiClusterDetails. + 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 CreateDedicatedAiClusterDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateDedicatedAiClusterDetails. + 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 CreateDedicatedAiClusterDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateDedicatedAiClusterDetails. + 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 CreateDedicatedAiClusterDetails. + :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 CreateDedicatedAiClusterDetails. + 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 CreateDedicatedAiClusterDetails. + :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/generative_ai/models/create_endpoint_details.py b/src/oci/generative_ai/models/create_endpoint_details.py new file mode 100644 index 000000000..72b9874bc --- /dev/null +++ b/src/oci/generative_ai/models/create_endpoint_details.py @@ -0,0 +1,305 @@ +# 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: 20231130 + + +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 CreateEndpointDetails(object): + """ + The data to create an endpoint. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateEndpointDetails 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 CreateEndpointDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateEndpointDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateEndpointDetails. + :type compartment_id: str + + :param model_id: + The value to assign to the model_id property of this CreateEndpointDetails. + :type model_id: str + + :param dedicated_ai_cluster_id: + The value to assign to the dedicated_ai_cluster_id property of this CreateEndpointDetails. + :type dedicated_ai_cluster_id: str + + :param content_moderation_config: + The value to assign to the content_moderation_config property of this CreateEndpointDetails. + :type content_moderation_config: oci.generative_ai.models.ContentModerationConfig + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateEndpointDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateEndpointDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'model_id': 'str', + 'dedicated_ai_cluster_id': 'str', + 'content_moderation_config': 'ContentModerationConfig', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'model_id': 'modelId', + 'dedicated_ai_cluster_id': 'dedicatedAiClusterId', + 'content_moderation_config': 'contentModerationConfig', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._compartment_id = None + self._model_id = None + self._dedicated_ai_cluster_id = None + self._content_moderation_config = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateEndpointDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateEndpointDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateEndpointDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateEndpointDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateEndpointDetails. + An optional description of the endpoint. + + + :return: The description of this CreateEndpointDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateEndpointDetails. + An optional description of the endpoint. + + + :param description: The description of this CreateEndpointDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateEndpointDetails. + The compartment OCID to create the endpoint in. + + + :return: The compartment_id of this CreateEndpointDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateEndpointDetails. + The compartment OCID to create the endpoint in. + + + :param compartment_id: The compartment_id of this CreateEndpointDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this CreateEndpointDetails. + The ID of the model that's used to create this endpoint. + + + :return: The model_id of this CreateEndpointDetails. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this CreateEndpointDetails. + The ID of the model that's used to create this endpoint. + + + :param model_id: The model_id of this CreateEndpointDetails. + :type: str + """ + self._model_id = model_id + + @property + def dedicated_ai_cluster_id(self): + """ + **[Required]** Gets the dedicated_ai_cluster_id of this CreateEndpointDetails. + The OCID of the dedicated AI cluster on which a model will be deployed to. + + + :return: The dedicated_ai_cluster_id of this CreateEndpointDetails. + :rtype: str + """ + return self._dedicated_ai_cluster_id + + @dedicated_ai_cluster_id.setter + def dedicated_ai_cluster_id(self, dedicated_ai_cluster_id): + """ + Sets the dedicated_ai_cluster_id of this CreateEndpointDetails. + The OCID of the dedicated AI cluster on which a model will be deployed to. + + + :param dedicated_ai_cluster_id: The dedicated_ai_cluster_id of this CreateEndpointDetails. + :type: str + """ + self._dedicated_ai_cluster_id = dedicated_ai_cluster_id + + @property + def content_moderation_config(self): + """ + Gets the content_moderation_config of this CreateEndpointDetails. + + :return: The content_moderation_config of this CreateEndpointDetails. + :rtype: oci.generative_ai.models.ContentModerationConfig + """ + return self._content_moderation_config + + @content_moderation_config.setter + def content_moderation_config(self, content_moderation_config): + """ + Sets the content_moderation_config of this CreateEndpointDetails. + + :param content_moderation_config: The content_moderation_config of this CreateEndpointDetails. + :type: oci.generative_ai.models.ContentModerationConfig + """ + self._content_moderation_config = content_moderation_config + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateEndpointDetails. + 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 CreateEndpointDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateEndpointDetails. + 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 CreateEndpointDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateEndpointDetails. + 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 CreateEndpointDetails. + :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 CreateEndpointDetails. + 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 CreateEndpointDetails. + :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/generative_ai/models/create_model_details.py b/src/oci/generative_ai/models/create_model_details.py new file mode 100644 index 000000000..db556f167 --- /dev/null +++ b/src/oci/generative_ai/models/create_model_details.py @@ -0,0 +1,336 @@ +# 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: 20231130 + + +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 CreateModelDetails(object): + """ + The data to create a custom model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateModelDetails 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 CreateModelDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateModelDetails. + :type compartment_id: str + + :param vendor: + The value to assign to the vendor property of this CreateModelDetails. + :type vendor: str + + :param version: + The value to assign to the version property of this CreateModelDetails. + :type version: str + + :param description: + The value to assign to the description property of this CreateModelDetails. + :type description: str + + :param base_model_id: + The value to assign to the base_model_id property of this CreateModelDetails. + :type base_model_id: str + + :param fine_tune_details: + The value to assign to the fine_tune_details property of this CreateModelDetails. + :type fine_tune_details: oci.generative_ai.models.FineTuneDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'compartment_id': 'str', + 'vendor': 'str', + 'version': 'str', + 'description': 'str', + 'base_model_id': 'str', + 'fine_tune_details': 'FineTuneDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'vendor': 'vendor', + 'version': 'version', + 'description': 'description', + 'base_model_id': 'baseModelId', + 'fine_tune_details': 'fineTuneDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._compartment_id = None + self._vendor = None + self._version = None + self._description = None + self._base_model_id = None + self._fine_tune_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateModelDetails. + A user-friendly name. + + + :return: The display_name of this CreateModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateModelDetails. + A user-friendly name. + + + :param display_name: The display_name of this CreateModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateModelDetails. + The compartment OCID for fine-tuned models. For pretrained models, this value is null. + + + :return: The compartment_id of this CreateModelDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateModelDetails. + The compartment OCID for fine-tuned models. For pretrained models, this value is null. + + + :param compartment_id: The compartment_id of this CreateModelDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def vendor(self): + """ + Gets the vendor of this CreateModelDetails. + The provider of the model. + + + :return: The vendor of this CreateModelDetails. + :rtype: str + """ + return self._vendor + + @vendor.setter + def vendor(self, vendor): + """ + Sets the vendor of this CreateModelDetails. + The provider of the model. + + + :param vendor: The vendor of this CreateModelDetails. + :type: str + """ + self._vendor = vendor + + @property + def version(self): + """ + Gets the version of this CreateModelDetails. + The version of the model. + + + :return: The version of this CreateModelDetails. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """ + Sets the version of this CreateModelDetails. + The version of the model. + + + :param version: The version of this CreateModelDetails. + :type: str + """ + self._version = version + + @property + def description(self): + """ + Gets the description of this CreateModelDetails. + An optional description of the model. + + + :return: The description of this CreateModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateModelDetails. + An optional description of the model. + + + :param description: The description of this CreateModelDetails. + :type: str + """ + self._description = description + + @property + def base_model_id(self): + """ + **[Required]** Gets the base_model_id of this CreateModelDetails. + The OCID of the base model that's used for fine-tuning. + + + :return: The base_model_id of this CreateModelDetails. + :rtype: str + """ + return self._base_model_id + + @base_model_id.setter + def base_model_id(self, base_model_id): + """ + Sets the base_model_id of this CreateModelDetails. + The OCID of the base model that's used for fine-tuning. + + + :param base_model_id: The base_model_id of this CreateModelDetails. + :type: str + """ + self._base_model_id = base_model_id + + @property + def fine_tune_details(self): + """ + **[Required]** Gets the fine_tune_details of this CreateModelDetails. + + :return: The fine_tune_details of this CreateModelDetails. + :rtype: oci.generative_ai.models.FineTuneDetails + """ + return self._fine_tune_details + + @fine_tune_details.setter + def fine_tune_details(self, fine_tune_details): + """ + Sets the fine_tune_details of this CreateModelDetails. + + :param fine_tune_details: The fine_tune_details of this CreateModelDetails. + :type: oci.generative_ai.models.FineTuneDetails + """ + self._fine_tune_details = fine_tune_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateModelDetails. + 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 CreateModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateModelDetails. + 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 CreateModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateModelDetails. + 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 CreateModelDetails. + :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 CreateModelDetails. + 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 CreateModelDetails. + :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/generative_ai/models/dataset.py b/src/oci/generative_ai/models/dataset.py new file mode 100644 index 000000000..8eac88435 --- /dev/null +++ b/src/oci/generative_ai/models/dataset.py @@ -0,0 +1,105 @@ +# 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: 20231130 + + +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 Dataset(object): + """ + The dataset used to fine-tune the model. + + Only one dataset is allowed per custom model, which is split 90-10 for training and validating. You must provide the dataset in a JSON Lines (JSONL) file. Each line in the JSONL file must have the format: + + `{\"prompt\": \"\", \"completion\": \"\"}` + """ + + #: A constant which can be used with the dataset_type property of a Dataset. + #: This constant has a value of "OBJECT_STORAGE" + DATASET_TYPE_OBJECT_STORAGE = "OBJECT_STORAGE" + + def __init__(self, **kwargs): + """ + Initializes a new Dataset 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.generative_ai.models.ObjectStorageDataset` + + 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 Dataset. + Allowed values for this property are: "OBJECT_STORAGE", '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' + else: + return 'Dataset' + + @property + def dataset_type(self): + """ + **[Required]** Gets the dataset_type of this Dataset. + The type of the data asset. + + Allowed values for this property are: "OBJECT_STORAGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The dataset_type of this Dataset. + :rtype: str + """ + return self._dataset_type + + @dataset_type.setter + def dataset_type(self, dataset_type): + """ + Sets the dataset_type of this Dataset. + The type of the data asset. + + + :param dataset_type: The dataset_type of this Dataset. + :type: str + """ + allowed_values = ["OBJECT_STORAGE"] + 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/generative_ai/models/dedicated_ai_cluster.py b/src/oci/generative_ai/models/dedicated_ai_cluster.py new file mode 100644 index 000000000..3723e0bd2 --- /dev/null +++ b/src/oci/generative_ai/models/dedicated_ai_cluster.py @@ -0,0 +1,612 @@ +# 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: 20231130 + + +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 DedicatedAiCluster(object): + """ + Dedicated AI clusters are compute resources that you can use for fine-tuning custom models or for hosting endpoints for custom models. The clusters are dedicated to your models and not shared with users in other tenancies. + + To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See + `Getting Started with Policies`__ and `Getting Access to Generative AI Resouces`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm + __ https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm + """ + + #: A constant which can be used with the type property of a DedicatedAiCluster. + #: This constant has a value of "HOSTING" + TYPE_HOSTING = "HOSTING" + + #: A constant which can be used with the type property of a DedicatedAiCluster. + #: This constant has a value of "FINE_TUNING" + TYPE_FINE_TUNING = "FINE_TUNING" + + #: A constant which can be used with the lifecycle_state property of a DedicatedAiCluster. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a DedicatedAiCluster. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a DedicatedAiCluster. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a DedicatedAiCluster. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a DedicatedAiCluster. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a DedicatedAiCluster. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a DedicatedAiCluster. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the unit_shape property of a DedicatedAiCluster. + #: This constant has a value of "LARGE_COHERE" + UNIT_SHAPE_LARGE_COHERE = "LARGE_COHERE" + + #: A constant which can be used with the unit_shape property of a DedicatedAiCluster. + #: This constant has a value of "SMALL_COHERE" + UNIT_SHAPE_SMALL_COHERE = "SMALL_COHERE" + + #: A constant which can be used with the unit_shape property of a DedicatedAiCluster. + #: This constant has a value of "EMBED_COHERE" + UNIT_SHAPE_EMBED_COHERE = "EMBED_COHERE" + + #: A constant which can be used with the unit_shape property of a DedicatedAiCluster. + #: This constant has a value of "LLAMA2_70" + UNIT_SHAPE_LLAMA2_70 = "LLAMA2_70" + + def __init__(self, **kwargs): + """ + Initializes a new DedicatedAiCluster 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 DedicatedAiCluster. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DedicatedAiCluster. + :type display_name: str + + :param description: + The value to assign to the description property of this DedicatedAiCluster. + :type description: str + + :param type: + The value to assign to the type property of this DedicatedAiCluster. + Allowed values for this property are: "HOSTING", "FINE_TUNING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param compartment_id: + The value to assign to the compartment_id property of this DedicatedAiCluster. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this DedicatedAiCluster. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this DedicatedAiCluster. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DedicatedAiCluster. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", '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 DedicatedAiCluster. + :type lifecycle_details: str + + :param unit_count: + The value to assign to the unit_count property of this DedicatedAiCluster. + :type unit_count: int + + :param unit_shape: + The value to assign to the unit_shape property of this DedicatedAiCluster. + Allowed values for this property are: "LARGE_COHERE", "SMALL_COHERE", "EMBED_COHERE", "LLAMA2_70", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type unit_shape: str + + :param capacity: + The value to assign to the capacity property of this DedicatedAiCluster. + :type capacity: oci.generative_ai.models.DedicatedAiClusterCapacity + + :param freeform_tags: + The value to assign to the freeform_tags property of this DedicatedAiCluster. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DedicatedAiCluster. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DedicatedAiCluster. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'type': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'unit_count': 'int', + 'unit_shape': 'str', + 'capacity': 'DedicatedAiClusterCapacity', + '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', + 'description': 'description', + 'type': 'type', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'unit_count': 'unitCount', + 'unit_shape': 'unitShape', + 'capacity': 'capacity', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._type = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._unit_count = None + self._unit_shape = None + self._capacity = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this DedicatedAiCluster. + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this DedicatedAiCluster. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this DedicatedAiCluster. + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this DedicatedAiCluster. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this DedicatedAiCluster. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this DedicatedAiCluster. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this DedicatedAiCluster. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this DedicatedAiCluster. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this DedicatedAiCluster. + An optional description of the dedicated AI cluster. + + + :return: The description of this DedicatedAiCluster. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this DedicatedAiCluster. + An optional description of the dedicated AI cluster. + + + :param description: The description of this DedicatedAiCluster. + :type: str + """ + self._description = description + + @property + def type(self): + """ + **[Required]** Gets the type of this DedicatedAiCluster. + The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + + Allowed values for this property are: "HOSTING", "FINE_TUNING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this DedicatedAiCluster. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this DedicatedAiCluster. + The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + + + :param type: The type of this DedicatedAiCluster. + :type: str + """ + allowed_values = ["HOSTING", "FINE_TUNING"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this DedicatedAiCluster. + The compartment OCID to create the dedicated AI cluster in. + + + :return: The compartment_id of this DedicatedAiCluster. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this DedicatedAiCluster. + The compartment OCID to create the dedicated AI cluster in. + + + :param compartment_id: The compartment_id of this DedicatedAiCluster. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this DedicatedAiCluster. + The date and time the dedicated AI cluster was created, in the format defined by RFC 3339 + + + :return: The time_created of this DedicatedAiCluster. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this DedicatedAiCluster. + The date and time the dedicated AI cluster was created, in the format defined by RFC 3339 + + + :param time_created: The time_created of this DedicatedAiCluster. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this DedicatedAiCluster. + The date and time the dedicated AI cluster was updated, in the format defined by RFC 3339 + + + :return: The time_updated of this DedicatedAiCluster. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this DedicatedAiCluster. + The date and time the dedicated AI cluster was updated, in the format defined by RFC 3339 + + + :param time_updated: The time_updated of this DedicatedAiCluster. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this DedicatedAiCluster. + The current state of the dedicated AI cluster. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this DedicatedAiCluster. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this DedicatedAiCluster. + The current state of the dedicated AI cluster. + + + :param lifecycle_state: The lifecycle_state of this DedicatedAiCluster. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION"] + 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 DedicatedAiCluster. + A message describing the current state with detail that can provide actionable information. + + + :return: The lifecycle_details of this DedicatedAiCluster. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this DedicatedAiCluster. + A message describing the current state with detail that can provide actionable information. + + + :param lifecycle_details: The lifecycle_details of this DedicatedAiCluster. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def unit_count(self): + """ + **[Required]** Gets the unit_count of this DedicatedAiCluster. + The number of dedicated units in this AI cluster. + + + :return: The unit_count of this DedicatedAiCluster. + :rtype: int + """ + return self._unit_count + + @unit_count.setter + def unit_count(self, unit_count): + """ + Sets the unit_count of this DedicatedAiCluster. + The number of dedicated units in this AI cluster. + + + :param unit_count: The unit_count of this DedicatedAiCluster. + :type: int + """ + self._unit_count = unit_count + + @property + def unit_shape(self): + """ + **[Required]** Gets the unit_shape of this DedicatedAiCluster. + The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + + Allowed values for this property are: "LARGE_COHERE", "SMALL_COHERE", "EMBED_COHERE", "LLAMA2_70", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The unit_shape of this DedicatedAiCluster. + :rtype: str + """ + return self._unit_shape + + @unit_shape.setter + def unit_shape(self, unit_shape): + """ + Sets the unit_shape of this DedicatedAiCluster. + The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + + + :param unit_shape: The unit_shape of this DedicatedAiCluster. + :type: str + """ + allowed_values = ["LARGE_COHERE", "SMALL_COHERE", "EMBED_COHERE", "LLAMA2_70"] + if not value_allowed_none_or_none_sentinel(unit_shape, allowed_values): + unit_shape = 'UNKNOWN_ENUM_VALUE' + self._unit_shape = unit_shape + + @property + def capacity(self): + """ + Gets the capacity of this DedicatedAiCluster. + + :return: The capacity of this DedicatedAiCluster. + :rtype: oci.generative_ai.models.DedicatedAiClusterCapacity + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """ + Sets the capacity of this DedicatedAiCluster. + + :param capacity: The capacity of this DedicatedAiCluster. + :type: oci.generative_ai.models.DedicatedAiClusterCapacity + """ + self._capacity = capacity + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this DedicatedAiCluster. + 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 DedicatedAiCluster. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this DedicatedAiCluster. + 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 DedicatedAiCluster. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this DedicatedAiCluster. + 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 DedicatedAiCluster. + :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 DedicatedAiCluster. + 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 DedicatedAiCluster. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this DedicatedAiCluster. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this DedicatedAiCluster. + :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 DedicatedAiCluster. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this DedicatedAiCluster. + :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/generative_ai/models/dedicated_ai_cluster_capacity.py b/src/oci/generative_ai/models/dedicated_ai_cluster_capacity.py new file mode 100644 index 000000000..d1e6faf3d --- /dev/null +++ b/src/oci/generative_ai/models/dedicated_ai_cluster_capacity.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: 20231130 + + +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 DedicatedAiClusterCapacity(object): + """ + The total capacity for a dedicated AI cluster. + """ + + #: A constant which can be used with the capacity_type property of a DedicatedAiClusterCapacity. + #: This constant has a value of "HOSTING_CAPACITY" + CAPACITY_TYPE_HOSTING_CAPACITY = "HOSTING_CAPACITY" + + def __init__(self, **kwargs): + """ + Initializes a new DedicatedAiClusterCapacity 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.generative_ai.models.DedicatedAiClusterHostingCapacity` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param capacity_type: + The value to assign to the capacity_type property of this DedicatedAiClusterCapacity. + Allowed values for this property are: "HOSTING_CAPACITY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type capacity_type: str + + """ + self.swagger_types = { + 'capacity_type': 'str' + } + + self.attribute_map = { + 'capacity_type': 'capacityType' + } + + self._capacity_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['capacityType'] + + if type == 'HOSTING_CAPACITY': + return 'DedicatedAiClusterHostingCapacity' + else: + return 'DedicatedAiClusterCapacity' + + @property + def capacity_type(self): + """ + **[Required]** Gets the capacity_type of this DedicatedAiClusterCapacity. + The type of the dedicated AI cluster capacity. + + Allowed values for this property are: "HOSTING_CAPACITY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The capacity_type of this DedicatedAiClusterCapacity. + :rtype: str + """ + return self._capacity_type + + @capacity_type.setter + def capacity_type(self, capacity_type): + """ + Sets the capacity_type of this DedicatedAiClusterCapacity. + The type of the dedicated AI cluster capacity. + + + :param capacity_type: The capacity_type of this DedicatedAiClusterCapacity. + :type: str + """ + allowed_values = ["HOSTING_CAPACITY"] + if not value_allowed_none_or_none_sentinel(capacity_type, allowed_values): + capacity_type = 'UNKNOWN_ENUM_VALUE' + self._capacity_type = capacity_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/generative_ai/models/dedicated_ai_cluster_collection.py b/src/oci/generative_ai/models/dedicated_ai_cluster_collection.py new file mode 100644 index 000000000..b9cefe1d5 --- /dev/null +++ b/src/oci/generative_ai/models/dedicated_ai_cluster_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: 20231130 + + +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 DedicatedAiClusterCollection(object): + """ + Results of a dedicate AI cluster search. Contains DedicatedAiClusterSummary items and other information such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DedicatedAiClusterCollection 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 DedicatedAiClusterCollection. + :type items: list[oci.generative_ai.models.DedicatedAiClusterSummary] + + """ + self.swagger_types = { + 'items': 'list[DedicatedAiClusterSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DedicatedAiClusterCollection. + List of dedicated AI clusters. + + + :return: The items of this DedicatedAiClusterCollection. + :rtype: list[oci.generative_ai.models.DedicatedAiClusterSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DedicatedAiClusterCollection. + List of dedicated AI clusters. + + + :param items: The items of this DedicatedAiClusterCollection. + :type: list[oci.generative_ai.models.DedicatedAiClusterSummary] + """ + 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/generative_ai/models/dedicated_ai_cluster_hosting_capacity.py b/src/oci/generative_ai/models/dedicated_ai_cluster_hosting_capacity.py new file mode 100644 index 000000000..9de6883fb --- /dev/null +++ b/src/oci/generative_ai/models/dedicated_ai_cluster_hosting_capacity.py @@ -0,0 +1,113 @@ +# 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: 20231130 + +from .dedicated_ai_cluster_capacity import DedicatedAiClusterCapacity +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 DedicatedAiClusterHostingCapacity(DedicatedAiClusterCapacity): + """ + The capacity of a hosting type dedicated AI cluster. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DedicatedAiClusterHostingCapacity object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai.models.DedicatedAiClusterHostingCapacity.capacity_type` attribute + of this class is ``HOSTING_CAPACITY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param capacity_type: + The value to assign to the capacity_type property of this DedicatedAiClusterHostingCapacity. + Allowed values for this property are: "HOSTING_CAPACITY" + :type capacity_type: str + + :param total_endpoint_capacity: + The value to assign to the total_endpoint_capacity property of this DedicatedAiClusterHostingCapacity. + :type total_endpoint_capacity: int + + :param used_endpoint_capacity: + The value to assign to the used_endpoint_capacity property of this DedicatedAiClusterHostingCapacity. + :type used_endpoint_capacity: int + + """ + self.swagger_types = { + 'capacity_type': 'str', + 'total_endpoint_capacity': 'int', + 'used_endpoint_capacity': 'int' + } + + self.attribute_map = { + 'capacity_type': 'capacityType', + 'total_endpoint_capacity': 'totalEndpointCapacity', + 'used_endpoint_capacity': 'usedEndpointCapacity' + } + + self._capacity_type = None + self._total_endpoint_capacity = None + self._used_endpoint_capacity = None + self._capacity_type = 'HOSTING_CAPACITY' + + @property + def total_endpoint_capacity(self): + """ + Gets the total_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + The total number of endpoints that can be hosted on this dedicated AI cluster. + + + :return: The total_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + :rtype: int + """ + return self._total_endpoint_capacity + + @total_endpoint_capacity.setter + def total_endpoint_capacity(self, total_endpoint_capacity): + """ + Sets the total_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + The total number of endpoints that can be hosted on this dedicated AI cluster. + + + :param total_endpoint_capacity: The total_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + :type: int + """ + self._total_endpoint_capacity = total_endpoint_capacity + + @property + def used_endpoint_capacity(self): + """ + Gets the used_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + The number of endpoints hosted on this dedicated AI cluster. + + + :return: The used_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + :rtype: int + """ + return self._used_endpoint_capacity + + @used_endpoint_capacity.setter + def used_endpoint_capacity(self, used_endpoint_capacity): + """ + Sets the used_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + The number of endpoints hosted on this dedicated AI cluster. + + + :param used_endpoint_capacity: The used_endpoint_capacity of this DedicatedAiClusterHostingCapacity. + :type: int + """ + self._used_endpoint_capacity = used_endpoint_capacity + + 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/generative_ai/models/dedicated_ai_cluster_summary.py b/src/oci/generative_ai/models/dedicated_ai_cluster_summary.py new file mode 100644 index 000000000..3b2474a38 --- /dev/null +++ b/src/oci/generative_ai/models/dedicated_ai_cluster_summary.py @@ -0,0 +1,556 @@ +# 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: 20231130 + + +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 DedicatedAiClusterSummary(object): + """ + Summary information about a dedicated AI cluster. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DedicatedAiClusterSummary 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 DedicatedAiClusterSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DedicatedAiClusterSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this DedicatedAiClusterSummary. + :type description: str + + :param type: + The value to assign to the type property of this DedicatedAiClusterSummary. + :type type: str + + :param compartment_id: + The value to assign to the compartment_id property of this DedicatedAiClusterSummary. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this DedicatedAiClusterSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this DedicatedAiClusterSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DedicatedAiClusterSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this DedicatedAiClusterSummary. + :type lifecycle_details: str + + :param unit_count: + The value to assign to the unit_count property of this DedicatedAiClusterSummary. + :type unit_count: int + + :param unit_shape: + The value to assign to the unit_shape property of this DedicatedAiClusterSummary. + :type unit_shape: str + + :param capacity: + The value to assign to the capacity property of this DedicatedAiClusterSummary. + :type capacity: oci.generative_ai.models.DedicatedAiClusterCapacity + + :param freeform_tags: + The value to assign to the freeform_tags property of this DedicatedAiClusterSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DedicatedAiClusterSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DedicatedAiClusterSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'type': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'unit_count': 'int', + 'unit_shape': 'str', + 'capacity': 'DedicatedAiClusterCapacity', + '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', + 'description': 'description', + 'type': 'type', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'unit_count': 'unitCount', + 'unit_shape': 'unitShape', + 'capacity': 'capacity', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._type = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._unit_count = None + self._unit_shape = None + self._capacity = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this DedicatedAiClusterSummary. + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this DedicatedAiClusterSummary. + The `OCID`__ of the dedicated AI cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this DedicatedAiClusterSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this DedicatedAiClusterSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this DedicatedAiClusterSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this DedicatedAiClusterSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this DedicatedAiClusterSummary. + An optional description of the dedicated AI cluster. + + + :return: The description of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this DedicatedAiClusterSummary. + An optional description of the dedicated AI cluster. + + + :param description: The description of this DedicatedAiClusterSummary. + :type: str + """ + self._description = description + + @property + def type(self): + """ + **[Required]** Gets the type of this DedicatedAiClusterSummary. + The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + + Allowed values are: + - HOSTING + - FINE_TUNING + + + :return: The type of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this DedicatedAiClusterSummary. + The dedicated AI cluster type indicating whether this is a fine-tuning/training processor or hosting/inference processor. + + Allowed values are: + - HOSTING + - FINE_TUNING + + + :param type: The type of this DedicatedAiClusterSummary. + :type: str + """ + self._type = type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this DedicatedAiClusterSummary. + The compartment OCID to create the dedicated AI cluster in. + + + :return: The compartment_id of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this DedicatedAiClusterSummary. + The compartment OCID to create the dedicated AI cluster in. + + + :param compartment_id: The compartment_id of this DedicatedAiClusterSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this DedicatedAiClusterSummary. + The date and time the dedicated AI cluster was created, in the format defined by RFC 3339. + + + :return: The time_created of this DedicatedAiClusterSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this DedicatedAiClusterSummary. + The date and time the dedicated AI cluster was created, in the format defined by RFC 3339. + + + :param time_created: The time_created of this DedicatedAiClusterSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this DedicatedAiClusterSummary. + The date and time the dedicated AI cluster was updated, in the format defined by RFC 3339. + + + :return: The time_updated of this DedicatedAiClusterSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this DedicatedAiClusterSummary. + The date and time the dedicated AI cluster was updated, in the format defined by RFC 3339. + + + :param time_updated: The time_updated of this DedicatedAiClusterSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this DedicatedAiClusterSummary. + The current state of the dedicated AI cluster. + + Allowed values are: + - CREATING + - ACTIVE + - UPDATING + - DELETING + - DELETED + - FAILED + - NEEDS_ATTENTION + + + :return: The lifecycle_state of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this DedicatedAiClusterSummary. + The current state of the dedicated AI cluster. + + Allowed values are: + - CREATING + - ACTIVE + - UPDATING + - DELETING + - DELETED + - FAILED + - NEEDS_ATTENTION + + + :param lifecycle_state: The lifecycle_state of this DedicatedAiClusterSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this DedicatedAiClusterSummary. + A message describing the current state of the dedicated AI cluster in more detail that can provide actionable information. + + + :return: The lifecycle_details of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this DedicatedAiClusterSummary. + A message describing the current state of the dedicated AI cluster in more detail that can provide actionable information. + + + :param lifecycle_details: The lifecycle_details of this DedicatedAiClusterSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def unit_count(self): + """ + **[Required]** Gets the unit_count of this DedicatedAiClusterSummary. + The number of dedicated units in this AI cluster. + + + :return: The unit_count of this DedicatedAiClusterSummary. + :rtype: int + """ + return self._unit_count + + @unit_count.setter + def unit_count(self, unit_count): + """ + Sets the unit_count of this DedicatedAiClusterSummary. + The number of dedicated units in this AI cluster. + + + :param unit_count: The unit_count of this DedicatedAiClusterSummary. + :type: int + """ + self._unit_count = unit_count + + @property + def unit_shape(self): + """ + **[Required]** Gets the unit_shape of this DedicatedAiClusterSummary. + The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + + + :return: The unit_shape of this DedicatedAiClusterSummary. + :rtype: str + """ + return self._unit_shape + + @unit_shape.setter + def unit_shape(self, unit_shape): + """ + Sets the unit_shape of this DedicatedAiClusterSummary. + The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers. + + + :param unit_shape: The unit_shape of this DedicatedAiClusterSummary. + :type: str + """ + self._unit_shape = unit_shape + + @property + def capacity(self): + """ + Gets the capacity of this DedicatedAiClusterSummary. + + :return: The capacity of this DedicatedAiClusterSummary. + :rtype: oci.generative_ai.models.DedicatedAiClusterCapacity + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """ + Sets the capacity of this DedicatedAiClusterSummary. + + :param capacity: The capacity of this DedicatedAiClusterSummary. + :type: oci.generative_ai.models.DedicatedAiClusterCapacity + """ + self._capacity = capacity + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this DedicatedAiClusterSummary. + 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 DedicatedAiClusterSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this DedicatedAiClusterSummary. + 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 DedicatedAiClusterSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this DedicatedAiClusterSummary. + 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 DedicatedAiClusterSummary. + :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 DedicatedAiClusterSummary. + 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 DedicatedAiClusterSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this DedicatedAiClusterSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this DedicatedAiClusterSummary. + :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 DedicatedAiClusterSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this DedicatedAiClusterSummary. + :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/generative_ai/models/endpoint.py b/src/oci/generative_ai/models/endpoint.py new file mode 100644 index 000000000..f57156d0e --- /dev/null +++ b/src/oci/generative_ai/models/endpoint.py @@ -0,0 +1,533 @@ +# 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: 20231130 + + +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 Endpoint(object): + """ + To host a custom model for inference, create an endpoint for that model on a dedicated AI cluster of type HOSTING. + + To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See + `Getting Started with Policies`__ and `Getting Access to Generative AI Resouces`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm + __ https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm + """ + + #: A constant which can be used with the lifecycle_state property of a Endpoint. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Endpoint. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Endpoint. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Endpoint. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Endpoint. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Endpoint. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Endpoint 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 Endpoint. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Endpoint. + :type display_name: str + + :param description: + The value to assign to the description property of this Endpoint. + :type description: str + + :param model_id: + The value to assign to the model_id property of this Endpoint. + :type model_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this Endpoint. + :type compartment_id: str + + :param dedicated_ai_cluster_id: + The value to assign to the dedicated_ai_cluster_id property of this Endpoint. + :type dedicated_ai_cluster_id: str + + :param time_created: + The value to assign to the time_created property of this Endpoint. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Endpoint. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Endpoint. + Allowed values for this property are: "ACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED", '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 Endpoint. + :type lifecycle_details: str + + :param content_moderation_config: + The value to assign to the content_moderation_config property of this Endpoint. + :type content_moderation_config: oci.generative_ai.models.ContentModerationConfig + + :param freeform_tags: + The value to assign to the freeform_tags property of this Endpoint. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Endpoint. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Endpoint. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'model_id': 'str', + 'compartment_id': 'str', + 'dedicated_ai_cluster_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'content_moderation_config': 'ContentModerationConfig', + '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', + 'description': 'description', + 'model_id': 'modelId', + 'compartment_id': 'compartmentId', + 'dedicated_ai_cluster_id': 'dedicatedAiClusterId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'content_moderation_config': 'contentModerationConfig', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._model_id = None + self._compartment_id = None + self._dedicated_ai_cluster_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._content_moderation_config = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Endpoint. + An OCID that uniquely identifies this endpoint resource. + + + :return: The id of this Endpoint. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Endpoint. + An OCID that uniquely identifies this endpoint resource. + + + :param id: The id of this Endpoint. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this Endpoint. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this Endpoint. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Endpoint. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this Endpoint. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Endpoint. + An optional description of the endpoint. + + + :return: The description of this Endpoint. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Endpoint. + An optional description of the endpoint. + + + :param description: The description of this Endpoint. + :type: str + """ + self._description = description + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this Endpoint. + The OCID of the model that's used to create this endpoint. + + + :return: The model_id of this Endpoint. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this Endpoint. + The OCID of the model that's used to create this endpoint. + + + :param model_id: The model_id of this Endpoint. + :type: str + """ + self._model_id = model_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Endpoint. + The compartment OCID to create the endpoint in. + + + :return: The compartment_id of this Endpoint. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Endpoint. + The compartment OCID to create the endpoint in. + + + :param compartment_id: The compartment_id of this Endpoint. + :type: str + """ + self._compartment_id = compartment_id + + @property + def dedicated_ai_cluster_id(self): + """ + **[Required]** Gets the dedicated_ai_cluster_id of this Endpoint. + The OCID of the dedicated AI cluster on which the model will be deployed to. + + + :return: The dedicated_ai_cluster_id of this Endpoint. + :rtype: str + """ + return self._dedicated_ai_cluster_id + + @dedicated_ai_cluster_id.setter + def dedicated_ai_cluster_id(self, dedicated_ai_cluster_id): + """ + Sets the dedicated_ai_cluster_id of this Endpoint. + The OCID of the dedicated AI cluster on which the model will be deployed to. + + + :param dedicated_ai_cluster_id: The dedicated_ai_cluster_id of this Endpoint. + :type: str + """ + self._dedicated_ai_cluster_id = dedicated_ai_cluster_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Endpoint. + The date and time that the endpoint was created in the format of an RFC3339 datetime string. + + + :return: The time_created of this Endpoint. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Endpoint. + The date and time that the endpoint was created in the format of an RFC3339 datetime string. + + + :param time_created: The time_created of this Endpoint. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Endpoint. + The date and time that the endpoint was updated in the format of an RFC3339 datetime string. + + + :return: The time_updated of this Endpoint. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Endpoint. + The date and time that the endpoint was updated in the format of an RFC3339 datetime string. + + + :param time_updated: The time_updated of this Endpoint. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Endpoint. + The current state of the endpoint. + + Allowed values for this property are: "ACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Endpoint. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Endpoint. + The current state of the endpoint. + + + :param lifecycle_state: The lifecycle_state of this Endpoint. + :type: str + """ + allowed_values = ["ACTIVE", "CREATING", "UPDATING", "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 + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Endpoint. + A message describing the current state of the endpoint in more detail that can provide actionable information. + + + :return: The lifecycle_details of this Endpoint. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Endpoint. + A message describing the current state of the endpoint in more detail that can provide actionable information. + + + :param lifecycle_details: The lifecycle_details of this Endpoint. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def content_moderation_config(self): + """ + Gets the content_moderation_config of this Endpoint. + + :return: The content_moderation_config of this Endpoint. + :rtype: oci.generative_ai.models.ContentModerationConfig + """ + return self._content_moderation_config + + @content_moderation_config.setter + def content_moderation_config(self, content_moderation_config): + """ + Sets the content_moderation_config of this Endpoint. + + :param content_moderation_config: The content_moderation_config of this Endpoint. + :type: oci.generative_ai.models.ContentModerationConfig + """ + self._content_moderation_config = content_moderation_config + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Endpoint. + 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 Endpoint. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Endpoint. + 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 Endpoint. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Endpoint. + 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 Endpoint. + :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 Endpoint. + 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 Endpoint. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Endpoint. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this Endpoint. + :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 Endpoint. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this Endpoint. + :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/generative_ai/models/endpoint_collection.py b/src/oci/generative_ai/models/endpoint_collection.py new file mode 100644 index 000000000..fa3cd894b --- /dev/null +++ b/src/oci/generative_ai/models/endpoint_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: 20231130 + + +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 EndpointCollection(object): + """ + Results of an endpoint search. Contains EndpointSummary items and other information such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EndpointCollection 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 EndpointCollection. + :type items: list[oci.generative_ai.models.EndpointSummary] + + """ + self.swagger_types = { + 'items': 'list[EndpointSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this EndpointCollection. + List of endpoints. + + + :return: The items of this EndpointCollection. + :rtype: list[oci.generative_ai.models.EndpointSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this EndpointCollection. + List of endpoints. + + + :param items: The items of this EndpointCollection. + :type: list[oci.generative_ai.models.EndpointSummary] + """ + 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/generative_ai/models/endpoint_summary.py b/src/oci/generative_ai/models/endpoint_summary.py new file mode 100644 index 000000000..790faee64 --- /dev/null +++ b/src/oci/generative_ai/models/endpoint_summary.py @@ -0,0 +1,511 @@ +# 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: 20231130 + + +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 EndpointSummary(object): + """ + Summary information for an endpoint resource. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EndpointSummary 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 EndpointSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this EndpointSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this EndpointSummary. + :type description: str + + :param model_id: + The value to assign to the model_id property of this EndpointSummary. + :type model_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this EndpointSummary. + :type compartment_id: str + + :param dedicated_ai_cluster_id: + The value to assign to the dedicated_ai_cluster_id property of this EndpointSummary. + :type dedicated_ai_cluster_id: str + + :param time_created: + The value to assign to the time_created property of this EndpointSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this EndpointSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this EndpointSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this EndpointSummary. + :type lifecycle_details: str + + :param content_moderation_config: + The value to assign to the content_moderation_config property of this EndpointSummary. + :type content_moderation_config: oci.generative_ai.models.ContentModerationConfig + + :param freeform_tags: + The value to assign to the freeform_tags property of this EndpointSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this EndpointSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this EndpointSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'model_id': 'str', + 'compartment_id': 'str', + 'dedicated_ai_cluster_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'content_moderation_config': 'ContentModerationConfig', + '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', + 'description': 'description', + 'model_id': 'modelId', + 'compartment_id': 'compartmentId', + 'dedicated_ai_cluster_id': 'dedicatedAiClusterId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'content_moderation_config': 'contentModerationConfig', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._model_id = None + self._compartment_id = None + self._dedicated_ai_cluster_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._content_moderation_config = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this EndpointSummary. + An OCID that uniquely identifies this endpoint resource. + + + :return: The id of this EndpointSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this EndpointSummary. + An OCID that uniquely identifies this endpoint resource. + + + :param id: The id of this EndpointSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this EndpointSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this EndpointSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this EndpointSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this EndpointSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this EndpointSummary. + An optional description of the endpoint. + + + :return: The description of this EndpointSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this EndpointSummary. + An optional description of the endpoint. + + + :param description: The description of this EndpointSummary. + :type: str + """ + self._description = description + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this EndpointSummary. + The OCID of the model that's used to create this endpoint. + + + :return: The model_id of this EndpointSummary. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this EndpointSummary. + The OCID of the model that's used to create this endpoint. + + + :param model_id: The model_id of this EndpointSummary. + :type: str + """ + self._model_id = model_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this EndpointSummary. + The compartment OCID to create the endpoint in. + + + :return: The compartment_id of this EndpointSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this EndpointSummary. + The compartment OCID to create the endpoint in. + + + :param compartment_id: The compartment_id of this EndpointSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def dedicated_ai_cluster_id(self): + """ + **[Required]** Gets the dedicated_ai_cluster_id of this EndpointSummary. + The OCID of the dedicated AI cluster on which a model will be deployed to. + + + :return: The dedicated_ai_cluster_id of this EndpointSummary. + :rtype: str + """ + return self._dedicated_ai_cluster_id + + @dedicated_ai_cluster_id.setter + def dedicated_ai_cluster_id(self, dedicated_ai_cluster_id): + """ + Sets the dedicated_ai_cluster_id of this EndpointSummary. + The OCID of the dedicated AI cluster on which a model will be deployed to. + + + :param dedicated_ai_cluster_id: The dedicated_ai_cluster_id of this EndpointSummary. + :type: str + """ + self._dedicated_ai_cluster_id = dedicated_ai_cluster_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this EndpointSummary. + The date and time that the endpoint was created in the format of an RFC3339 datetime string. + + + :return: The time_created of this EndpointSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this EndpointSummary. + The date and time that the endpoint was created in the format of an RFC3339 datetime string. + + + :param time_created: The time_created of this EndpointSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this EndpointSummary. + The date and time the endpoint was updated in the format of n RFC3339 datetime string. + + + :return: The time_updated of this EndpointSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this EndpointSummary. + The date and time the endpoint was updated in the format of n RFC3339 datetime string. + + + :param time_updated: The time_updated of this EndpointSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this EndpointSummary. + The current state of the endpoint. + + Allowed values are: + - ACTIVE + - CREATING + - UPDATING + - DELETING + - DELETED + - FAILED + + + :return: The lifecycle_state of this EndpointSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this EndpointSummary. + The current state of the endpoint. + + Allowed values are: + - ACTIVE + - CREATING + - UPDATING + - DELETING + - DELETED + - FAILED + + + :param lifecycle_state: The lifecycle_state of this EndpointSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this EndpointSummary. + A message describing the current state with detail that can provide actionable information. + + + :return: The lifecycle_details of this EndpointSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this EndpointSummary. + A message describing the current state with detail that can provide actionable information. + + + :param lifecycle_details: The lifecycle_details of this EndpointSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def content_moderation_config(self): + """ + Gets the content_moderation_config of this EndpointSummary. + + :return: The content_moderation_config of this EndpointSummary. + :rtype: oci.generative_ai.models.ContentModerationConfig + """ + return self._content_moderation_config + + @content_moderation_config.setter + def content_moderation_config(self, content_moderation_config): + """ + Sets the content_moderation_config of this EndpointSummary. + + :param content_moderation_config: The content_moderation_config of this EndpointSummary. + :type: oci.generative_ai.models.ContentModerationConfig + """ + self._content_moderation_config = content_moderation_config + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this EndpointSummary. + 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 EndpointSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this EndpointSummary. + 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 EndpointSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this EndpointSummary. + 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 EndpointSummary. + :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 EndpointSummary. + 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 EndpointSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this EndpointSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this EndpointSummary. + :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 EndpointSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this EndpointSummary. + :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/generative_ai/models/fine_tune_details.py b/src/oci/generative_ai/models/fine_tune_details.py new file mode 100644 index 000000000..b25c9a9c3 --- /dev/null +++ b/src/oci/generative_ai/models/fine_tune_details.py @@ -0,0 +1,126 @@ +# 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: 20231130 + + +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 FineTuneDetails(object): + """ + Details about fine-tuning a custom model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FineTuneDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param training_dataset: + The value to assign to the training_dataset property of this FineTuneDetails. + :type training_dataset: oci.generative_ai.models.Dataset + + :param dedicated_ai_cluster_id: + The value to assign to the dedicated_ai_cluster_id property of this FineTuneDetails. + :type dedicated_ai_cluster_id: str + + :param training_config: + The value to assign to the training_config property of this FineTuneDetails. + :type training_config: oci.generative_ai.models.TrainingConfig + + """ + self.swagger_types = { + 'training_dataset': 'Dataset', + 'dedicated_ai_cluster_id': 'str', + 'training_config': 'TrainingConfig' + } + + self.attribute_map = { + 'training_dataset': 'trainingDataset', + 'dedicated_ai_cluster_id': 'dedicatedAiClusterId', + 'training_config': 'trainingConfig' + } + + self._training_dataset = None + self._dedicated_ai_cluster_id = None + self._training_config = None + + @property + def training_dataset(self): + """ + **[Required]** Gets the training_dataset of this FineTuneDetails. + + :return: The training_dataset of this FineTuneDetails. + :rtype: oci.generative_ai.models.Dataset + """ + return self._training_dataset + + @training_dataset.setter + def training_dataset(self, training_dataset): + """ + Sets the training_dataset of this FineTuneDetails. + + :param training_dataset: The training_dataset of this FineTuneDetails. + :type: oci.generative_ai.models.Dataset + """ + self._training_dataset = training_dataset + + @property + def dedicated_ai_cluster_id(self): + """ + **[Required]** Gets the dedicated_ai_cluster_id of this FineTuneDetails. + The OCID of the dedicated AI cluster this fine-tuning runs on. + + + :return: The dedicated_ai_cluster_id of this FineTuneDetails. + :rtype: str + """ + return self._dedicated_ai_cluster_id + + @dedicated_ai_cluster_id.setter + def dedicated_ai_cluster_id(self, dedicated_ai_cluster_id): + """ + Sets the dedicated_ai_cluster_id of this FineTuneDetails. + The OCID of the dedicated AI cluster this fine-tuning runs on. + + + :param dedicated_ai_cluster_id: The dedicated_ai_cluster_id of this FineTuneDetails. + :type: str + """ + self._dedicated_ai_cluster_id = dedicated_ai_cluster_id + + @property + def training_config(self): + """ + Gets the training_config of this FineTuneDetails. + + :return: The training_config of this FineTuneDetails. + :rtype: oci.generative_ai.models.TrainingConfig + """ + return self._training_config + + @training_config.setter + def training_config(self, training_config): + """ + Sets the training_config of this FineTuneDetails. + + :param training_config: The training_config of this FineTuneDetails. + :type: oci.generative_ai.models.TrainingConfig + """ + self._training_config = training_config + + 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/generative_ai/models/model.py b/src/oci/generative_ai/models/model.py new file mode 100644 index 000000000..503ae9d78 --- /dev/null +++ b/src/oci/generative_ai/models/model.py @@ -0,0 +1,752 @@ +# 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: 20231130 + + +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 Model(object): + """ + You can create a custom model by using your dataset to fine-tune an out-of-the-box text generation base model. Have your dataset ready before you create a custom model. See `Training Data Requirements`__. + + To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See + `Getting Started with Policies`__ and `Getting Access to Generative AI Resouces`__. + + __ https://docs.cloud.oracle.com/iaas/Content/generative-ai/training-data-requirements.htm + __ https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm + __ https://docs.cloud.oracle.com/iaas/Content/generative-ai/iam-policies.htm + """ + + #: A constant which can be used with the capabilities property of a Model. + #: This constant has a value of "TEXT_GENERATION" + CAPABILITIES_TEXT_GENERATION = "TEXT_GENERATION" + + #: A constant which can be used with the capabilities property of a Model. + #: This constant has a value of "TEXT_SUMMARIZATION" + CAPABILITIES_TEXT_SUMMARIZATION = "TEXT_SUMMARIZATION" + + #: A constant which can be used with the capabilities property of a Model. + #: This constant has a value of "TEXT_EMBEDDINGS" + CAPABILITIES_TEXT_EMBEDDINGS = "TEXT_EMBEDDINGS" + + #: A constant which can be used with the capabilities property of a Model. + #: This constant has a value of "FINE_TUNE" + CAPABILITIES_FINE_TUNE = "FINE_TUNE" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the type property of a Model. + #: This constant has a value of "BASE" + TYPE_BASE = "BASE" + + #: A constant which can be used with the type property of a Model. + #: This constant has a value of "CUSTOM" + TYPE_CUSTOM = "CUSTOM" + + def __init__(self, **kwargs): + """ + Initializes a new Model 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 Model. + :type id: str + + :param description: + The value to assign to the description property of this Model. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this Model. + :type compartment_id: str + + :param capabilities: + The value to assign to the capabilities property of this Model. + Allowed values for items in this list are: "TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type capabilities: list[str] + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Model. + Allowed values for this property are: "ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED", '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 Model. + :type lifecycle_details: str + + :param vendor: + The value to assign to the vendor property of this Model. + :type vendor: str + + :param version: + The value to assign to the version property of this Model. + :type version: str + + :param display_name: + The value to assign to the display_name property of this Model. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this Model. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Model. + :type time_updated: datetime + + :param base_model_id: + The value to assign to the base_model_id property of this Model. + :type base_model_id: str + + :param type: + The value to assign to the type property of this Model. + Allowed values for this property are: "BASE", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param fine_tune_details: + The value to assign to the fine_tune_details property of this Model. + :type fine_tune_details: oci.generative_ai.models.FineTuneDetails + + :param model_metrics: + The value to assign to the model_metrics property of this Model. + :type model_metrics: oci.generative_ai.models.ModelMetrics + + :param is_long_term_supported: + The value to assign to the is_long_term_supported property of this Model. + :type is_long_term_supported: bool + + :param time_deprecated: + The value to assign to the time_deprecated property of this Model. + :type time_deprecated: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this Model. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Model. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Model. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'capabilities': 'list[str]', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'vendor': 'str', + 'version': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'base_model_id': 'str', + 'type': 'str', + 'fine_tune_details': 'FineTuneDetails', + 'model_metrics': 'ModelMetrics', + 'is_long_term_supported': 'bool', + 'time_deprecated': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'capabilities': 'capabilities', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'vendor': 'vendor', + 'version': 'version', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'base_model_id': 'baseModelId', + 'type': 'type', + 'fine_tune_details': 'fineTuneDetails', + 'model_metrics': 'modelMetrics', + 'is_long_term_supported': 'isLongTermSupported', + 'time_deprecated': 'timeDeprecated', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._description = None + self._compartment_id = None + self._capabilities = None + self._lifecycle_state = None + self._lifecycle_details = None + self._vendor = None + self._version = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._base_model_id = None + self._type = None + self._fine_tune_details = None + self._model_metrics = None + self._is_long_term_supported = None + self._time_deprecated = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Model. + An ID that uniquely identifies a pretrained or fine-tuned model. + + + :return: The id of this Model. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Model. + An ID that uniquely identifies a pretrained or fine-tuned model. + + + :param id: The id of this Model. + :type: str + """ + self._id = id + + @property + def description(self): + """ + Gets the description of this Model. + An optional description of the model. + + + :return: The description of this Model. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Model. + An optional description of the model. + + + :param description: The description of this Model. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Model. + The compartment OCID for fine-tuned models. For pretrained models, this value is null. + + + :return: The compartment_id of this Model. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Model. + The compartment OCID for fine-tuned models. For pretrained models, this value is null. + + + :param compartment_id: The compartment_id of this Model. + :type: str + """ + self._compartment_id = compartment_id + + @property + def capabilities(self): + """ + **[Required]** Gets the capabilities of this Model. + Describes what this model can be used for. + + Allowed values for items in this list are: "TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The capabilities of this Model. + :rtype: list[str] + """ + return self._capabilities + + @capabilities.setter + def capabilities(self, capabilities): + """ + Sets the capabilities of this Model. + Describes what this model can be used for. + + + :param capabilities: The capabilities of this Model. + :type: list[str] + """ + allowed_values = ["TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE"] + if capabilities: + capabilities[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in capabilities] + self._capabilities = capabilities + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Model. + The lifecycle state of the model. + + Allowed values for this property are: "ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Model. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Model. + The lifecycle state of the model. + + + :param lifecycle_state: The lifecycle_state of this Model. + :type: str + """ + allowed_values = ["ACTIVE", "CREATING", "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 + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Model. + A message describing the current state of the model in more detail that can provide actionable information. + + + :return: The lifecycle_details of this Model. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Model. + A message describing the current state of the model in more detail that can provide actionable information. + + + :param lifecycle_details: The lifecycle_details of this Model. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def vendor(self): + """ + Gets the vendor of this Model. + The provider of the base model. + + + :return: The vendor of this Model. + :rtype: str + """ + return self._vendor + + @vendor.setter + def vendor(self, vendor): + """ + Sets the vendor of this Model. + The provider of the base model. + + + :param vendor: The vendor of this Model. + :type: str + """ + self._vendor = vendor + + @property + def version(self): + """ + Gets the version of this Model. + The version of the model. + + + :return: The version of this Model. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """ + Sets the version of this Model. + The version of the model. + + + :param version: The version of this Model. + :type: str + """ + self._version = version + + @property + def display_name(self): + """ + Gets the display_name of this Model. + A user-friendly name. + + + :return: The display_name of this Model. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Model. + A user-friendly name. + + + :param display_name: The display_name of this Model. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Model. + The date and time that the model was created in the format of an RFC3339 datetime string. + + + :return: The time_created of this Model. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Model. + The date and time that the model was created in the format of an RFC3339 datetime string. + + + :param time_created: The time_created of this Model. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Model. + The date and time that the model was updated in the format of an RFC3339 datetime string. + + + :return: The time_updated of this Model. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Model. + The date and time that the model was updated in the format of an RFC3339 datetime string. + + + :param time_updated: The time_updated of this Model. + :type: datetime + """ + self._time_updated = time_updated + + @property + def base_model_id(self): + """ + Gets the base_model_id of this Model. + The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null. + + + :return: The base_model_id of this Model. + :rtype: str + """ + return self._base_model_id + + @base_model_id.setter + def base_model_id(self, base_model_id): + """ + Sets the base_model_id of this Model. + The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null. + + + :param base_model_id: The base_model_id of this Model. + :type: str + """ + self._base_model_id = base_model_id + + @property + def type(self): + """ + **[Required]** Gets the type of this Model. + The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model. + + Allowed values for this property are: "BASE", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this Model. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this Model. + The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model. + + + :param type: The type of this Model. + :type: str + """ + allowed_values = ["BASE", "CUSTOM"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def fine_tune_details(self): + """ + Gets the fine_tune_details of this Model. + + :return: The fine_tune_details of this Model. + :rtype: oci.generative_ai.models.FineTuneDetails + """ + return self._fine_tune_details + + @fine_tune_details.setter + def fine_tune_details(self, fine_tune_details): + """ + Sets the fine_tune_details of this Model. + + :param fine_tune_details: The fine_tune_details of this Model. + :type: oci.generative_ai.models.FineTuneDetails + """ + self._fine_tune_details = fine_tune_details + + @property + def model_metrics(self): + """ + Gets the model_metrics of this Model. + + :return: The model_metrics of this Model. + :rtype: oci.generative_ai.models.ModelMetrics + """ + return self._model_metrics + + @model_metrics.setter + def model_metrics(self, model_metrics): + """ + Sets the model_metrics of this Model. + + :param model_metrics: The model_metrics of this Model. + :type: oci.generative_ai.models.ModelMetrics + """ + self._model_metrics = model_metrics + + @property + def is_long_term_supported(self): + """ + Gets the is_long_term_supported of this Model. + Whether a model is supported long-term. Only applicable to base models. + + + :return: The is_long_term_supported of this Model. + :rtype: bool + """ + return self._is_long_term_supported + + @is_long_term_supported.setter + def is_long_term_supported(self, is_long_term_supported): + """ + Sets the is_long_term_supported of this Model. + Whether a model is supported long-term. Only applicable to base models. + + + :param is_long_term_supported: The is_long_term_supported of this Model. + :type: bool + """ + self._is_long_term_supported = is_long_term_supported + + @property + def time_deprecated(self): + """ + Gets the time_deprecated of this Model. + Corresponds to the time when the custom model and its associated foundation model will be deprecated. + + + :return: The time_deprecated of this Model. + :rtype: datetime + """ + return self._time_deprecated + + @time_deprecated.setter + def time_deprecated(self, time_deprecated): + """ + Sets the time_deprecated of this Model. + Corresponds to the time when the custom model and its associated foundation model will be deprecated. + + + :param time_deprecated: The time_deprecated of this Model. + :type: datetime + """ + self._time_deprecated = time_deprecated + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Model. + 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 Model. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Model. + 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 Model. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Model. + 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 Model. + :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 Model. + 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 Model. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Model. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this Model. + :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 Model. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this Model. + :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/generative_ai/models/model_collection.py b/src/oci/generative_ai/models/model_collection.py new file mode 100644 index 000000000..4c93c28ea --- /dev/null +++ b/src/oci/generative_ai/models/model_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: 20231130 + + +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 ModelCollection(object): + """ + Results of a model search. Contains ModelSummary items and other information such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModelCollection 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 ModelCollection. + :type items: list[oci.generative_ai.models.ModelSummary] + + """ + self.swagger_types = { + 'items': 'list[ModelSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ModelCollection. + The results of a model search. + + + :return: The items of this ModelCollection. + :rtype: list[oci.generative_ai.models.ModelSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ModelCollection. + The results of a model search. + + + :param items: The items of this ModelCollection. + :type: list[oci.generative_ai.models.ModelSummary] + """ + 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/generative_ai/models/model_metrics.py b/src/oci/generative_ai/models/model_metrics.py new file mode 100644 index 000000000..b210f156e --- /dev/null +++ b/src/oci/generative_ai/models/model_metrics.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: 20231130 + + +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 ModelMetrics(object): + """ + Model metrics during the creation of a new model. + """ + + #: A constant which can be used with the model_metrics_type property of a ModelMetrics. + #: This constant has a value of "TEXT_GENERATION_MODEL_METRICS" + MODEL_METRICS_TYPE_TEXT_GENERATION_MODEL_METRICS = "TEXT_GENERATION_MODEL_METRICS" + + def __init__(self, **kwargs): + """ + Initializes a new ModelMetrics 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.generative_ai.models.TextGenerationModelMetrics` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_metrics_type: + The value to assign to the model_metrics_type property of this ModelMetrics. + Allowed values for this property are: "TEXT_GENERATION_MODEL_METRICS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_metrics_type: str + + """ + self.swagger_types = { + 'model_metrics_type': 'str' + } + + self.attribute_map = { + 'model_metrics_type': 'modelMetricsType' + } + + self._model_metrics_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['modelMetricsType'] + + if type == 'TEXT_GENERATION_MODEL_METRICS': + return 'TextGenerationModelMetrics' + else: + return 'ModelMetrics' + + @property + def model_metrics_type(self): + """ + **[Required]** Gets the model_metrics_type of this ModelMetrics. + The type of the model metrics. Each type of model can expect a different set of model metrics. + + Allowed values for this property are: "TEXT_GENERATION_MODEL_METRICS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The model_metrics_type of this ModelMetrics. + :rtype: str + """ + return self._model_metrics_type + + @model_metrics_type.setter + def model_metrics_type(self, model_metrics_type): + """ + Sets the model_metrics_type of this ModelMetrics. + The type of the model metrics. Each type of model can expect a different set of model metrics. + + + :param model_metrics_type: The model_metrics_type of this ModelMetrics. + :type: str + """ + allowed_values = ["TEXT_GENERATION_MODEL_METRICS"] + if not value_allowed_none_or_none_sentinel(model_metrics_type, allowed_values): + model_metrics_type = 'UNKNOWN_ENUM_VALUE' + self._model_metrics_type = model_metrics_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/generative_ai/models/model_summary.py b/src/oci/generative_ai/models/model_summary.py new file mode 100644 index 000000000..dbb0e9e33 --- /dev/null +++ b/src/oci/generative_ai/models/model_summary.py @@ -0,0 +1,661 @@ +# 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: 20231130 + + +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 ModelSummary(object): + """ + Summary of the model. + """ + + #: A constant which can be used with the capabilities property of a ModelSummary. + #: This constant has a value of "TEXT_GENERATION" + CAPABILITIES_TEXT_GENERATION = "TEXT_GENERATION" + + #: A constant which can be used with the capabilities property of a ModelSummary. + #: This constant has a value of "TEXT_SUMMARIZATION" + CAPABILITIES_TEXT_SUMMARIZATION = "TEXT_SUMMARIZATION" + + #: A constant which can be used with the capabilities property of a ModelSummary. + #: This constant has a value of "TEXT_EMBEDDINGS" + CAPABILITIES_TEXT_EMBEDDINGS = "TEXT_EMBEDDINGS" + + #: A constant which can be used with the capabilities property of a ModelSummary. + #: This constant has a value of "FINE_TUNE" + CAPABILITIES_FINE_TUNE = "FINE_TUNE" + + def __init__(self, **kwargs): + """ + Initializes a new ModelSummary 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 ModelSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ModelSummary. + :type compartment_id: str + + :param capabilities: + The value to assign to the capabilities property of this ModelSummary. + Allowed values for items in this list are: "TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type capabilities: list[str] + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ModelSummary. + :type lifecycle_details: str + + :param display_name: + The value to assign to the display_name property of this ModelSummary. + :type display_name: str + + :param vendor: + The value to assign to the vendor property of this ModelSummary. + :type vendor: str + + :param version: + The value to assign to the version property of this ModelSummary. + :type version: str + + :param time_created: + The value to assign to the time_created property of this ModelSummary. + :type time_created: datetime + + :param base_model_id: + The value to assign to the base_model_id property of this ModelSummary. + :type base_model_id: str + + :param type: + The value to assign to the type property of this ModelSummary. + :type type: str + + :param fine_tune_details: + The value to assign to the fine_tune_details property of this ModelSummary. + :type fine_tune_details: oci.generative_ai.models.FineTuneDetails + + :param model_metrics: + The value to assign to the model_metrics property of this ModelSummary. + :type model_metrics: oci.generative_ai.models.ModelMetrics + + :param is_long_term_supported: + The value to assign to the is_long_term_supported property of this ModelSummary. + :type is_long_term_supported: bool + + :param time_deprecated: + The value to assign to the time_deprecated property of this ModelSummary. + :type time_deprecated: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'capabilities': 'list[str]', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'display_name': 'str', + 'vendor': 'str', + 'version': 'str', + 'time_created': 'datetime', + 'base_model_id': 'str', + 'type': 'str', + 'fine_tune_details': 'FineTuneDetails', + 'model_metrics': 'ModelMetrics', + 'is_long_term_supported': 'bool', + 'time_deprecated': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'capabilities': 'capabilities', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'display_name': 'displayName', + 'vendor': 'vendor', + 'version': 'version', + 'time_created': 'timeCreated', + 'base_model_id': 'baseModelId', + 'type': 'type', + 'fine_tune_details': 'fineTuneDetails', + 'model_metrics': 'modelMetrics', + 'is_long_term_supported': 'isLongTermSupported', + 'time_deprecated': 'timeDeprecated', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._capabilities = None + self._lifecycle_state = None + self._lifecycle_details = None + self._display_name = None + self._vendor = None + self._version = None + self._time_created = None + self._base_model_id = None + self._type = None + self._fine_tune_details = None + self._model_metrics = None + self._is_long_term_supported = None + self._time_deprecated = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelSummary. + An ID that uniquely identifies a pretrained or a fine-tuned model. + + + :return: The id of this ModelSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelSummary. + An ID that uniquely identifies a pretrained or a fine-tuned model. + + + :param id: The id of this ModelSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelSummary. + The compartment OCID for fine-tuned models. For pretrained models, this value is null. + + + :return: The compartment_id of this ModelSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelSummary. + The compartment OCID for fine-tuned models. For pretrained models, this value is null. + + + :param compartment_id: The compartment_id of this ModelSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def capabilities(self): + """ + **[Required]** Gets the capabilities of this ModelSummary. + Describes what this model can be used for. + + Allowed values for items in this list are: "TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The capabilities of this ModelSummary. + :rtype: list[str] + """ + return self._capabilities + + @capabilities.setter + def capabilities(self, capabilities): + """ + Sets the capabilities of this ModelSummary. + Describes what this model can be used for. + + + :param capabilities: The capabilities of this ModelSummary. + :type: list[str] + """ + allowed_values = ["TEXT_GENERATION", "TEXT_SUMMARIZATION", "TEXT_EMBEDDINGS", "FINE_TUNE"] + if capabilities: + capabilities[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in capabilities] + self._capabilities = capabilities + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelSummary. + The lifecycle state of the model. + + Allowed values are: + - ACTIVE + - CREATING + - DELETING + - DELETED + - FAILED + + + :return: The lifecycle_state of this ModelSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelSummary. + The lifecycle state of the model. + + Allowed values are: + - ACTIVE + - CREATING + - DELETING + - DELETED + - FAILED + + + :param lifecycle_state: The lifecycle_state of this ModelSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this ModelSummary. + A message describing the current state of the model with detail that can provide actionable information. + + + :return: The lifecycle_details of this ModelSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ModelSummary. + A message describing the current state of the model with detail that can provide actionable information. + + + :param lifecycle_details: The lifecycle_details of this ModelSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def display_name(self): + """ + Gets the display_name of this ModelSummary. + A user-friendly name. + + + :return: The display_name of this ModelSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelSummary. + A user-friendly name. + + + :param display_name: The display_name of this ModelSummary. + :type: str + """ + self._display_name = display_name + + @property + def vendor(self): + """ + Gets the vendor of this ModelSummary. + The provider of the model. + + + :return: The vendor of this ModelSummary. + :rtype: str + """ + return self._vendor + + @vendor.setter + def vendor(self, vendor): + """ + Sets the vendor of this ModelSummary. + The provider of the model. + + + :param vendor: The vendor of this ModelSummary. + :type: str + """ + self._vendor = vendor + + @property + def version(self): + """ + Gets the version of this ModelSummary. + The version of the model. + + + :return: The version of this ModelSummary. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """ + Sets the version of this ModelSummary. + The version of the model. + + + :param version: The version of this ModelSummary. + :type: str + """ + self._version = version + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelSummary. + The date and time that the model was created in the format of an RFC3339 datetime string. + + + :return: The time_created of this ModelSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelSummary. + The date and time that the model was created in the format of an RFC3339 datetime string. + + + :param time_created: The time_created of this ModelSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def base_model_id(self): + """ + Gets the base_model_id of this ModelSummary. + The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null. + + + :return: The base_model_id of this ModelSummary. + :rtype: str + """ + return self._base_model_id + + @base_model_id.setter + def base_model_id(self, base_model_id): + """ + Sets the base_model_id of this ModelSummary. + The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null. + + + :param base_model_id: The base_model_id of this ModelSummary. + :type: str + """ + self._base_model_id = base_model_id + + @property + def type(self): + """ + **[Required]** Gets the type of this ModelSummary. + The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model. + + Allowed values are: + - BASE + - CUSTOM + + + :return: The type of this ModelSummary. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this ModelSummary. + The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model. + + Allowed values are: + - BASE + - CUSTOM + + + :param type: The type of this ModelSummary. + :type: str + """ + self._type = type + + @property + def fine_tune_details(self): + """ + Gets the fine_tune_details of this ModelSummary. + + :return: The fine_tune_details of this ModelSummary. + :rtype: oci.generative_ai.models.FineTuneDetails + """ + return self._fine_tune_details + + @fine_tune_details.setter + def fine_tune_details(self, fine_tune_details): + """ + Sets the fine_tune_details of this ModelSummary. + + :param fine_tune_details: The fine_tune_details of this ModelSummary. + :type: oci.generative_ai.models.FineTuneDetails + """ + self._fine_tune_details = fine_tune_details + + @property + def model_metrics(self): + """ + Gets the model_metrics of this ModelSummary. + + :return: The model_metrics of this ModelSummary. + :rtype: oci.generative_ai.models.ModelMetrics + """ + return self._model_metrics + + @model_metrics.setter + def model_metrics(self, model_metrics): + """ + Sets the model_metrics of this ModelSummary. + + :param model_metrics: The model_metrics of this ModelSummary. + :type: oci.generative_ai.models.ModelMetrics + """ + self._model_metrics = model_metrics + + @property + def is_long_term_supported(self): + """ + Gets the is_long_term_supported of this ModelSummary. + Whether a model is supported long-term. Applies only to base models. + + + :return: The is_long_term_supported of this ModelSummary. + :rtype: bool + """ + return self._is_long_term_supported + + @is_long_term_supported.setter + def is_long_term_supported(self, is_long_term_supported): + """ + Sets the is_long_term_supported of this ModelSummary. + Whether a model is supported long-term. Applies only to base models. + + + :param is_long_term_supported: The is_long_term_supported of this ModelSummary. + :type: bool + """ + self._is_long_term_supported = is_long_term_supported + + @property + def time_deprecated(self): + """ + Gets the time_deprecated of this ModelSummary. + Corresponds to the time when the custom model and its associated foundation model will be deprecated. + + + :return: The time_deprecated of this ModelSummary. + :rtype: datetime + """ + return self._time_deprecated + + @time_deprecated.setter + def time_deprecated(self, time_deprecated): + """ + Sets the time_deprecated of this ModelSummary. + Corresponds to the time when the custom model and its associated foundation model will be deprecated. + + + :param time_deprecated: The time_deprecated of this ModelSummary. + :type: datetime + """ + self._time_deprecated = time_deprecated + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelSummary. + 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 ModelSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelSummary. + 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 ModelSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelSummary. + 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 ModelSummary. + :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 ModelSummary. + 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 ModelSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this ModelSummary. + :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 ModelSummary. + System tags for this resource. Each key is predefined and scoped to a namespace. + + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this ModelSummary. + :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/generative_ai/models/object_storage_dataset.py b/src/oci/generative_ai/models/object_storage_dataset.py new file mode 100644 index 000000000..bdd1b7ae8 --- /dev/null +++ b/src/oci/generative_ai/models/object_storage_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: 20231130 + +from .dataset import Dataset +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(Dataset): + """ + The dataset is stored in an OCI Object Storage bucket. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStorageDataset object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai.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" + :type dataset_type: str + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectStorageDataset. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectStorageDataset. + :type bucket_name: str + + :param object_name: + The value to assign to the object_name property of this ObjectStorageDataset. + :type object_name: str + + """ + self.swagger_types = { + 'dataset_type': 'str', + 'namespace_name': 'str', + 'bucket_name': 'str', + 'object_name': 'str' + } + + self.attribute_map = { + 'dataset_type': 'datasetType', + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'object_name': 'objectName' + } + + self._dataset_type = None + self._namespace_name = None + self._bucket_name = None + self._object_name = None + self._dataset_type = 'OBJECT_STORAGE' + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectStorageDataset. + The Object Storage namespace. + + + :return: The namespace_name of this ObjectStorageDataset. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectStorageDataset. + The Object Storage namespace. + + + :param namespace_name: The namespace_name of this ObjectStorageDataset. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectStorageDataset. + The Object Storage bucket name. + + + :return: The bucket_name of this ObjectStorageDataset. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectStorageDataset. + The Object Storage bucket name. + + + :param bucket_name: The bucket_name of this ObjectStorageDataset. + :type: str + """ + self._bucket_name = bucket_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this ObjectStorageDataset. + The Object Storage object name. + + + :return: The object_name of this ObjectStorageDataset. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this ObjectStorageDataset. + The Object Storage object name. + + + :param object_name: The object_name of this ObjectStorageDataset. + :type: str + """ + self._object_name = object_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/generative_ai/models/t_few_training_config.py b/src/oci/generative_ai/models/t_few_training_config.py new file mode 100644 index 000000000..3c9c84cae --- /dev/null +++ b/src/oci/generative_ai/models/t_few_training_config.py @@ -0,0 +1,93 @@ +# 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: 20231130 + +from .training_config import TrainingConfig +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 TFewTrainingConfig(TrainingConfig): + """ + The TFEW training method hyperparameters. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TFewTrainingConfig object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai.models.TFewTrainingConfig.training_config_type` attribute + of this class is ``TFEW_TRAINING_CONFIG`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param training_config_type: + The value to assign to the training_config_type property of this TFewTrainingConfig. + Allowed values for this property are: "TFEW_TRAINING_CONFIG", "VANILLA_TRAINING_CONFIG" + :type training_config_type: str + + :param total_training_epochs: + The value to assign to the total_training_epochs property of this TFewTrainingConfig. + :type total_training_epochs: int + + :param learning_rate: + The value to assign to the learning_rate property of this TFewTrainingConfig. + :type learning_rate: float + + :param training_batch_size: + The value to assign to the training_batch_size property of this TFewTrainingConfig. + :type training_batch_size: int + + :param early_stopping_patience: + The value to assign to the early_stopping_patience property of this TFewTrainingConfig. + :type early_stopping_patience: int + + :param early_stopping_threshold: + The value to assign to the early_stopping_threshold property of this TFewTrainingConfig. + :type early_stopping_threshold: float + + :param log_model_metrics_interval_in_steps: + The value to assign to the log_model_metrics_interval_in_steps property of this TFewTrainingConfig. + :type log_model_metrics_interval_in_steps: int + + """ + self.swagger_types = { + 'training_config_type': 'str', + 'total_training_epochs': 'int', + 'learning_rate': 'float', + 'training_batch_size': 'int', + 'early_stopping_patience': 'int', + 'early_stopping_threshold': 'float', + 'log_model_metrics_interval_in_steps': 'int' + } + + self.attribute_map = { + 'training_config_type': 'trainingConfigType', + 'total_training_epochs': 'totalTrainingEpochs', + 'learning_rate': 'learningRate', + 'training_batch_size': 'trainingBatchSize', + 'early_stopping_patience': 'earlyStoppingPatience', + 'early_stopping_threshold': 'earlyStoppingThreshold', + 'log_model_metrics_interval_in_steps': 'logModelMetricsIntervalInSteps' + } + + self._training_config_type = None + self._total_training_epochs = None + self._learning_rate = None + self._training_batch_size = None + self._early_stopping_patience = None + self._early_stopping_threshold = None + self._log_model_metrics_interval_in_steps = None + self._training_config_type = 'TFEW_TRAINING_CONFIG' + + 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/generative_ai/models/text_generation_model_metrics.py b/src/oci/generative_ai/models/text_generation_model_metrics.py new file mode 100644 index 000000000..ea824cd19 --- /dev/null +++ b/src/oci/generative_ai/models/text_generation_model_metrics.py @@ -0,0 +1,113 @@ +# 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: 20231130 + +from .model_metrics import ModelMetrics +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 TextGenerationModelMetrics(ModelMetrics): + """ + The text generation model metrics of the fine-tuning process. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TextGenerationModelMetrics object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai.models.TextGenerationModelMetrics.model_metrics_type` attribute + of this class is ``TEXT_GENERATION_MODEL_METRICS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_metrics_type: + The value to assign to the model_metrics_type property of this TextGenerationModelMetrics. + Allowed values for this property are: "TEXT_GENERATION_MODEL_METRICS" + :type model_metrics_type: str + + :param final_accuracy: + The value to assign to the final_accuracy property of this TextGenerationModelMetrics. + :type final_accuracy: float + + :param final_loss: + The value to assign to the final_loss property of this TextGenerationModelMetrics. + :type final_loss: float + + """ + self.swagger_types = { + 'model_metrics_type': 'str', + 'final_accuracy': 'float', + 'final_loss': 'float' + } + + self.attribute_map = { + 'model_metrics_type': 'modelMetricsType', + 'final_accuracy': 'finalAccuracy', + 'final_loss': 'finalLoss' + } + + self._model_metrics_type = None + self._final_accuracy = None + self._final_loss = None + self._model_metrics_type = 'TEXT_GENERATION_MODEL_METRICS' + + @property + def final_accuracy(self): + """ + Gets the final_accuracy of this TextGenerationModelMetrics. + Fine-tuned model accuracy. + + + :return: The final_accuracy of this TextGenerationModelMetrics. + :rtype: float + """ + return self._final_accuracy + + @final_accuracy.setter + def final_accuracy(self, final_accuracy): + """ + Sets the final_accuracy of this TextGenerationModelMetrics. + Fine-tuned model accuracy. + + + :param final_accuracy: The final_accuracy of this TextGenerationModelMetrics. + :type: float + """ + self._final_accuracy = final_accuracy + + @property + def final_loss(self): + """ + Gets the final_loss of this TextGenerationModelMetrics. + Fine-tuned model loss. + + + :return: The final_loss of this TextGenerationModelMetrics. + :rtype: float + """ + return self._final_loss + + @final_loss.setter + def final_loss(self, final_loss): + """ + Sets the final_loss of this TextGenerationModelMetrics. + Fine-tuned model loss. + + + :param final_loss: The final_loss of this TextGenerationModelMetrics. + :type: float + """ + self._final_loss = final_loss + + 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/generative_ai/models/training_config.py b/src/oci/generative_ai/models/training_config.py new file mode 100644 index 000000000..222f61128 --- /dev/null +++ b/src/oci/generative_ai/models/training_config.py @@ -0,0 +1,299 @@ +# 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: 20231130 + + +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 TrainingConfig(object): + """ + The fine-tuning method and hyperparameters used for fine-tuning a custom model. + """ + + #: A constant which can be used with the training_config_type property of a TrainingConfig. + #: This constant has a value of "TFEW_TRAINING_CONFIG" + TRAINING_CONFIG_TYPE_TFEW_TRAINING_CONFIG = "TFEW_TRAINING_CONFIG" + + #: A constant which can be used with the training_config_type property of a TrainingConfig. + #: This constant has a value of "VANILLA_TRAINING_CONFIG" + TRAINING_CONFIG_TYPE_VANILLA_TRAINING_CONFIG = "VANILLA_TRAINING_CONFIG" + + def __init__(self, **kwargs): + """ + Initializes a new TrainingConfig 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.generative_ai.models.VanillaTrainingConfig` + * :class:`~oci.generative_ai.models.TFewTrainingConfig` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param training_config_type: + The value to assign to the training_config_type property of this TrainingConfig. + Allowed values for this property are: "TFEW_TRAINING_CONFIG", "VANILLA_TRAINING_CONFIG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type training_config_type: str + + :param total_training_epochs: + The value to assign to the total_training_epochs property of this TrainingConfig. + :type total_training_epochs: int + + :param learning_rate: + The value to assign to the learning_rate property of this TrainingConfig. + :type learning_rate: float + + :param training_batch_size: + The value to assign to the training_batch_size property of this TrainingConfig. + :type training_batch_size: int + + :param early_stopping_patience: + The value to assign to the early_stopping_patience property of this TrainingConfig. + :type early_stopping_patience: int + + :param early_stopping_threshold: + The value to assign to the early_stopping_threshold property of this TrainingConfig. + :type early_stopping_threshold: float + + :param log_model_metrics_interval_in_steps: + The value to assign to the log_model_metrics_interval_in_steps property of this TrainingConfig. + :type log_model_metrics_interval_in_steps: int + + """ + self.swagger_types = { + 'training_config_type': 'str', + 'total_training_epochs': 'int', + 'learning_rate': 'float', + 'training_batch_size': 'int', + 'early_stopping_patience': 'int', + 'early_stopping_threshold': 'float', + 'log_model_metrics_interval_in_steps': 'int' + } + + self.attribute_map = { + 'training_config_type': 'trainingConfigType', + 'total_training_epochs': 'totalTrainingEpochs', + 'learning_rate': 'learningRate', + 'training_batch_size': 'trainingBatchSize', + 'early_stopping_patience': 'earlyStoppingPatience', + 'early_stopping_threshold': 'earlyStoppingThreshold', + 'log_model_metrics_interval_in_steps': 'logModelMetricsIntervalInSteps' + } + + self._training_config_type = None + self._total_training_epochs = None + self._learning_rate = None + self._training_batch_size = None + self._early_stopping_patience = None + self._early_stopping_threshold = None + self._log_model_metrics_interval_in_steps = 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['trainingConfigType'] + + if type == 'VANILLA_TRAINING_CONFIG': + return 'VanillaTrainingConfig' + + if type == 'TFEW_TRAINING_CONFIG': + return 'TFewTrainingConfig' + else: + return 'TrainingConfig' + + @property + def training_config_type(self): + """ + **[Required]** Gets the training_config_type of this TrainingConfig. + The fine-tuning method for training a custom model. + + Allowed values for this property are: "TFEW_TRAINING_CONFIG", "VANILLA_TRAINING_CONFIG", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The training_config_type of this TrainingConfig. + :rtype: str + """ + return self._training_config_type + + @training_config_type.setter + def training_config_type(self, training_config_type): + """ + Sets the training_config_type of this TrainingConfig. + The fine-tuning method for training a custom model. + + + :param training_config_type: The training_config_type of this TrainingConfig. + :type: str + """ + allowed_values = ["TFEW_TRAINING_CONFIG", "VANILLA_TRAINING_CONFIG"] + if not value_allowed_none_or_none_sentinel(training_config_type, allowed_values): + training_config_type = 'UNKNOWN_ENUM_VALUE' + self._training_config_type = training_config_type + + @property + def total_training_epochs(self): + """ + Gets the total_training_epochs of this TrainingConfig. + The maximum number of training epochs to run for. + + + :return: The total_training_epochs of this TrainingConfig. + :rtype: int + """ + return self._total_training_epochs + + @total_training_epochs.setter + def total_training_epochs(self, total_training_epochs): + """ + Sets the total_training_epochs of this TrainingConfig. + The maximum number of training epochs to run for. + + + :param total_training_epochs: The total_training_epochs of this TrainingConfig. + :type: int + """ + self._total_training_epochs = total_training_epochs + + @property + def learning_rate(self): + """ + Gets the learning_rate of this TrainingConfig. + The initial learning rate to be used during training + + + :return: The learning_rate of this TrainingConfig. + :rtype: float + """ + return self._learning_rate + + @learning_rate.setter + def learning_rate(self, learning_rate): + """ + Sets the learning_rate of this TrainingConfig. + The initial learning rate to be used during training + + + :param learning_rate: The learning_rate of this TrainingConfig. + :type: float + """ + self._learning_rate = learning_rate + + @property + def training_batch_size(self): + """ + Gets the training_batch_size of this TrainingConfig. + The batch size used during training. + + + :return: The training_batch_size of this TrainingConfig. + :rtype: int + """ + return self._training_batch_size + + @training_batch_size.setter + def training_batch_size(self, training_batch_size): + """ + Sets the training_batch_size of this TrainingConfig. + The batch size used during training. + + + :param training_batch_size: The training_batch_size of this TrainingConfig. + :type: int + """ + self._training_batch_size = training_batch_size + + @property + def early_stopping_patience(self): + """ + Gets the early_stopping_patience of this TrainingConfig. + Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation. + + + :return: The early_stopping_patience of this TrainingConfig. + :rtype: int + """ + return self._early_stopping_patience + + @early_stopping_patience.setter + def early_stopping_patience(self, early_stopping_patience): + """ + Sets the early_stopping_patience of this TrainingConfig. + Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation. + + + :param early_stopping_patience: The early_stopping_patience of this TrainingConfig. + :type: int + """ + self._early_stopping_patience = early_stopping_patience + + @property + def early_stopping_threshold(self): + """ + Gets the early_stopping_threshold of this TrainingConfig. + How much the loss must improve to prevent early stopping. + + + :return: The early_stopping_threshold of this TrainingConfig. + :rtype: float + """ + return self._early_stopping_threshold + + @early_stopping_threshold.setter + def early_stopping_threshold(self, early_stopping_threshold): + """ + Sets the early_stopping_threshold of this TrainingConfig. + How much the loss must improve to prevent early stopping. + + + :param early_stopping_threshold: The early_stopping_threshold of this TrainingConfig. + :type: float + """ + self._early_stopping_threshold = early_stopping_threshold + + @property + def log_model_metrics_interval_in_steps(self): + """ + Gets the log_model_metrics_interval_in_steps of this TrainingConfig. + Determines how frequently to log model metrics. + + Every step is logged for the first 20 steps and then follows this parameter for log frequency. Set to 0 to disable logging the model metrics. + + + :return: The log_model_metrics_interval_in_steps of this TrainingConfig. + :rtype: int + """ + return self._log_model_metrics_interval_in_steps + + @log_model_metrics_interval_in_steps.setter + def log_model_metrics_interval_in_steps(self, log_model_metrics_interval_in_steps): + """ + Sets the log_model_metrics_interval_in_steps of this TrainingConfig. + Determines how frequently to log model metrics. + + Every step is logged for the first 20 steps and then follows this parameter for log frequency. Set to 0 to disable logging the model metrics. + + + :param log_model_metrics_interval_in_steps: The log_model_metrics_interval_in_steps of this TrainingConfig. + :type: int + """ + self._log_model_metrics_interval_in_steps = log_model_metrics_interval_in_steps + + 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/generative_ai/models/update_dedicated_ai_cluster_details.py b/src/oci/generative_ai/models/update_dedicated_ai_cluster_details.py new file mode 100644 index 000000000..6d5efb5a7 --- /dev/null +++ b/src/oci/generative_ai/models/update_dedicated_ai_cluster_details.py @@ -0,0 +1,216 @@ +# 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: 20231130 + + +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 UpdateDedicatedAiClusterDetails(object): + """ + The data to update a dedicated AI cluster. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateDedicatedAiClusterDetails 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 UpdateDedicatedAiClusterDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateDedicatedAiClusterDetails. + :type description: str + + :param unit_count: + The value to assign to the unit_count property of this UpdateDedicatedAiClusterDetails. + :type unit_count: int + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateDedicatedAiClusterDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateDedicatedAiClusterDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'unit_count': 'int', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'unit_count': 'unitCount', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._unit_count = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateDedicatedAiClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateDedicatedAiClusterDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateDedicatedAiClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateDedicatedAiClusterDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateDedicatedAiClusterDetails. + An optional description of the dedicated AI cluster. + + + :return: The description of this UpdateDedicatedAiClusterDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateDedicatedAiClusterDetails. + An optional description of the dedicated AI cluster. + + + :param description: The description of this UpdateDedicatedAiClusterDetails. + :type: str + """ + self._description = description + + @property + def unit_count(self): + """ + Gets the unit_count of this UpdateDedicatedAiClusterDetails. + The number of dedicated units in this AI cluster. + + + :return: The unit_count of this UpdateDedicatedAiClusterDetails. + :rtype: int + """ + return self._unit_count + + @unit_count.setter + def unit_count(self, unit_count): + """ + Sets the unit_count of this UpdateDedicatedAiClusterDetails. + The number of dedicated units in this AI cluster. + + + :param unit_count: The unit_count of this UpdateDedicatedAiClusterDetails. + :type: int + """ + self._unit_count = unit_count + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateDedicatedAiClusterDetails. + 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 UpdateDedicatedAiClusterDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateDedicatedAiClusterDetails. + 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 UpdateDedicatedAiClusterDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateDedicatedAiClusterDetails. + 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 UpdateDedicatedAiClusterDetails. + :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 UpdateDedicatedAiClusterDetails. + 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 UpdateDedicatedAiClusterDetails. + :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/generative_ai/models/update_endpoint_details.py b/src/oci/generative_ai/models/update_endpoint_details.py new file mode 100644 index 000000000..1121fedcb --- /dev/null +++ b/src/oci/generative_ai/models/update_endpoint_details.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: 20231130 + + +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 UpdateEndpointDetails(object): + """ + The data to update an endpoint. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateEndpointDetails 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 UpdateEndpointDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateEndpointDetails. + :type description: str + + :param content_moderation_config: + The value to assign to the content_moderation_config property of this UpdateEndpointDetails. + :type content_moderation_config: oci.generative_ai.models.ContentModerationConfig + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateEndpointDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateEndpointDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'content_moderation_config': 'ContentModerationConfig', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'content_moderation_config': 'contentModerationConfig', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._content_moderation_config = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateEndpointDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateEndpointDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateEndpointDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateEndpointDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateEndpointDetails. + An optional description of the endpoint. + + + :return: The description of this UpdateEndpointDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateEndpointDetails. + An optional description of the endpoint. + + + :param description: The description of this UpdateEndpointDetails. + :type: str + """ + self._description = description + + @property + def content_moderation_config(self): + """ + Gets the content_moderation_config of this UpdateEndpointDetails. + + :return: The content_moderation_config of this UpdateEndpointDetails. + :rtype: oci.generative_ai.models.ContentModerationConfig + """ + return self._content_moderation_config + + @content_moderation_config.setter + def content_moderation_config(self, content_moderation_config): + """ + Sets the content_moderation_config of this UpdateEndpointDetails. + + :param content_moderation_config: The content_moderation_config of this UpdateEndpointDetails. + :type: oci.generative_ai.models.ContentModerationConfig + """ + self._content_moderation_config = content_moderation_config + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateEndpointDetails. + 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 UpdateEndpointDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateEndpointDetails. + 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 UpdateEndpointDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateEndpointDetails. + 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 UpdateEndpointDetails. + :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 UpdateEndpointDetails. + 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 UpdateEndpointDetails. + :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/generative_ai/models/update_model_details.py b/src/oci/generative_ai/models/update_model_details.py new file mode 100644 index 000000000..b0db4f776 --- /dev/null +++ b/src/oci/generative_ai/models/update_model_details.py @@ -0,0 +1,247 @@ +# 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: 20231130 + + +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 UpdateModelDetails(object): + """ + The data to update a custom model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelDetails 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 UpdateModelDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateModelDetails. + :type description: str + + :param vendor: + The value to assign to the vendor property of this UpdateModelDetails. + :type vendor: str + + :param version: + The value to assign to the version property of this UpdateModelDetails. + :type version: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'vendor': 'str', + 'version': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'vendor': 'vendor', + 'version': 'version', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._vendor = None + self._version = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateModelDetails. + A user-friendly name. + + + :return: The display_name of this UpdateModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateModelDetails. + A user-friendly name. + + + :param display_name: The display_name of this UpdateModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateModelDetails. + An optional description of the model. + + + :return: The description of this UpdateModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateModelDetails. + An optional description of the model. + + + :param description: The description of this UpdateModelDetails. + :type: str + """ + self._description = description + + @property + def vendor(self): + """ + Gets the vendor of this UpdateModelDetails. + The provider of the base model. + + + :return: The vendor of this UpdateModelDetails. + :rtype: str + """ + return self._vendor + + @vendor.setter + def vendor(self, vendor): + """ + Sets the vendor of this UpdateModelDetails. + The provider of the base model. + + + :param vendor: The vendor of this UpdateModelDetails. + :type: str + """ + self._vendor = vendor + + @property + def version(self): + """ + Gets the version of this UpdateModelDetails. + The version of the model. + + + :return: The version of this UpdateModelDetails. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """ + Sets the version of this UpdateModelDetails. + The version of the model. + + + :param version: The version of this UpdateModelDetails. + :type: str + """ + self._version = version + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateModelDetails. + 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 UpdateModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateModelDetails. + 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 UpdateModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateModelDetails. + 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 UpdateModelDetails. + :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 UpdateModelDetails. + 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 UpdateModelDetails. + :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/generative_ai/models/vanilla_training_config.py b/src/oci/generative_ai/models/vanilla_training_config.py new file mode 100644 index 000000000..499feb3c1 --- /dev/null +++ b/src/oci/generative_ai/models/vanilla_training_config.py @@ -0,0 +1,124 @@ +# 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: 20231130 + +from .training_config import TrainingConfig +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 VanillaTrainingConfig(TrainingConfig): + """ + The Vanilla training method hyperparameters. + """ + + def __init__(self, **kwargs): + """ + Initializes a new VanillaTrainingConfig object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai.models.VanillaTrainingConfig.training_config_type` attribute + of this class is ``VANILLA_TRAINING_CONFIG`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param training_config_type: + The value to assign to the training_config_type property of this VanillaTrainingConfig. + Allowed values for this property are: "TFEW_TRAINING_CONFIG", "VANILLA_TRAINING_CONFIG" + :type training_config_type: str + + :param total_training_epochs: + The value to assign to the total_training_epochs property of this VanillaTrainingConfig. + :type total_training_epochs: int + + :param learning_rate: + The value to assign to the learning_rate property of this VanillaTrainingConfig. + :type learning_rate: float + + :param training_batch_size: + The value to assign to the training_batch_size property of this VanillaTrainingConfig. + :type training_batch_size: int + + :param early_stopping_patience: + The value to assign to the early_stopping_patience property of this VanillaTrainingConfig. + :type early_stopping_patience: int + + :param early_stopping_threshold: + The value to assign to the early_stopping_threshold property of this VanillaTrainingConfig. + :type early_stopping_threshold: float + + :param log_model_metrics_interval_in_steps: + The value to assign to the log_model_metrics_interval_in_steps property of this VanillaTrainingConfig. + :type log_model_metrics_interval_in_steps: int + + :param num_of_last_layers: + The value to assign to the num_of_last_layers property of this VanillaTrainingConfig. + :type num_of_last_layers: int + + """ + self.swagger_types = { + 'training_config_type': 'str', + 'total_training_epochs': 'int', + 'learning_rate': 'float', + 'training_batch_size': 'int', + 'early_stopping_patience': 'int', + 'early_stopping_threshold': 'float', + 'log_model_metrics_interval_in_steps': 'int', + 'num_of_last_layers': 'int' + } + + self.attribute_map = { + 'training_config_type': 'trainingConfigType', + 'total_training_epochs': 'totalTrainingEpochs', + 'learning_rate': 'learningRate', + 'training_batch_size': 'trainingBatchSize', + 'early_stopping_patience': 'earlyStoppingPatience', + 'early_stopping_threshold': 'earlyStoppingThreshold', + 'log_model_metrics_interval_in_steps': 'logModelMetricsIntervalInSteps', + 'num_of_last_layers': 'numOfLastLayers' + } + + self._training_config_type = None + self._total_training_epochs = None + self._learning_rate = None + self._training_batch_size = None + self._early_stopping_patience = None + self._early_stopping_threshold = None + self._log_model_metrics_interval_in_steps = None + self._num_of_last_layers = None + self._training_config_type = 'VANILLA_TRAINING_CONFIG' + + @property + def num_of_last_layers(self): + """ + Gets the num_of_last_layers of this VanillaTrainingConfig. + The number of last layers to be fine-tuned. + + + :return: The num_of_last_layers of this VanillaTrainingConfig. + :rtype: int + """ + return self._num_of_last_layers + + @num_of_last_layers.setter + def num_of_last_layers(self, num_of_last_layers): + """ + Sets the num_of_last_layers of this VanillaTrainingConfig. + The number of last layers to be fine-tuned. + + + :param num_of_last_layers: The num_of_last_layers of this VanillaTrainingConfig. + :type: int + """ + self._num_of_last_layers = num_of_last_layers + + 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/generative_ai/models/work_request.py b/src/oci/generative_ai/models/work_request.py new file mode 100644 index 000000000..422da8b73 --- /dev/null +++ b/src/oci/generative_ai/models/work_request.py @@ -0,0 +1,438 @@ +# 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: 20231130 + + +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 WorkRequest(object): + """ + An asynchronous work request. When you start a long-running operation, the service creates a work request. Work requests help you monitor long-running operations. + + A work request is an activity log that lets you track each step in the operation's progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation. + """ + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_MODEL" + OPERATION_TYPE_CREATE_MODEL = "CREATE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_MODEL" + OPERATION_TYPE_DELETE_MODEL = "DELETE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MOVE_MODEL" + OPERATION_TYPE_MOVE_MODEL = "MOVE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_CREATE_DEDICATED_AI_CLUSTER = "CREATE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_DELETE_DEDICATED_AI_CLUSTER = "DELETE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_UPDATE_DEDICATED_AI_CLUSTER = "UPDATE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MOVE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_MOVE_DEDICATED_AI_CLUSTER = "MOVE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_ENDPOINT" + OPERATION_TYPE_CREATE_ENDPOINT = "CREATE_ENDPOINT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_ENDPOINT" + OPERATION_TYPE_DELETE_ENDPOINT = "DELETE_ENDPOINT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_ENDPOINT" + OPERATION_TYPE_UPDATE_ENDPOINT = "UPDATE_ENDPOINT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MOVE_ENDPOINT" + OPERATION_TYPE_MOVE_ENDPOINT = "MOVE_ENDPOINT" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "WAITING" + STATUS_WAITING = "WAITING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequest object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_type: + The value to assign to the operation_type property of this WorkRequest. + Allowed values for this property are: "CREATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", "CREATE_DEDICATED_AI_CLUSTER", "DELETE_DEDICATED_AI_CLUSTER", "UPDATE_DEDICATED_AI_CLUSTER", "MOVE_DEDICATED_AI_CLUSTER", "CREATE_ENDPOINT", "DELETE_ENDPOINT", "UPDATE_ENDPOINT", "MOVE_ENDPOINT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param status: + The value to assign to the status property of this WorkRequest. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param id: + The value to assign to the id property of this WorkRequest. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequest. + :type compartment_id: str + + :param resources: + The value to assign to the resources property of this WorkRequest. + :type resources: list[oci.generative_ai.models.WorkRequestResource] + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequest. + :type percent_complete: float + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequest. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequest. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequest. + :type time_finished: datetime + + """ + self.swagger_types = { + 'operation_type': 'str', + 'status': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'resources': 'list[WorkRequestResource]', + 'percent_complete': 'float', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'operation_type': 'operationType', + 'status': 'status', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'resources': 'resources', + 'percent_complete': 'percentComplete', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._operation_type = None + self._status = None + self._id = None + self._compartment_id = None + self._resources = None + self._percent_complete = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequest. + The asynchronous operation tracked by this work request. + + Allowed values for this property are: "CREATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", "CREATE_DEDICATED_AI_CLUSTER", "DELETE_DEDICATED_AI_CLUSTER", "UPDATE_DEDICATED_AI_CLUSTER", "MOVE_DEDICATED_AI_CLUSTER", "CREATE_ENDPOINT", "DELETE_ENDPOINT", "UPDATE_ENDPOINT", "MOVE_ENDPOINT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequest. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequest. + The asynchronous operation tracked by this work request. + + + :param operation_type: The operation_type of this WorkRequest. + :type: str + """ + allowed_values = ["CREATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", "CREATE_DEDICATED_AI_CLUSTER", "DELETE_DEDICATED_AI_CLUSTER", "UPDATE_DEDICATED_AI_CLUSTER", "MOVE_DEDICATED_AI_CLUSTER", "CREATE_ENDPOINT", "DELETE_ENDPOINT", "UPDATE_ENDPOINT", "MOVE_ENDPOINT"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequest. + The status of the work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequest. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequest. + The status of the work request. + + + :param status: The status of this WorkRequest. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequest. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this WorkRequest. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequest. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this WorkRequest. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this WorkRequest. + The `OCID`__ of the compartment that contains the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this WorkRequest. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequest. + The `OCID`__ of the compartment that contains the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this WorkRequest. + :type: str + """ + self._compartment_id = compartment_id + + @property + def resources(self): + """ + **[Required]** Gets the resources of this WorkRequest. + The resources that are affected by the work request. + + + :return: The resources of this WorkRequest. + :rtype: list[oci.generative_ai.models.WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequest. + The resources that are affected by the work request. + + + :param resources: The resources of this WorkRequest. + :type: list[oci.generative_ai.models.WorkRequestResource] + """ + self._resources = resources + + @property + def percent_complete(self): + """ + **[Required]** Gets the percent_complete of this WorkRequest. + Shows the progress of the operation tracked by the work request, as a percentage of the total work + that must be performed. + + + :return: The percent_complete of this WorkRequest. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequest. + Shows the progress of the operation tracked by the work request, as a percentage of the total work + that must be performed. + + + :param percent_complete: The percent_complete of this WorkRequest. + :type: float + """ + self._percent_complete = percent_complete + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this WorkRequest. + The date and time the work request was created, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_accepted of this WorkRequest. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequest. + The date and time the work request was created, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_accepted: The time_accepted of this WorkRequest. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequest. + The date and time the work request was started, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_started of this WorkRequest. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequest. + The date and time the work request was started, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_started: The time_started of this WorkRequest. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequest. + The date and time the work request was finished, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_finished of this WorkRequest. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequest. + The date and time the work request was finished, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_finished: The time_finished of this WorkRequest. + :type: datetime + """ + self._time_finished = time_finished + + 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/generative_ai/models/work_request_error.py b/src/oci/generative_ai/models/work_request_error.py new file mode 100644 index 000000000..ee6962885 --- /dev/null +++ b/src/oci/generative_ai/models/work_request_error.py @@ -0,0 +1,146 @@ +# 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: 20231130 + + +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 WorkRequestError(object): + """ + An error encountered while performing an operation that is tracked by this work request. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestError object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param code: + The value to assign to the code property of this WorkRequestError. + :type code: str + + :param message: + The value to assign to the message property of this WorkRequestError. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestError. + :type timestamp: datetime + + """ + self.swagger_types = { + 'code': 'str', + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._code = None + self._message = None + self._timestamp = None + + @property + def code(self): + """ + **[Required]** Gets the code of this WorkRequestError. + A machine-usable code for the error that occurred. For a list of error codes, see + `API Errors`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm + + + :return: The code of this WorkRequestError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this WorkRequestError. + A machine-usable code for the error that occurred. For a list of error codes, see + `API Errors`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm + + + :param code: The code of this WorkRequestError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestError. + A human-readable error message. + + + :return: The message of this WorkRequestError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestError. + A human-readable error message. + + + :param message: The message of this WorkRequestError. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestError. + The date and time that the error occurred, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The timestamp of this WorkRequestError. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestError. + The date and time that the error occurred, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param timestamp: The timestamp of this WorkRequestError. + :type: datetime + """ + self._timestamp = timestamp + + 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/generative_ai/models/work_request_error_collection.py b/src/oci/generative_ai/models/work_request_error_collection.py new file mode 100644 index 000000000..9bf49aae4 --- /dev/null +++ b/src/oci/generative_ai/models/work_request_error_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: 20231130 + + +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 WorkRequestErrorCollection(object): + """ + A list of work request errors. Can contain errors and other information such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestErrorCollection 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 WorkRequestErrorCollection. + :type items: list[oci.generative_ai.models.WorkRequestError] + + """ + self.swagger_types = { + 'items': 'list[WorkRequestError]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this WorkRequestErrorCollection. + A list of work request errors. + + + :return: The items of this WorkRequestErrorCollection. + :rtype: list[oci.generative_ai.models.WorkRequestError] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestErrorCollection. + A list of work request errors. + + + :param items: The items of this WorkRequestErrorCollection. + :type: list[oci.generative_ai.models.WorkRequestError] + """ + 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/generative_ai/models/work_request_log_entry.py b/src/oci/generative_ai/models/work_request_log_entry.py new file mode 100644 index 000000000..4cecc2a9a --- /dev/null +++ b/src/oci/generative_ai/models/work_request_log_entry.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: 20231130 + + +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 WorkRequestLogEntry(object): + """ + The log message from performing an operation that is tracked by this work request. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestLogEntry object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param message: + The value to assign to the message property of this WorkRequestLogEntry. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestLogEntry. + :type timestamp: datetime + + """ + self.swagger_types = { + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._message = None + self._timestamp = None + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestLogEntry. + A human-readable log message. + + + :return: The message of this WorkRequestLogEntry. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestLogEntry. + A human-readable log message. + + + :param message: The message of this WorkRequestLogEntry. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestLogEntry. + The date and time the log message was written, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The timestamp of this WorkRequestLogEntry. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestLogEntry. + The date and time the log message was written, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param timestamp: The timestamp of this WorkRequestLogEntry. + :type: datetime + """ + self._timestamp = timestamp + + 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/generative_ai/models/work_request_log_entry_collection.py b/src/oci/generative_ai/models/work_request_log_entry_collection.py new file mode 100644 index 000000000..4a45aed90 --- /dev/null +++ b/src/oci/generative_ai/models/work_request_log_entry_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: 20231130 + + +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 WorkRequestLogEntryCollection(object): + """ + A list of work request logs. Can contain logs and other information such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestLogEntryCollection 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 WorkRequestLogEntryCollection. + :type items: list[oci.generative_ai.models.WorkRequestLogEntry] + + """ + self.swagger_types = { + 'items': 'list[WorkRequestLogEntry]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this WorkRequestLogEntryCollection. + A list of work request log entries. + + + :return: The items of this WorkRequestLogEntryCollection. + :rtype: list[oci.generative_ai.models.WorkRequestLogEntry] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestLogEntryCollection. + A list of work request log entries. + + + :param items: The items of this WorkRequestLogEntryCollection. + :type: list[oci.generative_ai.models.WorkRequestLogEntry] + """ + 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/generative_ai/models/work_request_resource.py b/src/oci/generative_ai/models/work_request_resource.py new file mode 100644 index 000000000..460fd17fa --- /dev/null +++ b/src/oci/generative_ai/models/work_request_resource.py @@ -0,0 +1,238 @@ +# 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: 20231130 + + +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 WorkRequestResource(object): + """ + The resource created or operated on by a work request. + """ + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "CREATED" + ACTION_TYPE_CREATED = "CREATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "UPDATED" + ACTION_TYPE_UPDATED = "UPDATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "DELETED" + ACTION_TYPE_DELETED = "DELETED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "IN_PROGRESS" + ACTION_TYPE_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "RELATED" + ACTION_TYPE_RELATED = "RELATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "FAILED" + ACTION_TYPE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestResource 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 WorkRequestResource. + :type entity_type: str + + :param action_type: + The value to assign to the action_type property of this WorkRequestResource. + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action_type: str + + :param identifier: + The value to assign to the identifier property of this WorkRequestResource. + :type identifier: str + + :param entity_uri: + The value to assign to the entity_uri property of this WorkRequestResource. + :type entity_uri: str + + :param metadata: + The value to assign to the metadata property of this WorkRequestResource. + :type metadata: dict(str, str) + + """ + self.swagger_types = { + 'entity_type': 'str', + 'action_type': 'str', + 'identifier': 'str', + 'entity_uri': 'str', + 'metadata': 'dict(str, str)' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'action_type': 'actionType', + 'identifier': 'identifier', + 'entity_uri': 'entityUri', + 'metadata': 'metadata' + } + + self._entity_type = None + self._action_type = None + self._identifier = None + self._entity_uri = None + self._metadata = None + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this WorkRequestResource. + The resource type that the work request affects. + + + :return: The entity_type of this WorkRequestResource. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this WorkRequestResource. + The resource type that the work request affects. + + + :param entity_type: The entity_type of this WorkRequestResource. + :type: str + """ + self._entity_type = entity_type + + @property + def action_type(self): + """ + **[Required]** Gets the action_type of this WorkRequestResource. + The way in which this resource is affected by the operation tracked in the work request. + A resource being created, updated, or deleted remains in the IN_PROGRESS state until + work is complete for that resource, at which point it transitions to CREATED, UPDATED, + or DELETED, respectively. + + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action_type of this WorkRequestResource. + :rtype: str + """ + return self._action_type + + @action_type.setter + def action_type(self, action_type): + """ + Sets the action_type of this WorkRequestResource. + The way in which this resource is affected by the operation tracked in the work request. + A resource being created, updated, or deleted remains in the IN_PROGRESS state until + work is complete for that resource, at which point it transitions to CREATED, UPDATED, + or DELETED, respectively. + + + :param action_type: The action_type of this WorkRequestResource. + :type: str + """ + allowed_values = ["CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED"] + if not value_allowed_none_or_none_sentinel(action_type, allowed_values): + action_type = 'UNKNOWN_ENUM_VALUE' + self._action_type = action_type + + @property + def identifier(self): + """ + **[Required]** Gets the identifier of this WorkRequestResource. + An `OCID`__ or other unique identifier for the resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The identifier of this WorkRequestResource. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this WorkRequestResource. + An `OCID`__ or other unique identifier for the resource. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param identifier: The identifier of this WorkRequestResource. + :type: str + """ + self._identifier = identifier + + @property + def entity_uri(self): + """ + Gets the entity_uri of this WorkRequestResource. + The URI path that you can use for a GET request to access the resource metadata. + + + :return: The entity_uri of this WorkRequestResource. + :rtype: str + """ + return self._entity_uri + + @entity_uri.setter + def entity_uri(self, entity_uri): + """ + Sets the entity_uri of this WorkRequestResource. + The URI path that you can use for a GET request to access the resource metadata. + + + :param entity_uri: The entity_uri of this WorkRequestResource. + :type: str + """ + self._entity_uri = entity_uri + + @property + def metadata(self): + """ + Gets the metadata of this WorkRequestResource. + Additional information that helps to explain the resource. + + + :return: The metadata of this WorkRequestResource. + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """ + Sets the metadata of this WorkRequestResource. + Additional information that helps to explain the resource. + + + :param metadata: The metadata of this WorkRequestResource. + :type: dict(str, str) + """ + self._metadata = metadata + + 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/generative_ai/models/work_request_summary.py b/src/oci/generative_ai/models/work_request_summary.py new file mode 100644 index 000000000..2ad7555ff --- /dev/null +++ b/src/oci/generative_ai/models/work_request_summary.py @@ -0,0 +1,436 @@ +# 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: 20231130 + + +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 WorkRequestSummary(object): + """ + Summary information about an asynchronous work request. + """ + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_MODEL" + OPERATION_TYPE_CREATE_MODEL = "CREATE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_MODEL" + OPERATION_TYPE_DELETE_MODEL = "DELETE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MOVE_MODEL" + OPERATION_TYPE_MOVE_MODEL = "MOVE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_CREATE_DEDICATED_AI_CLUSTER = "CREATE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_DELETE_DEDICATED_AI_CLUSTER = "DELETE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_UPDATE_DEDICATED_AI_CLUSTER = "UPDATE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MOVE_DEDICATED_AI_CLUSTER" + OPERATION_TYPE_MOVE_DEDICATED_AI_CLUSTER = "MOVE_DEDICATED_AI_CLUSTER" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_ENDPOINT" + OPERATION_TYPE_CREATE_ENDPOINT = "CREATE_ENDPOINT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_ENDPOINT" + OPERATION_TYPE_DELETE_ENDPOINT = "DELETE_ENDPOINT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_ENDPOINT" + OPERATION_TYPE_UPDATE_ENDPOINT = "UPDATE_ENDPOINT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MOVE_ENDPOINT" + OPERATION_TYPE_MOVE_ENDPOINT = "MOVE_ENDPOINT" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "WAITING" + STATUS_WAITING = "WAITING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_type: + The value to assign to the operation_type property of this WorkRequestSummary. + Allowed values for this property are: "CREATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", "CREATE_DEDICATED_AI_CLUSTER", "DELETE_DEDICATED_AI_CLUSTER", "UPDATE_DEDICATED_AI_CLUSTER", "MOVE_DEDICATED_AI_CLUSTER", "CREATE_ENDPOINT", "DELETE_ENDPOINT", "UPDATE_ENDPOINT", "MOVE_ENDPOINT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param status: + The value to assign to the status property of this WorkRequestSummary. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param id: + The value to assign to the id property of this WorkRequestSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequestSummary. + :type compartment_id: str + + :param resources: + The value to assign to the resources property of this WorkRequestSummary. + :type resources: list[oci.generative_ai.models.WorkRequestResource] + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequestSummary. + :type percent_complete: float + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequestSummary. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequestSummary. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequestSummary. + :type time_finished: datetime + + """ + self.swagger_types = { + 'operation_type': 'str', + 'status': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'resources': 'list[WorkRequestResource]', + 'percent_complete': 'float', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'operation_type': 'operationType', + 'status': 'status', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'resources': 'resources', + 'percent_complete': 'percentComplete', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._operation_type = None + self._status = None + self._id = None + self._compartment_id = None + self._resources = None + self._percent_complete = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + + @property + 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: "CREATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", "CREATE_DEDICATED_AI_CLUSTER", "DELETE_DEDICATED_AI_CLUSTER", "UPDATE_DEDICATED_AI_CLUSTER", "MOVE_DEDICATED_AI_CLUSTER", "CREATE_ENDPOINT", "DELETE_ENDPOINT", "UPDATE_ENDPOINT", "MOVE_ENDPOINT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequestSummary. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequestSummary. + The asynchronous operation tracked by this work request. + + + :param operation_type: The operation_type of this WorkRequestSummary. + :type: str + """ + allowed_values = ["CREATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", "CREATE_DEDICATED_AI_CLUSTER", "DELETE_DEDICATED_AI_CLUSTER", "UPDATE_DEDICATED_AI_CLUSTER", "MOVE_DEDICATED_AI_CLUSTER", "CREATE_ENDPOINT", "DELETE_ENDPOINT", "UPDATE_ENDPOINT", "MOVE_ENDPOINT"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequestSummary. + The status of the work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequestSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequestSummary. + The status of the work request. + + + :param status: The status of this WorkRequestSummary. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequestSummary. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this WorkRequestSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequestSummary. + The `OCID`__ of the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this WorkRequestSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this WorkRequestSummary. + The `OCID`__ of the compartment that contains the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this WorkRequestSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequestSummary. + The `OCID`__ of the compartment that contains the work request. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this WorkRequestSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def resources(self): + """ + **[Required]** Gets the resources of this WorkRequestSummary. + The resources that are affected by this work request. + + + :return: The resources of this WorkRequestSummary. + :rtype: list[oci.generative_ai.models.WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequestSummary. + The resources that are affected by this work request. + + + :param resources: The resources of this WorkRequestSummary. + :type: list[oci.generative_ai.models.WorkRequestResource] + """ + self._resources = resources + + @property + def percent_complete(self): + """ + **[Required]** Gets the percent_complete of this WorkRequestSummary. + Shows the progress of the operation tracked by the work request, as a percentage of the total work + that must be performed. + + + :return: The percent_complete of this WorkRequestSummary. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequestSummary. + Shows the progress of the operation tracked by the work request, as a percentage of the total work + that must be performed. + + + :param percent_complete: The percent_complete of this WorkRequestSummary. + :type: float + """ + self._percent_complete = percent_complete + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this WorkRequestSummary. + The date and time the work request was created, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_accepted of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequestSummary. + The date and time the work request was created, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_accepted: The time_accepted of this WorkRequestSummary. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequestSummary. + The date and time the work request was started, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_started of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequestSummary. + The date and time the work request was started, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_started: The time_started of this WorkRequestSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequestSummary. + The date and time the work request was finished, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_finished of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequestSummary. + The date and time the work request was finished, in the format defined by + `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_finished: The time_finished of this WorkRequestSummary. + :type: datetime + """ + self._time_finished = time_finished + + 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/generative_ai/models/work_request_summary_collection.py b/src/oci/generative_ai/models/work_request_summary_collection.py new file mode 100644 index 000000000..7ddf480a9 --- /dev/null +++ b/src/oci/generative_ai/models/work_request_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: 20231130 + + +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 WorkRequestSummaryCollection(object): + """ + A list of work requests. Can contain work requests and other information such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestSummaryCollection 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 WorkRequestSummaryCollection. + :type items: list[oci.generative_ai.models.WorkRequestSummary] + + """ + self.swagger_types = { + 'items': 'list[WorkRequestSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this WorkRequestSummaryCollection. + A list of work requests. + + + :return: The items of this WorkRequestSummaryCollection. + :rtype: list[oci.generative_ai.models.WorkRequestSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestSummaryCollection. + A list of work requests. + + + :param items: The items of this WorkRequestSummaryCollection. + :type: list[oci.generative_ai.models.WorkRequestSummary] + """ + 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/generative_ai_inference/__init__.py b/src/oci/generative_ai_inference/__init__.py new file mode 100644 index 000000000..68dbefc13 --- /dev/null +++ b/src/oci/generative_ai_inference/__init__.py @@ -0,0 +1,14 @@ +# 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: 20231130 + +from __future__ import absolute_import + + +from .generative_ai_inference_client import GenerativeAiInferenceClient +from .generative_ai_inference_client_composite_operations import GenerativeAiInferenceClientCompositeOperations +from . import models + +__all__ = ["GenerativeAiInferenceClient", "GenerativeAiInferenceClientCompositeOperations", "models"] diff --git a/src/oci/generative_ai_inference/generative_ai_inference_client.py b/src/oci/generative_ai_inference/generative_ai_inference_client.py new file mode 100644 index 000000000..7d745f86b --- /dev/null +++ b/src/oci/generative_ai_inference/generative_ai_inference_client.py @@ -0,0 +1,419 @@ +# 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: 20231130 + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # noqa: F401 +from oci.base_client import BaseClient +from oci.config import get_config_value_or_default, validate_config +from oci.signer import Signer +from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from oci.exceptions import InvalidAlloyConfig +from oci.alloy import OCI_SDK_ENABLED_SERVICES_SET +from .models import generative_ai_inference_type_mapping +missing = Sentinel("Missing") + + +class GenerativeAiInferenceClient(object): + """ + OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings. + + Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText). + + To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/). + + To learn more about the service, see the [Generative AI documentation](/iaas/Content/generative-ai/home.htm). + """ + + def __init__(self, config, **kwargs): + """ + Creates a new service client + + :param dict config: + Configuration keys and values as per `SDK and Tool Configuration `__. + The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config + the dict using :py:meth:`~oci.config.validate_config` + + :param str service_endpoint: (optional) + The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is + not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit + need to specify a service endpoint. + + :param timeout: (optional) + The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided + as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If + a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout. + :type timeout: float or tuple(float, float) + + :param signer: (optional) + The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values + provided in the config parameter. + + One use case for this parameter is for `Instance Principals authentication `__ + by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument + :type signer: :py:class:`~oci.signer.AbstractBaseSigner` + + :param obj retry_strategy: (optional) + A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. + Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation. + Any value provided at the operation level will override whatever is specified at the client level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` + is also available. The specifics of the default retry strategy are described `here `__. + + :param obj circuit_breaker_strategy: (optional) + A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). + This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided. + The specifics of circuit breaker strategy are described `here `__. + + :param function circuit_breaker_callback: (optional) + Callback function to receive any exceptions triggerred by the circuit breaker. + + :param bool client_level_realm_specific_endpoint_template_enabled: (optional) + A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None. + + :param allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not + allow control characters to be in the response object. + """ + if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("generative_ai_inference"): + raise InvalidAlloyConfig("The Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service") + + validate_config(config, signer=kwargs.get('signer')) + if 'signer' in kwargs: + signer = kwargs['signer'] + + elif AUTHENTICATION_TYPE_FIELD_NAME in config: + signer = get_signer_from_authentication_type(config) + + else: + signer = Signer( + tenancy=config["tenancy"], + user=config["user"], + fingerprint=config["fingerprint"], + private_key_file_location=config.get("key_file"), + pass_phrase=get_config_value_or_default(config, "pass_phrase"), + private_key_content=config.get("key_content") + ) + + base_client_init_kwargs = { + 'regional_client': True, + 'service_endpoint': kwargs.get('service_endpoint'), + 'base_path': '/20231130', + 'service_endpoint_template': 'https://inference.generativeai.{region}.oci.{secondLevelDomain}', + 'service_endpoint_template_per_realm': { }, # noqa: E201 E202 + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY), + 'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled') + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + if base_client_init_kwargs.get('circuit_breaker_strategy') is None: + base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY + if 'allow_control_chars' in kwargs: + base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars') + self.base_client = BaseClient("generative_ai_inference", config, signer, generative_ai_inference_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def embed_text(self, embed_text_details, **kwargs): + """ + Produces embeddings for the inputs. + + An embedding is numeric representation of a piece of text. This text can be a phrase, a sentence, or one or more paragraphs. The Generative AI embedding model transforms each phrase, sentence, or paragraph that you input, into an array with 1024 numbers. You can use these embeddings for finding similarity in your input text such as finding phrases that are similar in context or category. Embeddings are mostly used for semantic searches where the search function focuses on the meaning of the text that it's searching through rather than finding results based on keywords. + + + :param oci.generative_ai_inference.models.EmbedTextDetails embed_text_details: (required) + Details for generating the embed response. + + :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.generative_ai_inference.models.EmbedTextResult` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use embed_text API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/actions/embedText" + method = "POST" + operation_name = "embed_text" + 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"embed_text 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=embed_text_details, + response_type="EmbedTextResult", + 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=embed_text_details, + response_type="EmbedTextResult", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def generate_text(self, generate_text_details, **kwargs): + """ + Generates a text response based on the user prompt. + + + :param oci.generative_ai_inference.models.GenerateTextDetails generate_text_details: (required) + Details for generating the text response. + + :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.generative_ai_inference.models.GenerateTextResult` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_text API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/actions/generateText" + method = "POST" + operation_name = "generate_text" + 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"generate_text got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json, text/event-stream", + "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=generate_text_details, + response_type="GenerateTextResult", + 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=generate_text_details, + response_type="GenerateTextResult", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def summarize_text(self, summarize_text_details, **kwargs): + """ + Summarizes the input text. + + + :param oci.generative_ai_inference.models.SummarizeTextDetails summarize_text_details: (required) + Details for summarizing the text. + + :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.generative_ai_inference.models.SummarizeTextResult` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use summarize_text API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/actions/summarizeText" + method = "POST" + operation_name = "summarize_text" + 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"summarize_text 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=summarize_text_details, + response_type="SummarizeTextResult", + 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=summarize_text_details, + response_type="SummarizeTextResult", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) diff --git a/src/oci/generative_ai_inference/generative_ai_inference_client_composite_operations.py b/src/oci/generative_ai_inference/generative_ai_inference_client_composite_operations.py new file mode 100644 index 000000000..682904de9 --- /dev/null +++ b/src/oci/generative_ai_inference/generative_ai_inference_client_composite_operations.py @@ -0,0 +1,26 @@ +# 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: 20231130 + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class GenerativeAiInferenceClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.generative_ai_inference.GenerativeAiInferenceClient` and offers convenience methods + for operations that would otherwise need to be chained together. For example, instead of performing an action + on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource + to enter a given state, you can call a single method in this class to accomplish the same functionality + """ + + def __init__(self, client, **kwargs): + """ + Creates a new GenerativeAiInferenceClientCompositeOperations object + + :param GenerativeAiInferenceClient client: + The service client which will be wrapped by this object + """ + self.client = client diff --git a/src/oci/generative_ai_inference/models/__init__.py b/src/oci/generative_ai_inference/models/__init__.py new file mode 100644 index 000000000..14b63f649 --- /dev/null +++ b/src/oci/generative_ai_inference/models/__init__.py @@ -0,0 +1,50 @@ +# 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: 20231130 + +from __future__ import absolute_import + +from .choice import Choice +from .cohere_llm_inference_request import CohereLlmInferenceRequest +from .cohere_llm_inference_response import CohereLlmInferenceResponse +from .dedicated_serving_mode import DedicatedServingMode +from .embed_text_details import EmbedTextDetails +from .embed_text_result import EmbedTextResult +from .generate_text_details import GenerateTextDetails +from .generate_text_result import GenerateTextResult +from .generated_text import GeneratedText +from .llama_llm_inference_request import LlamaLlmInferenceRequest +from .llama_llm_inference_response import LlamaLlmInferenceResponse +from .llm_inference_request import LlmInferenceRequest +from .llm_inference_response import LlmInferenceResponse +from .logprobs import Logprobs +from .on_demand_serving_mode import OnDemandServingMode +from .serving_mode import ServingMode +from .summarize_text_details import SummarizeTextDetails +from .summarize_text_result import SummarizeTextResult +from .token_likelihood import TokenLikelihood + +# Maps type names to classes for generative_ai_inference services. +generative_ai_inference_type_mapping = { + "Choice": Choice, + "CohereLlmInferenceRequest": CohereLlmInferenceRequest, + "CohereLlmInferenceResponse": CohereLlmInferenceResponse, + "DedicatedServingMode": DedicatedServingMode, + "EmbedTextDetails": EmbedTextDetails, + "EmbedTextResult": EmbedTextResult, + "GenerateTextDetails": GenerateTextDetails, + "GenerateTextResult": GenerateTextResult, + "GeneratedText": GeneratedText, + "LlamaLlmInferenceRequest": LlamaLlmInferenceRequest, + "LlamaLlmInferenceResponse": LlamaLlmInferenceResponse, + "LlmInferenceRequest": LlmInferenceRequest, + "LlmInferenceResponse": LlmInferenceResponse, + "Logprobs": Logprobs, + "OnDemandServingMode": OnDemandServingMode, + "ServingMode": ServingMode, + "SummarizeTextDetails": SummarizeTextDetails, + "SummarizeTextResult": SummarizeTextResult, + "TokenLikelihood": TokenLikelihood +} diff --git a/src/oci/generative_ai_inference/models/choice.py b/src/oci/generative_ai_inference/models/choice.py new file mode 100644 index 000000000..a0f8623a2 --- /dev/null +++ b/src/oci/generative_ai_inference/models/choice.py @@ -0,0 +1,165 @@ +# 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: 20231130 + + +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 Choice(object): + """ + Represents a single instance of generated text. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Choice object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param index: + The value to assign to the index property of this Choice. + :type index: int + + :param text: + The value to assign to the text property of this Choice. + :type text: str + + :param finish_reason: + The value to assign to the finish_reason property of this Choice. + :type finish_reason: str + + :param logprobs: + The value to assign to the logprobs property of this Choice. + :type logprobs: oci.generative_ai_inference.models.Logprobs + + """ + self.swagger_types = { + 'index': 'int', + 'text': 'str', + 'finish_reason': 'str', + 'logprobs': 'Logprobs' + } + + self.attribute_map = { + 'index': 'index', + 'text': 'text', + 'finish_reason': 'finishReason', + 'logprobs': 'logprobs' + } + + self._index = None + self._text = None + self._finish_reason = None + self._logprobs = None + + @property + def index(self): + """ + **[Required]** Gets the index of this Choice. + The index of the generated text. + + + :return: The index of this Choice. + :rtype: int + """ + return self._index + + @index.setter + def index(self, index): + """ + Sets the index of this Choice. + The index of the generated text. + + + :param index: The index of this Choice. + :type: int + """ + self._index = index + + @property + def text(self): + """ + **[Required]** Gets the text of this Choice. + The generated text. + + + :return: The text of this Choice. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """ + Sets the text of this Choice. + The generated text. + + + :param text: The text of this Choice. + :type: str + """ + self._text = text + + @property + def finish_reason(self): + """ + **[Required]** Gets the finish_reason of this Choice. + The reason why the model stopped generating tokens. + + Stops if the model hits a natural stop point or a provided stop sequence. Returns the length if the tokens reach the specified maximum number of tokens. + + + :return: The finish_reason of this Choice. + :rtype: str + """ + return self._finish_reason + + @finish_reason.setter + def finish_reason(self, finish_reason): + """ + Sets the finish_reason of this Choice. + The reason why the model stopped generating tokens. + + Stops if the model hits a natural stop point or a provided stop sequence. Returns the length if the tokens reach the specified maximum number of tokens. + + + :param finish_reason: The finish_reason of this Choice. + :type: str + """ + self._finish_reason = finish_reason + + @property + def logprobs(self): + """ + Gets the logprobs of this Choice. + + :return: The logprobs of this Choice. + :rtype: oci.generative_ai_inference.models.Logprobs + """ + return self._logprobs + + @logprobs.setter + def logprobs(self, logprobs): + """ + Sets the logprobs of this Choice. + + :param logprobs: The logprobs of this Choice. + :type: oci.generative_ai_inference.models.Logprobs + """ + self._logprobs = logprobs + + 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/generative_ai_inference/models/cohere_llm_inference_request.py b/src/oci/generative_ai_inference/models/cohere_llm_inference_request.py new file mode 100644 index 000000000..b20be9098 --- /dev/null +++ b/src/oci/generative_ai_inference/models/cohere_llm_inference_request.py @@ -0,0 +1,510 @@ +# 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: 20231130 + +from .llm_inference_request import LlmInferenceRequest +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 CohereLlmInferenceRequest(LlmInferenceRequest): + """ + Details for the text generation request for Cohere models. + """ + + #: A constant which can be used with the return_likelihoods property of a CohereLlmInferenceRequest. + #: This constant has a value of "NONE" + RETURN_LIKELIHOODS_NONE = "NONE" + + #: A constant which can be used with the return_likelihoods property of a CohereLlmInferenceRequest. + #: This constant has a value of "ALL" + RETURN_LIKELIHOODS_ALL = "ALL" + + #: A constant which can be used with the return_likelihoods property of a CohereLlmInferenceRequest. + #: This constant has a value of "GENERATION" + RETURN_LIKELIHOODS_GENERATION = "GENERATION" + + #: A constant which can be used with the truncate property of a CohereLlmInferenceRequest. + #: This constant has a value of "NONE" + TRUNCATE_NONE = "NONE" + + #: A constant which can be used with the truncate property of a CohereLlmInferenceRequest. + #: This constant has a value of "START" + TRUNCATE_START = "START" + + #: A constant which can be used with the truncate property of a CohereLlmInferenceRequest. + #: This constant has a value of "END" + TRUNCATE_END = "END" + + def __init__(self, **kwargs): + """ + Initializes a new CohereLlmInferenceRequest object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.CohereLlmInferenceRequest.runtime_type` attribute + of this class is ``COHERE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param runtime_type: + The value to assign to the runtime_type property of this CohereLlmInferenceRequest. + Allowed values for this property are: "COHERE", "LLAMA" + :type runtime_type: str + + :param prompt: + The value to assign to the prompt property of this CohereLlmInferenceRequest. + :type prompt: str + + :param is_stream: + The value to assign to the is_stream property of this CohereLlmInferenceRequest. + :type is_stream: bool + + :param num_generations: + The value to assign to the num_generations property of this CohereLlmInferenceRequest. + :type num_generations: int + + :param is_echo: + The value to assign to the is_echo property of this CohereLlmInferenceRequest. + :type is_echo: bool + + :param max_tokens: + The value to assign to the max_tokens property of this CohereLlmInferenceRequest. + :type max_tokens: int + + :param temperature: + The value to assign to the temperature property of this CohereLlmInferenceRequest. + :type temperature: float + + :param top_k: + The value to assign to the top_k property of this CohereLlmInferenceRequest. + :type top_k: int + + :param top_p: + The value to assign to the top_p property of this CohereLlmInferenceRequest. + :type top_p: float + + :param frequency_penalty: + The value to assign to the frequency_penalty property of this CohereLlmInferenceRequest. + :type frequency_penalty: float + + :param presence_penalty: + The value to assign to the presence_penalty property of this CohereLlmInferenceRequest. + :type presence_penalty: float + + :param stop_sequences: + The value to assign to the stop_sequences property of this CohereLlmInferenceRequest. + :type stop_sequences: list[str] + + :param return_likelihoods: + The value to assign to the return_likelihoods property of this CohereLlmInferenceRequest. + Allowed values for this property are: "NONE", "ALL", "GENERATION" + :type return_likelihoods: str + + :param truncate: + The value to assign to the truncate property of this CohereLlmInferenceRequest. + Allowed values for this property are: "NONE", "START", "END" + :type truncate: str + + """ + self.swagger_types = { + 'runtime_type': 'str', + 'prompt': 'str', + 'is_stream': 'bool', + 'num_generations': 'int', + 'is_echo': 'bool', + 'max_tokens': 'int', + 'temperature': 'float', + 'top_k': 'int', + 'top_p': 'float', + 'frequency_penalty': 'float', + 'presence_penalty': 'float', + 'stop_sequences': 'list[str]', + 'return_likelihoods': 'str', + 'truncate': 'str' + } + + self.attribute_map = { + 'runtime_type': 'runtimeType', + 'prompt': 'prompt', + 'is_stream': 'isStream', + 'num_generations': 'numGenerations', + 'is_echo': 'isEcho', + 'max_tokens': 'maxTokens', + 'temperature': 'temperature', + 'top_k': 'topK', + 'top_p': 'topP', + 'frequency_penalty': 'frequencyPenalty', + 'presence_penalty': 'presencePenalty', + 'stop_sequences': 'stopSequences', + 'return_likelihoods': 'returnLikelihoods', + 'truncate': 'truncate' + } + + self._runtime_type = None + self._prompt = None + self._is_stream = None + self._num_generations = None + self._is_echo = None + self._max_tokens = None + self._temperature = None + self._top_k = None + self._top_p = None + self._frequency_penalty = None + self._presence_penalty = None + self._stop_sequences = None + self._return_likelihoods = None + self._truncate = None + self._runtime_type = 'COHERE' + + @property + def prompt(self): + """ + **[Required]** Gets the prompt of this CohereLlmInferenceRequest. + Represents the prompt to be completed. The trailing white spaces are trimmed before completion. + + + :return: The prompt of this CohereLlmInferenceRequest. + :rtype: str + """ + return self._prompt + + @prompt.setter + def prompt(self, prompt): + """ + Sets the prompt of this CohereLlmInferenceRequest. + Represents the prompt to be completed. The trailing white spaces are trimmed before completion. + + + :param prompt: The prompt of this CohereLlmInferenceRequest. + :type: str + """ + self._prompt = prompt + + @property + def is_stream(self): + """ + Gets the is_stream of this CohereLlmInferenceRequest. + Whether to stream back partial progress. If set, tokens are sent as data-only server-sent events as they become available. + + + :return: The is_stream of this CohereLlmInferenceRequest. + :rtype: bool + """ + return self._is_stream + + @is_stream.setter + def is_stream(self, is_stream): + """ + Sets the is_stream of this CohereLlmInferenceRequest. + Whether to stream back partial progress. If set, tokens are sent as data-only server-sent events as they become available. + + + :param is_stream: The is_stream of this CohereLlmInferenceRequest. + :type: bool + """ + self._is_stream = is_stream + + @property + def num_generations(self): + """ + Gets the num_generations of this CohereLlmInferenceRequest. + The number of generated texts that will be returned. + + + :return: The num_generations of this CohereLlmInferenceRequest. + :rtype: int + """ + return self._num_generations + + @num_generations.setter + def num_generations(self, num_generations): + """ + Sets the num_generations of this CohereLlmInferenceRequest. + The number of generated texts that will be returned. + + + :param num_generations: The num_generations of this CohereLlmInferenceRequest. + :type: int + """ + self._num_generations = num_generations + + @property + def is_echo(self): + """ + Gets the is_echo of this CohereLlmInferenceRequest. + Whether or not to return the user prompt in the response. This option only applies to non-stream results. + + + :return: The is_echo of this CohereLlmInferenceRequest. + :rtype: bool + """ + return self._is_echo + + @is_echo.setter + def is_echo(self, is_echo): + """ + Sets the is_echo of this CohereLlmInferenceRequest. + Whether or not to return the user prompt in the response. This option only applies to non-stream results. + + + :param is_echo: The is_echo of this CohereLlmInferenceRequest. + :type: bool + """ + self._is_echo = is_echo + + @property + def max_tokens(self): + """ + Gets the max_tokens of this CohereLlmInferenceRequest. + The maximum number of tokens to predict for each response. Includes input plus output tokens. + + + :return: The max_tokens of this CohereLlmInferenceRequest. + :rtype: int + """ + return self._max_tokens + + @max_tokens.setter + def max_tokens(self, max_tokens): + """ + Sets the max_tokens of this CohereLlmInferenceRequest. + The maximum number of tokens to predict for each response. Includes input plus output tokens. + + + :param max_tokens: The max_tokens of this CohereLlmInferenceRequest. + :type: int + """ + self._max_tokens = max_tokens + + @property + def temperature(self): + """ + Gets the temperature of this CohereLlmInferenceRequest. + A number that sets the randomness of the generated output. A lower temperature means a less random generations. + + Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + + + :return: The temperature of this CohereLlmInferenceRequest. + :rtype: float + """ + return self._temperature + + @temperature.setter + def temperature(self, temperature): + """ + Sets the temperature of this CohereLlmInferenceRequest. + A number that sets the randomness of the generated output. A lower temperature means a less random generations. + + Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + + + :param temperature: The temperature of this CohereLlmInferenceRequest. + :type: float + """ + self._temperature = temperature + + @property + def top_k(self): + """ + Gets the top_k of this CohereLlmInferenceRequest. + An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value is 0 which disables this method and considers all tokens. To set a number for the likely tokens, choose an integer between 1 and 500. + + If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20, but the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen. + + + :return: The top_k of this CohereLlmInferenceRequest. + :rtype: int + """ + return self._top_k + + @top_k.setter + def top_k(self, top_k): + """ + Sets the top_k of this CohereLlmInferenceRequest. + An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value is 0 which disables this method and considers all tokens. To set a number for the likely tokens, choose an integer between 1 and 500. + + If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20, but the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen. + + + :param top_k: The top_k of this CohereLlmInferenceRequest. + :type: int + """ + self._top_k = top_k + + @property + def top_p(self): + """ + Gets the top_p of this CohereLlmInferenceRequest. + If set to a probability 0.0 < p < 1.0, it ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. + + To eliminate tokens with low likelihood, assign p a minimum percentage for the next token's likelihood. For example, when p is set to 0.75, the model eliminates the bottom 25 percent for the next token. Set to 1.0 to consider all tokens and set to 0 to disable. If both k and p are enabled, p acts after k. + + + :return: The top_p of this CohereLlmInferenceRequest. + :rtype: float + """ + return self._top_p + + @top_p.setter + def top_p(self, top_p): + """ + Sets the top_p of this CohereLlmInferenceRequest. + If set to a probability 0.0 < p < 1.0, it ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. + + To eliminate tokens with low likelihood, assign p a minimum percentage for the next token's likelihood. For example, when p is set to 0.75, the model eliminates the bottom 25 percent for the next token. Set to 1.0 to consider all tokens and set to 0 to disable. If both k and p are enabled, p acts after k. + + + :param top_p: The top_p of this CohereLlmInferenceRequest. + :type: float + """ + self._top_p = top_p + + @property + def frequency_penalty(self): + """ + Gets the frequency_penalty of this CohereLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on their frequency in the generated text so far. Greater numbers encourage the model to use new tokens, while lower numbers encourage the model to repeat the tokens. Set to 0 to disable. + + + :return: The frequency_penalty of this CohereLlmInferenceRequest. + :rtype: float + """ + return self._frequency_penalty + + @frequency_penalty.setter + def frequency_penalty(self, frequency_penalty): + """ + Sets the frequency_penalty of this CohereLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on their frequency in the generated text so far. Greater numbers encourage the model to use new tokens, while lower numbers encourage the model to repeat the tokens. Set to 0 to disable. + + + :param frequency_penalty: The frequency_penalty of this CohereLlmInferenceRequest. + :type: float + """ + self._frequency_penalty = frequency_penalty + + @property + def presence_penalty(self): + """ + Gets the presence_penalty of this CohereLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on whether they've appeared in the generated text so far. Greater numbers encourage the model to use new tokens, while lower numbers encourage the model to repeat the tokens. + + Similar to frequency penalty, a penalty is applied to previously present tokens, except that this penalty is applied equally to all tokens that have already appeared, regardless of how many times they've appeared. Set to 0 to disable. + + + :return: The presence_penalty of this CohereLlmInferenceRequest. + :rtype: float + """ + return self._presence_penalty + + @presence_penalty.setter + def presence_penalty(self, presence_penalty): + """ + Sets the presence_penalty of this CohereLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on whether they've appeared in the generated text so far. Greater numbers encourage the model to use new tokens, while lower numbers encourage the model to repeat the tokens. + + Similar to frequency penalty, a penalty is applied to previously present tokens, except that this penalty is applied equally to all tokens that have already appeared, regardless of how many times they've appeared. Set to 0 to disable. + + + :param presence_penalty: The presence_penalty of this CohereLlmInferenceRequest. + :type: float + """ + self._presence_penalty = presence_penalty + + @property + def stop_sequences(self): + """ + Gets the stop_sequences of this CohereLlmInferenceRequest. + The generated text is cut at the end of the earliest occurrence of this stop sequence. The generated text will include this stop sequence. + + + :return: The stop_sequences of this CohereLlmInferenceRequest. + :rtype: list[str] + """ + return self._stop_sequences + + @stop_sequences.setter + def stop_sequences(self, stop_sequences): + """ + Sets the stop_sequences of this CohereLlmInferenceRequest. + The generated text is cut at the end of the earliest occurrence of this stop sequence. The generated text will include this stop sequence. + + + :param stop_sequences: The stop_sequences of this CohereLlmInferenceRequest. + :type: list[str] + """ + self._stop_sequences = stop_sequences + + @property + def return_likelihoods(self): + """ + Gets the return_likelihoods of this CohereLlmInferenceRequest. + Specifies how and if the token likelihoods are returned with the response. + + Allowed values for this property are: "NONE", "ALL", "GENERATION" + + + :return: The return_likelihoods of this CohereLlmInferenceRequest. + :rtype: str + """ + return self._return_likelihoods + + @return_likelihoods.setter + def return_likelihoods(self, return_likelihoods): + """ + Sets the return_likelihoods of this CohereLlmInferenceRequest. + Specifies how and if the token likelihoods are returned with the response. + + + :param return_likelihoods: The return_likelihoods of this CohereLlmInferenceRequest. + :type: str + """ + allowed_values = ["NONE", "ALL", "GENERATION"] + if not value_allowed_none_or_none_sentinel(return_likelihoods, allowed_values): + raise ValueError( + f"Invalid value for `return_likelihoods`, must be None or one of {allowed_values}" + ) + self._return_likelihoods = return_likelihoods + + @property + def truncate(self): + """ + Gets the truncate of this CohereLlmInferenceRequest. + For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + + Allowed values for this property are: "NONE", "START", "END" + + + :return: The truncate of this CohereLlmInferenceRequest. + :rtype: str + """ + return self._truncate + + @truncate.setter + def truncate(self, truncate): + """ + Sets the truncate of this CohereLlmInferenceRequest. + For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + + + :param truncate: The truncate of this CohereLlmInferenceRequest. + :type: str + """ + allowed_values = ["NONE", "START", "END"] + if not value_allowed_none_or_none_sentinel(truncate, allowed_values): + raise ValueError( + f"Invalid value for `truncate`, must be None or one of {allowed_values}" + ) + self._truncate = truncate + + 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/generative_ai_inference/models/cohere_llm_inference_response.py b/src/oci/generative_ai_inference/models/cohere_llm_inference_response.py new file mode 100644 index 000000000..7b27c22d8 --- /dev/null +++ b/src/oci/generative_ai_inference/models/cohere_llm_inference_response.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: 20231130 + +from .llm_inference_response import LlmInferenceResponse +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 CohereLlmInferenceResponse(LlmInferenceResponse): + """ + The generated text result to return. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CohereLlmInferenceResponse object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.CohereLlmInferenceResponse.runtime_type` attribute + of this class is ``COHERE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param runtime_type: + The value to assign to the runtime_type property of this CohereLlmInferenceResponse. + Allowed values for this property are: "COHERE", "LLAMA" + :type runtime_type: str + + :param generated_texts: + The value to assign to the generated_texts property of this CohereLlmInferenceResponse. + :type generated_texts: list[oci.generative_ai_inference.models.GeneratedText] + + :param time_created: + The value to assign to the time_created property of this CohereLlmInferenceResponse. + :type time_created: datetime + + :param prompt: + The value to assign to the prompt property of this CohereLlmInferenceResponse. + :type prompt: str + + """ + self.swagger_types = { + 'runtime_type': 'str', + 'generated_texts': 'list[GeneratedText]', + 'time_created': 'datetime', + 'prompt': 'str' + } + + self.attribute_map = { + 'runtime_type': 'runtimeType', + 'generated_texts': 'generatedTexts', + 'time_created': 'timeCreated', + 'prompt': 'prompt' + } + + self._runtime_type = None + self._generated_texts = None + self._time_created = None + self._prompt = None + self._runtime_type = 'COHERE' + + @property + def generated_texts(self): + """ + **[Required]** Gets the generated_texts of this CohereLlmInferenceResponse. + Each prompt in the input array has an array of GeneratedText, controlled by numGenerations parameter in the request. + + + :return: The generated_texts of this CohereLlmInferenceResponse. + :rtype: list[oci.generative_ai_inference.models.GeneratedText] + """ + return self._generated_texts + + @generated_texts.setter + def generated_texts(self, generated_texts): + """ + Sets the generated_texts of this CohereLlmInferenceResponse. + Each prompt in the input array has an array of GeneratedText, controlled by numGenerations parameter in the request. + + + :param generated_texts: The generated_texts of this CohereLlmInferenceResponse. + :type: list[oci.generative_ai_inference.models.GeneratedText] + """ + self._generated_texts = generated_texts + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this CohereLlmInferenceResponse. + The date and time that the model was created in an RFC3339 formatted datetime string. + + + :return: The time_created of this CohereLlmInferenceResponse. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this CohereLlmInferenceResponse. + The date and time that the model was created in an RFC3339 formatted datetime string. + + + :param time_created: The time_created of this CohereLlmInferenceResponse. + :type: datetime + """ + self._time_created = time_created + + @property + def prompt(self): + """ + Gets the prompt of this CohereLlmInferenceResponse. + Represents the original prompt. Applies only to non-stream responses. + + + :return: The prompt of this CohereLlmInferenceResponse. + :rtype: str + """ + return self._prompt + + @prompt.setter + def prompt(self, prompt): + """ + Sets the prompt of this CohereLlmInferenceResponse. + Represents the original prompt. Applies only to non-stream responses. + + + :param prompt: The prompt of this CohereLlmInferenceResponse. + :type: str + """ + self._prompt = prompt + + 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/generative_ai_inference/models/dedicated_serving_mode.py b/src/oci/generative_ai_inference/models/dedicated_serving_mode.py new file mode 100644 index 000000000..4c6fbe72f --- /dev/null +++ b/src/oci/generative_ai_inference/models/dedicated_serving_mode.py @@ -0,0 +1,82 @@ +# 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: 20231130 + +from .serving_mode import ServingMode +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 DedicatedServingMode(ServingMode): + """ + The model's serving mode is dedicated serving and has an endpoint on a dedicated AI cluster. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DedicatedServingMode object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.DedicatedServingMode.serving_type` attribute + of this class is ``DEDICATED`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param serving_type: + The value to assign to the serving_type property of this DedicatedServingMode. + Allowed values for this property are: "ON_DEMAND", "DEDICATED" + :type serving_type: str + + :param endpoint_id: + The value to assign to the endpoint_id property of this DedicatedServingMode. + :type endpoint_id: str + + """ + self.swagger_types = { + 'serving_type': 'str', + 'endpoint_id': 'str' + } + + self.attribute_map = { + 'serving_type': 'servingType', + 'endpoint_id': 'endpointId' + } + + self._serving_type = None + self._endpoint_id = None + self._serving_type = 'DEDICATED' + + @property + def endpoint_id(self): + """ + **[Required]** Gets the endpoint_id of this DedicatedServingMode. + The OCID of the endpoint to use. + + + :return: The endpoint_id of this DedicatedServingMode. + :rtype: str + """ + return self._endpoint_id + + @endpoint_id.setter + def endpoint_id(self, endpoint_id): + """ + Sets the endpoint_id of this DedicatedServingMode. + The OCID of the endpoint to use. + + + :param endpoint_id: The endpoint_id of this DedicatedServingMode. + :type: str + """ + self._endpoint_id = endpoint_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/generative_ai_inference/models/embed_text_details.py b/src/oci/generative_ai_inference/models/embed_text_details.py new file mode 100644 index 000000000..235e75fbd --- /dev/null +++ b/src/oci/generative_ai_inference/models/embed_text_details.py @@ -0,0 +1,267 @@ +# 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: 20231130 + + +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 EmbedTextDetails(object): + """ + Details for the request to embed texts. + """ + + #: A constant which can be used with the truncate property of a EmbedTextDetails. + #: This constant has a value of "NONE" + TRUNCATE_NONE = "NONE" + + #: A constant which can be used with the truncate property of a EmbedTextDetails. + #: This constant has a value of "START" + TRUNCATE_START = "START" + + #: A constant which can be used with the truncate property of a EmbedTextDetails. + #: This constant has a value of "END" + TRUNCATE_END = "END" + + #: A constant which can be used with the input_type property of a EmbedTextDetails. + #: This constant has a value of "SEARCH_DOCUMENT" + INPUT_TYPE_SEARCH_DOCUMENT = "SEARCH_DOCUMENT" + + #: A constant which can be used with the input_type property of a EmbedTextDetails. + #: This constant has a value of "SEARCH_QUERY" + INPUT_TYPE_SEARCH_QUERY = "SEARCH_QUERY" + + #: A constant which can be used with the input_type property of a EmbedTextDetails. + #: This constant has a value of "CLASSIFICATION" + INPUT_TYPE_CLASSIFICATION = "CLASSIFICATION" + + #: A constant which can be used with the input_type property of a EmbedTextDetails. + #: This constant has a value of "CLUSTERING" + INPUT_TYPE_CLUSTERING = "CLUSTERING" + + def __init__(self, **kwargs): + """ + Initializes a new EmbedTextDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param inputs: + The value to assign to the inputs property of this EmbedTextDetails. + :type inputs: list[str] + + :param serving_mode: + The value to assign to the serving_mode property of this EmbedTextDetails. + :type serving_mode: oci.generative_ai_inference.models.ServingMode + + :param compartment_id: + The value to assign to the compartment_id property of this EmbedTextDetails. + :type compartment_id: str + + :param is_echo: + The value to assign to the is_echo property of this EmbedTextDetails. + :type is_echo: bool + + :param truncate: + The value to assign to the truncate property of this EmbedTextDetails. + Allowed values for this property are: "NONE", "START", "END" + :type truncate: str + + :param input_type: + The value to assign to the input_type property of this EmbedTextDetails. + Allowed values for this property are: "SEARCH_DOCUMENT", "SEARCH_QUERY", "CLASSIFICATION", "CLUSTERING" + :type input_type: str + + """ + self.swagger_types = { + 'inputs': 'list[str]', + 'serving_mode': 'ServingMode', + 'compartment_id': 'str', + 'is_echo': 'bool', + 'truncate': 'str', + 'input_type': 'str' + } + + self.attribute_map = { + 'inputs': 'inputs', + 'serving_mode': 'servingMode', + 'compartment_id': 'compartmentId', + 'is_echo': 'isEcho', + 'truncate': 'truncate', + 'input_type': 'inputType' + } + + self._inputs = None + self._serving_mode = None + self._compartment_id = None + self._is_echo = None + self._truncate = None + self._input_type = None + + @property + def inputs(self): + """ + **[Required]** Gets the inputs of this EmbedTextDetails. + The list of strings for embeddings. + + + :return: The inputs of this EmbedTextDetails. + :rtype: list[str] + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """ + Sets the inputs of this EmbedTextDetails. + The list of strings for embeddings. + + + :param inputs: The inputs of this EmbedTextDetails. + :type: list[str] + """ + self._inputs = inputs + + @property + def serving_mode(self): + """ + **[Required]** Gets the serving_mode of this EmbedTextDetails. + + :return: The serving_mode of this EmbedTextDetails. + :rtype: oci.generative_ai_inference.models.ServingMode + """ + return self._serving_mode + + @serving_mode.setter + def serving_mode(self, serving_mode): + """ + Sets the serving_mode of this EmbedTextDetails. + + :param serving_mode: The serving_mode of this EmbedTextDetails. + :type: oci.generative_ai_inference.models.ServingMode + """ + self._serving_mode = serving_mode + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this EmbedTextDetails. + The OCID of compartment that the user is authorized to use to call into the Generative AI service. + + + :return: The compartment_id of this EmbedTextDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this EmbedTextDetails. + The OCID of compartment that the user is authorized to use to call into the Generative AI service. + + + :param compartment_id: The compartment_id of this EmbedTextDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def is_echo(self): + """ + Gets the is_echo of this EmbedTextDetails. + Whether or not to include the original inputs in the response. Results are index-based. + + + :return: The is_echo of this EmbedTextDetails. + :rtype: bool + """ + return self._is_echo + + @is_echo.setter + def is_echo(self, is_echo): + """ + Sets the is_echo of this EmbedTextDetails. + Whether or not to include the original inputs in the response. Results are index-based. + + + :param is_echo: The is_echo of this EmbedTextDetails. + :type: bool + """ + self._is_echo = is_echo + + @property + def truncate(self): + """ + Gets the truncate of this EmbedTextDetails. + For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + + Allowed values for this property are: "NONE", "START", "END" + + + :return: The truncate of this EmbedTextDetails. + :rtype: str + """ + return self._truncate + + @truncate.setter + def truncate(self, truncate): + """ + Sets the truncate of this EmbedTextDetails. + For an input that's longer than the maximum token length, specifies which part of the input text will be truncated. + + + :param truncate: The truncate of this EmbedTextDetails. + :type: str + """ + allowed_values = ["NONE", "START", "END"] + if not value_allowed_none_or_none_sentinel(truncate, allowed_values): + raise ValueError( + f"Invalid value for `truncate`, must be None or one of {allowed_values}" + ) + self._truncate = truncate + + @property + def input_type(self): + """ + Gets the input_type of this EmbedTextDetails. + Specifies the input type. + + Allowed values for this property are: "SEARCH_DOCUMENT", "SEARCH_QUERY", "CLASSIFICATION", "CLUSTERING" + + + :return: The input_type of this EmbedTextDetails. + :rtype: str + """ + return self._input_type + + @input_type.setter + def input_type(self, input_type): + """ + Sets the input_type of this EmbedTextDetails. + Specifies the input type. + + + :param input_type: The input_type of this EmbedTextDetails. + :type: str + """ + allowed_values = ["SEARCH_DOCUMENT", "SEARCH_QUERY", "CLASSIFICATION", "CLUSTERING"] + if not value_allowed_none_or_none_sentinel(input_type, allowed_values): + raise ValueError( + f"Invalid value for `input_type`, must be None or one of {allowed_values}" + ) + self._input_type = input_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/generative_ai_inference/models/embed_text_result.py b/src/oci/generative_ai_inference/models/embed_text_result.py new file mode 100644 index 000000000..2159d2c2b --- /dev/null +++ b/src/oci/generative_ai_inference/models/embed_text_result.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: 20231130 + + +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 EmbedTextResult(object): + """ + The generated embedded result to return. + """ + + def __init__(self, **kwargs): + """ + Initializes a new EmbedTextResult 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 EmbedTextResult. + :type id: str + + :param inputs: + The value to assign to the inputs property of this EmbedTextResult. + :type inputs: list[str] + + :param embeddings: + The value to assign to the embeddings property of this EmbedTextResult. + :type embeddings: list[list[float]] + + :param model_id: + The value to assign to the model_id property of this EmbedTextResult. + :type model_id: str + + :param model_version: + The value to assign to the model_version property of this EmbedTextResult. + :type model_version: str + + """ + self.swagger_types = { + 'id': 'str', + 'inputs': 'list[str]', + 'embeddings': 'list[list[float]]', + 'model_id': 'str', + 'model_version': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'inputs': 'inputs', + 'embeddings': 'embeddings', + 'model_id': 'modelId', + 'model_version': 'modelVersion' + } + + self._id = None + self._inputs = None + self._embeddings = None + self._model_id = None + self._model_version = None + + @property + def id(self): + """ + **[Required]** Gets the id of this EmbedTextResult. + A unique identifier for the generated result. + + + :return: The id of this EmbedTextResult. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this EmbedTextResult. + A unique identifier for the generated result. + + + :param id: The id of this EmbedTextResult. + :type: str + """ + self._id = id + + @property + def inputs(self): + """ + Gets the inputs of this EmbedTextResult. + The original inputs. Only present if \"isEcho\" is set to true. + + + :return: The inputs of this EmbedTextResult. + :rtype: list[str] + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """ + Sets the inputs of this EmbedTextResult. + The original inputs. Only present if \"isEcho\" is set to true. + + + :param inputs: The inputs of this EmbedTextResult. + :type: list[str] + """ + self._inputs = inputs + + @property + def embeddings(self): + """ + **[Required]** Gets the embeddings of this EmbedTextResult. + The embeddings corresponding to inputs. + + + :return: The embeddings of this EmbedTextResult. + :rtype: list[list[float]] + """ + return self._embeddings + + @embeddings.setter + def embeddings(self, embeddings): + """ + Sets the embeddings of this EmbedTextResult. + The embeddings corresponding to inputs. + + + :param embeddings: The embeddings of this EmbedTextResult. + :type: list[list[float]] + """ + self._embeddings = embeddings + + @property + def model_id(self): + """ + Gets the model_id of this EmbedTextResult. + The OCID of the model used in this inference request. + + + :return: The model_id of this EmbedTextResult. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this EmbedTextResult. + The OCID of the model used in this inference request. + + + :param model_id: The model_id of this EmbedTextResult. + :type: str + """ + self._model_id = model_id + + @property + def model_version(self): + """ + Gets the model_version of this EmbedTextResult. + The version of the model. + + + :return: The model_version of this EmbedTextResult. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this EmbedTextResult. + The version of the model. + + + :param model_version: The model_version of this EmbedTextResult. + :type: str + """ + self._model_version = model_version + + 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/generative_ai_inference/models/generate_text_details.py b/src/oci/generative_ai_inference/models/generate_text_details.py new file mode 100644 index 000000000..e436c4273 --- /dev/null +++ b/src/oci/generative_ai_inference/models/generate_text_details.py @@ -0,0 +1,126 @@ +# 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: 20231130 + + +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 GenerateTextDetails(object): + """ + Details for the request to generate text. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GenerateTextDetails 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 GenerateTextDetails. + :type compartment_id: str + + :param serving_mode: + The value to assign to the serving_mode property of this GenerateTextDetails. + :type serving_mode: oci.generative_ai_inference.models.ServingMode + + :param inference_request: + The value to assign to the inference_request property of this GenerateTextDetails. + :type inference_request: oci.generative_ai_inference.models.LlmInferenceRequest + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'serving_mode': 'ServingMode', + 'inference_request': 'LlmInferenceRequest' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'serving_mode': 'servingMode', + 'inference_request': 'inferenceRequest' + } + + self._compartment_id = None + self._serving_mode = None + self._inference_request = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this GenerateTextDetails. + The OCID of compartment that the user is authorized to use to call into the Generative AI service. + + + :return: The compartment_id of this GenerateTextDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this GenerateTextDetails. + The OCID of compartment that the user is authorized to use to call into the Generative AI service. + + + :param compartment_id: The compartment_id of this GenerateTextDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def serving_mode(self): + """ + **[Required]** Gets the serving_mode of this GenerateTextDetails. + + :return: The serving_mode of this GenerateTextDetails. + :rtype: oci.generative_ai_inference.models.ServingMode + """ + return self._serving_mode + + @serving_mode.setter + def serving_mode(self, serving_mode): + """ + Sets the serving_mode of this GenerateTextDetails. + + :param serving_mode: The serving_mode of this GenerateTextDetails. + :type: oci.generative_ai_inference.models.ServingMode + """ + self._serving_mode = serving_mode + + @property + def inference_request(self): + """ + **[Required]** Gets the inference_request of this GenerateTextDetails. + + :return: The inference_request of this GenerateTextDetails. + :rtype: oci.generative_ai_inference.models.LlmInferenceRequest + """ + return self._inference_request + + @inference_request.setter + def inference_request(self, inference_request): + """ + Sets the inference_request of this GenerateTextDetails. + + :param inference_request: The inference_request of this GenerateTextDetails. + :type: oci.generative_ai_inference.models.LlmInferenceRequest + """ + self._inference_request = inference_request + + 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/generative_ai_inference/models/generate_text_result.py b/src/oci/generative_ai_inference/models/generate_text_result.py new file mode 100644 index 000000000..7e2bd1bcf --- /dev/null +++ b/src/oci/generative_ai_inference/models/generate_text_result.py @@ -0,0 +1,130 @@ +# 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: 20231130 + + +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 GenerateTextResult(object): + """ + The generated text result to return. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GenerateTextResult object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param model_id: + The value to assign to the model_id property of this GenerateTextResult. + :type model_id: str + + :param model_version: + The value to assign to the model_version property of this GenerateTextResult. + :type model_version: str + + :param inference_response: + The value to assign to the inference_response property of this GenerateTextResult. + :type inference_response: oci.generative_ai_inference.models.LlmInferenceResponse + + """ + self.swagger_types = { + 'model_id': 'str', + 'model_version': 'str', + 'inference_response': 'LlmInferenceResponse' + } + + self.attribute_map = { + 'model_id': 'modelId', + 'model_version': 'modelVersion', + 'inference_response': 'inferenceResponse' + } + + self._model_id = None + self._model_version = None + self._inference_response = None + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this GenerateTextResult. + The OCID of the model used in this inference request. + + + :return: The model_id of this GenerateTextResult. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this GenerateTextResult. + The OCID of the model used in this inference request. + + + :param model_id: The model_id of this GenerateTextResult. + :type: str + """ + self._model_id = model_id + + @property + def model_version(self): + """ + **[Required]** Gets the model_version of this GenerateTextResult. + The version of the model. + + + :return: The model_version of this GenerateTextResult. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this GenerateTextResult. + The version of the model. + + + :param model_version: The model_version of this GenerateTextResult. + :type: str + """ + self._model_version = model_version + + @property + def inference_response(self): + """ + **[Required]** Gets the inference_response of this GenerateTextResult. + + :return: The inference_response of this GenerateTextResult. + :rtype: oci.generative_ai_inference.models.LlmInferenceResponse + """ + return self._inference_response + + @inference_response.setter + def inference_response(self, inference_response): + """ + Sets the inference_response of this GenerateTextResult. + + :param inference_response: The inference_response of this GenerateTextResult. + :type: oci.generative_ai_inference.models.LlmInferenceResponse + """ + self._inference_response = inference_response + + 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/generative_ai_inference/models/generated_text.py b/src/oci/generative_ai_inference/models/generated_text.py new file mode 100644 index 000000000..f0068ceab --- /dev/null +++ b/src/oci/generative_ai_inference/models/generated_text.py @@ -0,0 +1,204 @@ +# 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: 20231130 + + +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 GeneratedText(object): + """ + The text generated during each run. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GeneratedText 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 GeneratedText. + :type id: str + + :param text: + The value to assign to the text property of this GeneratedText. + :type text: str + + :param likelihood: + The value to assign to the likelihood property of this GeneratedText. + :type likelihood: float + + :param finish_reason: + The value to assign to the finish_reason property of this GeneratedText. + :type finish_reason: str + + :param token_likelihoods: + The value to assign to the token_likelihoods property of this GeneratedText. + :type token_likelihoods: list[oci.generative_ai_inference.models.TokenLikelihood] + + """ + self.swagger_types = { + 'id': 'str', + 'text': 'str', + 'likelihood': 'float', + 'finish_reason': 'str', + 'token_likelihoods': 'list[TokenLikelihood]' + } + + self.attribute_map = { + 'id': 'id', + 'text': 'text', + 'likelihood': 'likelihood', + 'finish_reason': 'finishReason', + 'token_likelihoods': 'tokenLikelihoods' + } + + self._id = None + self._text = None + self._likelihood = None + self._finish_reason = None + self._token_likelihoods = None + + @property + def id(self): + """ + **[Required]** Gets the id of this GeneratedText. + A unique identifier for this text generation. + + + :return: The id of this GeneratedText. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this GeneratedText. + A unique identifier for this text generation. + + + :param id: The id of this GeneratedText. + :type: str + """ + self._id = id + + @property + def text(self): + """ + **[Required]** Gets the text of this GeneratedText. + The generated text. + + + :return: The text of this GeneratedText. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """ + Sets the text of this GeneratedText. + The generated text. + + + :param text: The text of this GeneratedText. + :type: str + """ + self._text = text + + @property + def likelihood(self): + """ + **[Required]** Gets the likelihood of this GeneratedText. + The overall likelihood of the generated text. + + When a large language model generates a new token for the output text, a likelihood is assigned to all tokens, where tokens with higher likelihoods are more likely to follow the current token. For example, it's more likely that the word favorite is followed by the word food or book rather than the word zebra. A lower likelihood means that it's less likely that token follows the current token. + + + :return: The likelihood of this GeneratedText. + :rtype: float + """ + return self._likelihood + + @likelihood.setter + def likelihood(self, likelihood): + """ + Sets the likelihood of this GeneratedText. + The overall likelihood of the generated text. + + When a large language model generates a new token for the output text, a likelihood is assigned to all tokens, where tokens with higher likelihoods are more likely to follow the current token. For example, it's more likely that the word favorite is followed by the word food or book rather than the word zebra. A lower likelihood means that it's less likely that token follows the current token. + + + :param likelihood: The likelihood of this GeneratedText. + :type: float + """ + self._likelihood = likelihood + + @property + def finish_reason(self): + """ + Gets the finish_reason of this GeneratedText. + The reason why the model stopped generating tokens. + + A model stops generating tokens if the model hits a natural stop point or reaches a provided stop sequence. + + + :return: The finish_reason of this GeneratedText. + :rtype: str + """ + return self._finish_reason + + @finish_reason.setter + def finish_reason(self, finish_reason): + """ + Sets the finish_reason of this GeneratedText. + The reason why the model stopped generating tokens. + + A model stops generating tokens if the model hits a natural stop point or reaches a provided stop sequence. + + + :param finish_reason: The finish_reason of this GeneratedText. + :type: str + """ + self._finish_reason = finish_reason + + @property + def token_likelihoods(self): + """ + Gets the token_likelihoods of this GeneratedText. + A collection of generated tokens and their corresponding likelihoods. + + + :return: The token_likelihoods of this GeneratedText. + :rtype: list[oci.generative_ai_inference.models.TokenLikelihood] + """ + return self._token_likelihoods + + @token_likelihoods.setter + def token_likelihoods(self, token_likelihoods): + """ + Sets the token_likelihoods of this GeneratedText. + A collection of generated tokens and their corresponding likelihoods. + + + :param token_likelihoods: The token_likelihoods of this GeneratedText. + :type: list[oci.generative_ai_inference.models.TokenLikelihood] + """ + self._token_likelihoods = token_likelihoods + + 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/generative_ai_inference/models/llama_llm_inference_request.py b/src/oci/generative_ai_inference/models/llama_llm_inference_request.py new file mode 100644 index 000000000..1b312c381 --- /dev/null +++ b/src/oci/generative_ai_inference/models/llama_llm_inference_request.py @@ -0,0 +1,443 @@ +# 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: 20231130 + +from .llm_inference_request import LlmInferenceRequest +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 LlamaLlmInferenceRequest(LlmInferenceRequest): + """ + Details for the text generation request for Llama models. + """ + + def __init__(self, **kwargs): + """ + Initializes a new LlamaLlmInferenceRequest object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.LlamaLlmInferenceRequest.runtime_type` attribute + of this class is ``LLAMA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param runtime_type: + The value to assign to the runtime_type property of this LlamaLlmInferenceRequest. + Allowed values for this property are: "COHERE", "LLAMA" + :type runtime_type: str + + :param prompt: + The value to assign to the prompt property of this LlamaLlmInferenceRequest. + :type prompt: str + + :param is_stream: + The value to assign to the is_stream property of this LlamaLlmInferenceRequest. + :type is_stream: bool + + :param num_generations: + The value to assign to the num_generations property of this LlamaLlmInferenceRequest. + :type num_generations: int + + :param is_echo: + The value to assign to the is_echo property of this LlamaLlmInferenceRequest. + :type is_echo: bool + + :param top_k: + The value to assign to the top_k property of this LlamaLlmInferenceRequest. + :type top_k: int + + :param top_p: + The value to assign to the top_p property of this LlamaLlmInferenceRequest. + :type top_p: float + + :param temperature: + The value to assign to the temperature property of this LlamaLlmInferenceRequest. + :type temperature: float + + :param frequency_penalty: + The value to assign to the frequency_penalty property of this LlamaLlmInferenceRequest. + :type frequency_penalty: float + + :param presence_penalty: + The value to assign to the presence_penalty property of this LlamaLlmInferenceRequest. + :type presence_penalty: float + + :param stop: + The value to assign to the stop property of this LlamaLlmInferenceRequest. + :type stop: list[str] + + :param log_probs: + The value to assign to the log_probs property of this LlamaLlmInferenceRequest. + :type log_probs: int + + :param max_tokens: + The value to assign to the max_tokens property of this LlamaLlmInferenceRequest. + :type max_tokens: int + + """ + self.swagger_types = { + 'runtime_type': 'str', + 'prompt': 'str', + 'is_stream': 'bool', + 'num_generations': 'int', + 'is_echo': 'bool', + 'top_k': 'int', + 'top_p': 'float', + 'temperature': 'float', + 'frequency_penalty': 'float', + 'presence_penalty': 'float', + 'stop': 'list[str]', + 'log_probs': 'int', + 'max_tokens': 'int' + } + + self.attribute_map = { + 'runtime_type': 'runtimeType', + 'prompt': 'prompt', + 'is_stream': 'isStream', + 'num_generations': 'numGenerations', + 'is_echo': 'isEcho', + 'top_k': 'topK', + 'top_p': 'topP', + 'temperature': 'temperature', + 'frequency_penalty': 'frequencyPenalty', + 'presence_penalty': 'presencePenalty', + 'stop': 'stop', + 'log_probs': 'logProbs', + 'max_tokens': 'maxTokens' + } + + self._runtime_type = None + self._prompt = None + self._is_stream = None + self._num_generations = None + self._is_echo = None + self._top_k = None + self._top_p = None + self._temperature = None + self._frequency_penalty = None + self._presence_penalty = None + self._stop = None + self._log_probs = None + self._max_tokens = None + self._runtime_type = 'LLAMA' + + @property + def prompt(self): + """ + Gets the prompt of this LlamaLlmInferenceRequest. + Represents the prompt to be completed. The trailing white spaces are trimmed before completion. + + + :return: The prompt of this LlamaLlmInferenceRequest. + :rtype: str + """ + return self._prompt + + @prompt.setter + def prompt(self, prompt): + """ + Sets the prompt of this LlamaLlmInferenceRequest. + Represents the prompt to be completed. The trailing white spaces are trimmed before completion. + + + :param prompt: The prompt of this LlamaLlmInferenceRequest. + :type: str + """ + self._prompt = prompt + + @property + def is_stream(self): + """ + Gets the is_stream of this LlamaLlmInferenceRequest. + Whether to stream back partial progress. If set, tokens are sent as data-only server-sent events as they become available. + + + :return: The is_stream of this LlamaLlmInferenceRequest. + :rtype: bool + """ + return self._is_stream + + @is_stream.setter + def is_stream(self, is_stream): + """ + Sets the is_stream of this LlamaLlmInferenceRequest. + Whether to stream back partial progress. If set, tokens are sent as data-only server-sent events as they become available. + + + :param is_stream: The is_stream of this LlamaLlmInferenceRequest. + :type: bool + """ + self._is_stream = is_stream + + @property + def num_generations(self): + """ + Gets the num_generations of this LlamaLlmInferenceRequest. + The number of of generated texts that will be returned. + + + :return: The num_generations of this LlamaLlmInferenceRequest. + :rtype: int + """ + return self._num_generations + + @num_generations.setter + def num_generations(self, num_generations): + """ + Sets the num_generations of this LlamaLlmInferenceRequest. + The number of of generated texts that will be returned. + + + :param num_generations: The num_generations of this LlamaLlmInferenceRequest. + :type: int + """ + self._num_generations = num_generations + + @property + def is_echo(self): + """ + Gets the is_echo of this LlamaLlmInferenceRequest. + Whether or not to return the user prompt in the response. Applies only to non-stream results. + + + :return: The is_echo of this LlamaLlmInferenceRequest. + :rtype: bool + """ + return self._is_echo + + @is_echo.setter + def is_echo(self, is_echo): + """ + Sets the is_echo of this LlamaLlmInferenceRequest. + Whether or not to return the user prompt in the response. Applies only to non-stream results. + + + :param is_echo: The is_echo of this LlamaLlmInferenceRequest. + :type: bool + """ + self._is_echo = is_echo + + @property + def top_k(self): + """ + Gets the top_k of this LlamaLlmInferenceRequest. + An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value is -1 which means to consider all tokens. Setting to 0 disables this method and considers all tokens. + + If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20, but the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen. + + + :return: The top_k of this LlamaLlmInferenceRequest. + :rtype: int + """ + return self._top_k + + @top_k.setter + def top_k(self, top_k): + """ + Sets the top_k of this LlamaLlmInferenceRequest. + An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value is -1 which means to consider all tokens. Setting to 0 disables this method and considers all tokens. + + If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20, but the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen. + + + :param top_k: The top_k of this LlamaLlmInferenceRequest. + :type: int + """ + self._top_k = top_k + + @property + def top_p(self): + """ + Gets the top_p of this LlamaLlmInferenceRequest. + If set to a probability 0.0 < p < 1.0, it ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. + + To eliminate tokens with low likelihood, assign p a minimum percentage for the next token's likelihood. For example, when p is set to 0.75, the model eliminates the bottom 25 percent for the next token. Set to 1 to consider all tokens and set to 0 to disable. If both k and p are enabled, p acts after k. + + + :return: The top_p of this LlamaLlmInferenceRequest. + :rtype: float + """ + return self._top_p + + @top_p.setter + def top_p(self, top_p): + """ + Sets the top_p of this LlamaLlmInferenceRequest. + If set to a probability 0.0 < p < 1.0, it ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. + + To eliminate tokens with low likelihood, assign p a minimum percentage for the next token's likelihood. For example, when p is set to 0.75, the model eliminates the bottom 25 percent for the next token. Set to 1 to consider all tokens and set to 0 to disable. If both k and p are enabled, p acts after k. + + + :param top_p: The top_p of this LlamaLlmInferenceRequest. + :type: float + """ + self._top_p = top_p + + @property + def temperature(self): + """ + Gets the temperature of this LlamaLlmInferenceRequest. + A number that sets the randomness of the generated output. A lower temperature means a less random generations. + + Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + + + :return: The temperature of this LlamaLlmInferenceRequest. + :rtype: float + """ + return self._temperature + + @temperature.setter + def temperature(self, temperature): + """ + Sets the temperature of this LlamaLlmInferenceRequest. + A number that sets the randomness of the generated output. A lower temperature means a less random generations. + + Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + + + :param temperature: The temperature of this LlamaLlmInferenceRequest. + :type: float + """ + self._temperature = temperature + + @property + def frequency_penalty(self): + """ + Gets the frequency_penalty of this LlamaLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on their frequency in the generated text so far. Values > 0 encourage the model to use new tokens and values < 0 encourage the model to repeat tokens. Set to 0 to disable. + + + :return: The frequency_penalty of this LlamaLlmInferenceRequest. + :rtype: float + """ + return self._frequency_penalty + + @frequency_penalty.setter + def frequency_penalty(self, frequency_penalty): + """ + Sets the frequency_penalty of this LlamaLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on their frequency in the generated text so far. Values > 0 encourage the model to use new tokens and values < 0 encourage the model to repeat tokens. Set to 0 to disable. + + + :param frequency_penalty: The frequency_penalty of this LlamaLlmInferenceRequest. + :type: float + """ + self._frequency_penalty = frequency_penalty + + @property + def presence_penalty(self): + """ + Gets the presence_penalty of this LlamaLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on whether they've appeared in the generated text so far. Values > 0 encourage the model to use new tokens and values < 0 encourage the model to repeat tokens. + + Similar to frequency penalty, a penalty is applied to previously present tokens, except that this penalty is applied equally to all tokens that have already appeared, regardless of how many times they've appeared. Set to 0 to disable. + + + :return: The presence_penalty of this LlamaLlmInferenceRequest. + :rtype: float + """ + return self._presence_penalty + + @presence_penalty.setter + def presence_penalty(self, presence_penalty): + """ + Sets the presence_penalty of this LlamaLlmInferenceRequest. + To reduce repetitiveness of generated tokens, this number penalizes new tokens based on whether they've appeared in the generated text so far. Values > 0 encourage the model to use new tokens and values < 0 encourage the model to repeat tokens. + + Similar to frequency penalty, a penalty is applied to previously present tokens, except that this penalty is applied equally to all tokens that have already appeared, regardless of how many times they've appeared. Set to 0 to disable. + + + :param presence_penalty: The presence_penalty of this LlamaLlmInferenceRequest. + :type: float + """ + self._presence_penalty = presence_penalty + + @property + def stop(self): + """ + Gets the stop of this LlamaLlmInferenceRequest. + List of strings that stop the generation if they are generated for the response text. The returned output will not contain the stop strings. + + + :return: The stop of this LlamaLlmInferenceRequest. + :rtype: list[str] + """ + return self._stop + + @stop.setter + def stop(self, stop): + """ + Sets the stop of this LlamaLlmInferenceRequest. + List of strings that stop the generation if they are generated for the response text. The returned output will not contain the stop strings. + + + :param stop: The stop of this LlamaLlmInferenceRequest. + :type: list[str] + """ + self._stop = stop + + @property + def log_probs(self): + """ + Gets the log_probs of this LlamaLlmInferenceRequest. + Includes the logarithmic probabilities for the most likely output tokens and the chosen tokens. + + For example, if the log probability is 5, the API returns a list of the 5 most likely tokens. The API returns the log probability of the sampled token, so there might be up to logprobs+1 elements in the response. + + + :return: The log_probs of this LlamaLlmInferenceRequest. + :rtype: int + """ + return self._log_probs + + @log_probs.setter + def log_probs(self, log_probs): + """ + Sets the log_probs of this LlamaLlmInferenceRequest. + Includes the logarithmic probabilities for the most likely output tokens and the chosen tokens. + + For example, if the log probability is 5, the API returns a list of the 5 most likely tokens. The API returns the log probability of the sampled token, so there might be up to logprobs+1 elements in the response. + + + :param log_probs: The log_probs of this LlamaLlmInferenceRequest. + :type: int + """ + self._log_probs = log_probs + + @property + def max_tokens(self): + """ + Gets the max_tokens of this LlamaLlmInferenceRequest. + The maximum number of tokens to predict for each response. Includes input plus output tokens. + + + :return: The max_tokens of this LlamaLlmInferenceRequest. + :rtype: int + """ + return self._max_tokens + + @max_tokens.setter + def max_tokens(self, max_tokens): + """ + Sets the max_tokens of this LlamaLlmInferenceRequest. + The maximum number of tokens to predict for each response. Includes input plus output tokens. + + + :param max_tokens: The max_tokens of this LlamaLlmInferenceRequest. + :type: int + """ + self._max_tokens = max_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/generative_ai_inference/models/llama_llm_inference_response.py b/src/oci/generative_ai_inference/models/llama_llm_inference_response.py new file mode 100644 index 000000000..454fdbfa7 --- /dev/null +++ b/src/oci/generative_ai_inference/models/llama_llm_inference_response.py @@ -0,0 +1,113 @@ +# 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: 20231130 + +from .llm_inference_response import LlmInferenceResponse +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 LlamaLlmInferenceResponse(LlmInferenceResponse): + """ + The generated text result to return. + """ + + def __init__(self, **kwargs): + """ + Initializes a new LlamaLlmInferenceResponse object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.LlamaLlmInferenceResponse.runtime_type` attribute + of this class is ``LLAMA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param runtime_type: + The value to assign to the runtime_type property of this LlamaLlmInferenceResponse. + Allowed values for this property are: "COHERE", "LLAMA" + :type runtime_type: str + + :param created: + The value to assign to the created property of this LlamaLlmInferenceResponse. + :type created: datetime + + :param choices: + The value to assign to the choices property of this LlamaLlmInferenceResponse. + :type choices: list[oci.generative_ai_inference.models.Choice] + + """ + self.swagger_types = { + 'runtime_type': 'str', + 'created': 'datetime', + 'choices': 'list[Choice]' + } + + self.attribute_map = { + 'runtime_type': 'runtimeType', + 'created': 'created', + 'choices': 'choices' + } + + self._runtime_type = None + self._created = None + self._choices = None + self._runtime_type = 'LLAMA' + + @property + def created(self): + """ + **[Required]** Gets the created of this LlamaLlmInferenceResponse. + The Unix timestamp (in seconds) of when the generation was created. + + + :return: The created of this LlamaLlmInferenceResponse. + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """ + Sets the created of this LlamaLlmInferenceResponse. + The Unix timestamp (in seconds) of when the generation was created. + + + :param created: The created of this LlamaLlmInferenceResponse. + :type: datetime + """ + self._created = created + + @property + def choices(self): + """ + **[Required]** Gets the choices of this LlamaLlmInferenceResponse. + A list of generated texts. Can be more than one if n is greater than 1. + + + :return: The choices of this LlamaLlmInferenceResponse. + :rtype: list[oci.generative_ai_inference.models.Choice] + """ + return self._choices + + @choices.setter + def choices(self, choices): + """ + Sets the choices of this LlamaLlmInferenceResponse. + A list of generated texts. Can be more than one if n is greater than 1. + + + :param choices: The choices of this LlamaLlmInferenceResponse. + :type: list[oci.generative_ai_inference.models.Choice] + """ + self._choices = choices + + 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/generative_ai_inference/models/llm_inference_request.py b/src/oci/generative_ai_inference/models/llm_inference_request.py new file mode 100644 index 000000000..034b2d76b --- /dev/null +++ b/src/oci/generative_ai_inference/models/llm_inference_request.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: 20231130 + + +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 LlmInferenceRequest(object): + """ + The base class for the inference requests. + """ + + #: A constant which can be used with the runtime_type property of a LlmInferenceRequest. + #: This constant has a value of "COHERE" + RUNTIME_TYPE_COHERE = "COHERE" + + #: A constant which can be used with the runtime_type property of a LlmInferenceRequest. + #: This constant has a value of "LLAMA" + RUNTIME_TYPE_LLAMA = "LLAMA" + + def __init__(self, **kwargs): + """ + Initializes a new LlmInferenceRequest 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.generative_ai_inference.models.LlamaLlmInferenceRequest` + * :class:`~oci.generative_ai_inference.models.CohereLlmInferenceRequest` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param runtime_type: + The value to assign to the runtime_type property of this LlmInferenceRequest. + Allowed values for this property are: "COHERE", "LLAMA" + :type runtime_type: str + + """ + self.swagger_types = { + 'runtime_type': 'str' + } + + self.attribute_map = { + 'runtime_type': 'runtimeType' + } + + self._runtime_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['runtimeType'] + + if type == 'LLAMA': + return 'LlamaLlmInferenceRequest' + + if type == 'COHERE': + return 'CohereLlmInferenceRequest' + else: + return 'LlmInferenceRequest' + + @property + def runtime_type(self): + """ + **[Required]** Gets the runtime_type of this LlmInferenceRequest. + The runtime of the provided model. + + Allowed values for this property are: "COHERE", "LLAMA" + + + :return: The runtime_type of this LlmInferenceRequest. + :rtype: str + """ + return self._runtime_type + + @runtime_type.setter + def runtime_type(self, runtime_type): + """ + Sets the runtime_type of this LlmInferenceRequest. + The runtime of the provided model. + + + :param runtime_type: The runtime_type of this LlmInferenceRequest. + :type: str + """ + allowed_values = ["COHERE", "LLAMA"] + if not value_allowed_none_or_none_sentinel(runtime_type, allowed_values): + raise ValueError( + f"Invalid value for `runtime_type`, must be None or one of {allowed_values}" + ) + self._runtime_type = runtime_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/generative_ai_inference/models/llm_inference_response.py b/src/oci/generative_ai_inference/models/llm_inference_response.py new file mode 100644 index 000000000..6af294f30 --- /dev/null +++ b/src/oci/generative_ai_inference/models/llm_inference_response.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: 20231130 + + +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 LlmInferenceResponse(object): + """ + The base class for inference responses. + """ + + #: A constant which can be used with the runtime_type property of a LlmInferenceResponse. + #: This constant has a value of "COHERE" + RUNTIME_TYPE_COHERE = "COHERE" + + #: A constant which can be used with the runtime_type property of a LlmInferenceResponse. + #: This constant has a value of "LLAMA" + RUNTIME_TYPE_LLAMA = "LLAMA" + + def __init__(self, **kwargs): + """ + Initializes a new LlmInferenceResponse 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.generative_ai_inference.models.LlamaLlmInferenceResponse` + * :class:`~oci.generative_ai_inference.models.CohereLlmInferenceResponse` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param runtime_type: + The value to assign to the runtime_type property of this LlmInferenceResponse. + Allowed values for this property are: "COHERE", "LLAMA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type runtime_type: str + + """ + self.swagger_types = { + 'runtime_type': 'str' + } + + self.attribute_map = { + 'runtime_type': 'runtimeType' + } + + self._runtime_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['runtimeType'] + + if type == 'LLAMA': + return 'LlamaLlmInferenceResponse' + + if type == 'COHERE': + return 'CohereLlmInferenceResponse' + else: + return 'LlmInferenceResponse' + + @property + def runtime_type(self): + """ + **[Required]** Gets the runtime_type of this LlmInferenceResponse. + The runtime of the provided model. + + Allowed values for this property are: "COHERE", "LLAMA", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The runtime_type of this LlmInferenceResponse. + :rtype: str + """ + return self._runtime_type + + @runtime_type.setter + def runtime_type(self, runtime_type): + """ + Sets the runtime_type of this LlmInferenceResponse. + The runtime of the provided model. + + + :param runtime_type: The runtime_type of this LlmInferenceResponse. + :type: str + """ + allowed_values = ["COHERE", "LLAMA"] + if not value_allowed_none_or_none_sentinel(runtime_type, allowed_values): + runtime_type = 'UNKNOWN_ENUM_VALUE' + self._runtime_type = runtime_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/generative_ai_inference/models/logprobs.py b/src/oci/generative_ai_inference/models/logprobs.py new file mode 100644 index 000000000..af6a21216 --- /dev/null +++ b/src/oci/generative_ai_inference/models/logprobs.py @@ -0,0 +1,165 @@ +# 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: 20231130 + + +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 Logprobs(object): + """ + Returns if the logarithmic probabilites is set. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Logprobs object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param text_offset: + The value to assign to the text_offset property of this Logprobs. + :type text_offset: list[int] + + :param token_logprobs: + The value to assign to the token_logprobs property of this Logprobs. + :type token_logprobs: list[float] + + :param tokens: + The value to assign to the tokens property of this Logprobs. + :type tokens: list[str] + + :param top_logprobs: + The value to assign to the top_logprobs property of this Logprobs. + :type top_logprobs: list[dict(str, str)] + + """ + self.swagger_types = { + 'text_offset': 'list[int]', + 'token_logprobs': 'list[float]', + 'tokens': 'list[str]', + 'top_logprobs': 'list[dict(str, str)]' + } + + self.attribute_map = { + 'text_offset': 'textOffset', + 'token_logprobs': 'tokenLogprobs', + 'tokens': 'tokens', + 'top_logprobs': 'topLogprobs' + } + + self._text_offset = None + self._token_logprobs = None + self._tokens = None + self._top_logprobs = None + + @property + def text_offset(self): + """ + Gets the text_offset of this Logprobs. + The text offset. + + + :return: The text_offset of this Logprobs. + :rtype: list[int] + """ + return self._text_offset + + @text_offset.setter + def text_offset(self, text_offset): + """ + Sets the text_offset of this Logprobs. + The text offset. + + + :param text_offset: The text_offset of this Logprobs. + :type: list[int] + """ + self._text_offset = text_offset + + @property + def token_logprobs(self): + """ + Gets the token_logprobs of this Logprobs. + The logarithmic probabilites of the output token. + + + :return: The token_logprobs of this Logprobs. + :rtype: list[float] + """ + return self._token_logprobs + + @token_logprobs.setter + def token_logprobs(self, token_logprobs): + """ + Sets the token_logprobs of this Logprobs. + The logarithmic probabilites of the output token. + + + :param token_logprobs: The token_logprobs of this Logprobs. + :type: list[float] + """ + self._token_logprobs = token_logprobs + + @property + def tokens(self): + """ + Gets the tokens of this Logprobs. + The list of output tokens. + + + :return: The tokens of this Logprobs. + :rtype: list[str] + """ + return self._tokens + + @tokens.setter + def tokens(self, tokens): + """ + Sets the tokens of this Logprobs. + The list of output tokens. + + + :param tokens: The tokens of this Logprobs. + :type: list[str] + """ + self._tokens = tokens + + @property + def top_logprobs(self): + """ + Gets the top_logprobs of this Logprobs. + The logarithmic probabilities of each of the top k tokens. + + + :return: The top_logprobs of this Logprobs. + :rtype: list[dict(str, str)] + """ + return self._top_logprobs + + @top_logprobs.setter + def top_logprobs(self, top_logprobs): + """ + Sets the top_logprobs of this Logprobs. + The logarithmic probabilities of each of the top k tokens. + + + :param top_logprobs: The top_logprobs of this Logprobs. + :type: list[dict(str, str)] + """ + self._top_logprobs = top_logprobs + + 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/generative_ai_inference/models/on_demand_serving_mode.py b/src/oci/generative_ai_inference/models/on_demand_serving_mode.py new file mode 100644 index 000000000..7538c3b11 --- /dev/null +++ b/src/oci/generative_ai_inference/models/on_demand_serving_mode.py @@ -0,0 +1,82 @@ +# 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: 20231130 + +from .serving_mode import ServingMode +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 OnDemandServingMode(ServingMode): + """ + The model's serving mode is on-demand serving on a shared infrastructure. + """ + + def __init__(self, **kwargs): + """ + Initializes a new OnDemandServingMode object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.OnDemandServingMode.serving_type` attribute + of this class is ``ON_DEMAND`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param serving_type: + The value to assign to the serving_type property of this OnDemandServingMode. + Allowed values for this property are: "ON_DEMAND", "DEDICATED" + :type serving_type: str + + :param model_id: + The value to assign to the model_id property of this OnDemandServingMode. + :type model_id: str + + """ + self.swagger_types = { + 'serving_type': 'str', + 'model_id': 'str' + } + + self.attribute_map = { + 'serving_type': 'servingType', + 'model_id': 'modelId' + } + + self._serving_type = None + self._model_id = None + self._serving_type = 'ON_DEMAND' + + @property + def model_id(self): + """ + **[Required]** Gets the model_id of this OnDemandServingMode. + The unique ID of a model to use. Can use list Models API to list available models. + + + :return: The model_id of this OnDemandServingMode. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this OnDemandServingMode. + The unique ID of a model to use. Can use list Models API to list available models. + + + :param model_id: The model_id of this OnDemandServingMode. + :type: str + """ + self._model_id = model_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/generative_ai_inference/models/serving_mode.py b/src/oci/generative_ai_inference/models/serving_mode.py new file mode 100644 index 000000000..c624d9c61 --- /dev/null +++ b/src/oci/generative_ai_inference/models/serving_mode.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: 20231130 + + +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 ServingMode(object): + """ + The model's serving mode, which could be on-demand serving or dedicated serving. + """ + + #: A constant which can be used with the serving_type property of a ServingMode. + #: This constant has a value of "ON_DEMAND" + SERVING_TYPE_ON_DEMAND = "ON_DEMAND" + + #: A constant which can be used with the serving_type property of a ServingMode. + #: This constant has a value of "DEDICATED" + SERVING_TYPE_DEDICATED = "DEDICATED" + + def __init__(self, **kwargs): + """ + Initializes a new ServingMode 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.generative_ai_inference.models.DedicatedServingMode` + * :class:`~oci.generative_ai_inference.models.OnDemandServingMode` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param serving_type: + The value to assign to the serving_type property of this ServingMode. + Allowed values for this property are: "ON_DEMAND", "DEDICATED" + :type serving_type: str + + """ + self.swagger_types = { + 'serving_type': 'str' + } + + self.attribute_map = { + 'serving_type': 'servingType' + } + + self._serving_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['servingType'] + + if type == 'DEDICATED': + return 'DedicatedServingMode' + + if type == 'ON_DEMAND': + return 'OnDemandServingMode' + else: + return 'ServingMode' + + @property + def serving_type(self): + """ + **[Required]** Gets the serving_type of this ServingMode. + The serving mode type, which could be on-demand serving or dedicated serving. + + Allowed values for this property are: "ON_DEMAND", "DEDICATED" + + + :return: The serving_type of this ServingMode. + :rtype: str + """ + return self._serving_type + + @serving_type.setter + def serving_type(self, serving_type): + """ + Sets the serving_type of this ServingMode. + The serving mode type, which could be on-demand serving or dedicated serving. + + + :param serving_type: The serving_type of this ServingMode. + :type: str + """ + allowed_values = ["ON_DEMAND", "DEDICATED"] + if not value_allowed_none_or_none_sentinel(serving_type, allowed_values): + raise ValueError( + f"Invalid value for `serving_type`, must be None or one of {allowed_values}" + ) + self._serving_type = serving_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/generative_ai_inference/models/summarize_text_details.py b/src/oci/generative_ai_inference/models/summarize_text_details.py new file mode 100644 index 000000000..62cf4a767 --- /dev/null +++ b/src/oci/generative_ai_inference/models/summarize_text_details.py @@ -0,0 +1,388 @@ +# 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: 20231130 + + +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 SummarizeTextDetails(object): + """ + Details for the request to summarize text. + """ + + #: A constant which can be used with the length property of a SummarizeTextDetails. + #: This constant has a value of "SHORT" + LENGTH_SHORT = "SHORT" + + #: A constant which can be used with the length property of a SummarizeTextDetails. + #: This constant has a value of "MEDIUM" + LENGTH_MEDIUM = "MEDIUM" + + #: A constant which can be used with the length property of a SummarizeTextDetails. + #: This constant has a value of "LONG" + LENGTH_LONG = "LONG" + + #: A constant which can be used with the length property of a SummarizeTextDetails. + #: This constant has a value of "AUTO" + LENGTH_AUTO = "AUTO" + + #: A constant which can be used with the format property of a SummarizeTextDetails. + #: This constant has a value of "PARAGRAPH" + FORMAT_PARAGRAPH = "PARAGRAPH" + + #: A constant which can be used with the format property of a SummarizeTextDetails. + #: This constant has a value of "BULLETS" + FORMAT_BULLETS = "BULLETS" + + #: A constant which can be used with the format property of a SummarizeTextDetails. + #: This constant has a value of "AUTO" + FORMAT_AUTO = "AUTO" + + #: A constant which can be used with the extractiveness property of a SummarizeTextDetails. + #: This constant has a value of "LOW" + EXTRACTIVENESS_LOW = "LOW" + + #: A constant which can be used with the extractiveness property of a SummarizeTextDetails. + #: This constant has a value of "MEDIUM" + EXTRACTIVENESS_MEDIUM = "MEDIUM" + + #: A constant which can be used with the extractiveness property of a SummarizeTextDetails. + #: This constant has a value of "HIGH" + EXTRACTIVENESS_HIGH = "HIGH" + + #: A constant which can be used with the extractiveness property of a SummarizeTextDetails. + #: This constant has a value of "AUTO" + EXTRACTIVENESS_AUTO = "AUTO" + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeTextDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param input: + The value to assign to the input property of this SummarizeTextDetails. + :type input: str + + :param serving_mode: + The value to assign to the serving_mode property of this SummarizeTextDetails. + :type serving_mode: oci.generative_ai_inference.models.ServingMode + + :param compartment_id: + The value to assign to the compartment_id property of this SummarizeTextDetails. + :type compartment_id: str + + :param is_echo: + The value to assign to the is_echo property of this SummarizeTextDetails. + :type is_echo: bool + + :param temperature: + The value to assign to the temperature property of this SummarizeTextDetails. + :type temperature: float + + :param additional_command: + The value to assign to the additional_command property of this SummarizeTextDetails. + :type additional_command: str + + :param length: + The value to assign to the length property of this SummarizeTextDetails. + Allowed values for this property are: "SHORT", "MEDIUM", "LONG", "AUTO" + :type length: str + + :param format: + The value to assign to the format property of this SummarizeTextDetails. + Allowed values for this property are: "PARAGRAPH", "BULLETS", "AUTO" + :type format: str + + :param extractiveness: + The value to assign to the extractiveness property of this SummarizeTextDetails. + Allowed values for this property are: "LOW", "MEDIUM", "HIGH", "AUTO" + :type extractiveness: str + + """ + self.swagger_types = { + 'input': 'str', + 'serving_mode': 'ServingMode', + 'compartment_id': 'str', + 'is_echo': 'bool', + 'temperature': 'float', + 'additional_command': 'str', + 'length': 'str', + 'format': 'str', + 'extractiveness': 'str' + } + + self.attribute_map = { + 'input': 'input', + 'serving_mode': 'servingMode', + 'compartment_id': 'compartmentId', + 'is_echo': 'isEcho', + 'temperature': 'temperature', + 'additional_command': 'additionalCommand', + 'length': 'length', + 'format': 'format', + 'extractiveness': 'extractiveness' + } + + self._input = None + self._serving_mode = None + self._compartment_id = None + self._is_echo = None + self._temperature = None + self._additional_command = None + self._length = None + self._format = None + self._extractiveness = None + + @property + def input(self): + """ + **[Required]** Gets the input of this SummarizeTextDetails. + The input string to be summarized. + + + :return: The input of this SummarizeTextDetails. + :rtype: str + """ + return self._input + + @input.setter + def input(self, input): + """ + Sets the input of this SummarizeTextDetails. + The input string to be summarized. + + + :param input: The input of this SummarizeTextDetails. + :type: str + """ + self._input = input + + @property + def serving_mode(self): + """ + **[Required]** Gets the serving_mode of this SummarizeTextDetails. + + :return: The serving_mode of this SummarizeTextDetails. + :rtype: oci.generative_ai_inference.models.ServingMode + """ + return self._serving_mode + + @serving_mode.setter + def serving_mode(self, serving_mode): + """ + Sets the serving_mode of this SummarizeTextDetails. + + :param serving_mode: The serving_mode of this SummarizeTextDetails. + :type: oci.generative_ai_inference.models.ServingMode + """ + self._serving_mode = serving_mode + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SummarizeTextDetails. + The OCID of compartment that the user is authorized to use to call into the Generative AI service. + + + :return: The compartment_id of this SummarizeTextDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SummarizeTextDetails. + The OCID of compartment that the user is authorized to use to call into the Generative AI service. + + + :param compartment_id: The compartment_id of this SummarizeTextDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def is_echo(self): + """ + Gets the is_echo of this SummarizeTextDetails. + Whether or not to include the original inputs in the response. + + + :return: The is_echo of this SummarizeTextDetails. + :rtype: bool + """ + return self._is_echo + + @is_echo.setter + def is_echo(self, is_echo): + """ + Sets the is_echo of this SummarizeTextDetails. + Whether or not to include the original inputs in the response. + + + :param is_echo: The is_echo of this SummarizeTextDetails. + :type: bool + """ + self._is_echo = is_echo + + @property + def temperature(self): + """ + Gets the temperature of this SummarizeTextDetails. + A number that sets the randomness of the generated output. Lower temperatures mean less random generations. + + Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0, and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + + + :return: The temperature of this SummarizeTextDetails. + :rtype: float + """ + return self._temperature + + @temperature.setter + def temperature(self, temperature): + """ + Sets the temperature of this SummarizeTextDetails. + A number that sets the randomness of the generated output. Lower temperatures mean less random generations. + + Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0, and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs. + + + :param temperature: The temperature of this SummarizeTextDetails. + :type: float + """ + self._temperature = temperature + + @property + def additional_command(self): + """ + Gets the additional_command of this SummarizeTextDetails. + A free-form instruction for modifying how the summaries get generated. Should complete the sentence \"Generate a summary _\". For example, \"focusing on the next steps\" or \"written by Yoda\". + + + :return: The additional_command of this SummarizeTextDetails. + :rtype: str + """ + return self._additional_command + + @additional_command.setter + def additional_command(self, additional_command): + """ + Sets the additional_command of this SummarizeTextDetails. + A free-form instruction for modifying how the summaries get generated. Should complete the sentence \"Generate a summary _\". For example, \"focusing on the next steps\" or \"written by Yoda\". + + + :param additional_command: The additional_command of this SummarizeTextDetails. + :type: str + """ + self._additional_command = additional_command + + @property + def length(self): + """ + Gets the length of this SummarizeTextDetails. + Indicates the approximate length of the summary. If \"AUTO\" is selected, the best option will be picked based on the input text. + + Allowed values for this property are: "SHORT", "MEDIUM", "LONG", "AUTO" + + + :return: The length of this SummarizeTextDetails. + :rtype: str + """ + return self._length + + @length.setter + def length(self, length): + """ + Sets the length of this SummarizeTextDetails. + Indicates the approximate length of the summary. If \"AUTO\" is selected, the best option will be picked based on the input text. + + + :param length: The length of this SummarizeTextDetails. + :type: str + """ + allowed_values = ["SHORT", "MEDIUM", "LONG", "AUTO"] + if not value_allowed_none_or_none_sentinel(length, allowed_values): + raise ValueError( + f"Invalid value for `length`, must be None or one of {allowed_values}" + ) + self._length = length + + @property + def format(self): + """ + Gets the format of this SummarizeTextDetails. + Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If \"AUTO\" is selected, the best option will be picked based on the input text. + + Allowed values for this property are: "PARAGRAPH", "BULLETS", "AUTO" + + + :return: The format of this SummarizeTextDetails. + :rtype: str + """ + return self._format + + @format.setter + def format(self, format): + """ + Sets the format of this SummarizeTextDetails. + Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If \"AUTO\" is selected, the best option will be picked based on the input text. + + + :param format: The format of this SummarizeTextDetails. + :type: str + """ + allowed_values = ["PARAGRAPH", "BULLETS", "AUTO"] + if not value_allowed_none_or_none_sentinel(format, allowed_values): + raise ValueError( + f"Invalid value for `format`, must be None or one of {allowed_values}" + ) + self._format = format + + @property + def extractiveness(self): + """ + Gets the extractiveness of this SummarizeTextDetails. + Controls how close to the original text the summary is. High extractiveness summaries will lean towards reusing sentences verbatim, while low extractiveness summaries will tend to paraphrase more. + + Allowed values for this property are: "LOW", "MEDIUM", "HIGH", "AUTO" + + + :return: The extractiveness of this SummarizeTextDetails. + :rtype: str + """ + return self._extractiveness + + @extractiveness.setter + def extractiveness(self, extractiveness): + """ + Sets the extractiveness of this SummarizeTextDetails. + Controls how close to the original text the summary is. High extractiveness summaries will lean towards reusing sentences verbatim, while low extractiveness summaries will tend to paraphrase more. + + + :param extractiveness: The extractiveness of this SummarizeTextDetails. + :type: str + """ + allowed_values = ["LOW", "MEDIUM", "HIGH", "AUTO"] + if not value_allowed_none_or_none_sentinel(extractiveness, allowed_values): + raise ValueError( + f"Invalid value for `extractiveness`, must be None or one of {allowed_values}" + ) + self._extractiveness = extractiveness + + 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/generative_ai_inference/models/summarize_text_result.py b/src/oci/generative_ai_inference/models/summarize_text_result.py new file mode 100644 index 000000000..51ee9bee3 --- /dev/null +++ b/src/oci/generative_ai_inference/models/summarize_text_result.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: 20231130 + + +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 SummarizeTextResult(object): + """ + Summarize text result to return to caller. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SummarizeTextResult 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 SummarizeTextResult. + :type id: str + + :param input: + The value to assign to the input property of this SummarizeTextResult. + :type input: str + + :param summary: + The value to assign to the summary property of this SummarizeTextResult. + :type summary: str + + :param model_id: + The value to assign to the model_id property of this SummarizeTextResult. + :type model_id: str + + :param model_version: + The value to assign to the model_version property of this SummarizeTextResult. + :type model_version: str + + """ + self.swagger_types = { + 'id': 'str', + 'input': 'str', + 'summary': 'str', + 'model_id': 'str', + 'model_version': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'input': 'input', + 'summary': 'summary', + 'model_id': 'modelId', + 'model_version': 'modelVersion' + } + + self._id = None + self._input = None + self._summary = None + self._model_id = None + self._model_version = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SummarizeTextResult. + A unique identifier for this SummarizeTextResult. + + + :return: The id of this SummarizeTextResult. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SummarizeTextResult. + A unique identifier for this SummarizeTextResult. + + + :param id: The id of this SummarizeTextResult. + :type: str + """ + self._id = id + + @property + def input(self): + """ + Gets the input of this SummarizeTextResult. + The original input. Only included if \"isEcho\" set to true. + + + :return: The input of this SummarizeTextResult. + :rtype: str + """ + return self._input + + @input.setter + def input(self, input): + """ + Sets the input of this SummarizeTextResult. + The original input. Only included if \"isEcho\" set to true. + + + :param input: The input of this SummarizeTextResult. + :type: str + """ + self._input = input + + @property + def summary(self): + """ + **[Required]** Gets the summary of this SummarizeTextResult. + Summary result corresponding to input. + + + :return: The summary of this SummarizeTextResult. + :rtype: str + """ + return self._summary + + @summary.setter + def summary(self, summary): + """ + Sets the summary of this SummarizeTextResult. + Summary result corresponding to input. + + + :param summary: The summary of this SummarizeTextResult. + :type: str + """ + self._summary = summary + + @property + def model_id(self): + """ + Gets the model_id of this SummarizeTextResult. + The OCID of the model used in this inference request. + + + :return: The model_id of this SummarizeTextResult. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this SummarizeTextResult. + The OCID of the model used in this inference request. + + + :param model_id: The model_id of this SummarizeTextResult. + :type: str + """ + self._model_id = model_id + + @property + def model_version(self): + """ + Gets the model_version of this SummarizeTextResult. + The version of the model. + + + :return: The model_version of this SummarizeTextResult. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this SummarizeTextResult. + The version of the model. + + + :param model_version: The model_version of this SummarizeTextResult. + :type: str + """ + self._model_version = model_version + + 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/generative_ai_inference/models/token_likelihood.py b/src/oci/generative_ai_inference/models/token_likelihood.py new file mode 100644 index 000000000..a866ac209 --- /dev/null +++ b/src/oci/generative_ai_inference/models/token_likelihood.py @@ -0,0 +1,107 @@ +# 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: 20231130 + + +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 TokenLikelihood(object): + """ + An object that contains the returned token and its corresponding likelihood. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TokenLikelihood 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 TokenLikelihood. + :type token: str + + :param likelihood: + The value to assign to the likelihood property of this TokenLikelihood. + :type likelihood: float + + """ + self.swagger_types = { + 'token': 'str', + 'likelihood': 'float' + } + + self.attribute_map = { + 'token': 'token', + 'likelihood': 'likelihood' + } + + self._token = None + self._likelihood = None + + @property + def token(self): + """ + Gets the token of this TokenLikelihood. + A word, part of a word, or a punctuation. + + For example, apple is a token and friendship is made up of two tokens, friend and ship. When you run a model, you can set the maximum number of output tokens. Estimate three tokens per word. + + + :return: The token of this TokenLikelihood. + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """ + Sets the token of this TokenLikelihood. + A word, part of a word, or a punctuation. + + For example, apple is a token and friendship is made up of two tokens, friend and ship. When you run a model, you can set the maximum number of output tokens. Estimate three tokens per word. + + + :param token: The token of this TokenLikelihood. + :type: str + """ + self._token = token + + @property + def likelihood(self): + """ + Gets the likelihood of this TokenLikelihood. + The likelihood of this token during generation. + + + :return: The likelihood of this TokenLikelihood. + :rtype: float + """ + return self._likelihood + + @likelihood.setter + def likelihood(self, likelihood): + """ + Sets the likelihood of this TokenLikelihood. + The likelihood of this token during generation. + + + :param likelihood: The likelihood of this TokenLikelihood. + :type: float + """ + self._likelihood = likelihood + + 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/golden_gate/golden_gate_client_composite_operations.py b/src/oci/golden_gate/golden_gate_client_composite_operations.py index fc1674bea..4311a0edb 100644 --- a/src/oci/golden_gate/golden_gate_client_composite_operations.py +++ b/src/oci/golden_gate/golden_gate_client_composite_operations.py @@ -49,8 +49,9 @@ def cancel_deployment_backup_and_wait_for_state(self, deployment_backup_id, canc operation_result = self.client.cancel_deployment_backup(deployment_backup_id, cancel_deployment_backup_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: @@ -90,7 +91,6 @@ def cancel_deployment_upgrade_and_wait_for_state(self, deployment_upgrade_id, ca operation_result = self.client.cancel_deployment_upgrade(deployment_upgrade_id, cancel_deployment_upgrade_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] deployment_upgrade_id = operation_result.data.id @@ -138,8 +138,9 @@ def change_connection_compartment_and_wait_for_state(self, connection_id, change operation_result = self.client.change_connection_compartment(connection_id, change_connection_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: @@ -179,8 +180,9 @@ def change_database_registration_compartment_and_wait_for_state(self, database_r operation_result = self.client.change_database_registration_compartment(database_registration_id, change_database_registration_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: @@ -220,8 +222,9 @@ def change_deployment_compartment_and_wait_for_state(self, deployment_id, change operation_result = self.client.change_deployment_compartment(deployment_id, change_deployment_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: @@ -261,8 +264,9 @@ def collect_deployment_diagnostic_and_wait_for_state(self, deployment_id, collec operation_result = self.client.collect_deployment_diagnostic(deployment_id, collect_deployment_diagnostic_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: @@ -302,8 +306,9 @@ def copy_deployment_backup_and_wait_for_state(self, deployment_backup_id, copy_d operation_result = self.client.copy_deployment_backup(deployment_backup_id, copy_deployment_backup_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: @@ -343,8 +348,9 @@ def create_certificate_and_wait_for_state(self, create_certificate_details, depl operation_result = self.client.create_certificate(create_certificate_details, deployment_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: @@ -381,8 +387,9 @@ def create_connection_and_wait_for_state(self, create_connection_details, wait_f operation_result = self.client.create_connection(create_connection_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: @@ -419,8 +426,9 @@ def create_connection_assignment_and_wait_for_state(self, create_connection_assi operation_result = self.client.create_connection_assignment(create_connection_assignment_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: @@ -457,8 +465,9 @@ def create_database_registration_and_wait_for_state(self, create_database_regist operation_result = self.client.create_database_registration(create_database_registration_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: @@ -495,8 +504,9 @@ def create_deployment_and_wait_for_state(self, create_deployment_details, wait_f operation_result = self.client.create_deployment(create_deployment_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: @@ -533,8 +543,9 @@ def create_deployment_backup_and_wait_for_state(self, create_deployment_backup_d operation_result = self.client.create_deployment_backup(create_deployment_backup_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: @@ -582,8 +593,9 @@ def delete_certificate_and_wait_for_state(self, deployment_id, certificate_key, 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: @@ -630,8 +642,9 @@ def delete_connection_and_wait_for_state(self, connection_id, wait_for_states=[] 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: @@ -678,8 +691,9 @@ def delete_connection_assignment_and_wait_for_state(self, connection_assignment_ 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: @@ -724,8 +738,9 @@ def delete_database_registration_and_wait_for_state(self, database_registration_ 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: @@ -770,8 +785,9 @@ def delete_deployment_and_wait_for_state(self, deployment_id, wait_for_states=[] 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: @@ -816,8 +832,9 @@ def delete_deployment_backup_and_wait_for_state(self, deployment_backup_id, wait 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: @@ -857,8 +874,9 @@ def export_deployment_wallet_and_wait_for_state(self, deployment_id, export_depl operation_result = self.client.export_deployment_wallet(deployment_id, export_deployment_wallet_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: @@ -898,8 +916,9 @@ def import_deployment_wallet_and_wait_for_state(self, deployment_id, import_depl operation_result = self.client.import_deployment_wallet(deployment_id, import_deployment_wallet_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: @@ -939,7 +958,6 @@ def reschedule_deployment_upgrade_and_wait_for_state(self, deployment_upgrade_id operation_result = self.client.reschedule_deployment_upgrade(deployment_upgrade_id, reschedule_deployment_upgrade_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] deployment_upgrade_id = operation_result.data.id @@ -985,8 +1003,9 @@ def restore_deployment_and_wait_for_state(self, deployment_backup_id, restore_de operation_result = self.client.restore_deployment(deployment_backup_id, restore_deployment_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: @@ -1026,8 +1045,9 @@ def rollback_deployment_upgrade_and_wait_for_state(self, deployment_upgrade_id, operation_result = self.client.rollback_deployment_upgrade(deployment_upgrade_id, rollback_deployment_upgrade_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: @@ -1067,8 +1087,9 @@ def start_deployment_and_wait_for_state(self, deployment_id, start_deployment_de operation_result = self.client.start_deployment(deployment_id, start_deployment_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: @@ -1108,8 +1129,9 @@ def stop_deployment_and_wait_for_state(self, deployment_id, stop_deployment_deta operation_result = self.client.stop_deployment(deployment_id, stop_deployment_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: @@ -1151,8 +1173,9 @@ def update_connection_and_wait_for_state(self, connection_id, update_connection_ operation_result = self.client.update_connection(connection_id, update_connection_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: @@ -1192,8 +1215,9 @@ def update_database_registration_and_wait_for_state(self, database_registration_ operation_result = self.client.update_database_registration(database_registration_id, update_database_registration_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: @@ -1233,8 +1257,9 @@ def update_deployment_and_wait_for_state(self, deployment_id, update_deployment_ operation_result = self.client.update_deployment(deployment_id, update_deployment_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: @@ -1274,7 +1299,6 @@ def update_deployment_backup_and_wait_for_state(self, deployment_backup_id, upda operation_result = self.client.update_deployment_backup(deployment_backup_id, update_deployment_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] deployment_backup_id = operation_result.data.id @@ -1320,8 +1344,9 @@ def upgrade_deployment_and_wait_for_state(self, deployment_id, upgrade_deploymen operation_result = self.client.upgrade_deployment(deployment_id, upgrade_deployment_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: @@ -1361,8 +1386,9 @@ def upgrade_deployment_upgrade_and_wait_for_state(self, deployment_upgrade_id, u operation_result = self.client.upgrade_deployment_upgrade(deployment_upgrade_id, upgrade_deployment_upgrade_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: diff --git a/src/oci/governance_rules_control_plane/governance_rule_client_composite_operations.py b/src/oci/governance_rules_control_plane/governance_rule_client_composite_operations.py index 0e8d72f61..1233a0607 100644 --- a/src/oci/governance_rules_control_plane/governance_rule_client_composite_operations.py +++ b/src/oci/governance_rules_control_plane/governance_rule_client_composite_operations.py @@ -46,8 +46,9 @@ def create_governance_rule_and_wait_for_state(self, create_governance_rule_detai operation_result = self.client.create_governance_rule(create_governance_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: @@ -84,8 +85,9 @@ def create_inclusion_criterion_and_wait_for_state(self, create_inclusion_criteri operation_result = self.client.create_inclusion_criterion(create_inclusion_criterion_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: @@ -130,8 +132,9 @@ def delete_governance_rule_and_wait_for_state(self, governance_rule_id, wait_for 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: @@ -176,8 +179,9 @@ def delete_inclusion_criterion_and_wait_for_state(self, inclusion_criterion_id, 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: @@ -214,8 +218,9 @@ def retry_governance_rule_and_wait_for_state(self, governance_rule_id, wait_for_ operation_result = self.client.retry_governance_rule(governance_rule_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: @@ -252,8 +257,9 @@ def retry_tenancy_attachment_and_wait_for_state(self, tenancy_attachment_id, wai operation_result = self.client.retry_tenancy_attachment(tenancy_attachment_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: @@ -293,8 +299,9 @@ def update_governance_rule_and_wait_for_state(self, governance_rule_id, update_g operation_result = self.client.update_governance_rule(governance_rule_id, update_governance_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: diff --git a/src/oci/identity/identity_client_composite_operations.py b/src/oci/identity/identity_client_composite_operations.py index 1581b189c..38aaf74fd 100644 --- a/src/oci/identity/identity_client_composite_operations.py +++ b/src/oci/identity/identity_client_composite_operations.py @@ -46,8 +46,9 @@ def activate_domain_and_wait_for_state(self, domain_id, wait_for_states=[], oper operation_result = self.client.activate_domain(domain_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: @@ -87,7 +88,6 @@ def add_tag_default_lock_and_wait_for_state(self, tag_default_id, add_lock_detai operation_result = self.client.add_tag_default_lock(tag_default_id, add_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_default_id = operation_result.data.id @@ -133,7 +133,6 @@ def add_tag_namespace_lock_and_wait_for_state(self, tag_namespace_id, add_lock_d operation_result = self.client.add_tag_namespace_lock(tag_namespace_id, add_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_namespace_id = operation_result.data.id @@ -176,7 +175,6 @@ def add_user_to_group_and_wait_for_state(self, add_user_to_group_details, wait_f operation_result = self.client.add_user_to_group(add_user_to_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] user_group_membership_id = operation_result.data.id @@ -222,8 +220,9 @@ def bulk_delete_resources_and_wait_for_state(self, compartment_id, bulk_delete_r operation_result = self.client.bulk_delete_resources(compartment_id, bulk_delete_resources_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: @@ -260,8 +259,9 @@ def bulk_delete_tags_and_wait_for_state(self, bulk_delete_tags_details, wait_for operation_result = self.client.bulk_delete_tags(bulk_delete_tags_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: @@ -295,8 +295,9 @@ def bulk_edit_tags_and_wait_for_state(self, wait_for_states=[], operation_kwargs operation_result = self.client.bulk_edit_tags(**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: @@ -336,8 +337,9 @@ def bulk_move_resources_and_wait_for_state(self, compartment_id, bulk_move_resou operation_result = self.client.bulk_move_resources(compartment_id, bulk_move_resources_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: @@ -374,8 +376,9 @@ def cascade_delete_tag_namespace_and_wait_for_state(self, tag_namespace_id, wait operation_result = self.client.cascade_delete_tag_namespace(tag_namespace_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: @@ -415,8 +418,9 @@ def change_domain_compartment_and_wait_for_state(self, domain_id, change_domain_ operation_result = self.client.change_domain_compartment(domain_id, change_domain_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: @@ -456,8 +460,9 @@ def change_domain_license_type_and_wait_for_state(self, domain_id, change_domain operation_result = self.client.change_domain_license_type(domain_id, change_domain_license_type_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: @@ -494,7 +499,6 @@ def create_compartment_and_wait_for_state(self, create_compartment_details, wait operation_result = self.client.create_compartment(create_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] compartment_id = operation_result.data.id @@ -537,8 +541,9 @@ def create_domain_and_wait_for_state(self, create_domain_details, wait_for_state operation_result = self.client.create_domain(create_domain_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: @@ -575,7 +580,6 @@ def create_dynamic_group_and_wait_for_state(self, create_dynamic_group_details, operation_result = self.client.create_dynamic_group(create_dynamic_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dynamic_group_id = operation_result.data.id @@ -618,7 +622,6 @@ def create_group_and_wait_for_state(self, create_group_details, wait_for_states= operation_result = self.client.create_group(create_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] group_id = operation_result.data.id @@ -661,7 +664,6 @@ def create_identity_provider_and_wait_for_state(self, create_identity_provider_d operation_result = self.client.create_identity_provider(create_identity_provider_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] identity_provider_id = operation_result.data.id @@ -707,7 +709,6 @@ def create_idp_group_mapping_and_wait_for_state(self, create_idp_group_mapping_d operation_result = self.client.create_idp_group_mapping(create_idp_group_mapping_details, identity_provider_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] identity_provider_id = operation_result.data.id @@ -750,7 +751,6 @@ def create_mfa_totp_device_and_wait_for_state(self, user_id, wait_for_states=[], operation_result = self.client.create_mfa_totp_device(user_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] mfa_totp_device_id = operation_result.data.id @@ -793,7 +793,6 @@ def create_policy_and_wait_for_state(self, create_policy_details, wait_for_state operation_result = self.client.create_policy(create_policy_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] policy_id = operation_result.data.id @@ -839,7 +838,6 @@ def create_tag_and_wait_for_state(self, tag_namespace_id, create_tag_details, wa operation_result = self.client.create_tag(tag_namespace_id, create_tag_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_namespace_id = operation_result.data.id @@ -882,7 +880,6 @@ def create_tag_default_and_wait_for_state(self, create_tag_default_details, wait operation_result = self.client.create_tag_default(create_tag_default_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_default_id = operation_result.data.id @@ -925,7 +922,6 @@ def create_tag_namespace_and_wait_for_state(self, create_tag_namespace_details, operation_result = self.client.create_tag_namespace(create_tag_namespace_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_namespace_id = operation_result.data.id @@ -968,7 +964,6 @@ def create_user_and_wait_for_state(self, create_user_details, wait_for_states=[] operation_result = self.client.create_user(create_user_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] user_id = operation_result.data.id @@ -1011,8 +1006,9 @@ def deactivate_domain_and_wait_for_state(self, domain_id, wait_for_states=[], op operation_result = self.client.deactivate_domain(domain_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: @@ -1057,8 +1053,9 @@ def delete_compartment_and_wait_for_state(self, compartment_id, wait_for_states= 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: @@ -1103,8 +1100,9 @@ def delete_domain_and_wait_for_state(self, domain_id, wait_for_states=[], operat 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: @@ -1150,7 +1148,6 @@ def delete_dynamic_group_and_wait_for_state(self, dynamic_group_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1210,7 +1207,6 @@ def delete_group_and_wait_for_state(self, group_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1270,7 +1266,6 @@ def delete_identity_provider_and_wait_for_state(self, identity_provider_id, wait if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1330,7 +1325,6 @@ def delete_policy_and_wait_for_state(self, policy_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1392,8 +1386,9 @@ def delete_tag_and_wait_for_state(self, tag_namespace_id, tag_name, wait_for_sta 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: @@ -1439,7 +1434,6 @@ def delete_tag_default_and_wait_for_state(self, tag_default_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1499,7 +1493,6 @@ def delete_tag_namespace_and_wait_for_state(self, tag_namespace_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1559,7 +1552,6 @@ def delete_user_and_wait_for_state(self, user_id, wait_for_states=[], operation_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1613,8 +1605,9 @@ def enable_replication_to_region_and_wait_for_state(self, domain_id, enable_repl operation_result = self.client.enable_replication_to_region(domain_id, enable_replication_to_region_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: @@ -1654,7 +1647,6 @@ def generate_totp_seed_and_wait_for_state(self, user_id, mfa_totp_device_id, wai operation_result = self.client.generate_totp_seed(user_id, mfa_totp_device_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] mfa_totp_device_id = operation_result.data.id @@ -1694,8 +1686,9 @@ def import_standard_tags_and_wait_for_state(self, wait_for_states=[], operation_ operation_result = self.client.import_standard_tags(**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: @@ -1735,8 +1728,9 @@ def move_compartment_and_wait_for_state(self, compartment_id, move_compartment_d operation_result = self.client.move_compartment(compartment_id, move_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: @@ -1773,7 +1767,6 @@ def recover_compartment_and_wait_for_state(self, compartment_id, wait_for_states operation_result = self.client.recover_compartment(compartment_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] compartment_id = operation_result.data.id @@ -1819,7 +1812,6 @@ def remove_tag_default_lock_and_wait_for_state(self, tag_default_id, remove_lock operation_result = self.client.remove_tag_default_lock(tag_default_id, remove_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_default_id = operation_result.data.id @@ -1865,7 +1857,6 @@ def remove_tag_namespace_lock_and_wait_for_state(self, tag_namespace_id, remove_ operation_result = self.client.remove_tag_namespace_lock(tag_namespace_id, remove_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_namespace_id = operation_result.data.id @@ -1911,7 +1902,6 @@ def update_compartment_and_wait_for_state(self, compartment_id, update_compartme operation_result = self.client.update_compartment(compartment_id, update_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] compartment_id = operation_result.data.id @@ -1957,8 +1947,9 @@ def update_domain_and_wait_for_state(self, domain_id, update_domain_details, wai operation_result = self.client.update_domain(domain_id, update_domain_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: @@ -1998,7 +1989,6 @@ def update_dynamic_group_and_wait_for_state(self, dynamic_group_id, update_dynam operation_result = self.client.update_dynamic_group(dynamic_group_id, update_dynamic_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] dynamic_group_id = operation_result.data.id @@ -2044,7 +2034,6 @@ def update_group_and_wait_for_state(self, group_id, update_group_details, wait_f operation_result = self.client.update_group(group_id, update_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] group_id = operation_result.data.id @@ -2090,7 +2079,6 @@ def update_identity_provider_and_wait_for_state(self, identity_provider_id, upda operation_result = self.client.update_identity_provider(identity_provider_id, update_identity_provider_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] identity_provider_id = operation_result.data.id @@ -2139,7 +2127,6 @@ def update_idp_group_mapping_and_wait_for_state(self, identity_provider_id, mapp operation_result = self.client.update_idp_group_mapping(identity_provider_id, mapping_id, update_idp_group_mapping_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] identity_provider_id = operation_result.data.id @@ -2185,7 +2172,6 @@ def update_policy_and_wait_for_state(self, policy_id, update_policy_details, wai operation_result = self.client.update_policy(policy_id, update_policy_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] policy_id = operation_result.data.id @@ -2234,7 +2220,6 @@ def update_tag_and_wait_for_state(self, tag_namespace_id, tag_name, update_tag_d operation_result = self.client.update_tag(tag_namespace_id, tag_name, update_tag_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_namespace_id = operation_result.data.id @@ -2280,7 +2265,6 @@ def update_tag_default_and_wait_for_state(self, tag_default_id, update_tag_defau operation_result = self.client.update_tag_default(tag_default_id, update_tag_default_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_default_id = operation_result.data.id @@ -2326,7 +2310,6 @@ def update_tag_namespace_and_wait_for_state(self, tag_namespace_id, update_tag_n operation_result = self.client.update_tag_namespace(tag_namespace_id, update_tag_namespace_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] tag_namespace_id = operation_result.data.id @@ -2372,7 +2355,6 @@ def update_user_and_wait_for_state(self, user_id, update_user_details, wait_for_ operation_result = self.client.update_user(user_id, update_user_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] user_id = operation_result.data.id @@ -2418,7 +2400,6 @@ def update_user_capabilities_and_wait_for_state(self, user_id, update_user_capab operation_result = self.client.update_user_capabilities(user_id, update_user_capabilities_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] user_id = operation_result.data.id @@ -2464,7 +2445,6 @@ def update_user_state_and_wait_for_state(self, user_id, update_state_details, wa operation_result = self.client.update_user_state(user_id, update_state_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] user_id = operation_result.data.id diff --git a/src/oci/integration/integration_instance_client_composite_operations.py b/src/oci/integration/integration_instance_client_composite_operations.py index 5c0a6865d..b90937979 100644 --- a/src/oci/integration/integration_instance_client_composite_operations.py +++ b/src/oci/integration/integration_instance_client_composite_operations.py @@ -49,8 +49,9 @@ def change_integration_instance_compartment_and_wait_for_state(self, integration operation_result = self.client.change_integration_instance_compartment(integration_instance_id, change_integration_instance_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: @@ -90,8 +91,9 @@ def change_integration_instance_network_endpoint_and_wait_for_state(self, integr operation_result = self.client.change_integration_instance_network_endpoint(integration_instance_id, change_integration_instance_network_endpoint_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: @@ -131,8 +133,9 @@ def change_private_endpoint_outbound_connection_and_wait_for_state(self, integra operation_result = self.client.change_private_endpoint_outbound_connection(integration_instance_id, change_private_endpoint_outbound_connection_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: @@ -169,8 +172,9 @@ def create_integration_instance_and_wait_for_state(self, create_integration_inst operation_result = self.client.create_integration_instance(create_integration_instance_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: @@ -215,8 +219,9 @@ def delete_integration_instance_and_wait_for_state(self, integration_instance_id 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: @@ -253,8 +258,9 @@ def enable_process_automation_and_wait_for_state(self, integration_instance_id, operation_result = self.client.enable_process_automation(integration_instance_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: @@ -291,8 +297,9 @@ def start_integration_instance_and_wait_for_state(self, integration_instance_id, operation_result = self.client.start_integration_instance(integration_instance_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: @@ -329,8 +336,9 @@ def stop_integration_instance_and_wait_for_state(self, integration_instance_id, operation_result = self.client.stop_integration_instance(integration_instance_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: @@ -370,8 +378,9 @@ def update_integration_instance_and_wait_for_state(self, integration_instance_id operation_result = self.client.update_integration_instance(integration_instance_id, update_integration_instance_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: diff --git a/src/oci/jms/java_management_service_client_composite_operations.py b/src/oci/jms/java_management_service_client_composite_operations.py index 2c27619b7..acefd4b1f 100644 --- a/src/oci/jms/java_management_service_client_composite_operations.py +++ b/src/oci/jms/java_management_service_client_composite_operations.py @@ -51,8 +51,9 @@ def add_fleet_installation_sites_and_wait_for_state(self, fleet_id, add_fleet_in operation_result = self.client.add_fleet_installation_sites(fleet_id, add_fleet_installation_sites_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: @@ -94,8 +95,9 @@ def change_fleet_compartment_and_wait_for_state(self, fleet_id, change_fleet_com operation_result = self.client.change_fleet_compartment(fleet_id, change_fleet_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: @@ -137,8 +139,9 @@ def create_drs_file_and_wait_for_state(self, fleet_id, create_drs_file_details, operation_result = self.client.create_drs_file(fleet_id, create_drs_file_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: @@ -175,8 +178,9 @@ def create_fleet_and_wait_for_state(self, create_fleet_details, wait_for_states= operation_result = self.client.create_fleet(create_fleet_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: @@ -226,8 +230,9 @@ def delete_crypto_analysis_result_and_wait_for_state(self, fleet_id, crypto_anal 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: @@ -277,8 +282,9 @@ def delete_drs_file_and_wait_for_state(self, fleet_id, drs_file_key, wait_for_st 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: @@ -325,8 +331,9 @@ def delete_fleet_and_wait_for_state(self, fleet_id, wait_for_states=[], operatio 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: @@ -376,8 +383,9 @@ def delete_java_migration_analysis_result_and_wait_for_state(self, fleet_id, jav 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: @@ -427,8 +435,9 @@ def delete_performance_tuning_analysis_result_and_wait_for_state(self, fleet_id, 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: @@ -470,8 +479,9 @@ def disable_drs_and_wait_for_state(self, fleet_id, disable_drs_details, wait_for operation_result = self.client.disable_drs(fleet_id, disable_drs_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: @@ -513,8 +523,9 @@ def enable_drs_and_wait_for_state(self, fleet_id, enable_drs_details, wait_for_s operation_result = self.client.enable_drs(fleet_id, enable_drs_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: @@ -556,8 +567,9 @@ def remove_fleet_installation_sites_and_wait_for_state(self, fleet_id, remove_fl operation_result = self.client.remove_fleet_installation_sites(fleet_id, remove_fleet_installation_sites_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: @@ -599,8 +611,9 @@ def request_crypto_analyses_and_wait_for_state(self, fleet_id, request_crypto_an operation_result = self.client.request_crypto_analyses(fleet_id, request_crypto_analyses_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: @@ -642,8 +655,9 @@ def request_java_migration_analyses_and_wait_for_state(self, fleet_id, request_j operation_result = self.client.request_java_migration_analyses(fleet_id, request_java_migration_analyses_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: @@ -685,8 +699,9 @@ def request_jfr_recordings_and_wait_for_state(self, fleet_id, request_jfr_record operation_result = self.client.request_jfr_recordings(fleet_id, request_jfr_recordings_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: @@ -728,8 +743,9 @@ def request_performance_tuning_analyses_and_wait_for_state(self, fleet_id, reque operation_result = self.client.request_performance_tuning_analyses(fleet_id, request_performance_tuning_analyses_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: @@ -771,8 +787,9 @@ def scan_java_server_usage_and_wait_for_state(self, fleet_id, scan_java_server_u operation_result = self.client.scan_java_server_usage(fleet_id, scan_java_server_usage_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: @@ -814,8 +831,9 @@ def scan_library_usage_and_wait_for_state(self, fleet_id, scan_library_usage_det operation_result = self.client.scan_library_usage(fleet_id, scan_library_usage_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: @@ -860,8 +878,9 @@ def update_drs_file_and_wait_for_state(self, fleet_id, update_drs_file_details, operation_result = self.client.update_drs_file(fleet_id, update_drs_file_details, drs_file_key, **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: @@ -903,8 +922,9 @@ def update_fleet_and_wait_for_state(self, fleet_id, update_fleet_details, wait_f operation_result = self.client.update_fleet(fleet_id, update_fleet_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: @@ -946,8 +966,9 @@ def update_fleet_agent_configuration_and_wait_for_state(self, fleet_id, update_f operation_result = self.client.update_fleet_agent_configuration(fleet_id, update_fleet_agent_configuration_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: diff --git a/src/oci/jms_java_downloads/java_download_client_composite_operations.py b/src/oci/jms_java_downloads/java_download_client_composite_operations.py index f223a7023..db4971549 100644 --- a/src/oci/jms_java_downloads/java_download_client_composite_operations.py +++ b/src/oci/jms_java_downloads/java_download_client_composite_operations.py @@ -46,8 +46,9 @@ def create_java_download_report_and_wait_for_state(self, create_java_download_re operation_result = self.client.create_java_download_report(create_java_download_report_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: @@ -84,8 +85,9 @@ def create_java_download_token_and_wait_for_state(self, create_java_download_tok operation_result = self.client.create_java_download_token(create_java_download_token_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: @@ -122,7 +124,6 @@ def create_java_license_acceptance_record_and_wait_for_state(self, create_java_l operation_result = self.client.create_java_license_acceptance_record(create_java_license_acceptance_record_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] java_license_acceptance_record_id = operation_result.data.id @@ -173,8 +174,9 @@ def delete_java_download_report_and_wait_for_state(self, java_download_report_id 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: @@ -219,8 +221,9 @@ def delete_java_download_token_and_wait_for_state(self, java_download_token_id, 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: @@ -266,7 +269,6 @@ def delete_java_license_acceptance_record_and_wait_for_state(self, java_license_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -320,8 +322,9 @@ def update_java_download_token_and_wait_for_state(self, java_download_token_id, operation_result = self.client.update_java_download_token(java_download_token_id, update_java_download_token_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: @@ -361,7 +364,6 @@ def update_java_license_acceptance_record_and_wait_for_state(self, java_license_ operation_result = self.client.update_java_license_acceptance_record(java_license_acceptance_record_id, update_java_license_acceptance_record_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] java_license_acceptance_record_id = operation_result.data.id diff --git a/src/oci/key_management/ekm_client_composite_operations.py b/src/oci/key_management/ekm_client_composite_operations.py index e1806f2aa..0c9ec9b2f 100644 --- a/src/oci/key_management/ekm_client_composite_operations.py +++ b/src/oci/key_management/ekm_client_composite_operations.py @@ -46,7 +46,6 @@ def create_ekms_private_endpoint_and_wait_for_state(self, create_ekms_private_en operation_result = self.client.create_ekms_private_endpoint(create_ekms_private_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ekms_private_endpoint_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_ekms_private_endpoint_and_wait_for_state(self, ekms_private_endpoint_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_ekms_private_endpoint_and_wait_for_state(self, ekms_private_endpoint_ operation_result = self.client.update_ekms_private_endpoint(ekms_private_endpoint_id, update_ekms_private_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ekms_private_endpoint_id = operation_result.data.id diff --git a/src/oci/key_management/kms_management_client_composite_operations.py b/src/oci/key_management/kms_management_client_composite_operations.py index 97ad684c0..742db77eb 100644 --- a/src/oci/key_management/kms_management_client_composite_operations.py +++ b/src/oci/key_management/kms_management_client_composite_operations.py @@ -46,7 +46,6 @@ def backup_key_and_wait_for_state(self, key_id, wait_for_states=[], operation_kw operation_result = self.client.backup_key(key_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_id = operation_result.data.id @@ -89,7 +88,6 @@ def cancel_key_deletion_and_wait_for_state(self, key_id, wait_for_states=[], ope operation_result = self.client.cancel_key_deletion(key_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_id = operation_result.data.id @@ -135,7 +133,6 @@ def cancel_key_version_deletion_and_wait_for_state(self, key_id, key_version_id, operation_result = self.client.cancel_key_version_deletion(key_id, key_version_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_version_id = operation_result.data.id @@ -178,7 +175,6 @@ def create_key_and_wait_for_state(self, create_key_details, wait_for_states=[], operation_result = self.client.create_key(create_key_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_id = operation_result.data.id @@ -221,7 +217,6 @@ def create_key_version_and_wait_for_state(self, key_id, wait_for_states=[], oper operation_result = self.client.create_key_version(key_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_version_id = operation_result.data.id @@ -264,7 +259,6 @@ def disable_key_and_wait_for_state(self, key_id, wait_for_states=[], operation_k operation_result = self.client.disable_key(key_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_id = operation_result.data.id @@ -307,7 +301,6 @@ def enable_key_and_wait_for_state(self, key_id, wait_for_states=[], operation_kw operation_result = self.client.enable_key(key_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_id = operation_result.data.id @@ -353,7 +346,6 @@ def schedule_key_deletion_and_wait_for_state(self, key_id, schedule_key_deletion operation_result = self.client.schedule_key_deletion(key_id, schedule_key_deletion_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_id = operation_result.data.id @@ -402,7 +394,6 @@ def schedule_key_version_deletion_and_wait_for_state(self, key_id, key_version_i operation_result = self.client.schedule_key_version_deletion(key_id, key_version_id, schedule_key_version_deletion_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_version_id = operation_result.data.id @@ -448,7 +439,6 @@ def update_key_and_wait_for_state(self, key_id, update_key_details, wait_for_sta operation_result = self.client.update_key(key_id, update_key_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] key_id = operation_result.data.id diff --git a/src/oci/key_management/kms_vault_client_composite_operations.py b/src/oci/key_management/kms_vault_client_composite_operations.py index 064fb3e7e..09d4a4b9c 100644 --- a/src/oci/key_management/kms_vault_client_composite_operations.py +++ b/src/oci/key_management/kms_vault_client_composite_operations.py @@ -46,7 +46,6 @@ def backup_vault_and_wait_for_state(self, vault_id, wait_for_states=[], operatio operation_result = self.client.backup_vault(vault_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vault_id = operation_result.data.id @@ -89,7 +88,6 @@ def cancel_vault_deletion_and_wait_for_state(self, vault_id, wait_for_states=[], operation_result = self.client.cancel_vault_deletion(vault_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vault_id = operation_result.data.id @@ -132,7 +130,6 @@ def create_vault_and_wait_for_state(self, create_vault_details, wait_for_states= operation_result = self.client.create_vault(create_vault_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vault_id = operation_result.data.id @@ -178,7 +175,6 @@ def schedule_vault_deletion_and_wait_for_state(self, vault_id, schedule_vault_de operation_result = self.client.schedule_vault_deletion(vault_id, schedule_vault_deletion_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vault_id = operation_result.data.id @@ -224,7 +220,6 @@ def update_vault_and_wait_for_state(self, vault_id, update_vault_details, wait_f operation_result = self.client.update_vault(vault_id, update_vault_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] vault_id = operation_result.data.id diff --git a/src/oci/license_manager/license_manager_client_composite_operations.py b/src/oci/license_manager/license_manager_client_composite_operations.py index 8cf56ae30..e80a87ac8 100644 --- a/src/oci/license_manager/license_manager_client_composite_operations.py +++ b/src/oci/license_manager/license_manager_client_composite_operations.py @@ -49,7 +49,6 @@ def create_license_record_and_wait_for_state(self, create_license_record_details operation_result = self.client.create_license_record(create_license_record_details, product_license_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] license_record_id = operation_result.data.id @@ -92,7 +91,6 @@ def create_product_license_and_wait_for_state(self, create_product_license_detai operation_result = self.client.create_product_license(create_product_license_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] product_license_id = operation_result.data.id @@ -144,7 +142,6 @@ def delete_license_record_and_wait_for_state(self, license_record_id, wait_for_s if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -204,7 +201,6 @@ def delete_product_license_and_wait_for_state(self, product_license_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -258,7 +254,6 @@ def update_license_record_and_wait_for_state(self, license_record_id, update_lic operation_result = self.client.update_license_record(license_record_id, update_license_record_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] license_record_id = operation_result.data.id @@ -304,7 +299,6 @@ def update_product_license_and_wait_for_state(self, product_license_id, update_p operation_result = self.client.update_product_license(product_license_id, update_product_license_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] product_license_id = operation_result.data.id diff --git a/src/oci/limits/quotas_client_composite_operations.py b/src/oci/limits/quotas_client_composite_operations.py index da424608f..52f5f9d6d 100644 --- a/src/oci/limits/quotas_client_composite_operations.py +++ b/src/oci/limits/quotas_client_composite_operations.py @@ -48,7 +48,6 @@ def add_quota_lock_and_wait_for_state(self, quota_id, add_lock_details, wait_for operation_result = self.client.add_quota_lock(quota_id, add_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] quota_id = operation_result.data.id @@ -91,7 +90,6 @@ def create_quota_and_wait_for_state(self, create_quota_details, wait_for_states= operation_result = self.client.create_quota(create_quota_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] quota_id = operation_result.data.id @@ -143,7 +141,6 @@ def delete_quota_and_wait_for_state(self, quota_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -196,7 +193,6 @@ def remove_quota_lock_and_wait_for_state(self, quota_id, remove_lock_details, wa operation_result = self.client.remove_quota_lock(quota_id, remove_lock_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] quota_id = operation_result.data.id @@ -242,7 +238,6 @@ def update_quota_and_wait_for_state(self, quota_id, update_quota_details, wait_f operation_result = self.client.update_quota(quota_id, update_quota_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] quota_id = operation_result.data.id diff --git a/src/oci/load_balancer/load_balancer_client_composite_operations.py b/src/oci/load_balancer/load_balancer_client_composite_operations.py index 618537d80..c6cdd94ad 100644 --- a/src/oci/load_balancer/load_balancer_client_composite_operations.py +++ b/src/oci/load_balancer/load_balancer_client_composite_operations.py @@ -51,8 +51,9 @@ def change_load_balancer_compartment_and_wait_for_state(self, load_balancer_id, operation_result = self.client.change_load_balancer_compartment(load_balancer_id, change_load_balancer_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: @@ -99,8 +100,9 @@ def create_backend_and_wait_for_state(self, create_backend_details, load_balance operation_result = self.client.create_backend(create_backend_details, load_balancer_id, backend_set_name, **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: @@ -142,8 +144,9 @@ def create_backend_set_and_wait_for_state(self, create_backend_set_details, load operation_result = self.client.create_backend_set(create_backend_set_details, load_balancer_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: @@ -185,8 +188,9 @@ def create_certificate_and_wait_for_state(self, create_certificate_details, load operation_result = self.client.create_certificate(create_certificate_details, load_balancer_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: @@ -228,8 +232,9 @@ def create_hostname_and_wait_for_state(self, create_hostname_details, load_balan operation_result = self.client.create_hostname(create_hostname_details, load_balancer_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: @@ -271,8 +276,9 @@ def create_listener_and_wait_for_state(self, create_listener_details, load_balan operation_result = self.client.create_listener(create_listener_details, load_balancer_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: @@ -309,8 +315,9 @@ def create_load_balancer_and_wait_for_state(self, create_load_balancer_details, operation_result = self.client.create_load_balancer(create_load_balancer_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: @@ -352,8 +359,9 @@ def create_path_route_set_and_wait_for_state(self, create_path_route_set_details operation_result = self.client.create_path_route_set(create_path_route_set_details, load_balancer_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: @@ -395,8 +403,9 @@ def create_routing_policy_and_wait_for_state(self, create_routing_policy_details operation_result = self.client.create_routing_policy(create_routing_policy_details, load_balancer_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: @@ -438,8 +447,9 @@ def create_rule_set_and_wait_for_state(self, load_balancer_id, create_rule_set_d operation_result = self.client.create_rule_set(load_balancer_id, create_rule_set_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: @@ -481,8 +491,9 @@ def create_ssl_cipher_suite_and_wait_for_state(self, create_ssl_cipher_suite_det operation_result = self.client.create_ssl_cipher_suite(create_ssl_cipher_suite_details, load_balancer_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: @@ -539,8 +550,9 @@ def delete_backend_and_wait_for_state(self, load_balancer_id, backend_set_name, 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: @@ -592,8 +604,9 @@ def delete_backend_set_and_wait_for_state(self, load_balancer_id, backend_set_na 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: @@ -646,8 +659,9 @@ def delete_certificate_and_wait_for_state(self, load_balancer_id, certificate_na 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: @@ -699,8 +713,9 @@ def delete_hostname_and_wait_for_state(self, load_balancer_id, name, wait_for_st 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: @@ -752,8 +767,9 @@ def delete_listener_and_wait_for_state(self, load_balancer_id, listener_name, wa 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: @@ -800,8 +816,9 @@ def delete_load_balancer_and_wait_for_state(self, load_balancer_id, wait_for_sta 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: @@ -853,8 +870,9 @@ def delete_path_route_set_and_wait_for_state(self, load_balancer_id, path_route_ 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: @@ -906,8 +924,9 @@ def delete_routing_policy_and_wait_for_state(self, load_balancer_id, routing_pol 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: @@ -959,8 +978,9 @@ def delete_rule_set_and_wait_for_state(self, load_balancer_id, rule_set_name, wa 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: @@ -1012,8 +1032,9 @@ def delete_ssl_cipher_suite_and_wait_for_state(self, load_balancer_id, name, wai 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: @@ -1065,8 +1086,9 @@ def update_backend_and_wait_for_state(self, update_backend_details, load_balance operation_result = self.client.update_backend(update_backend_details, load_balancer_id, backend_set_name, backend_name, **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: @@ -1113,8 +1135,9 @@ def update_backend_set_and_wait_for_state(self, update_backend_set_details, load operation_result = self.client.update_backend_set(update_backend_set_details, load_balancer_id, backend_set_name, **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: @@ -1161,8 +1184,9 @@ def update_health_checker_and_wait_for_state(self, health_checker, load_balancer operation_result = self.client.update_health_checker(health_checker, load_balancer_id, backend_set_name, **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: @@ -1210,8 +1234,9 @@ def update_hostname_and_wait_for_state(self, update_hostname_details, load_balan operation_result = self.client.update_hostname(update_hostname_details, load_balancer_id, name, **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: @@ -1258,8 +1283,9 @@ def update_listener_and_wait_for_state(self, update_listener_details, load_balan operation_result = self.client.update_listener(update_listener_details, load_balancer_id, listener_name, **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: @@ -1301,8 +1327,9 @@ def update_load_balancer_and_wait_for_state(self, update_load_balancer_details, operation_result = self.client.update_load_balancer(update_load_balancer_details, load_balancer_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: @@ -1344,8 +1371,9 @@ def update_load_balancer_shape_and_wait_for_state(self, load_balancer_id, update operation_result = self.client.update_load_balancer_shape(load_balancer_id, update_load_balancer_shape_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: @@ -1387,8 +1415,9 @@ def update_network_security_groups_and_wait_for_state(self, update_network_secur operation_result = self.client.update_network_security_groups(update_network_security_groups_details, load_balancer_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: @@ -1435,8 +1464,9 @@ def update_path_route_set_and_wait_for_state(self, update_path_route_set_details operation_result = self.client.update_path_route_set(update_path_route_set_details, load_balancer_id, path_route_set_name, **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: @@ -1483,8 +1513,9 @@ def update_routing_policy_and_wait_for_state(self, update_routing_policy_details operation_result = self.client.update_routing_policy(update_routing_policy_details, load_balancer_id, routing_policy_name, **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: @@ -1531,8 +1562,9 @@ def update_rule_set_and_wait_for_state(self, load_balancer_id, rule_set_name, up operation_result = self.client.update_rule_set(load_balancer_id, rule_set_name, update_rule_set_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: @@ -1579,8 +1611,9 @@ def update_ssl_cipher_suite_and_wait_for_state(self, update_ssl_cipher_suite_det operation_result = self.client.update_ssl_cipher_suite(update_ssl_cipher_suite_details, load_balancer_id, name, **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: diff --git a/src/oci/lockbox/lockbox_client_composite_operations.py b/src/oci/lockbox/lockbox_client_composite_operations.py index 76a6e8f00..59b410570 100644 --- a/src/oci/lockbox/lockbox_client_composite_operations.py +++ b/src/oci/lockbox/lockbox_client_composite_operations.py @@ -46,8 +46,9 @@ def create_access_request_and_wait_for_state(self, create_access_request_details operation_result = self.client.create_access_request(create_access_request_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: @@ -84,7 +85,6 @@ def create_approval_template_and_wait_for_state(self, create_approval_template_d operation_result = self.client.create_approval_template(create_approval_template_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] approval_template_id = operation_result.data.id @@ -127,7 +127,6 @@ def create_lockbox_and_wait_for_state(self, create_lockbox_details, wait_for_sta operation_result = self.client.create_lockbox(create_lockbox_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] lockbox_id = operation_result.data.id @@ -179,7 +178,6 @@ def delete_approval_template_and_wait_for_state(self, approval_template_id, wait if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -239,7 +237,6 @@ def delete_lockbox_and_wait_for_state(self, lockbox_id, wait_for_states=[], oper if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -293,8 +290,9 @@ def handle_access_request_and_wait_for_state(self, access_request_id, handle_acc operation_result = self.client.handle_access_request(access_request_id, handle_access_request_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: @@ -334,7 +332,6 @@ def update_approval_template_and_wait_for_state(self, approval_template_id, upda operation_result = self.client.update_approval_template(approval_template_id, update_approval_template_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] approval_template_id = operation_result.data.id @@ -380,7 +377,6 @@ def update_lockbox_and_wait_for_state(self, lockbox_id, update_lockbox_details, operation_result = self.client.update_lockbox(lockbox_id, update_lockbox_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] lockbox_id = operation_result.data.id diff --git a/src/oci/log_analytics/log_analytics_client_composite_operations.py b/src/oci/log_analytics/log_analytics_client_composite_operations.py index faae9d44e..d9586b51e 100644 --- a/src/oci/log_analytics/log_analytics_client_composite_operations.py +++ b/src/oci/log_analytics/log_analytics_client_composite_operations.py @@ -52,8 +52,9 @@ def append_lookup_data_and_wait_for_state(self, namespace_name, lookup_name, app operation_result = self.client.append_lookup_data(namespace_name, lookup_name, append_lookup_file_body, **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: @@ -93,8 +94,9 @@ def assign_encryption_key_and_wait_for_state(self, namespace_name, assign_encryp operation_result = self.client.assign_encryption_key(namespace_name, assign_encryption_key_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: @@ -134,7 +136,6 @@ def create_ingest_time_rule_and_wait_for_state(self, namespace_name, create_inge operation_result = self.client.create_ingest_time_rule(namespace_name, create_ingest_time_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ingest_time_rule_id = operation_result.data.id @@ -180,7 +181,6 @@ def create_log_analytics_em_bridge_and_wait_for_state(self, namespace_name, crea operation_result = self.client.create_log_analytics_em_bridge(namespace_name, create_log_analytics_em_bridge_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_analytics_em_bridge_id = operation_result.data.id @@ -226,7 +226,6 @@ def create_log_analytics_entity_and_wait_for_state(self, namespace_name, create_ operation_result = self.client.create_log_analytics_entity(namespace_name, create_log_analytics_entity_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_analytics_entity_id = operation_result.data.id @@ -272,7 +271,6 @@ def create_log_analytics_object_collection_rule_and_wait_for_state(self, namespa operation_result = self.client.create_log_analytics_object_collection_rule(namespace_name, create_log_analytics_object_collection_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_analytics_object_collection_rule_id = operation_result.data.id @@ -318,7 +316,6 @@ def create_scheduled_task_and_wait_for_state(self, namespace_name, create_schedu operation_result = self.client.create_scheduled_task(namespace_name, create_scheduled_task_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_task_id = operation_result.data.id @@ -364,8 +361,9 @@ def delete_associations_and_wait_for_state(self, namespace_name, delete_log_anal operation_result = self.client.delete_associations(namespace_name, delete_log_analytics_association_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: @@ -413,8 +411,9 @@ def delete_lookup_and_wait_for_state(self, namespace_name, lookup_name, wait_for 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: @@ -457,8 +456,9 @@ def disable_auto_association_and_wait_for_state(self, namespace_name, source_nam operation_result = self.client.disable_auto_association(namespace_name, source_name, disable_auto_association_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: @@ -498,8 +498,9 @@ def disable_ingest_time_rule_and_wait_for_state(self, namespace_name, ingest_tim operation_result = self.client.disable_ingest_time_rule(namespace_name, ingest_time_rule_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: @@ -542,8 +543,9 @@ def enable_auto_association_and_wait_for_state(self, namespace_name, source_name operation_result = self.client.enable_auto_association(namespace_name, source_name, enable_auto_association_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: @@ -583,8 +585,9 @@ def enable_ingest_time_rule_and_wait_for_state(self, namespace_name, ingest_time operation_result = self.client.enable_ingest_time_rule(namespace_name, ingest_time_rule_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: @@ -621,8 +624,9 @@ def offboard_namespace_and_wait_for_state(self, namespace_name, wait_for_states= operation_result = self.client.offboard_namespace(namespace_name, **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: @@ -659,8 +663,9 @@ def onboard_namespace_and_wait_for_state(self, namespace_name, wait_for_states=[ operation_result = self.client.onboard_namespace(namespace_name, **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: @@ -701,7 +706,6 @@ def pause_scheduled_task_and_wait_for_state(self, namespace_name, scheduled_task operation_result = self.client.pause_scheduled_task(namespace_name, scheduled_task_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_task_id = operation_result.data.id @@ -747,8 +751,9 @@ def purge_storage_data_and_wait_for_state(self, namespace_name, purge_storage_da operation_result = self.client.purge_storage_data(namespace_name, purge_storage_data_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: @@ -788,8 +793,9 @@ def query_and_wait_for_state(self, namespace_name, query_details, wait_for_state operation_result = self.client.query(namespace_name, query_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: @@ -829,8 +835,9 @@ def recall_archived_data_and_wait_for_state(self, namespace_name, recall_archive operation_result = self.client.recall_archived_data(namespace_name, recall_archived_data_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: @@ -870,8 +877,9 @@ def release_recalled_data_and_wait_for_state(self, namespace_name, release_recal operation_result = self.client.release_recalled_data(namespace_name, release_recalled_data_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: @@ -912,7 +920,6 @@ def resume_scheduled_task_and_wait_for_state(self, namespace_name, scheduled_tas operation_result = self.client.resume_scheduled_task(namespace_name, scheduled_task_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_task_id = operation_result.data.id @@ -961,7 +968,6 @@ def update_ingest_time_rule_and_wait_for_state(self, namespace_name, ingest_time operation_result = self.client.update_ingest_time_rule(namespace_name, ingest_time_rule_id, update_ingest_time_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] ingest_time_rule_id = operation_result.data.id @@ -1010,7 +1016,6 @@ def update_log_analytics_em_bridge_and_wait_for_state(self, namespace_name, log_ operation_result = self.client.update_log_analytics_em_bridge(namespace_name, log_analytics_em_bridge_id, update_log_analytics_em_bridge_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_analytics_em_bridge_id = operation_result.data.id @@ -1059,7 +1064,6 @@ def update_log_analytics_entity_and_wait_for_state(self, namespace_name, log_ana operation_result = self.client.update_log_analytics_entity(namespace_name, log_analytics_entity_id, update_log_analytics_entity_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_analytics_entity_id = operation_result.data.id @@ -1110,7 +1114,6 @@ def update_log_analytics_object_collection_rule_and_wait_for_state(self, namespa operation_result = self.client.update_log_analytics_object_collection_rule(namespace_name, log_analytics_object_collection_rule_id, update_log_analytics_object_collection_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_analytics_object_collection_rule_id = operation_result.data.id @@ -1159,8 +1162,9 @@ def update_lookup_data_and_wait_for_state(self, namespace_name, lookup_name, upd operation_result = self.client.update_lookup_data(namespace_name, lookup_name, update_lookup_file_body, **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: @@ -1205,7 +1209,6 @@ def update_scheduled_task_and_wait_for_state(self, namespace_name, scheduled_tas operation_result = self.client.update_scheduled_task(namespace_name, scheduled_task_id, update_scheduled_task_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_task_id = operation_result.data.id @@ -1251,8 +1254,9 @@ def upsert_associations_and_wait_for_state(self, namespace_name, upsert_log_anal operation_result = self.client.upsert_associations(namespace_name, upsert_log_analytics_association_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: diff --git a/src/oci/logging/logging_management_client_composite_operations.py b/src/oci/logging/logging_management_client_composite_operations.py index 7307c10de..79066cc3e 100644 --- a/src/oci/logging/logging_management_client_composite_operations.py +++ b/src/oci/logging/logging_management_client_composite_operations.py @@ -49,8 +49,9 @@ def change_log_group_compartment_and_wait_for_state(self, log_group_id, change_l operation_result = self.client.change_log_group_compartment(log_group_id, change_log_group_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: @@ -93,8 +94,9 @@ def change_log_log_group_and_wait_for_state(self, log_group_id, log_id, change_l operation_result = self.client.change_log_log_group(log_group_id, log_id, change_log_log_group_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: @@ -134,8 +136,9 @@ def change_unified_agent_configuration_compartment_and_wait_for_state(self, unif operation_result = self.client.change_unified_agent_configuration_compartment(unified_agent_configuration_id, change_unified_agent_configuration_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: @@ -175,8 +178,9 @@ def create_log_and_wait_for_state(self, log_group_id, create_log_details, wait_f operation_result = self.client.create_log(log_group_id, create_log_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: @@ -213,8 +217,9 @@ def create_log_group_and_wait_for_state(self, create_log_group_details, wait_for operation_result = self.client.create_log_group(create_log_group_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: @@ -251,7 +256,6 @@ def create_log_saved_search_and_wait_for_state(self, create_log_saved_search_det operation_result = self.client.create_log_saved_search(create_log_saved_search_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_saved_search_id = operation_result.data.id @@ -294,8 +298,9 @@ def create_unified_agent_configuration_and_wait_for_state(self, create_unified_a operation_result = self.client.create_unified_agent_configuration(create_unified_agent_configuration_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: @@ -343,8 +348,9 @@ def delete_log_and_wait_for_state(self, log_group_id, log_id, wait_for_states=[] 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: @@ -389,8 +395,9 @@ def delete_log_group_and_wait_for_state(self, log_group_id, wait_for_states=[], 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: @@ -436,7 +443,6 @@ def delete_log_saved_search_and_wait_for_state(self, log_saved_search_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -495,8 +501,9 @@ def delete_unified_agent_configuration_and_wait_for_state(self, unified_agent_co 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: @@ -541,8 +548,9 @@ def delete_work_request_and_wait_for_state(self, work_request_id, wait_for_state 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: @@ -585,8 +593,9 @@ def update_log_and_wait_for_state(self, log_group_id, log_id, update_log_details operation_result = self.client.update_log(log_group_id, log_id, update_log_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: @@ -626,8 +635,9 @@ def update_log_group_and_wait_for_state(self, log_group_id, update_log_group_det operation_result = self.client.update_log_group(log_group_id, update_log_group_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: @@ -667,7 +677,6 @@ def update_log_saved_search_and_wait_for_state(self, log_saved_search_id, update operation_result = self.client.update_log_saved_search(log_saved_search_id, update_log_saved_search_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] log_saved_search_id = operation_result.data.id @@ -713,8 +722,9 @@ def update_unified_agent_configuration_and_wait_for_state(self, unified_agent_co operation_result = self.client.update_unified_agent_configuration(unified_agent_configuration_id, update_unified_agent_configuration_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: diff --git a/src/oci/management_agent/management_agent_client_composite_operations.py b/src/oci/management_agent/management_agent_client_composite_operations.py index 6dd061342..2bf93d304 100644 --- a/src/oci/management_agent/management_agent_client_composite_operations.py +++ b/src/oci/management_agent/management_agent_client_composite_operations.py @@ -46,7 +46,6 @@ def create_management_agent_install_key_and_wait_for_state(self, create_manageme operation_result = self.client.create_management_agent_install_key(create_management_agent_install_key_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_agent_install_key_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_management_agent_and_wait_for_state(self, management_agent_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -158,7 +156,6 @@ def delete_management_agent_install_key_and_wait_for_state(self, management_agen if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -209,8 +206,9 @@ def deploy_plugins_and_wait_for_state(self, deploy_plugins_details, wait_for_sta operation_result = self.client.deploy_plugins(deploy_plugins_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: @@ -250,7 +248,6 @@ def update_management_agent_and_wait_for_state(self, management_agent_id, update operation_result = self.client.update_management_agent(management_agent_id, update_management_agent_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_agent_id = operation_result.data.id @@ -296,7 +293,6 @@ def update_management_agent_install_key_and_wait_for_state(self, management_agen operation_result = self.client.update_management_agent_install_key(management_agent_install_key_id, update_management_agent_install_key_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_agent_install_key_id = operation_result.data.id diff --git a/src/oci/management_dashboard/dashx_apis_client_composite_operations.py b/src/oci/management_dashboard/dashx_apis_client_composite_operations.py index cce7aa7dc..d433b3adf 100644 --- a/src/oci/management_dashboard/dashx_apis_client_composite_operations.py +++ b/src/oci/management_dashboard/dashx_apis_client_composite_operations.py @@ -49,7 +49,6 @@ def change_management_dashboards_compartment_and_wait_for_state(self, management operation_result = self.client.change_management_dashboards_compartment(management_dashboard_id, change_management_dashboards_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_dashboard_id = operation_result.data.id @@ -95,7 +94,6 @@ def change_management_saved_searches_compartment_and_wait_for_state(self, manage operation_result = self.client.change_management_saved_searches_compartment(management_saved_search_id, change_management_saved_searches_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_saved_search_id = operation_result.data.id @@ -138,7 +136,6 @@ def create_management_dashboard_and_wait_for_state(self, create_management_dashb operation_result = self.client.create_management_dashboard(create_management_dashboard_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_dashboard_id = operation_result.data.id @@ -181,7 +178,6 @@ def create_management_saved_search_and_wait_for_state(self, create_management_sa operation_result = self.client.create_management_saved_search(create_management_saved_search_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_saved_search_id = operation_result.data.id @@ -233,7 +229,6 @@ def delete_management_dashboard_and_wait_for_state(self, management_dashboard_id if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -293,7 +288,6 @@ def delete_management_saved_search_and_wait_for_state(self, management_saved_sea if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -347,7 +341,6 @@ def update_management_dashboard_and_wait_for_state(self, management_dashboard_id operation_result = self.client.update_management_dashboard(management_dashboard_id, update_management_dashboard_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_dashboard_id = operation_result.data.id @@ -393,7 +386,6 @@ def update_management_saved_search_and_wait_for_state(self, management_saved_sea operation_result = self.client.update_management_saved_search(management_saved_search_id, update_management_saved_search_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_saved_search_id = operation_result.data.id diff --git a/src/oci/marketplace/marketplace_client_composite_operations.py b/src/oci/marketplace/marketplace_client_composite_operations.py index e8fd08ed5..7dfdb31ee 100644 --- a/src/oci/marketplace/marketplace_client_composite_operations.py +++ b/src/oci/marketplace/marketplace_client_composite_operations.py @@ -46,7 +46,6 @@ def create_publication_and_wait_for_state(self, create_publication_details, wait operation_result = self.client.create_publication(create_publication_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] publication_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_publication_and_wait_for_state(self, publication_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -155,8 +153,9 @@ def export_listing_and_wait_for_state(self, listing_id, package_version, export_ operation_result = self.client.export_listing(listing_id, package_version, export_package_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: @@ -196,7 +195,6 @@ def update_publication_and_wait_for_state(self, publication_id, update_publicati operation_result = self.client.update_publication(publication_id, update_publication_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] publication_id = operation_result.data.id diff --git a/src/oci/marketplace/models/international_market_price.py b/src/oci/marketplace/models/international_market_price.py index 2e1351920..1de4ff7ae 100644 --- a/src/oci/marketplace/models/international_market_price.py +++ b/src/oci/marketplace/models/international_market_price.py @@ -59,6 +59,186 @@ class InternationalMarketPrice(object): #: This constant has a value of "CLP" CURRENCY_CODE_CLP = "CLP" + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "ALL" + CURRENCY_CODE_ALL = "ALL" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "ARS" + CURRENCY_CODE_ARS = "ARS" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "AUD" + CURRENCY_CODE_AUD = "AUD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "BDT" + CURRENCY_CODE_BDT = "BDT" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "BAM" + CURRENCY_CODE_BAM = "BAM" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "BGN" + CURRENCY_CODE_BGN = "BGN" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "CNY" + CURRENCY_CODE_CNY = "CNY" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "COP" + CURRENCY_CODE_COP = "COP" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "CRC" + CURRENCY_CODE_CRC = "CRC" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "HRK" + CURRENCY_CODE_HRK = "HRK" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "CZK" + CURRENCY_CODE_CZK = "CZK" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "DKK" + CURRENCY_CODE_DKK = "DKK" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "EGP" + CURRENCY_CODE_EGP = "EGP" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "HKD" + CURRENCY_CODE_HKD = "HKD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "HUF" + CURRENCY_CODE_HUF = "HUF" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "ISK" + CURRENCY_CODE_ISK = "ISK" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "IDR" + CURRENCY_CODE_IDR = "IDR" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "ILS" + CURRENCY_CODE_ILS = "ILS" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "JMD" + CURRENCY_CODE_JMD = "JMD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "KZT" + CURRENCY_CODE_KZT = "KZT" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "KES" + CURRENCY_CODE_KES = "KES" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "KRW" + CURRENCY_CODE_KRW = "KRW" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "KWD" + CURRENCY_CODE_KWD = "KWD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "LBP" + CURRENCY_CODE_LBP = "LBP" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "MOP" + CURRENCY_CODE_MOP = "MOP" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "MYR" + CURRENCY_CODE_MYR = "MYR" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "MVR" + CURRENCY_CODE_MVR = "MVR" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "AED" + CURRENCY_CODE_AED = "AED" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "NZD" + CURRENCY_CODE_NZD = "NZD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "NOK" + CURRENCY_CODE_NOK = "NOK" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "PKR" + CURRENCY_CODE_PKR = "PKR" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "PEN" + CURRENCY_CODE_PEN = "PEN" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "PHP" + CURRENCY_CODE_PHP = "PHP" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "PLN" + CURRENCY_CODE_PLN = "PLN" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "QAR" + CURRENCY_CODE_QAR = "QAR" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "RON" + CURRENCY_CODE_RON = "RON" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "SAR" + CURRENCY_CODE_SAR = "SAR" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "RSD" + CURRENCY_CODE_RSD = "RSD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "SGD" + CURRENCY_CODE_SGD = "SGD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "ZAR" + CURRENCY_CODE_ZAR = "ZAR" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "SEK" + CURRENCY_CODE_SEK = "SEK" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "TWD" + CURRENCY_CODE_TWD = "TWD" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "THB" + CURRENCY_CODE_THB = "THB" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "TRY" + CURRENCY_CODE_TRY = "TRY" + + #: A constant which can be used with the currency_code property of a InternationalMarketPrice. + #: This constant has a value of "VND" + CURRENCY_CODE_VND = "VND" + def __init__(self, **kwargs): """ Initializes a new InternationalMarketPrice object with values from keyword arguments. @@ -66,7 +246,7 @@ def __init__(self, **kwargs): :param currency_code: The value to assign to the currency_code property of this InternationalMarketPrice. - Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", "ALL", "ARS", "AUD", "BDT", "BAM", "BGN", "CNY", "COP", "CRC", "HRK", "CZK", "DKK", "EGP", "HKD", "HUF", "ISK", "IDR", "ILS", "JMD", "KZT", "KES", "KRW", "KWD", "LBP", "MOP", "MYR", "MVR", "AED", "NZD", "NOK", "PKR", "PEN", "PHP", "PLN", "QAR", "RON", "SAR", "RSD", "SGD", "ZAR", "SEK", "TWD", "THB", "TRY", "VND", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type currency_code: str @@ -101,7 +281,7 @@ def currency_code(self): **[Required]** Gets the currency_code of this InternationalMarketPrice. The currency of the pricing model. - Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", "ALL", "ARS", "AUD", "BDT", "BAM", "BGN", "CNY", "COP", "CRC", "HRK", "CZK", "DKK", "EGP", "HKD", "HUF", "ISK", "IDR", "ILS", "JMD", "KZT", "KES", "KRW", "KWD", "LBP", "MOP", "MYR", "MVR", "AED", "NZD", "NOK", "PKR", "PEN", "PHP", "PLN", "QAR", "RON", "SAR", "RSD", "SGD", "ZAR", "SEK", "TWD", "THB", "TRY", "VND", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -120,7 +300,7 @@ def currency_code(self, currency_code): :param currency_code: The currency_code of this InternationalMarketPrice. :type: str """ - allowed_values = ["USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP"] + allowed_values = ["USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", "ALL", "ARS", "AUD", "BDT", "BAM", "BGN", "CNY", "COP", "CRC", "HRK", "CZK", "DKK", "EGP", "HKD", "HUF", "ISK", "IDR", "ILS", "JMD", "KZT", "KES", "KRW", "KWD", "LBP", "MOP", "MYR", "MVR", "AED", "NZD", "NOK", "PKR", "PEN", "PHP", "PLN", "QAR", "RON", "SAR", "RSD", "SGD", "ZAR", "SEK", "TWD", "THB", "TRY", "VND"] if not value_allowed_none_or_none_sentinel(currency_code, allowed_values): currency_code = 'UNKNOWN_ENUM_VALUE' self._currency_code = currency_code diff --git a/src/oci/marketplace/models/pricing_model.py b/src/oci/marketplace/models/pricing_model.py index 43cc3b009..22a74a376 100644 --- a/src/oci/marketplace/models/pricing_model.py +++ b/src/oci/marketplace/models/pricing_model.py @@ -87,6 +87,186 @@ class PricingModel(object): #: This constant has a value of "CLP" CURRENCY_CLP = "CLP" + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "ALL" + CURRENCY_ALL = "ALL" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "ARS" + CURRENCY_ARS = "ARS" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "AUD" + CURRENCY_AUD = "AUD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "BDT" + CURRENCY_BDT = "BDT" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "BAM" + CURRENCY_BAM = "BAM" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "BGN" + CURRENCY_BGN = "BGN" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "CNY" + CURRENCY_CNY = "CNY" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "COP" + CURRENCY_COP = "COP" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "CRC" + CURRENCY_CRC = "CRC" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "HRK" + CURRENCY_HRK = "HRK" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "CZK" + CURRENCY_CZK = "CZK" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "DKK" + CURRENCY_DKK = "DKK" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "EGP" + CURRENCY_EGP = "EGP" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "HKD" + CURRENCY_HKD = "HKD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "HUF" + CURRENCY_HUF = "HUF" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "ISK" + CURRENCY_ISK = "ISK" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "IDR" + CURRENCY_IDR = "IDR" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "ILS" + CURRENCY_ILS = "ILS" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "JMD" + CURRENCY_JMD = "JMD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "KZT" + CURRENCY_KZT = "KZT" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "KES" + CURRENCY_KES = "KES" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "KRW" + CURRENCY_KRW = "KRW" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "KWD" + CURRENCY_KWD = "KWD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "LBP" + CURRENCY_LBP = "LBP" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "MOP" + CURRENCY_MOP = "MOP" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "MYR" + CURRENCY_MYR = "MYR" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "MVR" + CURRENCY_MVR = "MVR" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "AED" + CURRENCY_AED = "AED" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "NZD" + CURRENCY_NZD = "NZD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "NOK" + CURRENCY_NOK = "NOK" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "PKR" + CURRENCY_PKR = "PKR" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "PEN" + CURRENCY_PEN = "PEN" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "PHP" + CURRENCY_PHP = "PHP" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "PLN" + CURRENCY_PLN = "PLN" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "QAR" + CURRENCY_QAR = "QAR" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "RON" + CURRENCY_RON = "RON" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "SAR" + CURRENCY_SAR = "SAR" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "RSD" + CURRENCY_RSD = "RSD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "SGD" + CURRENCY_SGD = "SGD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "ZAR" + CURRENCY_ZAR = "ZAR" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "SEK" + CURRENCY_SEK = "SEK" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "TWD" + CURRENCY_TWD = "TWD" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "THB" + CURRENCY_THB = "THB" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "TRY" + CURRENCY_TRY = "TRY" + + #: A constant which can be used with the currency property of a PricingModel. + #: This constant has a value of "VND" + CURRENCY_VND = "VND" + def __init__(self, **kwargs): """ Initializes a new PricingModel object with values from keyword arguments. @@ -106,7 +286,7 @@ def __init__(self, **kwargs): :param currency: The value to assign to the currency property of this PricingModel. - Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", "ALL", "ARS", "AUD", "BDT", "BAM", "BGN", "CNY", "COP", "CRC", "HRK", "CZK", "DKK", "EGP", "HKD", "HUF", "ISK", "IDR", "ILS", "JMD", "KZT", "KES", "KRW", "KWD", "LBP", "MOP", "MYR", "MVR", "AED", "NZD", "NOK", "PKR", "PEN", "PHP", "PLN", "QAR", "RON", "SAR", "RSD", "SGD", "ZAR", "SEK", "TWD", "THB", "TRY", "VND", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type currency: str @@ -207,7 +387,7 @@ def currency(self): Gets the currency of this PricingModel. The currency of the pricing model. - Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", "ALL", "ARS", "AUD", "BDT", "BAM", "BGN", "CNY", "COP", "CRC", "HRK", "CZK", "DKK", "EGP", "HKD", "HUF", "ISK", "IDR", "ILS", "JMD", "KZT", "KES", "KRW", "KWD", "LBP", "MOP", "MYR", "MVR", "AED", "NZD", "NOK", "PKR", "PEN", "PHP", "PLN", "QAR", "RON", "SAR", "RSD", "SGD", "ZAR", "SEK", "TWD", "THB", "TRY", "VND", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -226,7 +406,7 @@ def currency(self, currency): :param currency: The currency of this PricingModel. :type: str """ - allowed_values = ["USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP"] + allowed_values = ["USD", "CAD", "INR", "GBP", "BRL", "JPY", "OMR", "EUR", "CHF", "MXN", "CLP", "ALL", "ARS", "AUD", "BDT", "BAM", "BGN", "CNY", "COP", "CRC", "HRK", "CZK", "DKK", "EGP", "HKD", "HUF", "ISK", "IDR", "ILS", "JMD", "KZT", "KES", "KRW", "KWD", "LBP", "MOP", "MYR", "MVR", "AED", "NZD", "NOK", "PKR", "PEN", "PHP", "PLN", "QAR", "RON", "SAR", "RSD", "SGD", "ZAR", "SEK", "TWD", "THB", "TRY", "VND"] if not value_allowed_none_or_none_sentinel(currency, allowed_values): currency = 'UNKNOWN_ENUM_VALUE' self._currency = currency diff --git a/src/oci/marketplace/models/publication.py b/src/oci/marketplace/models/publication.py index 35e502e59..35a1b0929 100644 --- a/src/oci/marketplace/models/publication.py +++ b/src/oci/marketplace/models/publication.py @@ -130,6 +130,10 @@ def __init__(self, **kwargs): The value to assign to the freeform_tags property of this Publication. :type freeform_tags: dict(str, str) + :param system_tags: + The value to assign to the system_tags property of this Publication. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'lifecycle_state': 'str', @@ -145,7 +149,8 @@ def __init__(self, **kwargs): 'supported_operating_systems': 'list[OperatingSystem]', 'time_created': 'datetime', 'defined_tags': 'dict(str, dict(str, object))', - 'freeform_tags': 'dict(str, str)' + 'freeform_tags': 'dict(str, str)', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { @@ -162,7 +167,8 @@ def __init__(self, **kwargs): 'supported_operating_systems': 'supportedOperatingSystems', 'time_created': 'timeCreated', 'defined_tags': 'definedTags', - 'freeform_tags': 'freeformTags' + 'freeform_tags': 'freeformTags', + 'system_tags': 'systemTags' } self._lifecycle_state = None @@ -179,6 +185,7 @@ def __init__(self, **kwargs): self._time_created = None self._defined_tags = None self._freeform_tags = None + self._system_tags = None @property def lifecycle_state(self): @@ -560,6 +567,38 @@ def freeform_tags(self, freeform_tags): """ self._freeform_tags = freeform_tags + @property + def system_tags(self): + """ + Gets the system_tags of this Publication. + The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. + For more information, see `Resource Tags`__. + Example: `{orcl-cloud: {free-tier-retain: true}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this Publication. + :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 Publication. + The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. + For more information, see `Resource Tags`__. + Example: `{orcl-cloud: {free-tier-retain: true}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this Publication. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/marketplace/models/publication_summary.py b/src/oci/marketplace/models/publication_summary.py index 7b4ca49e1..24776f1d4 100644 --- a/src/oci/marketplace/models/publication_summary.py +++ b/src/oci/marketplace/models/publication_summary.py @@ -92,6 +92,18 @@ def __init__(self, **kwargs): The value to assign to the time_created property of this PublicationSummary. :type time_created: datetime + :param defined_tags: + The value to assign to the defined_tags property of this PublicationSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this PublicationSummary. + :type freeform_tags: dict(str, str) + + :param system_tags: + The value to assign to the system_tags property of this PublicationSummary. + :type system_tags: dict(str, dict(str, object)) + """ self.swagger_types = { 'lifecycle_state': 'str', @@ -103,7 +115,10 @@ def __init__(self, **kwargs): 'package_type': 'str', 'supported_operating_systems': 'list[OperatingSystem]', 'listing_type': 'str', - 'time_created': 'datetime' + 'time_created': 'datetime', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)', + 'system_tags': 'dict(str, dict(str, object))' } self.attribute_map = { @@ -116,7 +131,10 @@ def __init__(self, **kwargs): 'package_type': 'packageType', 'supported_operating_systems': 'supportedOperatingSystems', 'listing_type': 'listingType', - 'time_created': 'timeCreated' + 'time_created': 'timeCreated', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags', + 'system_tags': 'systemTags' } self._lifecycle_state = None @@ -129,6 +147,9 @@ def __init__(self, **kwargs): self._supported_operating_systems = None self._listing_type = None self._time_created = None + self._defined_tags = None + self._freeform_tags = None + self._system_tags = None @property def lifecycle_state(self): @@ -392,6 +413,102 @@ def time_created(self, time_created): """ self._time_created = time_created + @property + def defined_tags(self): + """ + Gets the defined_tags of this PublicationSummary. + The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + 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 PublicationSummary. + :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 PublicationSummary. + The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + 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 PublicationSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this PublicationSummary. + The freeform tags associated with this resource, if any. 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 PublicationSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this PublicationSummary. + The freeform tags associated with this resource, if any. 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 PublicationSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this PublicationSummary. + The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. + For more information, see `Resource Tags`__. + Example: `{orcl-cloud: {free-tier-retain: true}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The system_tags of this PublicationSummary. + :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 PublicationSummary. + The system tags associated with this resource, if any. The system tags are set by Oracle Cloud Infrastructure services. Each key is predefined and scoped to namespaces. + For more information, see `Resource Tags`__. + Example: `{orcl-cloud: {free-tier-retain: true}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param system_tags: The system_tags of this PublicationSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.py b/src/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.py index 70d3c3715..5b5709225 100644 --- a/src/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.py +++ b/src/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.py @@ -46,7 +46,6 @@ def activate_term_version_and_wait_for_state(self, term_version_id, wait_for_sta operation_result = self.client.activate_term_version(term_version_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] term_version_id = operation_result.data.id @@ -89,8 +88,9 @@ def cascading_delete_listing_and_wait_for_state(self, listing_id, wait_for_state operation_result = self.client.cascading_delete_listing(listing_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: @@ -127,8 +127,9 @@ def cascading_delete_listing_revision_and_wait_for_state(self, listing_revision_ operation_result = self.client.cascading_delete_listing_revision(listing_revision_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: @@ -165,7 +166,6 @@ def change_listing_revision_to_new_status_and_wait_for_state(self, listing_revis operation_result = self.client.change_listing_revision_to_new_status(listing_revision_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_id = operation_result.data.id @@ -208,8 +208,9 @@ def clone_listing_revision_and_wait_for_state(self, listing_revision_id, wait_fo operation_result = self.client.clone_listing_revision(listing_revision_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: @@ -246,8 +247,9 @@ def create_artifact_and_wait_for_state(self, create_artifact_details, wait_for_s operation_result = self.client.create_artifact(create_artifact_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: @@ -284,7 +286,6 @@ def create_listing_and_wait_for_state(self, create_listing_details, wait_for_sta operation_result = self.client.create_listing(create_listing_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_id = operation_result.data.id @@ -327,7 +328,6 @@ def create_listing_revision_and_wait_for_state(self, create_listing_revision_det operation_result = self.client.create_listing_revision(create_listing_revision_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_id = operation_result.data.id @@ -370,7 +370,6 @@ def create_listing_revision_attachment_and_wait_for_state(self, create_listing_r operation_result = self.client.create_listing_revision_attachment(create_listing_revision_attachment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_attachment_id = operation_result.data.id @@ -413,7 +412,6 @@ def create_listing_revision_note_and_wait_for_state(self, create_listing_revisio operation_result = self.client.create_listing_revision_note(create_listing_revision_note_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_note_id = operation_result.data.id @@ -456,7 +454,6 @@ def create_listing_revision_package_and_wait_for_state(self, create_listing_revi operation_result = self.client.create_listing_revision_package(create_listing_revision_package_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_package_id = operation_result.data.id @@ -499,7 +496,6 @@ def create_term_and_wait_for_state(self, create_term_details, wait_for_states=[] operation_result = self.client.create_term(create_term_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] term_id = operation_result.data.id @@ -545,7 +541,6 @@ def create_term_version_and_wait_for_state(self, create_term_version_content, te operation_result = self.client.create_term_version(create_term_version_content, term_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] term_version_id = operation_result.data.id @@ -596,8 +591,9 @@ def delete_artifact_and_wait_for_state(self, artifact_id, wait_for_states=[], op 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: @@ -643,7 +639,6 @@ def delete_listing_and_wait_for_state(self, listing_id, wait_for_states=[], oper if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -703,7 +698,6 @@ def delete_listing_revision_and_wait_for_state(self, listing_revision_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -763,7 +757,6 @@ def delete_listing_revision_attachment_and_wait_for_state(self, listing_revision if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -823,7 +816,6 @@ def delete_listing_revision_note_and_wait_for_state(self, listing_revision_note_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -883,7 +875,6 @@ def delete_listing_revision_package_and_wait_for_state(self, listing_revision_pa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -943,7 +934,6 @@ def delete_term_and_wait_for_state(self, term_id, wait_for_states=[], operation_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1003,7 +993,6 @@ def delete_term_version_and_wait_for_state(self, term_version_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -1054,8 +1043,9 @@ def mark_listing_revision_package_as_default_and_wait_for_state(self, listing_re operation_result = self.client.mark_listing_revision_package_as_default(listing_revision_package_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: @@ -1092,8 +1082,9 @@ def publish_listing_revision_and_wait_for_state(self, listing_revision_id, wait_ operation_result = self.client.publish_listing_revision(listing_revision_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: @@ -1133,8 +1124,9 @@ def publish_listing_revision_as_private_and_wait_for_state(self, publish_listing operation_result = self.client.publish_listing_revision_as_private(publish_listing_revision_as_private_details, listing_revision_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: @@ -1171,8 +1163,9 @@ def publish_listing_revision_package_and_wait_for_state(self, listing_revision_p operation_result = self.client.publish_listing_revision_package(listing_revision_package_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: @@ -1212,7 +1205,6 @@ def submit_listing_revision_for_review_and_wait_for_state(self, submit_listing_r operation_result = self.client.submit_listing_revision_for_review(submit_listing_revision_for_review_details, listing_revision_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_id = operation_result.data.id @@ -1255,8 +1247,9 @@ def un_publish_listing_revision_package_and_wait_for_state(self, listing_revisio operation_result = self.client.un_publish_listing_revision_package(listing_revision_package_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: @@ -1296,8 +1289,9 @@ def update_artifact_and_wait_for_state(self, artifact_id, update_artifact_detail operation_result = self.client.update_artifact(artifact_id, update_artifact_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: @@ -1337,7 +1331,6 @@ def update_listing_and_wait_for_state(self, listing_id, update_listing_details, operation_result = self.client.update_listing(listing_id, update_listing_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_id = operation_result.data.id @@ -1383,7 +1376,6 @@ def update_listing_revision_and_wait_for_state(self, listing_revision_id, update operation_result = self.client.update_listing_revision(listing_revision_id, update_listing_revision_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_id = operation_result.data.id @@ -1429,7 +1421,6 @@ def update_listing_revision_attachment_and_wait_for_state(self, listing_revision operation_result = self.client.update_listing_revision_attachment(listing_revision_attachment_id, update_listing_revision_attachment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_attachment_id = operation_result.data.id @@ -1475,7 +1466,6 @@ def update_listing_revision_attachment_content_and_wait_for_state(self, listing_ operation_result = self.client.update_listing_revision_attachment_content(listing_revision_attachment_id, update_listing_revision_attachment_content, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_attachment_id = operation_result.data.id @@ -1521,7 +1511,6 @@ def update_listing_revision_icon_content_and_wait_for_state(self, listing_revisi operation_result = self.client.update_listing_revision_icon_content(listing_revision_id, update_listing_revision_icon_content, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_id = operation_result.data.id @@ -1567,7 +1556,6 @@ def update_listing_revision_package_and_wait_for_state(self, listing_revision_pa operation_result = self.client.update_listing_revision_package(listing_revision_package_id, update_listing_revision_package_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] listing_revision_package_id = operation_result.data.id @@ -1613,7 +1601,6 @@ def update_term_and_wait_for_state(self, term_id, update_term_details, wait_for_ operation_result = self.client.update_term(term_id, update_term_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] term_id = operation_result.data.id @@ -1659,7 +1646,6 @@ def update_term_version_and_wait_for_state(self, term_version_id, update_term_ve operation_result = self.client.update_term_version(term_version_id, update_term_version_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] term_version_id = operation_result.data.id @@ -1705,7 +1691,6 @@ def update_term_version_content_and_wait_for_state(self, term_version_id, update operation_result = self.client.update_term_version_content(term_version_id, update_term_version_content, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] term_version_id = operation_result.data.id @@ -1748,8 +1733,9 @@ def validate_and_publish_artifact_and_wait_for_state(self, artifact_id, wait_for operation_result = self.client.validate_and_publish_artifact(artifact_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: @@ -1786,8 +1772,9 @@ def withdraw_listing_revision_and_wait_for_state(self, listing_revision_id, wait operation_result = self.client.withdraw_listing_revision(listing_revision_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: diff --git a/src/oci/media_services/media_services_client_composite_operations.py b/src/oci/media_services/media_services_client_composite_operations.py index fa347c371..0418af635 100644 --- a/src/oci/media_services/media_services_client_composite_operations.py +++ b/src/oci/media_services/media_services_client_composite_operations.py @@ -46,7 +46,6 @@ def create_media_asset_and_wait_for_state(self, create_media_asset_details, wait operation_result = self.client.create_media_asset(create_media_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_asset_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_media_workflow_and_wait_for_state(self, create_media_workflow_details operation_result = self.client.create_media_workflow(create_media_workflow_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_workflow_id = operation_result.data.id @@ -132,7 +130,6 @@ def create_media_workflow_configuration_and_wait_for_state(self, create_media_wo operation_result = self.client.create_media_workflow_configuration(create_media_workflow_configuration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_workflow_configuration_id = operation_result.data.id @@ -175,7 +172,6 @@ def create_media_workflow_job_and_wait_for_state(self, create_media_workflow_job operation_result = self.client.create_media_workflow_job(create_media_workflow_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_workflow_job_id = operation_result.data.id @@ -218,7 +214,6 @@ def create_stream_cdn_config_and_wait_for_state(self, create_stream_cdn_config_d operation_result = self.client.create_stream_cdn_config(create_stream_cdn_config_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_cdn_config_id = operation_result.data.id @@ -261,7 +256,6 @@ def create_stream_distribution_channel_and_wait_for_state(self, create_stream_di operation_result = self.client.create_stream_distribution_channel(create_stream_distribution_channel_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_distribution_channel_id = operation_result.data.id @@ -304,7 +298,6 @@ def create_stream_packaging_config_and_wait_for_state(self, create_stream_packag operation_result = self.client.create_stream_packaging_config(create_stream_packaging_config_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_packaging_config_id = operation_result.data.id @@ -356,7 +349,6 @@ def delete_media_asset_and_wait_for_state(self, media_asset_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -416,7 +408,6 @@ def delete_media_workflow_and_wait_for_state(self, media_workflow_id, wait_for_s if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -476,7 +467,6 @@ def delete_media_workflow_configuration_and_wait_for_state(self, media_workflow_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -536,7 +526,6 @@ def delete_media_workflow_job_and_wait_for_state(self, media_workflow_job_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -596,7 +585,6 @@ def delete_stream_cdn_config_and_wait_for_state(self, stream_cdn_config_id, wait if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -656,7 +644,6 @@ def delete_stream_distribution_channel_and_wait_for_state(self, stream_distribut if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -716,7 +703,6 @@ def delete_stream_packaging_config_and_wait_for_state(self, stream_packaging_con if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -770,7 +756,6 @@ def update_media_asset_and_wait_for_state(self, media_asset_id, update_media_ass operation_result = self.client.update_media_asset(media_asset_id, update_media_asset_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_asset_id = operation_result.data.id @@ -816,7 +801,6 @@ def update_media_workflow_and_wait_for_state(self, media_workflow_id, update_med operation_result = self.client.update_media_workflow(media_workflow_id, update_media_workflow_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_workflow_id = operation_result.data.id @@ -862,7 +846,6 @@ def update_media_workflow_configuration_and_wait_for_state(self, media_workflow_ operation_result = self.client.update_media_workflow_configuration(media_workflow_configuration_id, update_media_workflow_configuration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_workflow_configuration_id = operation_result.data.id @@ -908,7 +891,6 @@ def update_media_workflow_job_and_wait_for_state(self, media_workflow_job_id, up operation_result = self.client.update_media_workflow_job(media_workflow_job_id, update_media_workflow_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] media_workflow_job_id = operation_result.data.id @@ -954,7 +936,6 @@ def update_stream_cdn_config_and_wait_for_state(self, stream_cdn_config_id, upda operation_result = self.client.update_stream_cdn_config(stream_cdn_config_id, update_stream_cdn_config_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_cdn_config_id = operation_result.data.id @@ -1000,7 +981,6 @@ def update_stream_distribution_channel_and_wait_for_state(self, stream_distribut operation_result = self.client.update_stream_distribution_channel(stream_distribution_channel_id, update_stream_distribution_channel_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_distribution_channel_id = operation_result.data.id @@ -1046,7 +1026,6 @@ def update_stream_packaging_config_and_wait_for_state(self, stream_packaging_con operation_result = self.client.update_stream_packaging_config(stream_packaging_config_id, update_stream_packaging_config_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_packaging_config_id = operation_result.data.id diff --git a/src/oci/monitoring/monitoring_client_composite_operations.py b/src/oci/monitoring/monitoring_client_composite_operations.py index d72882d39..3490e9b21 100644 --- a/src/oci/monitoring/monitoring_client_composite_operations.py +++ b/src/oci/monitoring/monitoring_client_composite_operations.py @@ -46,7 +46,6 @@ def create_alarm_and_wait_for_state(self, create_alarm_details, wait_for_states= operation_result = self.client.create_alarm(create_alarm_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] alarm_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_alarm_suppression_and_wait_for_state(self, create_alarm_suppression_d operation_result = self.client.create_alarm_suppression(create_alarm_suppression_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] alarm_suppression_id = operation_result.data.id @@ -143,7 +141,6 @@ def delete_alarm_and_wait_for_state(self, alarm_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -205,7 +202,6 @@ def delete_alarm_suppression_and_wait_for_state(self, alarm_suppression_id, wait if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -261,7 +257,6 @@ def update_alarm_and_wait_for_state(self, alarm_id, update_alarm_details, wait_f operation_result = self.client.update_alarm(alarm_id, update_alarm_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] alarm_id = operation_result.data.id diff --git a/src/oci/mysql/channels_client_composite_operations.py b/src/oci/mysql/channels_client_composite_operations.py index 618b6f188..7bc5fc611 100644 --- a/src/oci/mysql/channels_client_composite_operations.py +++ b/src/oci/mysql/channels_client_composite_operations.py @@ -46,8 +46,9 @@ def create_channel_and_wait_for_state(self, create_channel_details, wait_for_sta operation_result = self.client.create_channel(create_channel_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: @@ -94,8 +95,9 @@ def delete_channel_and_wait_for_state(self, channel_id, wait_for_states=[], oper 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: @@ -134,8 +136,9 @@ def reset_channel_and_wait_for_state(self, channel_id, wait_for_states=[], opera operation_result = self.client.reset_channel(channel_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: @@ -174,8 +177,9 @@ def resume_channel_and_wait_for_state(self, channel_id, wait_for_states=[], oper operation_result = self.client.resume_channel(channel_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: @@ -217,8 +221,9 @@ def update_channel_and_wait_for_state(self, channel_id, update_channel_details, operation_result = self.client.update_channel(channel_id, update_channel_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: diff --git a/src/oci/mysql/db_backups_client_composite_operations.py b/src/oci/mysql/db_backups_client_composite_operations.py index 3309e8e4d..daaa7956a 100644 --- a/src/oci/mysql/db_backups_client_composite_operations.py +++ b/src/oci/mysql/db_backups_client_composite_operations.py @@ -49,8 +49,9 @@ def change_backup_compartment_and_wait_for_state(self, backup_id, change_backup_ operation_result = self.client.change_backup_compartment(backup_id, change_backup_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: @@ -87,8 +88,9 @@ def create_backup_and_wait_for_state(self, create_backup_details, wait_for_state operation_result = self.client.create_backup(create_backup_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: @@ -133,8 +135,9 @@ def delete_backup_and_wait_for_state(self, backup_id, wait_for_states=[], operat 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: @@ -174,7 +177,6 @@ def update_backup_and_wait_for_state(self, backup_id, update_backup_details, wai operation_result = self.client.update_backup(backup_id, update_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] backup_id = operation_result.data.id diff --git a/src/oci/mysql/db_system_client_composite_operations.py b/src/oci/mysql/db_system_client_composite_operations.py index ac477e77d..d01b39215 100644 --- a/src/oci/mysql/db_system_client_composite_operations.py +++ b/src/oci/mysql/db_system_client_composite_operations.py @@ -51,8 +51,9 @@ def add_heat_wave_cluster_and_wait_for_state(self, db_system_id, add_heat_wave_c operation_result = self.client.add_heat_wave_cluster(db_system_id, add_heat_wave_cluster_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: @@ -89,8 +90,9 @@ def create_db_system_and_wait_for_state(self, create_db_system_details, wait_for operation_result = self.client.create_db_system(create_db_system_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: @@ -137,8 +139,9 @@ def delete_db_system_and_wait_for_state(self, db_system_id, wait_for_states=[], 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: @@ -185,8 +188,9 @@ def delete_heat_wave_cluster_and_wait_for_state(self, db_system_id, wait_for_sta 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: @@ -225,8 +229,9 @@ def generate_heat_wave_cluster_memory_estimate_and_wait_for_state(self, db_syste operation_result = self.client.generate_heat_wave_cluster_memory_estimate(db_system_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: @@ -268,8 +273,9 @@ def restart_db_system_and_wait_for_state(self, db_system_id, restart_db_system_d operation_result = self.client.restart_db_system(db_system_id, restart_db_system_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: @@ -308,8 +314,9 @@ def restart_heat_wave_cluster_and_wait_for_state(self, db_system_id, wait_for_st operation_result = self.client.restart_heat_wave_cluster(db_system_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: @@ -348,8 +355,9 @@ def start_db_system_and_wait_for_state(self, db_system_id, wait_for_states=[], o operation_result = self.client.start_db_system(db_system_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: @@ -388,8 +396,9 @@ def start_heat_wave_cluster_and_wait_for_state(self, db_system_id, wait_for_stat operation_result = self.client.start_heat_wave_cluster(db_system_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: @@ -431,8 +440,9 @@ def stop_db_system_and_wait_for_state(self, db_system_id, stop_db_system_details operation_result = self.client.stop_db_system(db_system_id, stop_db_system_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: @@ -471,8 +481,9 @@ def stop_heat_wave_cluster_and_wait_for_state(self, db_system_id, wait_for_state operation_result = self.client.stop_heat_wave_cluster(db_system_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: @@ -514,8 +525,9 @@ def update_db_system_and_wait_for_state(self, db_system_id, update_db_system_det operation_result = self.client.update_db_system(db_system_id, update_db_system_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: @@ -557,8 +569,9 @@ def update_heat_wave_cluster_and_wait_for_state(self, db_system_id, update_heat_ operation_result = self.client.update_heat_wave_cluster(db_system_id, update_heat_wave_cluster_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: diff --git a/src/oci/mysql/mysqlaas_client_composite_operations.py b/src/oci/mysql/mysqlaas_client_composite_operations.py index 8ed394a7a..43a6f779f 100644 --- a/src/oci/mysql/mysqlaas_client_composite_operations.py +++ b/src/oci/mysql/mysqlaas_client_composite_operations.py @@ -46,8 +46,9 @@ def create_configuration_and_wait_for_state(self, create_configuration_details, operation_result = self.client.create_configuration(create_configuration_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: @@ -93,7 +94,6 @@ def delete_configuration_and_wait_for_state(self, configuration_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -147,7 +147,6 @@ def update_configuration_and_wait_for_state(self, configuration_id, update_confi operation_result = self.client.update_configuration(configuration_id, update_configuration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] configuration_id = operation_result.data.id diff --git a/src/oci/mysql/replicas_client_composite_operations.py b/src/oci/mysql/replicas_client_composite_operations.py index 4859e9e62..70bbf9f37 100644 --- a/src/oci/mysql/replicas_client_composite_operations.py +++ b/src/oci/mysql/replicas_client_composite_operations.py @@ -46,8 +46,9 @@ def create_replica_and_wait_for_state(self, create_replica_details, wait_for_sta operation_result = self.client.create_replica(create_replica_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: @@ -94,8 +95,9 @@ def delete_replica_and_wait_for_state(self, replica_id, wait_for_states=[], oper 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: @@ -137,8 +139,9 @@ def update_replica_and_wait_for_state(self, replica_id, update_replica_details, operation_result = self.client.update_replica(replica_id, update_replica_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: 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 aa060fbdb..bca57d26c 100644 --- a/src/oci/network_firewall/network_firewall_client_composite_operations.py +++ b/src/oci/network_firewall/network_firewall_client_composite_operations.py @@ -49,8 +49,9 @@ def apply_network_firewall_policy_and_wait_for_state(self, network_firewall_poli operation_result = self.client.apply_network_firewall_policy(network_firewall_policy_id, apply_network_firewall_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: @@ -90,8 +91,9 @@ def bulk_upload_address_lists_and_wait_for_state(self, network_firewall_policy_i operation_result = self.client.bulk_upload_address_lists(network_firewall_policy_id, bulk_upload_address_lists_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: @@ -131,8 +133,9 @@ def bulk_upload_application_groups_and_wait_for_state(self, network_firewall_pol operation_result = self.client.bulk_upload_application_groups(network_firewall_policy_id, bulk_upload_application_groups_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: @@ -172,8 +175,9 @@ def bulk_upload_applications_and_wait_for_state(self, network_firewall_policy_id operation_result = self.client.bulk_upload_applications(network_firewall_policy_id, bulk_upload_applications_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: @@ -213,8 +217,9 @@ def bulk_upload_decryption_profiles_and_wait_for_state(self, network_firewall_po operation_result = self.client.bulk_upload_decryption_profiles(network_firewall_policy_id, bulk_upload_decryption_profiles_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: @@ -254,8 +259,9 @@ def bulk_upload_decryption_rules_and_wait_for_state(self, network_firewall_polic operation_result = self.client.bulk_upload_decryption_rules(network_firewall_policy_id, bulk_upload_decryption_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: @@ -295,8 +301,9 @@ def bulk_upload_mapped_secrets_and_wait_for_state(self, network_firewall_policy_ operation_result = self.client.bulk_upload_mapped_secrets(network_firewall_policy_id, bulk_upload_mapped_secrets_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: @@ -336,8 +343,9 @@ def bulk_upload_security_rules_and_wait_for_state(self, network_firewall_policy_ operation_result = self.client.bulk_upload_security_rules(network_firewall_policy_id, bulk_upload_security_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: @@ -377,8 +385,9 @@ def bulk_upload_service_lists_and_wait_for_state(self, network_firewall_policy_i operation_result = self.client.bulk_upload_service_lists(network_firewall_policy_id, bulk_upload_service_lists_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: @@ -418,8 +427,9 @@ def bulk_upload_services_and_wait_for_state(self, network_firewall_policy_id, bu operation_result = self.client.bulk_upload_services(network_firewall_policy_id, bulk_upload_services_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: @@ -459,8 +469,9 @@ def bulk_upload_url_lists_and_wait_for_state(self, network_firewall_policy_id, b operation_result = self.client.bulk_upload_url_lists(network_firewall_policy_id, bulk_upload_url_lists_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: @@ -502,8 +513,9 @@ def change_network_firewall_compartment_and_wait_for_state(self, network_firewal operation_result = self.client.change_network_firewall_compartment(network_firewall_id, change_network_firewall_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: @@ -543,8 +555,9 @@ def clone_network_firewall_policy_and_wait_for_state(self, network_firewall_poli operation_result = self.client.clone_network_firewall_policy(network_firewall_policy_id, clone_network_firewall_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: @@ -581,8 +594,9 @@ def create_network_firewall_and_wait_for_state(self, create_network_firewall_det operation_result = self.client.create_network_firewall(create_network_firewall_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: @@ -619,8 +633,9 @@ def create_network_firewall_policy_and_wait_for_state(self, create_network_firew operation_result = self.client.create_network_firewall_policy(create_network_firewall_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: @@ -667,8 +682,9 @@ def delete_network_firewall_and_wait_for_state(self, network_firewall_id, wait_f 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: @@ -713,8 +729,9 @@ def delete_network_firewall_policy_and_wait_for_state(self, network_firewall_pol 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: @@ -751,8 +768,9 @@ def migrate_network_firewall_policy_and_wait_for_state(self, network_firewall_po operation_result = self.client.migrate_network_firewall_policy(network_firewall_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: @@ -794,8 +812,9 @@ def update_network_firewall_and_wait_for_state(self, network_firewall_id, update operation_result = self.client.update_network_firewall(network_firewall_id, update_network_firewall_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: @@ -835,8 +854,9 @@ def update_network_firewall_policy_and_wait_for_state(self, network_firewall_pol operation_result = self.client.update_network_firewall_policy(network_firewall_policy_id, update_network_firewall_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: diff --git a/src/oci/network_load_balancer/network_load_balancer_client_composite_operations.py b/src/oci/network_load_balancer/network_load_balancer_client_composite_operations.py index 086cc94ab..99db4f183 100644 --- a/src/oci/network_load_balancer/network_load_balancer_client_composite_operations.py +++ b/src/oci/network_load_balancer/network_load_balancer_client_composite_operations.py @@ -51,8 +51,9 @@ def change_network_load_balancer_compartment_and_wait_for_state(self, network_lo operation_result = self.client.change_network_load_balancer_compartment(network_load_balancer_id, change_network_load_balancer_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: @@ -99,8 +100,9 @@ def create_backend_and_wait_for_state(self, network_load_balancer_id, create_bac operation_result = self.client.create_backend(network_load_balancer_id, create_backend_details, backend_set_name, **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: @@ -142,8 +144,9 @@ def create_backend_set_and_wait_for_state(self, network_load_balancer_id, create operation_result = self.client.create_backend_set(network_load_balancer_id, create_backend_set_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: @@ -185,8 +188,9 @@ def create_listener_and_wait_for_state(self, network_load_balancer_id, create_li operation_result = self.client.create_listener(network_load_balancer_id, create_listener_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: @@ -223,8 +227,9 @@ def create_network_load_balancer_and_wait_for_state(self, create_network_load_ba operation_result = self.client.create_network_load_balancer(create_network_load_balancer_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: @@ -284,8 +289,9 @@ def delete_backend_and_wait_for_state(self, network_load_balancer_id, backend_se 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: @@ -337,8 +343,9 @@ def delete_backend_set_and_wait_for_state(self, network_load_balancer_id, backen 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: @@ -390,8 +397,9 @@ def delete_listener_and_wait_for_state(self, network_load_balancer_id, listener_ 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: @@ -438,8 +446,9 @@ def delete_network_load_balancer_and_wait_for_state(self, network_load_balancer_ 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: @@ -494,8 +503,9 @@ def update_backend_and_wait_for_state(self, network_load_balancer_id, update_bac operation_result = self.client.update_backend(network_load_balancer_id, update_backend_details, backend_set_name, backend_name, **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: @@ -542,8 +552,9 @@ def update_backend_set_and_wait_for_state(self, network_load_balancer_id, update operation_result = self.client.update_backend_set(network_load_balancer_id, update_backend_set_details, backend_set_name, **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: @@ -590,8 +601,9 @@ def update_health_checker_and_wait_for_state(self, network_load_balancer_id, upd operation_result = self.client.update_health_checker(network_load_balancer_id, update_health_checker_details, backend_set_name, **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: @@ -638,8 +650,9 @@ def update_listener_and_wait_for_state(self, network_load_balancer_id, update_li operation_result = self.client.update_listener(network_load_balancer_id, update_listener_details, listener_name, **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: @@ -681,8 +694,9 @@ def update_network_load_balancer_and_wait_for_state(self, network_load_balancer_ operation_result = self.client.update_network_load_balancer(network_load_balancer_id, update_network_load_balancer_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: @@ -724,8 +738,9 @@ def update_network_security_groups_and_wait_for_state(self, network_load_balance operation_result = self.client.update_network_security_groups(network_load_balancer_id, update_network_security_groups_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: diff --git a/src/oci/nosql/nosql_client_composite_operations.py b/src/oci/nosql/nosql_client_composite_operations.py index d338e3df1..f21f57bd8 100644 --- a/src/oci/nosql/nosql_client_composite_operations.py +++ b/src/oci/nosql/nosql_client_composite_operations.py @@ -49,8 +49,9 @@ def change_table_compartment_and_wait_for_state(self, table_name_or_id, change_t operation_result = self.client.change_table_compartment(table_name_or_id, change_table_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: @@ -90,8 +91,9 @@ def create_index_and_wait_for_state(self, table_name_or_id, create_index_details operation_result = self.client.create_index(table_name_or_id, create_index_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: @@ -131,8 +133,9 @@ def create_replica_and_wait_for_state(self, table_name_or_id, create_replica_det operation_result = self.client.create_replica(table_name_or_id, create_replica_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: @@ -169,8 +172,9 @@ def create_table_and_wait_for_state(self, create_table_details, wait_for_states= operation_result = self.client.create_table(create_table_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: @@ -218,8 +222,9 @@ def delete_index_and_wait_for_state(self, table_name_or_id, index_name, wait_for 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: @@ -267,8 +272,9 @@ def delete_replica_and_wait_for_state(self, table_name_or_id, region, wait_for_s 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: @@ -313,8 +319,9 @@ def delete_table_and_wait_for_state(self, table_name_or_id, wait_for_states=[], 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: @@ -359,8 +366,9 @@ def delete_work_request_and_wait_for_state(self, work_request_id, wait_for_state 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: @@ -400,8 +408,9 @@ def update_table_and_wait_for_state(self, table_name_or_id, update_table_details operation_result = self.client.update_table(table_name_or_id, update_table_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: diff --git a/src/oci/object_storage/object_storage_client_composite_operations.py b/src/oci/object_storage/object_storage_client_composite_operations.py index 7bbd1a465..c28fcab65 100644 --- a/src/oci/object_storage/object_storage_client_composite_operations.py +++ b/src/oci/object_storage/object_storage_client_composite_operations.py @@ -53,8 +53,9 @@ def copy_object_and_wait_for_state(self, namespace_name, bucket_name, copy_objec operation_result = self.client.copy_object(namespace_name, bucket_name, copy_object_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: @@ -95,8 +96,9 @@ def reencrypt_bucket_and_wait_for_state(self, namespace_name, bucket_name, wait_ operation_result = self.client.reencrypt_bucket(namespace_name, bucket_name, **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: diff --git a/src/oci/oce/oce_instance_client_composite_operations.py b/src/oci/oce/oce_instance_client_composite_operations.py index a28deb44a..28c95efbb 100644 --- a/src/oci/oce/oce_instance_client_composite_operations.py +++ b/src/oci/oce/oce_instance_client_composite_operations.py @@ -49,8 +49,9 @@ def change_oce_instance_compartment_and_wait_for_state(self, oce_instance_id, ch operation_result = self.client.change_oce_instance_compartment(oce_instance_id, change_oce_instance_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: @@ -87,8 +88,9 @@ def create_oce_instance_and_wait_for_state(self, create_oce_instance_details, wa operation_result = self.client.create_oce_instance(create_oce_instance_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: @@ -133,8 +135,9 @@ def delete_oce_instance_and_wait_for_state(self, oce_instance_id, wait_for_state 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: @@ -174,8 +177,9 @@ def update_oce_instance_and_wait_for_state(self, oce_instance_id, update_oce_ins operation_result = self.client.update_oce_instance(oce_instance_id, update_oce_instance_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: diff --git a/src/oci/ocvp/cluster_client_composite_operations.py b/src/oci/ocvp/cluster_client_composite_operations.py index 666dd04de..30fa5b682 100644 --- a/src/oci/ocvp/cluster_client_composite_operations.py +++ b/src/oci/ocvp/cluster_client_composite_operations.py @@ -46,8 +46,9 @@ def create_cluster_and_wait_for_state(self, create_cluster_details, wait_for_sta operation_result = self.client.create_cluster(create_cluster_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: @@ -94,8 +95,9 @@ def delete_cluster_and_wait_for_state(self, cluster_id, wait_for_states=[], oper 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: @@ -137,7 +139,6 @@ def update_cluster_and_wait_for_state(self, cluster_id, update_cluster_details, operation_result = self.client.update_cluster(cluster_id, update_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] cluster_id = operation_result.data.id diff --git a/src/oci/ocvp/esxi_host_client_composite_operations.py b/src/oci/ocvp/esxi_host_client_composite_operations.py index 2cd16c751..8c67e0195 100644 --- a/src/oci/ocvp/esxi_host_client_composite_operations.py +++ b/src/oci/ocvp/esxi_host_client_composite_operations.py @@ -46,8 +46,9 @@ def create_esxi_host_and_wait_for_state(self, create_esxi_host_details, wait_for operation_result = self.client.create_esxi_host(create_esxi_host_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: @@ -94,8 +95,9 @@ def delete_esxi_host_and_wait_for_state(self, esxi_host_id, wait_for_states=[], 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: @@ -134,8 +136,9 @@ def inplace_upgrade_and_wait_for_state(self, esxi_host_id, wait_for_states=[], o operation_result = self.client.inplace_upgrade(esxi_host_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: @@ -177,8 +180,9 @@ def replace_host_and_wait_for_state(self, esxi_host_id, replace_host_details, wa operation_result = self.client.replace_host(esxi_host_id, replace_host_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: @@ -222,8 +226,9 @@ def swap_billing_and_wait_for_state(self, esxi_host_id, swap_billing_host_id, wa operation_result = self.client.swap_billing(esxi_host_id, swap_billing_host_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: @@ -265,7 +270,6 @@ def update_esxi_host_and_wait_for_state(self, esxi_host_id, update_esxi_host_det operation_result = self.client.update_esxi_host(esxi_host_id, update_esxi_host_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] esxi_host_id = operation_result.data.id diff --git a/src/oci/ocvp/sddc_client_composite_operations.py b/src/oci/ocvp/sddc_client_composite_operations.py index 9252e1445..b5bfbc2d5 100644 --- a/src/oci/ocvp/sddc_client_composite_operations.py +++ b/src/oci/ocvp/sddc_client_composite_operations.py @@ -48,8 +48,9 @@ def cancel_downgrade_hcx_and_wait_for_state(self, sddc_id, wait_for_states=[], o operation_result = self.client.cancel_downgrade_hcx(sddc_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: @@ -86,8 +87,9 @@ def create_sddc_and_wait_for_state(self, create_sddc_details, wait_for_states=[] operation_result = self.client.create_sddc(create_sddc_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: @@ -134,8 +136,9 @@ def delete_sddc_and_wait_for_state(self, sddc_id, wait_for_states=[], operation_ 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: @@ -177,8 +180,9 @@ def downgrade_hcx_and_wait_for_state(self, downgrade_hcx_details, sddc_id, wait_ operation_result = self.client.downgrade_hcx(downgrade_hcx_details, sddc_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: @@ -217,8 +221,9 @@ def refresh_hcx_license_status_and_wait_for_state(self, sddc_id, wait_for_states operation_result = self.client.refresh_hcx_license_status(sddc_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: @@ -260,7 +265,6 @@ def update_sddc_and_wait_for_state(self, sddc_id, update_sddc_details, wait_for_ operation_result = self.client.update_sddc(sddc_id, update_sddc_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] sddc_id = operation_result.data.id @@ -305,8 +309,9 @@ def upgrade_hcx_and_wait_for_state(self, sddc_id, wait_for_states=[], operation_ operation_result = self.client.upgrade_hcx(sddc_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: diff --git a/src/oci/oda/management_client_composite_operations.py b/src/oci/oda/management_client_composite_operations.py index 81f73f29a..d366a3480 100644 --- a/src/oci/oda/management_client_composite_operations.py +++ b/src/oci/oda/management_client_composite_operations.py @@ -51,8 +51,9 @@ def change_oda_private_endpoint_compartment_and_wait_for_state(self, oda_private operation_result = self.client.change_oda_private_endpoint_compartment(oda_private_endpoint_id, change_oda_private_endpoint_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: @@ -92,7 +93,6 @@ def create_authentication_provider_and_wait_for_state(self, oda_instance_id, cre operation_result = self.client.create_authentication_provider(oda_instance_id, create_authentication_provider_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] authentication_provider_id = operation_result.data.id @@ -138,8 +138,9 @@ def create_digital_assistant_and_wait_for_state(self, oda_instance_id, create_di operation_result = self.client.create_digital_assistant(oda_instance_id, create_digital_assistant_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: @@ -176,8 +177,9 @@ def create_oda_private_endpoint_and_wait_for_state(self, create_oda_private_endp operation_result = self.client.create_oda_private_endpoint(create_oda_private_endpoint_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: @@ -214,8 +216,9 @@ def create_oda_private_endpoint_attachment_and_wait_for_state(self, create_oda_p operation_result = self.client.create_oda_private_endpoint_attachment(create_oda_private_endpoint_attachment_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: @@ -257,8 +260,9 @@ def create_oda_private_endpoint_scan_proxy_and_wait_for_state(self, create_oda_p operation_result = self.client.create_oda_private_endpoint_scan_proxy(create_oda_private_endpoint_scan_proxy_details, oda_private_endpoint_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: @@ -298,8 +302,9 @@ def create_skill_and_wait_for_state(self, oda_instance_id, create_skill_details, operation_result = self.client.create_skill(oda_instance_id, create_skill_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: @@ -342,7 +347,6 @@ def create_skill_parameter_and_wait_for_state(self, oda_instance_id, skill_id, c operation_result = self.client.create_skill_parameter(oda_instance_id, skill_id, create_skill_parameter_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] oda_instance_id = operation_result.data.id @@ -388,7 +392,6 @@ def create_translator_and_wait_for_state(self, oda_instance_id, create_translato operation_result = self.client.create_translator(oda_instance_id, create_translator_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] translator_id = operation_result.data.id @@ -441,8 +444,9 @@ def delete_oda_private_endpoint_and_wait_for_state(self, oda_private_endpoint_id 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: @@ -489,8 +493,9 @@ def delete_oda_private_endpoint_attachment_and_wait_for_state(self, oda_private_ 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: @@ -540,8 +545,9 @@ def delete_oda_private_endpoint_scan_proxy_and_wait_for_state(self, oda_private_ 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: @@ -584,8 +590,9 @@ def export_digital_assistant_and_wait_for_state(self, oda_instance_id, digital_a operation_result = self.client.export_digital_assistant(oda_instance_id, digital_assistant_id, export_digital_assistant_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: @@ -628,8 +635,9 @@ def export_skill_and_wait_for_state(self, oda_instance_id, skill_id, export_skil operation_result = self.client.export_skill(oda_instance_id, skill_id, export_skill_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: @@ -669,8 +677,9 @@ def import_bot_and_wait_for_state(self, oda_instance_id, import_bot_details, wai operation_result = self.client.import_bot(oda_instance_id, import_bot_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: @@ -710,7 +719,6 @@ def publish_digital_assistant_and_wait_for_state(self, oda_instance_id, digital_ operation_result = self.client.publish_digital_assistant(oda_instance_id, digital_assistant_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] digital_assistant_id = operation_result.data.id @@ -756,7 +764,6 @@ def publish_skill_and_wait_for_state(self, oda_instance_id, skill_id, wait_for_s operation_result = self.client.publish_skill(oda_instance_id, skill_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] skill_id = operation_result.data.id @@ -802,7 +809,6 @@ def start_channel_and_wait_for_state(self, oda_instance_id, channel_id, wait_for operation_result = self.client.start_channel(oda_instance_id, channel_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] channel_id = operation_result.data.id @@ -848,7 +854,6 @@ def stop_channel_and_wait_for_state(self, oda_instance_id, channel_id, wait_for_ operation_result = self.client.stop_channel(oda_instance_id, channel_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] channel_id = operation_result.data.id @@ -897,7 +902,6 @@ def update_authentication_provider_and_wait_for_state(self, oda_instance_id, aut operation_result = self.client.update_authentication_provider(oda_instance_id, authentication_provider_id, update_authentication_provider_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] authentication_provider_id = operation_result.data.id @@ -946,7 +950,6 @@ def update_channel_and_wait_for_state(self, oda_instance_id, channel_id, update_ operation_result = self.client.update_channel(oda_instance_id, channel_id, update_channel_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] channel_id = operation_result.data.id @@ -995,7 +998,6 @@ def update_digital_assistant_and_wait_for_state(self, oda_instance_id, digital_a operation_result = self.client.update_digital_assistant(oda_instance_id, digital_assistant_id, update_digital_assistant_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] digital_assistant_id = operation_result.data.id @@ -1047,7 +1049,6 @@ def update_digital_assistant_parameter_and_wait_for_state(self, oda_instance_id, operation_result = self.client.update_digital_assistant_parameter(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] oda_instance_id = operation_result.data.id @@ -1095,8 +1096,9 @@ def update_oda_private_endpoint_and_wait_for_state(self, oda_private_endpoint_id operation_result = self.client.update_oda_private_endpoint(oda_private_endpoint_id, update_oda_private_endpoint_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: @@ -1139,7 +1141,6 @@ def update_skill_and_wait_for_state(self, oda_instance_id, skill_id, update_skil operation_result = self.client.update_skill(oda_instance_id, skill_id, update_skill_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] skill_id = operation_result.data.id @@ -1191,7 +1192,6 @@ def update_skill_parameter_and_wait_for_state(self, oda_instance_id, skill_id, p operation_result = self.client.update_skill_parameter(oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] oda_instance_id = operation_result.data.id @@ -1240,7 +1240,6 @@ def update_translator_and_wait_for_state(self, oda_instance_id, translator_id, u operation_result = self.client.update_translator(oda_instance_id, translator_id, update_translator_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] translator_id = operation_result.data.id diff --git a/src/oci/oda/oda_client_composite_operations.py b/src/oci/oda/oda_client_composite_operations.py index d55f41d7d..5a9e35c46 100644 --- a/src/oci/oda/oda_client_composite_operations.py +++ b/src/oci/oda/oda_client_composite_operations.py @@ -49,8 +49,9 @@ def change_oda_instance_compartment_and_wait_for_state(self, oda_instance_id, ch operation_result = self.client.change_oda_instance_compartment(oda_instance_id, change_oda_instance_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: @@ -87,8 +88,9 @@ def create_oda_instance_and_wait_for_state(self, create_oda_instance_details, wa operation_result = self.client.create_oda_instance(create_oda_instance_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: @@ -128,8 +130,9 @@ def create_oda_instance_attachment_and_wait_for_state(self, oda_instance_id, cre operation_result = self.client.create_oda_instance_attachment(oda_instance_id, create_oda_instance_attachment_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: @@ -174,8 +177,9 @@ def delete_oda_instance_and_wait_for_state(self, oda_instance_id, wait_for_state 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: @@ -223,8 +227,9 @@ def delete_oda_instance_attachment_and_wait_for_state(self, oda_instance_id, att 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: @@ -261,8 +266,9 @@ def start_oda_instance_and_wait_for_state(self, oda_instance_id, wait_for_states operation_result = self.client.start_oda_instance(oda_instance_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: @@ -299,8 +305,9 @@ def stop_oda_instance_and_wait_for_state(self, oda_instance_id, wait_for_states= operation_result = self.client.stop_oda_instance(oda_instance_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: @@ -340,7 +347,6 @@ def update_oda_instance_and_wait_for_state(self, oda_instance_id, update_oda_ins operation_result = self.client.update_oda_instance(oda_instance_id, update_oda_instance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] oda_instance_id = operation_result.data.id @@ -389,8 +395,9 @@ def update_oda_instance_attachment_and_wait_for_state(self, oda_instance_id, att operation_result = self.client.update_oda_instance_attachment(oda_instance_id, attachment_id, update_oda_instance_attachment_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: diff --git a/src/oci/oda/odapackage_client_composite_operations.py b/src/oci/oda/odapackage_client_composite_operations.py index e9a5027f1..ee4a459cb 100644 --- a/src/oci/oda/odapackage_client_composite_operations.py +++ b/src/oci/oda/odapackage_client_composite_operations.py @@ -49,8 +49,9 @@ def create_imported_package_and_wait_for_state(self, create_imported_package_det operation_result = self.client.create_imported_package(create_imported_package_details, oda_instance_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: @@ -98,8 +99,9 @@ def delete_imported_package_and_wait_for_state(self, oda_instance_id, package_id 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: @@ -142,8 +144,9 @@ def update_imported_package_and_wait_for_state(self, update_imported_package_det operation_result = self.client.update_imported_package(update_imported_package_details, oda_instance_id, package_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: diff --git a/src/oci/ons/notification_data_plane_client_composite_operations.py b/src/oci/ons/notification_data_plane_client_composite_operations.py index e1a636c32..0d2a7229e 100644 --- a/src/oci/ons/notification_data_plane_client_composite_operations.py +++ b/src/oci/ons/notification_data_plane_client_composite_operations.py @@ -46,7 +46,6 @@ def create_subscription_and_wait_for_state(self, create_subscription_details, wa operation_result = self.client.create_subscription(create_subscription_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] subscription_id = operation_result.data.id @@ -100,7 +99,6 @@ def delete_subscription_and_wait_for_state(self, subscription_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: diff --git a/src/oci/opa/opa_instance_client_composite_operations.py b/src/oci/opa/opa_instance_client_composite_operations.py index 4d38c2821..95d3e67af 100644 --- a/src/oci/opa/opa_instance_client_composite_operations.py +++ b/src/oci/opa/opa_instance_client_composite_operations.py @@ -49,8 +49,9 @@ def change_opa_instance_compartment_and_wait_for_state(self, opa_instance_id, ch operation_result = self.client.change_opa_instance_compartment(opa_instance_id, change_opa_instance_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: @@ -87,8 +88,9 @@ def create_opa_instance_and_wait_for_state(self, create_opa_instance_details, wa operation_result = self.client.create_opa_instance(create_opa_instance_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: @@ -133,8 +135,9 @@ def delete_opa_instance_and_wait_for_state(self, opa_instance_id, wait_for_state 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: @@ -174,8 +177,9 @@ def update_opa_instance_and_wait_for_state(self, opa_instance_id, update_opa_ins operation_result = self.client.update_opa_instance(opa_instance_id, update_opa_instance_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: diff --git a/src/oci/opensearch/opensearch_cluster_backup_client_composite_operations.py b/src/oci/opensearch/opensearch_cluster_backup_client_composite_operations.py index 21c118cda..b7aaba627 100644 --- a/src/oci/opensearch/opensearch_cluster_backup_client_composite_operations.py +++ b/src/oci/opensearch/opensearch_cluster_backup_client_composite_operations.py @@ -54,8 +54,9 @@ def delete_opensearch_cluster_backup_and_wait_for_state(self, opensearch_cluster 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: @@ -95,8 +96,9 @@ def update_opensearch_cluster_backup_and_wait_for_state(self, opensearch_cluster operation_result = self.client.update_opensearch_cluster_backup(opensearch_cluster_backup_id, update_opensearch_cluster_backup_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: diff --git a/src/oci/opensearch/opensearch_cluster_client_composite_operations.py b/src/oci/opensearch/opensearch_cluster_client_composite_operations.py index 794bd3c07..125f94555 100644 --- a/src/oci/opensearch/opensearch_cluster_client_composite_operations.py +++ b/src/oci/opensearch/opensearch_cluster_client_composite_operations.py @@ -49,8 +49,9 @@ def backup_opensearch_cluster_and_wait_for_state(self, opensearch_cluster_id, ba operation_result = self.client.backup_opensearch_cluster(opensearch_cluster_id, backup_opensearch_cluster_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: @@ -87,8 +88,9 @@ def create_opensearch_cluster_and_wait_for_state(self, create_opensearch_cluster operation_result = self.client.create_opensearch_cluster(create_opensearch_cluster_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: @@ -133,8 +135,9 @@ def delete_opensearch_cluster_and_wait_for_state(self, opensearch_cluster_id, wa 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: @@ -174,8 +177,9 @@ def opensearch_cluster_restore_and_wait_for_state(self, opensearch_cluster_id, r operation_result = self.client.opensearch_cluster_restore(opensearch_cluster_id, restore_opensearch_cluster_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: @@ -215,8 +219,9 @@ def resize_opensearch_cluster_horizontal_and_wait_for_state(self, opensearch_clu operation_result = self.client.resize_opensearch_cluster_horizontal(opensearch_cluster_id, resize_opensearch_cluster_horizontal_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: @@ -256,8 +261,9 @@ def resize_opensearch_cluster_vertical_and_wait_for_state(self, opensearch_clust operation_result = self.client.resize_opensearch_cluster_vertical(opensearch_cluster_id, resize_opensearch_cluster_vertical_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: @@ -297,8 +303,9 @@ def update_opensearch_cluster_and_wait_for_state(self, opensearch_cluster_id, up operation_result = self.client.update_opensearch_cluster(opensearch_cluster_id, update_opensearch_cluster_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: diff --git a/src/oci/operator_access_control/access_requests_client_composite_operations.py b/src/oci/operator_access_control/access_requests_client_composite_operations.py index f1659fc94..3b5d0fa3a 100644 --- a/src/oci/operator_access_control/access_requests_client_composite_operations.py +++ b/src/oci/operator_access_control/access_requests_client_composite_operations.py @@ -49,7 +49,6 @@ def interaction_request_and_wait_for_state(self, access_request_id, interaction_ operation_result = self.client.interaction_request(access_request_id, interaction_request_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] access_request_id = operation_result.data.id @@ -95,7 +94,6 @@ def review_access_request_and_wait_for_state(self, access_request_id, review_acc operation_result = self.client.review_access_request(access_request_id, review_access_request_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] access_request_id = operation_result.data.id diff --git a/src/oci/operator_access_control/operator_control_assignment_client_composite_operations.py b/src/oci/operator_access_control/operator_control_assignment_client_composite_operations.py index 5bce46452..234b7b477 100644 --- a/src/oci/operator_access_control/operator_control_assignment_client_composite_operations.py +++ b/src/oci/operator_access_control/operator_control_assignment_client_composite_operations.py @@ -46,7 +46,6 @@ def create_operator_control_assignment_and_wait_for_state(self, create_operator_ operation_result = self.client.create_operator_control_assignment(create_operator_control_assignment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] operator_control_assignment_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_operator_control_assignment_and_wait_for_state(self, operator_control if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_operator_control_assignment_and_wait_for_state(self, operator_control operation_result = self.client.update_operator_control_assignment(operator_control_assignment_id, update_operator_control_assignment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] operator_control_assignment_id = operation_result.data.id diff --git a/src/oci/operator_access_control/operator_control_client_composite_operations.py b/src/oci/operator_access_control/operator_control_client_composite_operations.py index b9eba915c..2ecea6b51 100644 --- a/src/oci/operator_access_control/operator_control_client_composite_operations.py +++ b/src/oci/operator_access_control/operator_control_client_composite_operations.py @@ -46,7 +46,6 @@ def create_operator_control_and_wait_for_state(self, create_operator_control_det operation_result = self.client.create_operator_control(create_operator_control_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] operator_control_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_operator_control_and_wait_for_state(self, operator_control_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_operator_control_and_wait_for_state(self, operator_control_id, update operation_result = self.client.update_operator_control(operator_control_id, update_operator_control_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] operator_control_id = operation_result.data.id diff --git a/src/oci/opsi/operations_insights_client_composite_operations.py b/src/oci/opsi/operations_insights_client_composite_operations.py index b533060af..7d05b2086 100644 --- a/src/oci/opsi/operations_insights_client_composite_operations.py +++ b/src/oci/opsi/operations_insights_client_composite_operations.py @@ -49,8 +49,9 @@ def add_exadata_insight_members_and_wait_for_state(self, add_exadata_insight_mem operation_result = self.client.add_exadata_insight_members(add_exadata_insight_members_details, exadata_insight_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: @@ -90,8 +91,9 @@ def change_autonomous_database_insight_advanced_features_and_wait_for_state(self operation_result = self.client.change_autonomous_database_insight_advanced_features(change_autonomous_database_insight_advanced_features_details, database_insight_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: @@ -131,8 +133,9 @@ def change_awr_hub_source_compartment_and_wait_for_state(self, awr_hub_source_id operation_result = self.client.change_awr_hub_source_compartment(awr_hub_source_id, change_awr_hub_source_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: @@ -172,8 +175,9 @@ def change_database_insight_compartment_and_wait_for_state(self, database_insigh operation_result = self.client.change_database_insight_compartment(database_insight_id, change_database_insight_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: @@ -213,8 +217,9 @@ def change_enterprise_manager_bridge_compartment_and_wait_for_state(self, enterp operation_result = self.client.change_enterprise_manager_bridge_compartment(enterprise_manager_bridge_id, change_enterprise_manager_bridge_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: @@ -254,8 +259,9 @@ def change_exadata_insight_compartment_and_wait_for_state(self, exadata_insight_ operation_result = self.client.change_exadata_insight_compartment(exadata_insight_id, change_exadata_insight_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: @@ -295,8 +301,9 @@ def change_host_insight_compartment_and_wait_for_state(self, host_insight_id, ch operation_result = self.client.change_host_insight_compartment(host_insight_id, change_host_insight_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: @@ -336,8 +343,9 @@ def change_news_report_compartment_and_wait_for_state(self, news_report_id, chan operation_result = self.client.change_news_report_compartment(news_report_id, change_news_report_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: @@ -379,8 +387,9 @@ def change_operations_insights_private_endpoint_compartment_and_wait_for_state(s operation_result = self.client.change_operations_insights_private_endpoint_compartment(operations_insights_private_endpoint_id, change_operations_insights_private_endpoint_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: @@ -420,8 +429,9 @@ def change_operations_insights_warehouse_compartment_and_wait_for_state(self, op operation_result = self.client.change_operations_insights_warehouse_compartment(operations_insights_warehouse_id, change_operations_insights_warehouse_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: @@ -463,8 +473,9 @@ def change_opsi_configuration_compartment_and_wait_for_state(self, opsi_configur operation_result = self.client.change_opsi_configuration_compartment(opsi_configuration_id, change_opsi_configuration_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: @@ -504,8 +515,9 @@ def change_pe_comanaged_database_insight_and_wait_for_state(self, database_insig operation_result = self.client.change_pe_comanaged_database_insight(database_insight_id, change_pe_comanaged_database_insight_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: @@ -542,8 +554,9 @@ def create_awr_hub_and_wait_for_state(self, create_awr_hub_details, wait_for_sta operation_result = self.client.create_awr_hub(create_awr_hub_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: @@ -580,8 +593,9 @@ def create_awr_hub_source_and_wait_for_state(self, create_awr_hub_source_details operation_result = self.client.create_awr_hub_source(create_awr_hub_source_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: @@ -618,8 +632,9 @@ def create_database_insight_and_wait_for_state(self, create_database_insight_det operation_result = self.client.create_database_insight(create_database_insight_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: @@ -656,8 +671,9 @@ def create_enterprise_manager_bridge_and_wait_for_state(self, create_enterprise_ operation_result = self.client.create_enterprise_manager_bridge(create_enterprise_manager_bridge_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: @@ -694,8 +710,9 @@ def create_exadata_insight_and_wait_for_state(self, create_exadata_insight_detai operation_result = self.client.create_exadata_insight(create_exadata_insight_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: @@ -732,8 +749,9 @@ def create_host_insight_and_wait_for_state(self, create_host_insight_details, wa operation_result = self.client.create_host_insight(create_host_insight_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: @@ -770,8 +788,9 @@ def create_news_report_and_wait_for_state(self, create_news_report_details, wait operation_result = self.client.create_news_report(create_news_report_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: @@ -808,8 +827,9 @@ def create_operations_insights_private_endpoint_and_wait_for_state(self, create_ operation_result = self.client.create_operations_insights_private_endpoint(create_operations_insights_private_endpoint_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: @@ -846,8 +866,9 @@ def create_operations_insights_warehouse_and_wait_for_state(self, create_operati operation_result = self.client.create_operations_insights_warehouse(create_operations_insights_warehouse_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: @@ -884,8 +905,9 @@ def create_operations_insights_warehouse_user_and_wait_for_state(self, create_op operation_result = self.client.create_operations_insights_warehouse_user(create_operations_insights_warehouse_user_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: @@ -922,8 +944,9 @@ def create_opsi_configuration_and_wait_for_state(self, create_opsi_configuration operation_result = self.client.create_opsi_configuration(create_opsi_configuration_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: @@ -968,8 +991,9 @@ def delete_awr_hub_and_wait_for_state(self, awr_hub_id, wait_for_states=[], oper 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: @@ -1014,8 +1038,9 @@ def delete_awr_hub_source_and_wait_for_state(self, awr_hub_source_id, wait_for_s 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: @@ -1060,8 +1085,9 @@ def delete_database_insight_and_wait_for_state(self, database_insight_id, wait_f 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: @@ -1106,8 +1132,9 @@ def delete_enterprise_manager_bridge_and_wait_for_state(self, enterprise_manager 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: @@ -1152,8 +1179,9 @@ def delete_exadata_insight_and_wait_for_state(self, exadata_insight_id, wait_for 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: @@ -1198,8 +1226,9 @@ def delete_host_insight_and_wait_for_state(self, host_insight_id, wait_for_state 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: @@ -1244,8 +1273,9 @@ def delete_news_report_and_wait_for_state(self, news_report_id, wait_for_states= 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: @@ -1292,8 +1322,9 @@ def delete_operations_insights_private_endpoint_and_wait_for_state(self, operati 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: @@ -1338,8 +1369,9 @@ def delete_operations_insights_warehouse_and_wait_for_state(self, operations_ins 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: @@ -1384,8 +1416,9 @@ def delete_operations_insights_warehouse_user_and_wait_for_state(self, operation 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: @@ -1432,8 +1465,9 @@ def delete_opsi_configuration_and_wait_for_state(self, opsi_configuration_id, wa 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: @@ -1470,8 +1504,9 @@ def disable_autonomous_database_insight_advanced_features_and_wait_for_state(sel operation_result = self.client.disable_autonomous_database_insight_advanced_features(database_insight_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: @@ -1508,8 +1543,9 @@ def disable_awr_hub_source_and_wait_for_state(self, awr_hub_source_id, wait_for_ operation_result = self.client.disable_awr_hub_source(awr_hub_source_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: @@ -1546,8 +1582,9 @@ def disable_database_insight_and_wait_for_state(self, database_insight_id, wait_ operation_result = self.client.disable_database_insight(database_insight_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: @@ -1584,8 +1621,9 @@ def disable_exadata_insight_and_wait_for_state(self, exadata_insight_id, wait_fo operation_result = self.client.disable_exadata_insight(exadata_insight_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: @@ -1622,8 +1660,9 @@ def disable_host_insight_and_wait_for_state(self, host_insight_id, wait_for_stat operation_result = self.client.disable_host_insight(host_insight_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: @@ -1663,8 +1702,9 @@ def enable_autonomous_database_insight_advanced_features_and_wait_for_state(self operation_result = self.client.enable_autonomous_database_insight_advanced_features(enable_autonomous_database_insight_advanced_features_details, database_insight_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: @@ -1701,8 +1741,9 @@ def enable_awr_hub_source_and_wait_for_state(self, awr_hub_source_id, wait_for_s operation_result = self.client.enable_awr_hub_source(awr_hub_source_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: @@ -1742,8 +1783,9 @@ def enable_database_insight_and_wait_for_state(self, enable_database_insight_det operation_result = self.client.enable_database_insight(enable_database_insight_details, database_insight_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: @@ -1783,8 +1825,9 @@ def enable_exadata_insight_and_wait_for_state(self, enable_exadata_insight_detai operation_result = self.client.enable_exadata_insight(enable_exadata_insight_details, exadata_insight_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: @@ -1824,8 +1867,9 @@ def enable_host_insight_and_wait_for_state(self, enable_host_insight_details, ho operation_result = self.client.enable_host_insight(enable_host_insight_details, host_insight_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: @@ -1862,8 +1906,9 @@ def rotate_operations_insights_warehouse_wallet_and_wait_for_state(self, operati operation_result = self.client.rotate_operations_insights_warehouse_wallet(operations_insights_warehouse_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: @@ -1903,8 +1948,9 @@ def update_awr_hub_and_wait_for_state(self, awr_hub_id, update_awr_hub_details, operation_result = self.client.update_awr_hub(awr_hub_id, update_awr_hub_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: @@ -1944,8 +1990,9 @@ def update_awr_hub_source_and_wait_for_state(self, update_awr_hub_source_details operation_result = self.client.update_awr_hub_source(update_awr_hub_source_details, awr_hub_source_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: @@ -1985,8 +2032,9 @@ def update_database_insight_and_wait_for_state(self, database_insight_id, update operation_result = self.client.update_database_insight(database_insight_id, update_database_insight_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: @@ -2026,8 +2074,9 @@ def update_enterprise_manager_bridge_and_wait_for_state(self, enterprise_manager operation_result = self.client.update_enterprise_manager_bridge(enterprise_manager_bridge_id, update_enterprise_manager_bridge_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: @@ -2067,8 +2116,9 @@ def update_exadata_insight_and_wait_for_state(self, exadata_insight_id, update_e operation_result = self.client.update_exadata_insight(exadata_insight_id, update_exadata_insight_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: @@ -2108,8 +2158,9 @@ def update_host_insight_and_wait_for_state(self, host_insight_id, update_host_in operation_result = self.client.update_host_insight(host_insight_id, update_host_insight_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: @@ -2149,8 +2200,9 @@ def update_news_report_and_wait_for_state(self, news_report_id, update_news_repo operation_result = self.client.update_news_report(news_report_id, update_news_report_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: @@ -2192,8 +2244,9 @@ def update_operations_insights_private_endpoint_and_wait_for_state(self, operati operation_result = self.client.update_operations_insights_private_endpoint(operations_insights_private_endpoint_id, update_operations_insights_private_endpoint_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: @@ -2233,8 +2286,9 @@ def update_operations_insights_warehouse_and_wait_for_state(self, operations_ins operation_result = self.client.update_operations_insights_warehouse(operations_insights_warehouse_id, update_operations_insights_warehouse_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: @@ -2274,8 +2328,9 @@ def update_operations_insights_warehouse_user_and_wait_for_state(self, operation operation_result = self.client.update_operations_insights_warehouse_user(operations_insights_warehouse_user_id, update_operations_insights_warehouse_user_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: @@ -2317,8 +2372,9 @@ def update_opsi_configuration_and_wait_for_state(self, opsi_configuration_id, up operation_result = self.client.update_opsi_configuration(opsi_configuration_id, update_opsi_configuration_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: diff --git a/src/oci/optimizer/optimizer_client_composite_operations.py b/src/oci/optimizer/optimizer_client_composite_operations.py index 05a9541ab..bebb90f87 100644 --- a/src/oci/optimizer/optimizer_client_composite_operations.py +++ b/src/oci/optimizer/optimizer_client_composite_operations.py @@ -49,8 +49,9 @@ def bulk_apply_recommendations_and_wait_for_state(self, recommendation_id, bulk_ operation_result = self.client.bulk_apply_recommendations(recommendation_id, bulk_apply_recommendations_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: @@ -87,7 +88,6 @@ def create_profile_and_wait_for_state(self, create_profile_details, wait_for_sta operation_result = self.client.create_profile(create_profile_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] profile_id = operation_result.data.id @@ -139,7 +139,6 @@ def delete_profile_and_wait_for_state(self, profile_id, wait_for_states=[], oper if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -193,7 +192,6 @@ def update_enrollment_status_and_wait_for_state(self, enrollment_status_id, upda operation_result = self.client.update_enrollment_status(enrollment_status_id, update_enrollment_status_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] enrollment_status_id = operation_result.data.id @@ -239,7 +237,6 @@ def update_profile_and_wait_for_state(self, profile_id, update_profile_details, operation_result = self.client.update_profile(profile_id, update_profile_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] profile_id = operation_result.data.id @@ -285,7 +282,6 @@ def update_recommendation_and_wait_for_state(self, recommendation_id, update_rec operation_result = self.client.update_recommendation(recommendation_id, update_recommendation_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] recommendation_id = operation_result.data.id @@ -331,7 +327,6 @@ def update_resource_action_and_wait_for_state(self, resource_action_id, update_r operation_result = self.client.update_resource_action(resource_action_id, update_resource_action_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] resource_action_id = operation_result.data.id diff --git a/src/oci/os_management/os_management_client_composite_operations.py b/src/oci/os_management/os_management_client_composite_operations.py index a4e198147..21e8329b7 100644 --- a/src/oci/os_management/os_management_client_composite_operations.py +++ b/src/oci/os_management/os_management_client_composite_operations.py @@ -46,7 +46,6 @@ def create_managed_instance_group_and_wait_for_state(self, create_managed_instan operation_result = self.client.create_managed_instance_group(create_managed_instance_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_instance_group_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_scheduled_job_and_wait_for_state(self, create_scheduled_job_details, operation_result = self.client.create_scheduled_job(create_scheduled_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_job_id = operation_result.data.id @@ -132,7 +130,6 @@ def create_software_source_and_wait_for_state(self, create_software_source_detai operation_result = self.client.create_software_source(create_software_source_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] software_source_id = operation_result.data.id @@ -184,7 +181,6 @@ def delete_managed_instance_group_and_wait_for_state(self, managed_instance_grou if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -244,7 +240,6 @@ def delete_scheduled_job_and_wait_for_state(self, scheduled_job_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -304,7 +299,6 @@ def delete_software_source_and_wait_for_state(self, software_source_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -358,8 +352,9 @@ def disable_module_stream_on_managed_instance_and_wait_for_state(self, managed_i operation_result = self.client.disable_module_stream_on_managed_instance(managed_instance_id, module_name, **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: @@ -399,8 +394,9 @@ def enable_module_stream_on_managed_instance_and_wait_for_state(self, managed_in operation_result = self.client.enable_module_stream_on_managed_instance(managed_instance_id, module_name, **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: @@ -443,8 +439,9 @@ def get_module_stream_and_wait_for_state(self, software_source_id, module_name, operation_result = self.client.get_module_stream(software_source_id, module_name, stream_name, **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: @@ -490,8 +487,9 @@ def get_module_stream_profile_and_wait_for_state(self, software_source_id, modul operation_result = self.client.get_module_stream_profile(software_source_id, module_name, stream_name, profile_name, **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: @@ -528,8 +526,9 @@ def install_all_package_updates_on_managed_instance_and_wait_for_state(self, man operation_result = self.client.install_all_package_updates_on_managed_instance(managed_instance_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: @@ -566,8 +565,9 @@ def install_all_updates_on_managed_instance_group_and_wait_for_state(self, manag operation_result = self.client.install_all_updates_on_managed_instance_group(managed_instance_group_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: @@ -604,8 +604,9 @@ def install_all_windows_updates_on_managed_instance_and_wait_for_state(self, man operation_result = self.client.install_all_windows_updates_on_managed_instance(managed_instance_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: @@ -645,8 +646,9 @@ def install_module_stream_profile_on_managed_instance_and_wait_for_state(self, m operation_result = self.client.install_module_stream_profile_on_managed_instance(managed_instance_id, module_name, **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: @@ -686,8 +688,9 @@ def install_package_on_managed_instance_and_wait_for_state(self, managed_instanc operation_result = self.client.install_package_on_managed_instance(managed_instance_id, software_package_name, **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: @@ -727,8 +730,9 @@ def install_package_update_on_managed_instance_and_wait_for_state(self, managed_ operation_result = self.client.install_package_update_on_managed_instance(managed_instance_id, software_package_name, **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: @@ -770,8 +774,9 @@ def install_windows_update_on_managed_instance_and_wait_for_state(self, managed_ operation_result = self.client.install_windows_update_on_managed_instance(managed_instance_id, windows_update_name, **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: @@ -808,8 +813,9 @@ def list_module_stream_profiles_and_wait_for_state(self, software_source_id, wai operation_result = self.client.list_module_stream_profiles(software_source_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: @@ -846,8 +852,9 @@ def list_module_stream_profiles_on_managed_instance_and_wait_for_state(self, man operation_result = self.client.list_module_stream_profiles_on_managed_instance(managed_instance_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: @@ -884,8 +891,9 @@ def list_module_streams_and_wait_for_state(self, software_source_id, wait_for_st operation_result = self.client.list_module_streams(software_source_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: @@ -922,8 +930,9 @@ def list_module_streams_on_managed_instance_and_wait_for_state(self, managed_ins operation_result = self.client.list_module_streams_on_managed_instance(managed_instance_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: @@ -963,8 +972,9 @@ def manage_module_streams_on_managed_instance_and_wait_for_state(self, managed_i operation_result = self.client.manage_module_streams_on_managed_instance(managed_instance_id, manage_module_streams_on_managed_instance_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: @@ -1004,8 +1014,9 @@ def remove_module_stream_profile_from_managed_instance_and_wait_for_state(self, operation_result = self.client.remove_module_stream_profile_from_managed_instance(managed_instance_id, module_name, **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: @@ -1045,8 +1056,9 @@ def remove_package_from_managed_instance_and_wait_for_state(self, managed_instan operation_result = self.client.remove_package_from_managed_instance(managed_instance_id, software_package_name, **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: @@ -1086,8 +1098,9 @@ def switch_module_stream_on_managed_instance_and_wait_for_state(self, managed_in operation_result = self.client.switch_module_stream_on_managed_instance(managed_instance_id, module_name, **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: @@ -1127,7 +1140,6 @@ def update_managed_instance_group_and_wait_for_state(self, managed_instance_grou operation_result = self.client.update_managed_instance_group(managed_instance_group_id, update_managed_instance_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_instance_group_id = operation_result.data.id @@ -1173,7 +1185,6 @@ def update_scheduled_job_and_wait_for_state(self, scheduled_job_id, update_sched operation_result = self.client.update_scheduled_job(scheduled_job_id, update_scheduled_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_job_id = operation_result.data.id @@ -1219,7 +1230,6 @@ def update_software_source_and_wait_for_state(self, software_source_id, update_s operation_result = self.client.update_software_source(software_source_id, update_software_source_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] software_source_id = operation_result.data.id diff --git a/src/oci/os_management_hub/lifecycle_environment_client_composite_operations.py b/src/oci/os_management_hub/lifecycle_environment_client_composite_operations.py index babad9073..73738f898 100644 --- a/src/oci/os_management_hub/lifecycle_environment_client_composite_operations.py +++ b/src/oci/os_management_hub/lifecycle_environment_client_composite_operations.py @@ -49,8 +49,9 @@ def attach_managed_instances_to_lifecycle_stage_and_wait_for_state(self, lifecyc operation_result = self.client.attach_managed_instances_to_lifecycle_stage(lifecycle_stage_id, attach_managed_instances_to_lifecycle_stage_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: @@ -87,7 +88,6 @@ def create_lifecycle_environment_and_wait_for_state(self, create_lifecycle_envir operation_result = self.client.create_lifecycle_environment(create_lifecycle_environment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] lifecycle_environment_id = operation_result.data.id @@ -139,7 +139,6 @@ def delete_lifecycle_environment_and_wait_for_state(self, lifecycle_environment_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -193,8 +192,9 @@ def detach_managed_instances_from_lifecycle_stage_and_wait_for_state(self, lifec operation_result = self.client.detach_managed_instances_from_lifecycle_stage(lifecycle_stage_id, detach_managed_instances_from_lifecycle_stage_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: @@ -234,8 +234,9 @@ def promote_software_source_to_lifecycle_stage_and_wait_for_state(self, lifecycl operation_result = self.client.promote_software_source_to_lifecycle_stage(lifecycle_stage_id, promote_software_source_to_lifecycle_stage_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: @@ -275,7 +276,6 @@ def update_lifecycle_environment_and_wait_for_state(self, lifecycle_environment_ operation_result = self.client.update_lifecycle_environment(lifecycle_environment_id, update_lifecycle_environment_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] lifecycle_environment_id = operation_result.data.id diff --git a/src/oci/os_management_hub/managed_instance_client_composite_operations.py b/src/oci/os_management_hub/managed_instance_client_composite_operations.py index ebdab0fa1..08f76d2a6 100644 --- a/src/oci/os_management_hub/managed_instance_client_composite_operations.py +++ b/src/oci/os_management_hub/managed_instance_client_composite_operations.py @@ -49,8 +49,9 @@ def attach_software_sources_to_managed_instance_and_wait_for_state(self, managed operation_result = self.client.attach_software_sources_to_managed_instance(managed_instance_id, attach_software_sources_to_managed_instance_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: @@ -90,8 +91,9 @@ def detach_software_sources_from_managed_instance_and_wait_for_state(self, manag operation_result = self.client.detach_software_sources_from_managed_instance(managed_instance_id, detach_software_sources_from_managed_instance_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: @@ -131,8 +133,9 @@ def disable_module_stream_on_managed_instance_and_wait_for_state(self, managed_i operation_result = self.client.disable_module_stream_on_managed_instance(managed_instance_id, disable_module_stream_on_managed_instance_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: @@ -172,8 +175,9 @@ def enable_module_stream_on_managed_instance_and_wait_for_state(self, managed_in operation_result = self.client.enable_module_stream_on_managed_instance(managed_instance_id, enable_module_stream_on_managed_instance_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: @@ -213,8 +217,9 @@ def install_module_stream_profile_on_managed_instance_and_wait_for_state(self, m operation_result = self.client.install_module_stream_profile_on_managed_instance(managed_instance_id, install_module_stream_profile_on_managed_instance_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: @@ -254,8 +259,9 @@ def install_packages_on_managed_instance_and_wait_for_state(self, managed_instan operation_result = self.client.install_packages_on_managed_instance(managed_instance_id, install_packages_on_managed_instance_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: @@ -292,8 +298,9 @@ def list_managed_instance_modules_and_wait_for_state(self, managed_instance_id, operation_result = self.client.list_managed_instance_modules(managed_instance_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: @@ -333,8 +340,9 @@ def manage_module_streams_on_managed_instance_and_wait_for_state(self, managed_i operation_result = self.client.manage_module_streams_on_managed_instance(managed_instance_id, manage_module_streams_on_managed_instance_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: @@ -371,8 +379,9 @@ def refresh_software_on_managed_instance_and_wait_for_state(self, managed_instan operation_result = self.client.refresh_software_on_managed_instance(managed_instance_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: @@ -412,8 +421,9 @@ def remove_module_stream_profile_from_managed_instance_and_wait_for_state(self, operation_result = self.client.remove_module_stream_profile_from_managed_instance(managed_instance_id, remove_module_stream_profile_from_managed_instance_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: @@ -453,8 +463,9 @@ def remove_packages_from_managed_instance_and_wait_for_state(self, managed_insta operation_result = self.client.remove_packages_from_managed_instance(managed_instance_id, remove_packages_from_managed_instance_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: @@ -494,8 +505,9 @@ def switch_module_stream_on_managed_instance_and_wait_for_state(self, managed_in operation_result = self.client.switch_module_stream_on_managed_instance(managed_instance_id, switch_module_stream_on_managed_instance_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: @@ -532,8 +544,9 @@ def update_all_packages_on_managed_instances_in_compartment_and_wait_for_state(s operation_result = self.client.update_all_packages_on_managed_instances_in_compartment(update_all_packages_on_managed_instances_in_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: @@ -573,8 +586,9 @@ def update_packages_on_managed_instance_and_wait_for_state(self, managed_instanc operation_result = self.client.update_packages_on_managed_instance(managed_instance_id, update_packages_on_managed_instance_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: diff --git a/src/oci/os_management_hub/managed_instance_group_client_composite_operations.py b/src/oci/os_management_hub/managed_instance_group_client_composite_operations.py index f63c628fd..b989ef013 100644 --- a/src/oci/os_management_hub/managed_instance_group_client_composite_operations.py +++ b/src/oci/os_management_hub/managed_instance_group_client_composite_operations.py @@ -49,8 +49,9 @@ def attach_managed_instances_to_managed_instance_group_and_wait_for_state(self, operation_result = self.client.attach_managed_instances_to_managed_instance_group(managed_instance_group_id, attach_managed_instances_to_managed_instance_group_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: @@ -87,7 +88,6 @@ def create_managed_instance_group_and_wait_for_state(self, create_managed_instan operation_result = self.client.create_managed_instance_group(create_managed_instance_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_instance_group_id = operation_result.data.id @@ -139,7 +139,6 @@ def delete_managed_instance_group_and_wait_for_state(self, managed_instance_grou if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -193,8 +192,9 @@ def disable_module_stream_on_managed_instance_group_and_wait_for_state(self, man operation_result = self.client.disable_module_stream_on_managed_instance_group(managed_instance_group_id, disable_module_stream_on_managed_instance_group_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: @@ -234,8 +234,9 @@ def enable_module_stream_on_managed_instance_group_and_wait_for_state(self, mana operation_result = self.client.enable_module_stream_on_managed_instance_group(managed_instance_group_id, enable_module_stream_on_managed_instance_group_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: @@ -275,8 +276,9 @@ def install_module_stream_profile_on_managed_instance_group_and_wait_for_state(s operation_result = self.client.install_module_stream_profile_on_managed_instance_group(managed_instance_group_id, install_module_stream_profile_on_managed_instance_group_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: @@ -316,8 +318,9 @@ def install_packages_on_managed_instance_group_and_wait_for_state(self, managed_ operation_result = self.client.install_packages_on_managed_instance_group(managed_instance_group_id, install_packages_on_managed_instance_group_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: @@ -354,8 +357,9 @@ def list_managed_instance_group_modules_and_wait_for_state(self, managed_instanc operation_result = self.client.list_managed_instance_group_modules(managed_instance_group_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: @@ -395,8 +399,9 @@ def manage_module_streams_on_managed_instance_group_and_wait_for_state(self, man operation_result = self.client.manage_module_streams_on_managed_instance_group(managed_instance_group_id, manage_module_streams_on_managed_instance_group_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: @@ -436,8 +441,9 @@ def remove_module_stream_profile_from_managed_instance_group_and_wait_for_state( operation_result = self.client.remove_module_stream_profile_from_managed_instance_group(managed_instance_group_id, remove_module_stream_profile_from_managed_instance_group_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: @@ -477,8 +483,9 @@ def remove_packages_from_managed_instance_group_and_wait_for_state(self, managed operation_result = self.client.remove_packages_from_managed_instance_group(managed_instance_group_id, remove_packages_from_managed_instance_group_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: @@ -518,8 +525,9 @@ def update_all_packages_on_managed_instance_group_and_wait_for_state(self, manag operation_result = self.client.update_all_packages_on_managed_instance_group(managed_instance_group_id, update_all_packages_on_managed_instance_group_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: @@ -559,7 +567,6 @@ def update_managed_instance_group_and_wait_for_state(self, managed_instance_grou operation_result = self.client.update_managed_instance_group(managed_instance_group_id, update_managed_instance_group_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] managed_instance_group_id = operation_result.data.id diff --git a/src/oci/os_management_hub/management_station_client_composite_operations.py b/src/oci/os_management_hub/management_station_client_composite_operations.py index 1d7707713..4ff59bff1 100644 --- a/src/oci/os_management_hub/management_station_client_composite_operations.py +++ b/src/oci/os_management_hub/management_station_client_composite_operations.py @@ -46,7 +46,6 @@ def create_management_station_and_wait_for_state(self, create_management_station operation_result = self.client.create_management_station(create_management_station_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_station_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_management_station_and_wait_for_state(self, management_station_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,8 +150,9 @@ def synchronize_mirrors_and_wait_for_state(self, management_station_id, synchron operation_result = self.client.synchronize_mirrors(management_station_id, synchronize_mirrors_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: @@ -193,8 +192,9 @@ def synchronize_single_mirrors_and_wait_for_state(self, management_station_id, m operation_result = self.client.synchronize_single_mirrors(management_station_id, mirror_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: @@ -234,7 +234,6 @@ def update_management_station_and_wait_for_state(self, management_station_id, up operation_result = self.client.update_management_station(management_station_id, update_management_station_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] management_station_id = operation_result.data.id diff --git a/src/oci/os_management_hub/onboarding_client_composite_operations.py b/src/oci/os_management_hub/onboarding_client_composite_operations.py index 5d551e4a9..ef1ffd7f0 100644 --- a/src/oci/os_management_hub/onboarding_client_composite_operations.py +++ b/src/oci/os_management_hub/onboarding_client_composite_operations.py @@ -46,7 +46,6 @@ def create_profile_and_wait_for_state(self, create_profile_details, wait_for_sta operation_result = self.client.create_profile(create_profile_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] profile_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_profile_and_wait_for_state(self, profile_id, wait_for_states=[], oper if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_profile_and_wait_for_state(self, profile_id, update_profile_details, operation_result = self.client.update_profile(profile_id, update_profile_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] profile_id = operation_result.data.id diff --git a/src/oci/os_management_hub/scheduled_job_client_composite_operations.py b/src/oci/os_management_hub/scheduled_job_client_composite_operations.py index 6b0f5a022..ce6bda0fa 100644 --- a/src/oci/os_management_hub/scheduled_job_client_composite_operations.py +++ b/src/oci/os_management_hub/scheduled_job_client_composite_operations.py @@ -46,7 +46,6 @@ def create_scheduled_job_and_wait_for_state(self, create_scheduled_job_details, operation_result = self.client.create_scheduled_job(create_scheduled_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_job_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_scheduled_job_and_wait_for_state(self, scheduled_job_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_scheduled_job_and_wait_for_state(self, scheduled_job_id, update_sched operation_result = self.client.update_scheduled_job(scheduled_job_id, update_scheduled_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] scheduled_job_id = operation_result.data.id diff --git a/src/oci/os_management_hub/software_source_client_composite_operations.py b/src/oci/os_management_hub/software_source_client_composite_operations.py index 25d2cb112..7826d1fb1 100644 --- a/src/oci/os_management_hub/software_source_client_composite_operations.py +++ b/src/oci/os_management_hub/software_source_client_composite_operations.py @@ -46,8 +46,9 @@ def create_software_source_and_wait_for_state(self, create_software_source_detai operation_result = self.client.create_software_source(create_software_source_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: @@ -93,7 +94,6 @@ def delete_software_source_and_wait_for_state(self, software_source_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -147,8 +147,9 @@ def update_software_source_and_wait_for_state(self, software_source_id, update_s operation_result = self.client.update_software_source(software_source_id, update_software_source_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: diff --git a/src/oci/psql/postgresql_client_composite_operations.py b/src/oci/psql/postgresql_client_composite_operations.py index 92c19e86f..7cbbe02d3 100644 --- a/src/oci/psql/postgresql_client_composite_operations.py +++ b/src/oci/psql/postgresql_client_composite_operations.py @@ -49,8 +49,9 @@ def change_backup_compartment_and_wait_for_state(self, backup_id, change_backup_ operation_result = self.client.change_backup_compartment(backup_id, change_backup_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: @@ -90,8 +91,9 @@ def change_db_system_compartment_and_wait_for_state(self, db_system_id, change_d operation_result = self.client.change_db_system_compartment(db_system_id, change_db_system_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: @@ -128,8 +130,9 @@ def create_backup_and_wait_for_state(self, create_backup_details, wait_for_state operation_result = self.client.create_backup(create_backup_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: @@ -166,7 +169,6 @@ def create_configuration_and_wait_for_state(self, create_configuration_details, operation_result = self.client.create_configuration(create_configuration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] configuration_id = operation_result.data.id @@ -209,8 +211,9 @@ def create_db_system_and_wait_for_state(self, create_db_system_details, wait_for operation_result = self.client.create_db_system(create_db_system_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: @@ -255,8 +258,9 @@ def delete_backup_and_wait_for_state(self, backup_id, wait_for_states=[], operat 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: @@ -302,7 +306,6 @@ def delete_configuration_and_wait_for_state(self, configuration_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -361,8 +364,9 @@ def delete_db_system_and_wait_for_state(self, db_system_id, wait_for_states=[], 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: @@ -402,8 +406,9 @@ def failover_db_system_and_wait_for_state(self, db_system_id, failover_db_system operation_result = self.client.failover_db_system(db_system_id, failover_db_system_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: @@ -443,8 +448,9 @@ def patch_db_system_and_wait_for_state(self, db_system_id, patch_db_system_detai operation_result = self.client.patch_db_system(db_system_id, patch_db_system_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: @@ -484,8 +490,9 @@ def reset_master_user_password_and_wait_for_state(self, db_system_id, reset_mast operation_result = self.client.reset_master_user_password(db_system_id, reset_master_user_password_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: @@ -525,8 +532,9 @@ def restart_db_instance_in_db_system_and_wait_for_state(self, db_system_id, rest operation_result = self.client.restart_db_instance_in_db_system(db_system_id, restart_db_instance_in_db_system_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: @@ -566,8 +574,9 @@ def restore_db_system_and_wait_for_state(self, db_system_id, restore_db_system_d operation_result = self.client.restore_db_system(db_system_id, restore_db_system_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: @@ -607,7 +616,6 @@ def update_backup_and_wait_for_state(self, backup_id, update_backup_details, wai operation_result = self.client.update_backup(backup_id, update_backup_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] backup_id = operation_result.data.id @@ -653,7 +661,6 @@ def update_configuration_and_wait_for_state(self, configuration_id, update_confi operation_result = self.client.update_configuration(configuration_id, update_configuration_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] configuration_id = operation_result.data.id @@ -699,8 +706,9 @@ def update_db_system_and_wait_for_state(self, db_system_id, update_db_system_det operation_result = self.client.update_db_system(db_system_id, update_db_system_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: @@ -743,8 +751,9 @@ def update_db_system_db_instance_and_wait_for_state(self, db_system_id, db_insta operation_result = self.client.update_db_system_db_instance(db_system_id, db_instance_id, update_db_system_db_instance_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: diff --git a/src/oci/queue/queue_admin_client_composite_operations.py b/src/oci/queue/queue_admin_client_composite_operations.py index 947cf404d..390ccb6d0 100644 --- a/src/oci/queue/queue_admin_client_composite_operations.py +++ b/src/oci/queue/queue_admin_client_composite_operations.py @@ -49,8 +49,9 @@ def change_queue_compartment_and_wait_for_state(self, queue_id, change_queue_com operation_result = self.client.change_queue_compartment(queue_id, change_queue_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: @@ -87,8 +88,9 @@ def create_queue_and_wait_for_state(self, create_queue_details, wait_for_states= operation_result = self.client.create_queue(create_queue_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: @@ -133,8 +135,9 @@ def delete_queue_and_wait_for_state(self, queue_id, wait_for_states=[], operatio 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: @@ -174,8 +177,9 @@ def purge_queue_and_wait_for_state(self, queue_id, purge_queue_details, wait_for operation_result = self.client.purge_queue(queue_id, purge_queue_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: @@ -215,8 +219,9 @@ def update_queue_and_wait_for_state(self, queue_id, update_queue_details, wait_f operation_result = self.client.update_queue(queue_id, update_queue_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: diff --git a/src/oci/recovery/database_recovery_client_composite_operations.py b/src/oci/recovery/database_recovery_client_composite_operations.py index 9f1c452b5..d2560ee04 100644 --- a/src/oci/recovery/database_recovery_client_composite_operations.py +++ b/src/oci/recovery/database_recovery_client_composite_operations.py @@ -49,8 +49,9 @@ def change_protected_database_compartment_and_wait_for_state(self, protected_dat operation_result = self.client.change_protected_database_compartment(protected_database_id, change_protected_database_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: @@ -90,8 +91,9 @@ def change_protection_policy_compartment_and_wait_for_state(self, protection_pol operation_result = self.client.change_protection_policy_compartment(protection_policy_id, change_protection_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: @@ -131,8 +133,9 @@ def change_recovery_service_subnet_compartment_and_wait_for_state(self, recovery operation_result = self.client.change_recovery_service_subnet_compartment(recovery_service_subnet_id, change_recovery_service_subnet_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: @@ -169,8 +172,9 @@ def create_protected_database_and_wait_for_state(self, create_protected_database operation_result = self.client.create_protected_database(create_protected_database_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: @@ -207,8 +211,9 @@ def create_protection_policy_and_wait_for_state(self, create_protection_policy_d operation_result = self.client.create_protection_policy(create_protection_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: @@ -245,8 +250,9 @@ def create_recovery_service_subnet_and_wait_for_state(self, create_recovery_serv operation_result = self.client.create_recovery_service_subnet(create_recovery_service_subnet_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: @@ -291,8 +297,9 @@ def delete_protected_database_and_wait_for_state(self, protected_database_id, wa 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: @@ -337,8 +344,9 @@ def delete_protection_policy_and_wait_for_state(self, protection_policy_id, wait 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: @@ -383,8 +391,9 @@ def delete_recovery_service_subnet_and_wait_for_state(self, recovery_service_sub 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: @@ -424,8 +433,9 @@ def update_protected_database_and_wait_for_state(self, protected_database_id, up operation_result = self.client.update_protected_database(protected_database_id, update_protected_database_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: @@ -465,8 +475,9 @@ def update_protection_policy_and_wait_for_state(self, protection_policy_id, upda operation_result = self.client.update_protection_policy(protection_policy_id, update_protection_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: @@ -506,8 +517,9 @@ def update_recovery_service_subnet_and_wait_for_state(self, recovery_service_sub operation_result = self.client.update_recovery_service_subnet(recovery_service_subnet_id, update_recovery_service_subnet_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: diff --git a/src/oci/redis/redis_cluster_client_composite_operations.py b/src/oci/redis/redis_cluster_client_composite_operations.py index b32d44dd3..90fc6f3e4 100644 --- a/src/oci/redis/redis_cluster_client_composite_operations.py +++ b/src/oci/redis/redis_cluster_client_composite_operations.py @@ -51,8 +51,9 @@ def change_redis_cluster_compartment_and_wait_for_state(self, redis_cluster_id, operation_result = self.client.change_redis_cluster_compartment(redis_cluster_id, change_redis_cluster_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: @@ -89,8 +90,9 @@ def create_redis_cluster_and_wait_for_state(self, create_redis_cluster_details, operation_result = self.client.create_redis_cluster(create_redis_cluster_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: @@ -137,8 +139,9 @@ def delete_redis_cluster_and_wait_for_state(self, redis_cluster_id, wait_for_sta 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: @@ -180,8 +183,9 @@ def update_redis_cluster_and_wait_for_state(self, redis_cluster_id, update_redis operation_result = self.client.update_redis_cluster(redis_cluster_id, update_redis_cluster_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: diff --git a/src/oci/resource_manager/resource_manager_client_composite_operations.py b/src/oci/resource_manager/resource_manager_client_composite_operations.py index a8f125956..d1aa724de 100644 --- a/src/oci/resource_manager/resource_manager_client_composite_operations.py +++ b/src/oci/resource_manager/resource_manager_client_composite_operations.py @@ -57,7 +57,6 @@ def cancel_job_and_wait_for_state(self, job_id, wait_for_states=[], operation_kw if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -113,8 +112,9 @@ def change_stack_compartment_and_wait_for_state(self, stack_id, change_stack_com operation_result = self.client.change_stack_compartment(stack_id, change_stack_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: @@ -151,7 +151,6 @@ def create_configuration_source_provider_and_wait_for_state(self, create_configu operation_result = self.client.create_configuration_source_provider(create_configuration_source_provider_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] configuration_source_provider_id = operation_result.data.id @@ -194,7 +193,6 @@ def create_job_and_wait_for_state(self, create_job_details, wait_for_states=[], operation_result = self.client.create_job(create_job_details, **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 @@ -237,7 +235,6 @@ def create_private_endpoint_and_wait_for_state(self, create_private_endpoint_det operation_result = self.client.create_private_endpoint(create_private_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] private_endpoint_id = operation_result.data.id @@ -280,8 +277,9 @@ def create_stack_and_wait_for_state(self, create_stack_details, wait_for_states= operation_result = self.client.create_stack(create_stack_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: @@ -318,7 +316,6 @@ def create_template_and_wait_for_state(self, create_template_details, wait_for_s operation_result = self.client.create_template(create_template_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] template_id = operation_result.data.id @@ -372,7 +369,6 @@ def delete_configuration_source_provider_and_wait_for_state(self, configuration_ if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -434,7 +430,6 @@ def delete_private_endpoint_and_wait_for_state(self, private_endpoint_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -496,7 +491,6 @@ def delete_stack_and_wait_for_state(self, stack_id, wait_for_states=[], operatio if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -558,7 +552,6 @@ def delete_template_and_wait_for_state(self, template_id, wait_for_states=[], op if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -611,8 +604,9 @@ def detect_stack_drift_and_wait_for_state(self, stack_id, wait_for_states=[], op operation_result = self.client.detect_stack_drift(stack_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: @@ -654,7 +648,6 @@ def update_configuration_source_provider_and_wait_for_state(self, configuration_ operation_result = self.client.update_configuration_source_provider(configuration_source_provider_id, update_configuration_source_provider_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] configuration_source_provider_id = operation_result.data.id @@ -702,7 +695,6 @@ def update_job_and_wait_for_state(self, job_id, update_job_details, wait_for_sta operation_result = self.client.update_job(job_id, update_job_details, **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 @@ -750,7 +742,6 @@ def update_private_endpoint_and_wait_for_state(self, private_endpoint_id, update operation_result = self.client.update_private_endpoint(private_endpoint_id, update_private_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] private_endpoint_id = operation_result.data.id @@ -798,7 +789,6 @@ def update_stack_and_wait_for_state(self, stack_id, update_stack_details, wait_f operation_result = self.client.update_stack(stack_id, update_stack_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stack_id = operation_result.data.id @@ -846,7 +836,6 @@ def update_template_and_wait_for_state(self, template_id, update_template_detail operation_result = self.client.update_template(template_id, update_template_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] template_id = operation_result.data.id diff --git a/src/oci/rover/rover_bundle_client_composite_operations.py b/src/oci/rover/rover_bundle_client_composite_operations.py index ae1c2cd66..875c04999 100644 --- a/src/oci/rover/rover_bundle_client_composite_operations.py +++ b/src/oci/rover/rover_bundle_client_composite_operations.py @@ -49,8 +49,9 @@ def request_bundle_rover_cluster_and_wait_for_state(self, request_rover_bundle_d operation_result = self.client.request_bundle_rover_cluster(request_rover_bundle_details, rover_cluster_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: @@ -90,8 +91,9 @@ def request_bundle_rover_node_and_wait_for_state(self, request_rover_bundle_deta operation_result = self.client.request_bundle_rover_node(request_rover_bundle_details, rover_node_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: diff --git a/src/oci/rover/rover_cluster_client_composite_operations.py b/src/oci/rover/rover_cluster_client_composite_operations.py index 1c9ec77f4..948f6fe89 100644 --- a/src/oci/rover/rover_cluster_client_composite_operations.py +++ b/src/oci/rover/rover_cluster_client_composite_operations.py @@ -46,7 +46,6 @@ def create_rover_cluster_and_wait_for_state(self, create_rover_cluster_details, operation_result = self.client.create_rover_cluster(create_rover_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rover_cluster_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_rover_cluster_and_wait_for_state(self, rover_cluster_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,8 +150,9 @@ def request_additional_nodes_and_wait_for_state(self, rover_cluster_id, request_ operation_result = self.client.request_additional_nodes(rover_cluster_id, request_additional_nodes_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: @@ -193,7 +192,6 @@ def update_rover_cluster_and_wait_for_state(self, rover_cluster_id, update_rover operation_result = self.client.update_rover_cluster(rover_cluster_id, update_rover_cluster_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rover_cluster_id = operation_result.data.id diff --git a/src/oci/rover/rover_entitlement_client_composite_operations.py b/src/oci/rover/rover_entitlement_client_composite_operations.py index 2e5e0c5fa..336cf3fb3 100644 --- a/src/oci/rover/rover_entitlement_client_composite_operations.py +++ b/src/oci/rover/rover_entitlement_client_composite_operations.py @@ -46,7 +46,6 @@ def create_rover_entitlement_and_wait_for_state(self, create_rover_entitlement_d operation_result = self.client.create_rover_entitlement(create_rover_entitlement_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rover_entitlement_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_rover_entitlement_and_wait_for_state(self, rover_entitlement_id, wait if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_rover_entitlement_and_wait_for_state(self, rover_entitlement_id, upda operation_result = self.client.update_rover_entitlement(rover_entitlement_id, update_rover_entitlement_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rover_entitlement_id = operation_result.data.id diff --git a/src/oci/rover/rover_node_client_composite_operations.py b/src/oci/rover/rover_node_client_composite_operations.py index 1c65fefd9..b55149eaf 100644 --- a/src/oci/rover/rover_node_client_composite_operations.py +++ b/src/oci/rover/rover_node_client_composite_operations.py @@ -46,7 +46,6 @@ def create_rover_node_and_wait_for_state(self, create_rover_node_details, wait_f operation_result = self.client.create_rover_node(create_rover_node_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rover_node_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_rover_node_and_wait_for_state(self, rover_node_id, wait_for_states=[] if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_rover_node_and_wait_for_state(self, rover_node_id, update_rover_node_ operation_result = self.client.update_rover_node(rover_node_id, update_rover_node_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] rover_node_id = operation_result.data.id diff --git a/src/oci/sch/service_connector_client_composite_operations.py b/src/oci/sch/service_connector_client_composite_operations.py index cf2b5fd11..7d2f5d0d6 100644 --- a/src/oci/sch/service_connector_client_composite_operations.py +++ b/src/oci/sch/service_connector_client_composite_operations.py @@ -48,8 +48,9 @@ def activate_service_connector_and_wait_for_state(self, service_connector_id, wa operation_result = self.client.activate_service_connector(service_connector_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: @@ -91,8 +92,9 @@ def change_service_connector_compartment_and_wait_for_state(self, service_connec operation_result = self.client.change_service_connector_compartment(service_connector_id, change_service_connector_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: @@ -129,8 +131,9 @@ def create_service_connector_and_wait_for_state(self, create_service_connector_d operation_result = self.client.create_service_connector(create_service_connector_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: @@ -169,8 +172,9 @@ def deactivate_service_connector_and_wait_for_state(self, service_connector_id, operation_result = self.client.deactivate_service_connector(service_connector_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: @@ -217,8 +221,9 @@ def delete_service_connector_and_wait_for_state(self, service_connector_id, wait 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: @@ -260,8 +265,9 @@ def update_service_connector_and_wait_for_state(self, service_connector_id, upda operation_result = self.client.update_service_connector(service_connector_id, update_service_connector_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: diff --git a/src/oci/service_catalog/service_catalog_client_composite_operations.py b/src/oci/service_catalog/service_catalog_client_composite_operations.py index c761e4f34..fe5e651f4 100644 --- a/src/oci/service_catalog/service_catalog_client_composite_operations.py +++ b/src/oci/service_catalog/service_catalog_client_composite_operations.py @@ -49,8 +49,9 @@ def change_private_application_compartment_and_wait_for_state(self, private_appl operation_result = self.client.change_private_application_compartment(private_application_id, change_private_application_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: @@ -87,8 +88,9 @@ def create_private_application_and_wait_for_state(self, create_private_applicati operation_result = self.client.create_private_application(create_private_application_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: @@ -125,7 +127,6 @@ def create_service_catalog_and_wait_for_state(self, create_service_catalog_detai operation_result = self.client.create_service_catalog(create_service_catalog_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] service_catalog_id = operation_result.data.id @@ -176,8 +177,9 @@ def delete_private_application_and_wait_for_state(self, private_application_id, 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: @@ -223,7 +225,6 @@ def delete_service_catalog_and_wait_for_state(self, service_catalog_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -277,8 +278,9 @@ def update_private_application_and_wait_for_state(self, private_application_id, operation_result = self.client.update_private_application(private_application_id, update_private_application_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: @@ -318,7 +320,6 @@ def update_service_catalog_and_wait_for_state(self, service_catalog_id, update_s operation_result = self.client.update_service_catalog(service_catalog_id, update_service_catalog_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] service_catalog_id = operation_result.data.id diff --git a/src/oci/service_mesh/service_mesh_client_composite_operations.py b/src/oci/service_mesh/service_mesh_client_composite_operations.py index cceb66a99..102a862b2 100644 --- a/src/oci/service_mesh/service_mesh_client_composite_operations.py +++ b/src/oci/service_mesh/service_mesh_client_composite_operations.py @@ -49,8 +49,9 @@ def change_access_policy_compartment_and_wait_for_state(self, access_policy_id, operation_result = self.client.change_access_policy_compartment(access_policy_id, change_access_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: @@ -90,8 +91,9 @@ def change_ingress_gateway_compartment_and_wait_for_state(self, ingress_gateway_ operation_result = self.client.change_ingress_gateway_compartment(ingress_gateway_id, change_ingress_gateway_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: @@ -131,8 +133,9 @@ def change_ingress_gateway_route_table_compartment_and_wait_for_state(self, ingr operation_result = self.client.change_ingress_gateway_route_table_compartment(ingress_gateway_route_table_id, change_ingress_gateway_route_table_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: @@ -172,8 +175,9 @@ def change_mesh_compartment_and_wait_for_state(self, mesh_id, change_mesh_compar operation_result = self.client.change_mesh_compartment(mesh_id, change_mesh_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: @@ -213,8 +217,9 @@ def change_virtual_deployment_compartment_and_wait_for_state(self, virtual_deplo operation_result = self.client.change_virtual_deployment_compartment(virtual_deployment_id, change_virtual_deployment_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: @@ -254,8 +259,9 @@ def change_virtual_service_compartment_and_wait_for_state(self, virtual_service_ operation_result = self.client.change_virtual_service_compartment(virtual_service_id, change_virtual_service_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: @@ -295,8 +301,9 @@ def change_virtual_service_route_table_compartment_and_wait_for_state(self, virt operation_result = self.client.change_virtual_service_route_table_compartment(virtual_service_route_table_id, change_virtual_service_route_table_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: @@ -333,8 +340,9 @@ def create_access_policy_and_wait_for_state(self, create_access_policy_details, operation_result = self.client.create_access_policy(create_access_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: @@ -371,8 +379,9 @@ def create_ingress_gateway_and_wait_for_state(self, create_ingress_gateway_detai operation_result = self.client.create_ingress_gateway(create_ingress_gateway_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: @@ -409,8 +418,9 @@ def create_ingress_gateway_route_table_and_wait_for_state(self, create_ingress_g operation_result = self.client.create_ingress_gateway_route_table(create_ingress_gateway_route_table_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: @@ -447,8 +457,9 @@ def create_mesh_and_wait_for_state(self, create_mesh_details, wait_for_states=[] operation_result = self.client.create_mesh(create_mesh_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: @@ -485,8 +496,9 @@ def create_virtual_deployment_and_wait_for_state(self, create_virtual_deployment operation_result = self.client.create_virtual_deployment(create_virtual_deployment_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: @@ -523,8 +535,9 @@ def create_virtual_service_and_wait_for_state(self, create_virtual_service_detai operation_result = self.client.create_virtual_service(create_virtual_service_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: @@ -561,8 +574,9 @@ def create_virtual_service_route_table_and_wait_for_state(self, create_virtual_s operation_result = self.client.create_virtual_service_route_table(create_virtual_service_route_table_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: @@ -607,8 +621,9 @@ def delete_access_policy_and_wait_for_state(self, access_policy_id, wait_for_sta 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: @@ -653,8 +668,9 @@ def delete_ingress_gateway_and_wait_for_state(self, ingress_gateway_id, wait_for 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: @@ -699,8 +715,9 @@ def delete_ingress_gateway_route_table_and_wait_for_state(self, ingress_gateway_ 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: @@ -745,8 +762,9 @@ def delete_mesh_and_wait_for_state(self, mesh_id, wait_for_states=[], operation_ 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: @@ -791,8 +809,9 @@ def delete_virtual_deployment_and_wait_for_state(self, virtual_deployment_id, wa 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: @@ -837,8 +856,9 @@ def delete_virtual_service_and_wait_for_state(self, virtual_service_id, wait_for 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: @@ -883,8 +903,9 @@ def delete_virtual_service_route_table_and_wait_for_state(self, virtual_service_ 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: @@ -924,8 +945,9 @@ def update_access_policy_and_wait_for_state(self, access_policy_id, update_acces operation_result = self.client.update_access_policy(access_policy_id, update_access_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: @@ -965,8 +987,9 @@ def update_ingress_gateway_and_wait_for_state(self, ingress_gateway_id, update_i operation_result = self.client.update_ingress_gateway(ingress_gateway_id, update_ingress_gateway_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: @@ -1006,8 +1029,9 @@ def update_ingress_gateway_route_table_and_wait_for_state(self, ingress_gateway_ operation_result = self.client.update_ingress_gateway_route_table(ingress_gateway_route_table_id, update_ingress_gateway_route_table_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: @@ -1047,8 +1071,9 @@ def update_mesh_and_wait_for_state(self, mesh_id, update_mesh_details, wait_for_ operation_result = self.client.update_mesh(mesh_id, update_mesh_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: @@ -1088,8 +1113,9 @@ def update_virtual_deployment_and_wait_for_state(self, virtual_deployment_id, up operation_result = self.client.update_virtual_deployment(virtual_deployment_id, update_virtual_deployment_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: @@ -1129,8 +1155,9 @@ def update_virtual_service_and_wait_for_state(self, virtual_service_id, update_v operation_result = self.client.update_virtual_service(virtual_service_id, update_virtual_service_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: @@ -1170,8 +1197,9 @@ def update_virtual_service_route_table_and_wait_for_state(self, virtual_service_ operation_result = self.client.update_virtual_service_route_table(virtual_service_route_table_id, update_virtual_service_route_table_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: diff --git a/src/oci/stack_monitoring/models/__init__.py b/src/oci/stack_monitoring/models/__init__.py index da131e52d..b8269efd4 100644 --- a/src/oci/stack_monitoring/models/__init__.py +++ b/src/oci/stack_monitoring/models/__init__.py @@ -23,6 +23,7 @@ from .change_metric_extension_compartment_details import ChangeMetricExtensionCompartmentDetails from .change_monitored_resource_compartment_details import ChangeMonitoredResourceCompartmentDetails from .change_monitored_resource_task_compartment_details import ChangeMonitoredResourceTaskCompartmentDetails +from .change_process_set_compartment_details import ChangeProcessSetCompartmentDetails from .config import Config from .config_collection import ConfigCollection from .config_summary import ConfigSummary @@ -37,6 +38,7 @@ from .create_monitored_resource_details import CreateMonitoredResourceDetails from .create_monitored_resource_task_details import CreateMonitoredResourceTaskDetails from .create_monitored_resource_type_details import CreateMonitoredResourceTypeDetails +from .create_process_set_details import CreateProcessSetDetails from .credential_collection import CredentialCollection from .credential_details import CredentialDetails from .credential_property import CredentialProperty @@ -94,6 +96,11 @@ from .os_command_update_query_properties import OsCommandUpdateQueryProperties from .plain_text_credentials import PlainTextCredentials from .pre_existing_credentials import PreExistingCredentials +from .process_set import ProcessSet +from .process_set_collection import ProcessSetCollection +from .process_set_specification import ProcessSetSpecification +from .process_set_specification_details import ProcessSetSpecificationDetails +from .process_set_summary import ProcessSetSummary from .property_details import PropertyDetails from .resource_type_metadata_details import ResourceTypeMetadataDetails from .script_file_details import ScriptFileDetails @@ -120,6 +127,7 @@ from .update_monitored_resource_details import UpdateMonitoredResourceDetails from .update_monitored_resource_task_details import UpdateMonitoredResourceTaskDetails from .update_monitored_resource_type_details import UpdateMonitoredResourceTypeDetails +from .update_process_set_details import UpdateProcessSetDetails from .work_request import WorkRequest from .work_request_error import WorkRequestError from .work_request_error_collection import WorkRequestErrorCollection @@ -148,6 +156,7 @@ "ChangeMetricExtensionCompartmentDetails": ChangeMetricExtensionCompartmentDetails, "ChangeMonitoredResourceCompartmentDetails": ChangeMonitoredResourceCompartmentDetails, "ChangeMonitoredResourceTaskCompartmentDetails": ChangeMonitoredResourceTaskCompartmentDetails, + "ChangeProcessSetCompartmentDetails": ChangeProcessSetCompartmentDetails, "Config": Config, "ConfigCollection": ConfigCollection, "ConfigSummary": ConfigSummary, @@ -162,6 +171,7 @@ "CreateMonitoredResourceDetails": CreateMonitoredResourceDetails, "CreateMonitoredResourceTaskDetails": CreateMonitoredResourceTaskDetails, "CreateMonitoredResourceTypeDetails": CreateMonitoredResourceTypeDetails, + "CreateProcessSetDetails": CreateProcessSetDetails, "CredentialCollection": CredentialCollection, "CredentialDetails": CredentialDetails, "CredentialProperty": CredentialProperty, @@ -219,6 +229,11 @@ "OsCommandUpdateQueryProperties": OsCommandUpdateQueryProperties, "PlainTextCredentials": PlainTextCredentials, "PreExistingCredentials": PreExistingCredentials, + "ProcessSet": ProcessSet, + "ProcessSetCollection": ProcessSetCollection, + "ProcessSetSpecification": ProcessSetSpecification, + "ProcessSetSpecificationDetails": ProcessSetSpecificationDetails, + "ProcessSetSummary": ProcessSetSummary, "PropertyDetails": PropertyDetails, "ResourceTypeMetadataDetails": ResourceTypeMetadataDetails, "ScriptFileDetails": ScriptFileDetails, @@ -245,6 +260,7 @@ "UpdateMonitoredResourceDetails": UpdateMonitoredResourceDetails, "UpdateMonitoredResourceTaskDetails": UpdateMonitoredResourceTaskDetails, "UpdateMonitoredResourceTypeDetails": UpdateMonitoredResourceTypeDetails, + "UpdateProcessSetDetails": UpdateProcessSetDetails, "WorkRequest": WorkRequest, "WorkRequestError": WorkRequestError, "WorkRequestErrorCollection": WorkRequestErrorCollection, diff --git a/src/oci/stack_monitoring/models/change_process_set_compartment_details.py b/src/oci/stack_monitoring/models/change_process_set_compartment_details.py new file mode 100644 index 000000000..586efb632 --- /dev/null +++ b/src/oci/stack_monitoring/models/change_process_set_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: 20210330 + + +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 ChangeProcessSetCompartmentDetails(object): + """ + Payload describing to which compartment the resource should be moved. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeProcessSetCompartmentDetails 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 ChangeProcessSetCompartmentDetails. + :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 ChangeProcessSetCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeProcessSetCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeProcessSetCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeProcessSetCompartmentDetails. + :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/stack_monitoring/models/create_process_set_details.py b/src/oci/stack_monitoring/models/create_process_set_details.py new file mode 100644 index 000000000..6d913ff50 --- /dev/null +++ b/src/oci/stack_monitoring/models/create_process_set_details.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: 20210330 + + +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 CreateProcessSetDetails(object): + """ + Process Set create payload model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateProcessSetDetails 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 CreateProcessSetDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateProcessSetDetails. + :type display_name: str + + :param specification: + The value to assign to the specification property of this CreateProcessSetDetails. + :type specification: oci.stack_monitoring.models.ProcessSetSpecification + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateProcessSetDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateProcessSetDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'display_name': 'str', + 'specification': 'ProcessSetSpecification', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'specification': 'specification', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._display_name = None + self._specification = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateProcessSetDetails. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateProcessSetDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateProcessSetDetails. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateProcessSetDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CreateProcessSetDetails. + Name of the Process Set. + + + :return: The display_name of this CreateProcessSetDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateProcessSetDetails. + Name of the Process Set. + + + :param display_name: The display_name of this CreateProcessSetDetails. + :type: str + """ + self._display_name = display_name + + @property + def specification(self): + """ + **[Required]** Gets the specification of this CreateProcessSetDetails. + + :return: The specification of this CreateProcessSetDetails. + :rtype: oci.stack_monitoring.models.ProcessSetSpecification + """ + return self._specification + + @specification.setter + def specification(self, specification): + """ + Sets the specification of this CreateProcessSetDetails. + + :param specification: The specification of this CreateProcessSetDetails. + :type: oci.stack_monitoring.models.ProcessSetSpecification + """ + self._specification = specification + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateProcessSetDetails. + 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 CreateProcessSetDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateProcessSetDetails. + 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 CreateProcessSetDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateProcessSetDetails. + 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 CreateProcessSetDetails. + :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 CreateProcessSetDetails. + 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 CreateProcessSetDetails. + :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/stack_monitoring/models/discovery_details.py b/src/oci/stack_monitoring/models/discovery_details.py index d0aa13147..6c0c6e495 100644 --- a/src/oci/stack_monitoring/models/discovery_details.py +++ b/src/oci/stack_monitoring/models/discovery_details.py @@ -67,6 +67,10 @@ class DiscoveryDetails(object): #: This constant has a value of "ORACLE_GOLDENGATE" RESOURCE_TYPE_ORACLE_GOLDENGATE = "ORACLE_GOLDENGATE" + #: A constant which can be used with the resource_type property of a DiscoveryDetails. + #: This constant has a value of "CUSTOM_RESOURCE" + RESOURCE_TYPE_CUSTOM_RESOURCE = "CUSTOM_RESOURCE" + #: A constant which can be used with the license property of a DiscoveryDetails. #: This constant has a value of "STANDARD_EDITION" LICENSE_STANDARD_EDITION = "STANDARD_EDITION" @@ -86,7 +90,7 @@ def __init__(self, **kwargs): :param resource_type: The value to assign to the resource_type property of this DiscoveryDetails. - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type resource_type: str @@ -171,7 +175,7 @@ def resource_type(self): **[Required]** Gets the resource_type of this DiscoveryDetails. Resource Type. - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -190,7 +194,7 @@ def resource_type(self, resource_type): :param resource_type: The resource_type of this DiscoveryDetails. :type: str """ - allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE"] + allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE"] if not value_allowed_none_or_none_sentinel(resource_type, allowed_values): resource_type = 'UNKNOWN_ENUM_VALUE' self._resource_type = resource_type diff --git a/src/oci/stack_monitoring/models/discovery_job_summary.py b/src/oci/stack_monitoring/models/discovery_job_summary.py index d5811156e..1020d8fad 100644 --- a/src/oci/stack_monitoring/models/discovery_job_summary.py +++ b/src/oci/stack_monitoring/models/discovery_job_summary.py @@ -67,6 +67,10 @@ class DiscoveryJobSummary(object): #: This constant has a value of "ORACLE_GOLDENGATE" RESOURCE_TYPE_ORACLE_GOLDENGATE = "ORACLE_GOLDENGATE" + #: A constant which can be used with the resource_type property of a DiscoveryJobSummary. + #: This constant has a value of "CUSTOM_RESOURCE" + RESOURCE_TYPE_CUSTOM_RESOURCE = "CUSTOM_RESOURCE" + #: A constant which can be used with the license property of a DiscoveryJobSummary. #: This constant has a value of "STANDARD_EDITION" LICENSE_STANDARD_EDITION = "STANDARD_EDITION" @@ -146,7 +150,7 @@ def __init__(self, **kwargs): :param resource_type: The value to assign to the resource_type property of this DiscoveryJobSummary. - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type resource_type: str @@ -293,7 +297,7 @@ def resource_type(self): Gets the resource_type of this DiscoveryJobSummary. Resource Type - Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -312,7 +316,7 @@ def resource_type(self, resource_type): :param resource_type: The resource_type of this DiscoveryJobSummary. :type: str """ - allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE"] + allowed_values = ["WEBLOGIC_DOMAIN", "EBS_INSTANCE", "SQL_SERVER", "APACHE_TOMCAT", "ORACLE_DATABASE", "OCI_ORACLE_DB", "OCI_ORACLE_CDB", "OCI_ORACLE_PDB", "HOST", "ORACLE_PSFT", "ORACLE_MFT", "APACHE_HTTP_SERVER", "ORACLE_GOLDENGATE", "CUSTOM_RESOURCE"] if not value_allowed_none_or_none_sentinel(resource_type, allowed_values): resource_type = 'UNKNOWN_ENUM_VALUE' self._resource_type = resource_type diff --git a/src/oci/stack_monitoring/models/process_set.py b/src/oci/stack_monitoring/models/process_set.py new file mode 100644 index 000000000..c758ff240 --- /dev/null +++ b/src/oci/stack_monitoring/models/process_set.py @@ -0,0 +1,424 @@ +# 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: 20210330 + + +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 ProcessSet(object): + """ + The Process Set details. + """ + + #: A constant which can be used with the lifecycle_state property of a ProcessSet. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ProcessSet. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ProcessSet. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ProcessSet. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ProcessSet. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ProcessSet. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new ProcessSet 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 ProcessSet. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ProcessSet. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ProcessSet. + 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 + + :param display_name: + The value to assign to the display_name property of this ProcessSet. + :type display_name: str + + :param specification: + The value to assign to the specification property of this ProcessSet. + :type specification: oci.stack_monitoring.models.ProcessSetSpecification + + :param time_created: + The value to assign to the time_created property of this ProcessSet. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ProcessSet. + :type time_updated: datetime + + :param revision: + The value to assign to the revision property of this ProcessSet. + :type revision: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ProcessSet. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ProcessSet. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ProcessSet. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'display_name': 'str', + 'specification': 'ProcessSetSpecification', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'revision': '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', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'display_name': 'displayName', + 'specification': 'specification', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'revision': 'revision', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._lifecycle_state = None + self._display_name = None + self._specification = None + self._time_created = None + self._time_updated = None + self._revision = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ProcessSet. + The `OCID`__ of the Process Set. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The id of this ProcessSet. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ProcessSet. + The `OCID`__ of the Process Set. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ProcessSet. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ProcessSet. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ProcessSet. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ProcessSet. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ProcessSet. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ProcessSet. + The current state of the Resource. + + 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'. + + + :return: The lifecycle_state of this ProcessSet. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ProcessSet. + The current state of the Resource. + + + :param lifecycle_state: The lifecycle_state of this ProcessSet. + :type: str + """ + 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 + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ProcessSet. + Name of the Process Set. + + + :return: The display_name of this ProcessSet. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ProcessSet. + Name of the Process Set. + + + :param display_name: The display_name of this ProcessSet. + :type: str + """ + self._display_name = display_name + + @property + def specification(self): + """ + **[Required]** Gets the specification of this ProcessSet. + + :return: The specification of this ProcessSet. + :rtype: oci.stack_monitoring.models.ProcessSetSpecification + """ + return self._specification + + @specification.setter + def specification(self, specification): + """ + Sets the specification of this ProcessSet. + + :param specification: The specification of this ProcessSet. + :type: oci.stack_monitoring.models.ProcessSetSpecification + """ + self._specification = specification + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ProcessSet. + The time the process set was created. An RFC3339 formatted datetime string. + + + :return: The time_created of this ProcessSet. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ProcessSet. + The time the process set was created. An RFC3339 formatted datetime string. + + + :param time_created: The time_created of this ProcessSet. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ProcessSet. + The time the process set was last updated. An RFC3339 formatted datetime string. + + + :return: The time_updated of this ProcessSet. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ProcessSet. + The time the process set was last updated. An RFC3339 formatted datetime string. + + + :param time_updated: The time_updated of this ProcessSet. + :type: datetime + """ + self._time_updated = time_updated + + @property + def revision(self): + """ + **[Required]** Gets the revision of this ProcessSet. + The current revision of the Process Set. + + + :return: The revision of this ProcessSet. + :rtype: str + """ + return self._revision + + @revision.setter + def revision(self, revision): + """ + Sets the revision of this ProcessSet. + The current revision of the Process Set. + + + :param revision: The revision of this ProcessSet. + :type: str + """ + self._revision = revision + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ProcessSet. + 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 ProcessSet. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ProcessSet. + 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 ProcessSet. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ProcessSet. + 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 ProcessSet. + :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 ProcessSet. + 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 ProcessSet. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ProcessSet. + 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 ProcessSet. + :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 ProcessSet. + 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 ProcessSet. + :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/stack_monitoring/models/process_set_collection.py b/src/oci/stack_monitoring/models/process_set_collection.py new file mode 100644 index 000000000..e954021f9 --- /dev/null +++ b/src/oci/stack_monitoring/models/process_set_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: 20210330 + + +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 ProcessSetCollection(object): + """ + Result of the Process Set fetch. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProcessSetCollection 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 ProcessSetCollection. + :type items: list[oci.stack_monitoring.models.ProcessSetSummary] + + """ + self.swagger_types = { + 'items': 'list[ProcessSetSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ProcessSetCollection. + List of Process Sets. + + + :return: The items of this ProcessSetCollection. + :rtype: list[oci.stack_monitoring.models.ProcessSetSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ProcessSetCollection. + List of Process Sets. + + + :param items: The items of this ProcessSetCollection. + :type: list[oci.stack_monitoring.models.ProcessSetSummary] + """ + 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/stack_monitoring/models/process_set_specification.py b/src/oci/stack_monitoring/models/process_set_specification.py new file mode 100644 index 000000000..a650547f6 --- /dev/null +++ b/src/oci/stack_monitoring/models/process_set_specification.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: 20210330 + + +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 ProcessSetSpecification(object): + """ + Collection of regular expression specifications used to identify the processes to be monitored. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProcessSetSpecification 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 ProcessSetSpecification. + :type items: list[oci.stack_monitoring.models.ProcessSetSpecificationDetails] + + """ + self.swagger_types = { + 'items': 'list[ProcessSetSpecificationDetails]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ProcessSetSpecification. + List of Process Set specification details. + + + :return: The items of this ProcessSetSpecification. + :rtype: list[oci.stack_monitoring.models.ProcessSetSpecificationDetails] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ProcessSetSpecification. + List of Process Set specification details. + + + :param items: The items of this ProcessSetSpecification. + :type: list[oci.stack_monitoring.models.ProcessSetSpecificationDetails] + """ + 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/stack_monitoring/models/process_set_specification_details.py b/src/oci/stack_monitoring/models/process_set_specification_details.py new file mode 100644 index 000000000..cd0552ce3 --- /dev/null +++ b/src/oci/stack_monitoring/models/process_set_specification_details.py @@ -0,0 +1,165 @@ +# 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: 20210330 + + +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 ProcessSetSpecificationDetails(object): + """ + Details of a single regular expression specification in a Process Set. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProcessSetSpecificationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param label: + The value to assign to the label property of this ProcessSetSpecificationDetails. + :type label: str + + :param process_command: + The value to assign to the process_command property of this ProcessSetSpecificationDetails. + :type process_command: str + + :param process_user: + The value to assign to the process_user property of this ProcessSetSpecificationDetails. + :type process_user: str + + :param process_line_regex_pattern: + The value to assign to the process_line_regex_pattern property of this ProcessSetSpecificationDetails. + :type process_line_regex_pattern: str + + """ + self.swagger_types = { + 'label': 'str', + 'process_command': 'str', + 'process_user': 'str', + 'process_line_regex_pattern': 'str' + } + + self.attribute_map = { + 'label': 'label', + 'process_command': 'processCommand', + 'process_user': 'processUser', + 'process_line_regex_pattern': 'processLineRegexPattern' + } + + self._label = None + self._process_command = None + self._process_user = None + self._process_line_regex_pattern = None + + @property + def label(self): + """ + Gets the label of this ProcessSetSpecificationDetails. + Optional label used to identify a single filter. + + + :return: The label of this ProcessSetSpecificationDetails. + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """ + Sets the label of this ProcessSetSpecificationDetails. + Optional label used to identify a single filter. + + + :param label: The label of this ProcessSetSpecificationDetails. + :type: str + """ + self._label = label + + @property + def process_command(self): + """ + Gets the process_command of this ProcessSetSpecificationDetails. + String literal used for exact matching on process name. + + + :return: The process_command of this ProcessSetSpecificationDetails. + :rtype: str + """ + return self._process_command + + @process_command.setter + def process_command(self, process_command): + """ + Sets the process_command of this ProcessSetSpecificationDetails. + String literal used for exact matching on process name. + + + :param process_command: The process_command of this ProcessSetSpecificationDetails. + :type: str + """ + self._process_command = process_command + + @property + def process_user(self): + """ + Gets the process_user of this ProcessSetSpecificationDetails. + String literal used for exact matching on process user. + + + :return: The process_user of this ProcessSetSpecificationDetails. + :rtype: str + """ + return self._process_user + + @process_user.setter + def process_user(self, process_user): + """ + Sets the process_user of this ProcessSetSpecificationDetails. + String literal used for exact matching on process user. + + + :param process_user: The process_user of this ProcessSetSpecificationDetails. + :type: str + """ + self._process_user = process_user + + @property + def process_line_regex_pattern(self): + """ + Gets the process_line_regex_pattern of this ProcessSetSpecificationDetails. + Regex pattern matching on process arguments. + + + :return: The process_line_regex_pattern of this ProcessSetSpecificationDetails. + :rtype: str + """ + return self._process_line_regex_pattern + + @process_line_regex_pattern.setter + def process_line_regex_pattern(self, process_line_regex_pattern): + """ + Sets the process_line_regex_pattern of this ProcessSetSpecificationDetails. + Regex pattern matching on process arguments. + + + :param process_line_regex_pattern: The process_line_regex_pattern of this ProcessSetSpecificationDetails. + :type: str + """ + self._process_line_regex_pattern = process_line_regex_pattern + + 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/stack_monitoring/models/process_set_summary.py b/src/oci/stack_monitoring/models/process_set_summary.py new file mode 100644 index 000000000..dd00d4e0f --- /dev/null +++ b/src/oci/stack_monitoring/models/process_set_summary.py @@ -0,0 +1,424 @@ +# 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: 20210330 + + +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 ProcessSetSummary(object): + """ + Summary of a Process Set, used to construct a list of Process Sets when fetching all Process Sets in a compartment. + """ + + #: A constant which can be used with the lifecycle_state property of a ProcessSetSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ProcessSetSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ProcessSetSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ProcessSetSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ProcessSetSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a ProcessSetSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new ProcessSetSummary 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 ProcessSetSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ProcessSetSummary. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ProcessSetSummary. + 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 + + :param display_name: + The value to assign to the display_name property of this ProcessSetSummary. + :type display_name: str + + :param specification: + The value to assign to the specification property of this ProcessSetSummary. + :type specification: oci.stack_monitoring.models.ProcessSetSpecification + + :param time_created: + The value to assign to the time_created property of this ProcessSetSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ProcessSetSummary. + :type time_updated: datetime + + :param revision: + The value to assign to the revision property of this ProcessSetSummary. + :type revision: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ProcessSetSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ProcessSetSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ProcessSetSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'display_name': 'str', + 'specification': 'ProcessSetSpecification', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'revision': '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', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'display_name': 'displayName', + 'specification': 'specification', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'revision': 'revision', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._lifecycle_state = None + self._display_name = None + self._specification = None + self._time_created = None + self._time_updated = None + self._revision = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ProcessSetSummary. + The `OCID`__ of the Process Set. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The id of this ProcessSetSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ProcessSetSummary. + The `OCID`__ of the Process Set. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ProcessSetSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ProcessSetSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ProcessSetSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ProcessSetSummary. + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ProcessSetSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ProcessSetSummary. + The current state of the Resource. + + 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'. + + + :return: The lifecycle_state of this ProcessSetSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ProcessSetSummary. + The current state of the Resource. + + + :param lifecycle_state: The lifecycle_state of this ProcessSetSummary. + :type: str + """ + 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 + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ProcessSetSummary. + Name of the Process Set. + + + :return: The display_name of this ProcessSetSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ProcessSetSummary. + Name of the Process Set. + + + :param display_name: The display_name of this ProcessSetSummary. + :type: str + """ + self._display_name = display_name + + @property + def specification(self): + """ + **[Required]** Gets the specification of this ProcessSetSummary. + + :return: The specification of this ProcessSetSummary. + :rtype: oci.stack_monitoring.models.ProcessSetSpecification + """ + return self._specification + + @specification.setter + def specification(self, specification): + """ + Sets the specification of this ProcessSetSummary. + + :param specification: The specification of this ProcessSetSummary. + :type: oci.stack_monitoring.models.ProcessSetSpecification + """ + self._specification = specification + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ProcessSetSummary. + The time the process set was created. An RFC3339 formatted datetime string. + + + :return: The time_created of this ProcessSetSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ProcessSetSummary. + The time the process set was created. An RFC3339 formatted datetime string. + + + :param time_created: The time_created of this ProcessSetSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ProcessSetSummary. + The time the process set was last updated. An RFC3339 formatted datetime string. + + + :return: The time_updated of this ProcessSetSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ProcessSetSummary. + The time the process set was last updated. An RFC3339 formatted datetime string. + + + :param time_updated: The time_updated of this ProcessSetSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def revision(self): + """ + **[Required]** Gets the revision of this ProcessSetSummary. + The current revision of the Process Set. + + + :return: The revision of this ProcessSetSummary. + :rtype: str + """ + return self._revision + + @revision.setter + def revision(self, revision): + """ + Sets the revision of this ProcessSetSummary. + The current revision of the Process Set. + + + :param revision: The revision of this ProcessSetSummary. + :type: str + """ + self._revision = revision + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ProcessSetSummary. + 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 ProcessSetSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ProcessSetSummary. + 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 ProcessSetSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ProcessSetSummary. + 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 ProcessSetSummary. + :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 ProcessSetSummary. + 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 ProcessSetSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ProcessSetSummary. + 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 ProcessSetSummary. + :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 ProcessSetSummary. + 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 ProcessSetSummary. + :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/stack_monitoring/models/update_process_set_details.py b/src/oci/stack_monitoring/models/update_process_set_details.py new file mode 100644 index 000000000..9690392e9 --- /dev/null +++ b/src/oci/stack_monitoring/models/update_process_set_details.py @@ -0,0 +1,165 @@ +# 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: 20210330 + + +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 UpdateProcessSetDetails(object): + """ + Process Set update payload model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateProcessSetDetails 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 UpdateProcessSetDetails. + :type display_name: str + + :param specification: + The value to assign to the specification property of this UpdateProcessSetDetails. + :type specification: oci.stack_monitoring.models.ProcessSetSpecification + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateProcessSetDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateProcessSetDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'specification': 'ProcessSetSpecification', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'specification': 'specification', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._specification = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateProcessSetDetails. + Name of the Process Set. + + + :return: The display_name of this UpdateProcessSetDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateProcessSetDetails. + Name of the Process Set. + + + :param display_name: The display_name of this UpdateProcessSetDetails. + :type: str + """ + self._display_name = display_name + + @property + def specification(self): + """ + Gets the specification of this UpdateProcessSetDetails. + + :return: The specification of this UpdateProcessSetDetails. + :rtype: oci.stack_monitoring.models.ProcessSetSpecification + """ + return self._specification + + @specification.setter + def specification(self, specification): + """ + Sets the specification of this UpdateProcessSetDetails. + + :param specification: The specification of this UpdateProcessSetDetails. + :type: oci.stack_monitoring.models.ProcessSetSpecification + """ + self._specification = specification + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateProcessSetDetails. + 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 UpdateProcessSetDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateProcessSetDetails. + 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 UpdateProcessSetDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateProcessSetDetails. + 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 UpdateProcessSetDetails. + :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 UpdateProcessSetDetails. + 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 UpdateProcessSetDetails. + :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/stack_monitoring/stack_monitoring_client.py b/src/oci/stack_monitoring/stack_monitoring_client.py index c55f7ccc4..c29e8431d 100644 --- a/src/oci/stack_monitoring/stack_monitoring_client.py +++ b/src/oci/stack_monitoring/stack_monitoring_client.py @@ -722,6 +722,127 @@ def change_monitored_resource_task_compartment(self, monitored_resource_task_id, api_reference_link=api_reference_link, required_arguments=required_arguments) + def change_process_set_compartment(self, process_set_id, change_process_set_compartment_details, **kwargs): + """ + Moves a ProcessSet resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. + + + :param str process_set_id: (required) + The Process Set ID + + :param oci.stack_monitoring.models.ChangeProcessSetCompartmentDetails change_process_set_compartment_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) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :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_process_set_compartment API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['processSetId'] + resource_path = "/processSets/{processSetId}/actions/changeCompartment" + method = "POST" + operation_name = "change_process_set_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/ChangeProcessSetCompartment" + + # 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_process_set_compartment got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "processSetId": process_set_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, + body=change_process_set_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_process_set_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 create_baselineable_metric(self, create_baselineable_metric_details, **kwargs): """ Creates the specified Baseline-able metric @@ -1425,6 +1546,105 @@ def create_monitored_resource_type(self, create_monitored_resource_type_details, api_reference_link=api_reference_link, required_arguments=required_arguments) + def create_process_set(self, create_process_set_details, **kwargs): + """ + API to create Process Set. + + + :param oci.stack_monitoring.models.CreateProcessSetDetails create_process_set_details: (required) + Summary of process set details. + + :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 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 :class:`~oci.stack_monitoring.models.ProcessSet` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_process_set API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = [] + resource_path = "/processSets" + method = "POST" + operation_name = "create_process_set" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/CreateProcessSet" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "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"create_process_set got unknown kwargs: {extra_kwargs!r}") + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "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, + header_params=header_params, + body=create_process_set_details, + response_type="ProcessSet", + 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_process_set_details, + response_type="ProcessSet", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + def delete_baselineable_metric(self, baselineable_metric_id, **kwargs): """ Deletes the Baseline-able metric for the given id @@ -2080,6 +2300,112 @@ def delete_monitored_resource_type(self, monitored_resource_type_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def delete_process_set(self, process_set_id, **kwargs): + """ + Deletes a Process Set + + + :param str process_set_id: (required) + The Process Set 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_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 delete_process_set API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['processSetId'] + resource_path = "/processSets/{processSetId}" + method = "DELETE" + operation_name = "delete_process_set" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/DeleteProcessSet" + + # 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_process_set got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "processSetId": process_set_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 disable_external_database(self, monitored_resource_id, **kwargs): """ Disable external database resource monitoring. All the references in DBaaS, @@ -3338,10 +3664,113 @@ def get_monitored_resource_task(self, monitored_resource_task_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_monitored_resource_task got unknown kwargs: {extra_kwargs!r}") + f"get_monitored_resource_task got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "monitoredResourceTaskId": monitored_resource_task_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="MonitoredResourceTask", + 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="MonitoredResourceTask", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) + + def get_monitored_resource_type(self, monitored_resource_type_id, **kwargs): + """ + Gets a monitored resource type by identifier `OCID`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param str monitored_resource_type_id: (required) + The `OCID`__ of monitored resource type. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + :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.stack_monitoring.models.MonitoredResourceType` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_monitored_resource_type API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['monitoredResourceTypeId'] + resource_path = "/monitoredResourceTypes/{monitoredResourceTypeId}" + method = "GET" + operation_name = "get_monitored_resource_type" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResourceType/GetMonitoredResourceType" + + # 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_monitored_resource_type got unknown kwargs: {extra_kwargs!r}") path_params = { - "monitoredResourceTaskId": monitored_resource_task_id + "monitoredResourceTypeId": monitored_resource_type_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3374,7 +3803,7 @@ def get_monitored_resource_task(self, monitored_resource_task_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MonitoredResourceTask", + response_type="MonitoredResourceType", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3385,23 +3814,19 @@ def get_monitored_resource_task(self, monitored_resource_task_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MonitoredResourceTask", + response_type="MonitoredResourceType", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) - def get_monitored_resource_type(self, monitored_resource_type_id, **kwargs): + def get_process_set(self, process_set_id, **kwargs): """ - Gets a monitored resource type by identifier `OCID`__. - - __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm - + API to get the details of a Process Set by identifier. - :param str monitored_resource_type_id: (required) - The `OCID`__ of monitored resource type. - __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + :param str process_set_id: (required) + The Process Set ID :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -3419,18 +3844,18 @@ def get_monitored_resource_type(self, monitored_resource_type_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.stack_monitoring.models.MonitoredResourceType` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.stack_monitoring.models.ProcessSet` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_monitored_resource_type API. + Click `here `__ to see an example of how to use get_process_set API. """ # Required path and query arguments. These are in camelCase to replace values in service endpoints. - required_arguments = ['monitoredResourceTypeId'] - resource_path = "/monitoredResourceTypes/{monitoredResourceTypeId}" + required_arguments = ['processSetId'] + resource_path = "/processSets/{processSetId}" method = "GET" - operation_name = "get_monitored_resource_type" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/MonitoredResourceType/GetMonitoredResourceType" + operation_name = "get_process_set" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/GetProcessSet" # Don't accept unknown kwargs expected_kwargs = [ @@ -3441,10 +3866,10 @@ def get_monitored_resource_type(self, monitored_resource_type_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - f"get_monitored_resource_type got unknown kwargs: {extra_kwargs!r}") + f"get_process_set got unknown kwargs: {extra_kwargs!r}") path_params = { - "monitoredResourceTypeId": monitored_resource_type_id + "processSetId": process_set_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3477,7 +3902,7 @@ def get_monitored_resource_type(self, monitored_resource_type_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MonitoredResourceType", + response_type="ProcessSet", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -3488,7 +3913,7 @@ def get_monitored_resource_type(self, monitored_resource_type_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="MonitoredResourceType", + response_type="ProcessSet", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link, @@ -4942,6 +5367,151 @@ def list_monitored_resources(self, compartment_id, **kwargs): api_reference_link=api_reference_link, required_arguments=required_arguments) + def list_process_sets(self, compartment_id, **kwargs): + """ + API to get the details of all Process Sets. + + + :param str compartment_id: (required) + The ID of the compartment in which data is listed. + + :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`__. + + __ 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_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). + + Allowed values are: "ASC", "DESC" + + :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 sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending. Default order for name is ascending. + + Allowed values are: "timeUpdated", "name" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :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.stack_monitoring.models.ProcessSetCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_process_sets API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['compartmentId'] + resource_path = "/processSets" + method = "GET" + operation_name = "list_process_sets" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSetCollection/ListProcessSets" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "page", + "sort_order", + "opc_request_id", + "sort_by", + "display_name" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + f"list_process_sets got unknown kwargs: {extra_kwargs!r}") + + 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 = ["timeUpdated", "name"] + 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": compartment_id, + "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) + } + 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, + query_params=query_params, + header_params=header_params, + response_type="ProcessSetCollection", + 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="ProcessSetCollection", + 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): """ Return a (paginated) list of errors for a given work request. @@ -7396,3 +7966,116 @@ def update_monitored_resource_type(self, monitored_resource_type_id, update_moni operation_name=operation_name, api_reference_link=api_reference_link, required_arguments=required_arguments) + + def update_process_set(self, process_set_id, update_process_set_details, **kwargs): + """ + API to update a Process Set identified by a given ocid. + + + :param str process_set_id: (required) + The Process Set ID + + :param oci.stack_monitoring.models.UpdateProcessSetDetails update_process_set_details: (required) + The updated Process Set details. + + :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 :class:`~oci.stack_monitoring.models.ProcessSet` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_process_set API. + """ + # Required path and query arguments. These are in camelCase to replace values in service endpoints. + required_arguments = ['processSetId'] + resource_path = "/processSets/{processSetId}" + method = "PUT" + operation_name = "update_process_set" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/stack-monitoring/20210330/ProcessSet/UpdateProcessSet" + + # 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"update_process_set got unknown kwargs: {extra_kwargs!r}") + + path_params = { + "processSetId": process_set_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) + } + 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_process_set_details, + response_type="ProcessSet", + 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_process_set_details, + response_type="ProcessSet", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link, + required_arguments=required_arguments) diff --git a/src/oci/stack_monitoring/stack_monitoring_client_composite_operations.py b/src/oci/stack_monitoring/stack_monitoring_client_composite_operations.py index b03242b33..5ecc29c1e 100644 --- a/src/oci/stack_monitoring/stack_monitoring_client_composite_operations.py +++ b/src/oci/stack_monitoring/stack_monitoring_client_composite_operations.py @@ -51,8 +51,9 @@ def change_monitored_resource_compartment_and_wait_for_state(self, monitored_res operation_result = self.client.change_monitored_resource_compartment(monitored_resource_id, change_monitored_resource_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: @@ -89,7 +90,6 @@ def create_baselineable_metric_and_wait_for_state(self, create_baselineable_metr operation_result = self.client.create_baselineable_metric(create_baselineable_metric_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] baselineable_metric_id = operation_result.data.id @@ -132,7 +132,6 @@ def create_config_and_wait_for_state(self, create_config_details, wait_for_state operation_result = self.client.create_config(create_config_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] config_id = operation_result.data.id @@ -175,7 +174,6 @@ def create_discovery_job_and_wait_for_state(self, create_discovery_job_details, operation_result = self.client.create_discovery_job(create_discovery_job_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] discovery_job_id = operation_result.data.id @@ -218,7 +216,6 @@ def create_metric_extension_and_wait_for_state(self, create_metric_extension_det operation_result = self.client.create_metric_extension(create_metric_extension_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] metric_extension_id = operation_result.data.id @@ -261,8 +258,9 @@ def create_monitored_resource_and_wait_for_state(self, create_monitored_resource operation_result = self.client.create_monitored_resource(create_monitored_resource_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: @@ -299,8 +297,9 @@ def create_monitored_resource_task_and_wait_for_state(self, create_monitored_res operation_result = self.client.create_monitored_resource_task(create_monitored_resource_task_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: @@ -337,7 +336,6 @@ def create_monitored_resource_type_and_wait_for_state(self, create_monitored_res operation_result = self.client.create_monitored_resource_type(create_monitored_resource_type_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] monitored_resource_type_id = operation_result.data.id @@ -359,6 +357,48 @@ def create_monitored_resource_type_and_wait_for_state(self, create_monitored_res except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_process_set_and_wait_for_state(self, create_process_set_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.stack_monitoring.StackMonitoringClient.create_process_set` and waits for the :py:class:`~oci.stack_monitoring.models.ProcessSet` acted upon + to enter the given state(s). + + :param oci.stack_monitoring.models.CreateProcessSetDetails create_process_set_details: (required) + Summary of process set details. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.stack_monitoring.models.ProcessSet.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.stack_monitoring.StackMonitoringClient.create_process_set` + + :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_process_set(create_process_set_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + process_set_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_process_set(process_set_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 delete_baselineable_metric_and_wait_for_state(self, baselineable_metric_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.stack_monitoring.StackMonitoringClient.delete_baselineable_metric` and waits for the :py:class:`~oci.stack_monitoring.models.BaselineableMetric` acted upon @@ -389,7 +429,6 @@ def delete_baselineable_metric_and_wait_for_state(self, baselineable_metric_id, if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -449,7 +488,6 @@ def delete_config_and_wait_for_state(self, config_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -509,7 +547,6 @@ def delete_discovery_job_and_wait_for_state(self, discovery_job_id, wait_for_sta if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -571,7 +608,6 @@ def delete_metric_extension_and_wait_for_state(self, metric_extension_id, wait_f if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -632,8 +668,9 @@ def delete_monitored_resource_and_wait_for_state(self, monitored_resource_id, wa 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: @@ -681,7 +718,6 @@ def delete_monitored_resource_type_and_wait_for_state(self, monitored_resource_t if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -711,6 +747,65 @@ def delete_monitored_resource_type_and_wait_for_state(self, monitored_resource_t except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_process_set_and_wait_for_state(self, process_set_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.stack_monitoring.StackMonitoringClient.delete_process_set` and waits for the :py:class:`~oci.stack_monitoring.models.ProcessSet` acted upon + to enter the given state(s). + + :param str process_set_id: (required) + The Process Set ID + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.stack_monitoring.models.ProcessSet.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.stack_monitoring.StackMonitoringClient.delete_process_set` + + :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_process_set(process_set_id) + operation_result = None + try: + operation_result = self.client.delete_process_set(process_set_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_process_set, 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 disable_external_database_and_wait_for_state(self, monitored_resource_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.stack_monitoring.StackMonitoringClient.disable_external_database` and waits for the :py:class:`~oci.stack_monitoring.models.WorkRequest` @@ -734,8 +829,9 @@ def disable_external_database_and_wait_for_state(self, monitored_resource_id, wa operation_result = self.client.disable_external_database(monitored_resource_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: @@ -777,8 +873,9 @@ def disable_metric_extension_and_wait_for_state(self, metric_extension_id, disab operation_result = self.client.disable_metric_extension(metric_extension_id, disable_metric_extension_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: @@ -820,8 +917,9 @@ def enable_metric_extension_and_wait_for_state(self, metric_extension_id, enable operation_result = self.client.enable_metric_extension(metric_extension_id, enable_metric_extension_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: @@ -860,7 +958,6 @@ def publish_metric_extension_and_wait_for_state(self, metric_extension_id, wait_ operation_result = self.client.publish_metric_extension(metric_extension_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] metric_extension_id = operation_result.data.id @@ -908,8 +1005,9 @@ def test_metric_extension_and_wait_for_state(self, metric_extension_id, test_met operation_result = self.client.test_metric_extension(metric_extension_id, test_metric_extension_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: @@ -951,8 +1049,9 @@ def update_and_propagate_tags_and_wait_for_state(self, monitored_resource_id, up operation_result = self.client.update_and_propagate_tags(monitored_resource_id, update_and_propagate_tags_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: @@ -992,7 +1091,6 @@ def update_baselineable_metric_and_wait_for_state(self, update_baselineable_metr operation_result = self.client.update_baselineable_metric(update_baselineable_metric_details, baselineable_metric_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] baselineable_metric_id = operation_result.data.id @@ -1038,7 +1136,6 @@ def update_config_and_wait_for_state(self, config_id, update_config_details, wai operation_result = self.client.update_config(config_id, update_config_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] config_id = operation_result.data.id @@ -1086,7 +1183,6 @@ def update_metric_extension_and_wait_for_state(self, metric_extension_id, update operation_result = self.client.update_metric_extension(metric_extension_id, update_metric_extension_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] metric_extension_id = operation_result.data.id @@ -1134,8 +1230,9 @@ def update_monitored_resource_and_wait_for_state(self, monitored_resource_id, up operation_result = self.client.update_monitored_resource(monitored_resource_id, update_monitored_resource_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: @@ -1177,7 +1274,6 @@ def update_monitored_resource_task_and_wait_for_state(self, monitored_resource_t operation_result = self.client.update_monitored_resource_task(monitored_resource_task_id, update_monitored_resource_task_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] monitored_resource_task_id = operation_result.data.id @@ -1225,7 +1321,6 @@ def update_monitored_resource_type_and_wait_for_state(self, monitored_resource_t operation_result = self.client.update_monitored_resource_type(monitored_resource_type_id, update_monitored_resource_type_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] monitored_resource_type_id = operation_result.data.id @@ -1246,3 +1341,48 @@ def update_monitored_resource_type_and_wait_for_state(self, monitored_resource_t 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_process_set_and_wait_for_state(self, process_set_id, update_process_set_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.stack_monitoring.StackMonitoringClient.update_process_set` and waits for the :py:class:`~oci.stack_monitoring.models.ProcessSet` acted upon + to enter the given state(s). + + :param str process_set_id: (required) + The Process Set ID + + :param oci.stack_monitoring.models.UpdateProcessSetDetails update_process_set_details: (required) + The updated Process Set details. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.stack_monitoring.models.ProcessSet.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.stack_monitoring.StackMonitoringClient.update_process_set` + + :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_process_set(process_set_id, update_process_set_details, **operation_kwargs) + if not wait_for_states: + return operation_result + lowered_wait_for_states = [w.lower() for w in wait_for_states] + process_set_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_process_set(process_set_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) diff --git a/src/oci/streaming/stream_admin_client_composite_operations.py b/src/oci/streaming/stream_admin_client_composite_operations.py index 47d6675df..5ed544d5a 100644 --- a/src/oci/streaming/stream_admin_client_composite_operations.py +++ b/src/oci/streaming/stream_admin_client_composite_operations.py @@ -46,7 +46,6 @@ def create_connect_harness_and_wait_for_state(self, create_connect_harness_detai operation_result = self.client.create_connect_harness(create_connect_harness_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] connect_harness_id = operation_result.data.id @@ -89,7 +88,6 @@ def create_stream_and_wait_for_state(self, create_stream_details, wait_for_state operation_result = self.client.create_stream(create_stream_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_id = operation_result.data.id @@ -132,7 +130,6 @@ def create_stream_pool_and_wait_for_state(self, create_stream_pool_details, wait operation_result = self.client.create_stream_pool(create_stream_pool_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_pool_id = operation_result.data.id @@ -184,7 +181,6 @@ def delete_connect_harness_and_wait_for_state(self, connect_harness_id, wait_for if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -244,7 +240,6 @@ def delete_stream_and_wait_for_state(self, stream_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -304,7 +299,6 @@ def delete_stream_pool_and_wait_for_state(self, stream_pool_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -358,7 +352,6 @@ def update_connect_harness_and_wait_for_state(self, connect_harness_id, update_c operation_result = self.client.update_connect_harness(connect_harness_id, update_connect_harness_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] connect_harness_id = operation_result.data.id @@ -404,7 +397,6 @@ def update_stream_and_wait_for_state(self, stream_id, update_stream_details, wai operation_result = self.client.update_stream(stream_id, update_stream_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_id = operation_result.data.id @@ -450,7 +442,6 @@ def update_stream_pool_and_wait_for_state(self, stream_pool_id, update_stream_po operation_result = self.client.update_stream_pool(stream_pool_id, update_stream_pool_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] stream_pool_id = operation_result.data.id diff --git a/src/oci/tenant_manager_control_plane/domain_client_composite_operations.py b/src/oci/tenant_manager_control_plane/domain_client_composite_operations.py index d7b24a2d9..e5ed44fdf 100644 --- a/src/oci/tenant_manager_control_plane/domain_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/domain_client_composite_operations.py @@ -46,8 +46,9 @@ def create_domain_and_wait_for_state(self, create_domain_details, wait_for_state operation_result = self.client.create_domain(create_domain_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: @@ -93,7 +94,6 @@ def delete_domain_and_wait_for_state(self, domain_id, wait_for_states=[], operat if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -147,7 +147,6 @@ def update_domain_and_wait_for_state(self, domain_id, update_domain_details, wai operation_result = self.client.update_domain(domain_id, update_domain_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] domain_id = operation_result.data.id diff --git a/src/oci/tenant_manager_control_plane/domain_governance_client_composite_operations.py b/src/oci/tenant_manager_control_plane/domain_governance_client_composite_operations.py index 072bb22b8..8a747c60e 100644 --- a/src/oci/tenant_manager_control_plane/domain_governance_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/domain_governance_client_composite_operations.py @@ -46,7 +46,6 @@ def create_domain_governance_and_wait_for_state(self, create_domain_governance_d operation_result = self.client.create_domain_governance(create_domain_governance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] domain_governance_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_domain_governance_and_wait_for_state(self, domain_governance_id, wait if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_domain_governance_and_wait_for_state(self, domain_governance_id, upda operation_result = self.client.update_domain_governance(domain_governance_id, update_domain_governance_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] domain_governance_id = operation_result.data.id diff --git a/src/oci/tenant_manager_control_plane/governance_client_composite_operations.py b/src/oci/tenant_manager_control_plane/governance_client_composite_operations.py index 801004c30..f14da38ba 100644 --- a/src/oci/tenant_manager_control_plane/governance_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/governance_client_composite_operations.py @@ -49,8 +49,9 @@ def add_governance_and_wait_for_state(self, organization_id, organization_tenanc operation_result = self.client.add_governance(organization_id, organization_tenancy_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: @@ -90,8 +91,9 @@ def remove_governance_and_wait_for_state(self, organization_id, organization_ten operation_result = self.client.remove_governance(organization_id, organization_tenancy_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: diff --git a/src/oci/tenant_manager_control_plane/link_client_composite_operations.py b/src/oci/tenant_manager_control_plane/link_client_composite_operations.py index 8bd2aaaf0..f33560e9f 100644 --- a/src/oci/tenant_manager_control_plane/link_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/link_client_composite_operations.py @@ -54,8 +54,9 @@ def delete_link_and_wait_for_state(self, link_id, wait_for_states=[], operation_ 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: diff --git a/src/oci/tenant_manager_control_plane/orders_client_composite_operations.py b/src/oci/tenant_manager_control_plane/orders_client_composite_operations.py index 3a17f8e04..68c30d3f7 100644 --- a/src/oci/tenant_manager_control_plane/orders_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/orders_client_composite_operations.py @@ -49,8 +49,9 @@ def activate_order_and_wait_for_state(self, activate_order_details, activation_t operation_result = self.client.activate_order(activate_order_details, activation_token, **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: diff --git a/src/oci/tenant_manager_control_plane/organization_client_composite_operations.py b/src/oci/tenant_manager_control_plane/organization_client_composite_operations.py index 24ad18532..f5545efdd 100644 --- a/src/oci/tenant_manager_control_plane/organization_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/organization_client_composite_operations.py @@ -46,8 +46,9 @@ def create_child_tenancy_and_wait_for_state(self, create_child_tenancy_details, operation_result = self.client.create_child_tenancy(create_child_tenancy_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: @@ -92,8 +93,9 @@ def delete_organization_tenancy_and_wait_for_state(self, organization_tenancy_id 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: @@ -130,8 +132,9 @@ def restore_organization_tenancy_and_wait_for_state(self, organization_tenancy_i operation_result = self.client.restore_organization_tenancy(organization_tenancy_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: @@ -171,8 +174,9 @@ def update_organization_and_wait_for_state(self, organization_id, update_organiz operation_result = self.client.update_organization(organization_id, update_organization_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: diff --git a/src/oci/tenant_manager_control_plane/recipient_invitation_client_composite_operations.py b/src/oci/tenant_manager_control_plane/recipient_invitation_client_composite_operations.py index 9e748c081..336f8167a 100644 --- a/src/oci/tenant_manager_control_plane/recipient_invitation_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/recipient_invitation_client_composite_operations.py @@ -46,8 +46,9 @@ def accept_recipient_invitation_and_wait_for_state(self, recipient_invitation_id operation_result = self.client.accept_recipient_invitation(recipient_invitation_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: @@ -84,7 +85,6 @@ def ignore_recipient_invitation_and_wait_for_state(self, recipient_invitation_id operation_result = self.client.ignore_recipient_invitation(recipient_invitation_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] recipient_invitation_id = operation_result.data.id @@ -130,7 +130,6 @@ def update_recipient_invitation_and_wait_for_state(self, recipient_invitation_id operation_result = self.client.update_recipient_invitation(recipient_invitation_id, update_recipient_invitation_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] recipient_invitation_id = operation_result.data.id diff --git a/src/oci/tenant_manager_control_plane/sender_invitation_client_composite_operations.py b/src/oci/tenant_manager_control_plane/sender_invitation_client_composite_operations.py index c09a566a4..188b0dd88 100644 --- a/src/oci/tenant_manager_control_plane/sender_invitation_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/sender_invitation_client_composite_operations.py @@ -46,8 +46,9 @@ def cancel_sender_invitation_and_wait_for_state(self, sender_invitation_id, wait operation_result = self.client.cancel_sender_invitation(sender_invitation_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: @@ -84,8 +85,9 @@ def create_sender_invitation_and_wait_for_state(self, create_sender_invitation_d operation_result = self.client.create_sender_invitation(create_sender_invitation_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: @@ -125,7 +127,6 @@ def update_sender_invitation_and_wait_for_state(self, sender_invitation_id, upda operation_result = self.client.update_sender_invitation(sender_invitation_id, update_sender_invitation_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] sender_invitation_id = operation_result.data.id diff --git a/src/oci/tenant_manager_control_plane/subscription_client_composite_operations.py b/src/oci/tenant_manager_control_plane/subscription_client_composite_operations.py index abe237361..a5d9a1194 100644 --- a/src/oci/tenant_manager_control_plane/subscription_client_composite_operations.py +++ b/src/oci/tenant_manager_control_plane/subscription_client_composite_operations.py @@ -46,8 +46,9 @@ def create_subscription_mapping_and_wait_for_state(self, create_subscription_map operation_result = self.client.create_subscription_mapping(create_subscription_mapping_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: @@ -93,7 +94,6 @@ def delete_subscription_mapping_and_wait_for_state(self, subscription_mapping_id if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: diff --git a/src/oci/usage_api/usageapi_client_composite_operations.py b/src/oci/usage_api/usageapi_client_composite_operations.py index badcfaadd..671c8dfa8 100644 --- a/src/oci/usage_api/usageapi_client_composite_operations.py +++ b/src/oci/usage_api/usageapi_client_composite_operations.py @@ -46,7 +46,6 @@ def create_schedule_and_wait_for_state(self, create_schedule_details, wait_for_s operation_result = self.client.create_schedule(create_schedule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] schedule_id = operation_result.data.id @@ -98,7 +97,6 @@ def delete_schedule_and_wait_for_state(self, schedule_id, wait_for_states=[], op if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -152,7 +150,6 @@ def update_schedule_and_wait_for_state(self, update_schedule_details, schedule_i operation_result = self.client.update_schedule(update_schedule_details, schedule_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] schedule_id = operation_result.data.id diff --git a/src/oci/vault/vaults_client_composite_operations.py b/src/oci/vault/vaults_client_composite_operations.py index 6c1c3aab5..c9413f542 100644 --- a/src/oci/vault/vaults_client_composite_operations.py +++ b/src/oci/vault/vaults_client_composite_operations.py @@ -46,7 +46,6 @@ def create_secret_and_wait_for_state(self, create_secret_details, wait_for_state operation_result = self.client.create_secret(create_secret_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] secret_id = operation_result.data.id @@ -92,7 +91,6 @@ def update_secret_and_wait_for_state(self, secret_id, update_secret_details, wai operation_result = self.client.update_secret(secret_id, update_secret_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] secret_id = operation_result.data.id diff --git a/src/oci/vbs_inst/vbs_instance_client_composite_operations.py b/src/oci/vbs_inst/vbs_instance_client_composite_operations.py index d53fcd2be..c21e77558 100644 --- a/src/oci/vbs_inst/vbs_instance_client_composite_operations.py +++ b/src/oci/vbs_inst/vbs_instance_client_composite_operations.py @@ -49,8 +49,9 @@ def change_vbs_instance_compartment_and_wait_for_state(self, vbs_instance_id, ch operation_result = self.client.change_vbs_instance_compartment(vbs_instance_id, change_vbs_instance_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: @@ -87,8 +88,9 @@ def create_vbs_instance_and_wait_for_state(self, create_vbs_instance_details, wa operation_result = self.client.create_vbs_instance(create_vbs_instance_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: @@ -133,8 +135,9 @@ def delete_vbs_instance_and_wait_for_state(self, vbs_instance_id, wait_for_state 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: @@ -174,8 +177,9 @@ def update_vbs_instance_and_wait_for_state(self, vbs_instance_id, update_vbs_ins operation_result = self.client.update_vbs_instance(vbs_instance_id, update_vbs_instance_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: diff --git a/src/oci/version.py b/src/oci/version.py index 117e5a6d4..12c6eeec8 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.119.0" +__version__ = "2.119.1" diff --git a/src/oci/visual_builder/vb_instance_client_composite_operations.py b/src/oci/visual_builder/vb_instance_client_composite_operations.py index 45e4a695c..cb9e7ada0 100644 --- a/src/oci/visual_builder/vb_instance_client_composite_operations.py +++ b/src/oci/visual_builder/vb_instance_client_composite_operations.py @@ -49,8 +49,9 @@ def change_vb_instance_compartment_and_wait_for_state(self, vb_instance_id, chan operation_result = self.client.change_vb_instance_compartment(vb_instance_id, change_vb_instance_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: @@ -87,8 +88,9 @@ def create_vb_instance_and_wait_for_state(self, create_vb_instance_details, wait operation_result = self.client.create_vb_instance(create_vb_instance_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: @@ -133,8 +135,9 @@ def delete_vb_instance_and_wait_for_state(self, vb_instance_id, wait_for_states= 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: @@ -171,8 +174,9 @@ def start_vb_instance_and_wait_for_state(self, vb_instance_id, wait_for_states=[ operation_result = self.client.start_vb_instance(vb_instance_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: @@ -209,8 +213,9 @@ def stop_vb_instance_and_wait_for_state(self, vb_instance_id, wait_for_states=[] operation_result = self.client.stop_vb_instance(vb_instance_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: @@ -250,8 +255,9 @@ def update_vb_instance_and_wait_for_state(self, vb_instance_id, update_vb_instan operation_result = self.client.update_vb_instance(vb_instance_id, update_vb_instance_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: diff --git a/src/oci/vn_monitoring/vn_monitoring_client_composite_operations.py b/src/oci/vn_monitoring/vn_monitoring_client_composite_operations.py index a996fbdae..b42818952 100644 --- a/src/oci/vn_monitoring/vn_monitoring_client_composite_operations.py +++ b/src/oci/vn_monitoring/vn_monitoring_client_composite_operations.py @@ -46,7 +46,6 @@ def create_path_analyzer_test_and_wait_for_state(self, create_path_analyzer_test operation_result = self.client.create_path_analyzer_test(create_path_analyzer_test_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] path_analyzer_test_id = operation_result.data.id @@ -100,7 +99,6 @@ def delete_path_analyzer_test_and_wait_for_state(self, path_analyzer_test_id, wa if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -151,8 +149,9 @@ def get_path_analysis_and_wait_for_state(self, get_path_analysis_details, wait_f operation_result = self.client.get_path_analysis(get_path_analysis_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: @@ -194,7 +193,6 @@ def update_path_analyzer_test_and_wait_for_state(self, path_analyzer_test_id, up operation_result = self.client.update_path_analyzer_test(path_analyzer_test_id, update_path_analyzer_test_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] path_analyzer_test_id = operation_result.data.id diff --git a/src/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.py b/src/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.py index 85b537d96..d701715cf 100644 --- a/src/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.py +++ b/src/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.py @@ -46,8 +46,9 @@ def create_container_scan_recipe_and_wait_for_state(self, create_container_scan_ operation_result = self.client.create_container_scan_recipe(create_container_scan_recipe_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: @@ -84,8 +85,9 @@ def create_container_scan_target_and_wait_for_state(self, create_container_scan_ operation_result = self.client.create_container_scan_target(create_container_scan_target_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: @@ -122,8 +124,9 @@ def create_host_scan_recipe_and_wait_for_state(self, create_host_scan_recipe_det operation_result = self.client.create_host_scan_recipe(create_host_scan_recipe_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: @@ -160,8 +163,9 @@ def create_host_scan_target_and_wait_for_state(self, create_host_scan_target_det operation_result = self.client.create_host_scan_target(create_host_scan_target_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: @@ -206,8 +210,9 @@ def delete_container_scan_recipe_and_wait_for_state(self, container_scan_recipe_ 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: @@ -252,8 +257,9 @@ def delete_container_scan_result_and_wait_for_state(self, container_scan_result_ 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: @@ -298,8 +304,9 @@ def delete_container_scan_target_and_wait_for_state(self, container_scan_target_ 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: @@ -344,8 +351,9 @@ def delete_host_agent_scan_result_and_wait_for_state(self, host_agent_scan_resul 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: @@ -390,8 +398,9 @@ def delete_host_cis_benchmark_scan_result_and_wait_for_state(self, host_cis_benc 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: @@ -436,8 +445,9 @@ def delete_host_endpoint_protection_scan_result_and_wait_for_state(self, host_en 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: @@ -482,8 +492,9 @@ def delete_host_port_scan_result_and_wait_for_state(self, host_port_scan_result_ 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: @@ -528,8 +539,9 @@ def delete_host_scan_recipe_and_wait_for_state(self, host_scan_recipe_id, wait_f 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: @@ -574,8 +586,9 @@ def delete_host_scan_target_and_wait_for_state(self, host_scan_target_id, wait_f 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: @@ -615,8 +628,9 @@ def update_container_scan_recipe_and_wait_for_state(self, container_scan_recipe_ operation_result = self.client.update_container_scan_recipe(container_scan_recipe_id, update_container_scan_recipe_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: @@ -656,8 +670,9 @@ def update_container_scan_target_and_wait_for_state(self, container_scan_target_ operation_result = self.client.update_container_scan_target(container_scan_target_id, update_container_scan_target_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: @@ -697,8 +712,9 @@ def update_host_scan_recipe_and_wait_for_state(self, host_scan_recipe_id, update operation_result = self.client.update_host_scan_recipe(host_scan_recipe_id, update_host_scan_recipe_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: @@ -738,8 +754,9 @@ def update_host_scan_target_and_wait_for_state(self, host_scan_target_id, update operation_result = self.client.update_host_scan_target(host_scan_target_id, update_host_scan_target_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: diff --git a/src/oci/waa/waa_client_composite_operations.py b/src/oci/waa/waa_client_composite_operations.py index 73775a505..74e130d15 100644 --- a/src/oci/waa/waa_client_composite_operations.py +++ b/src/oci/waa/waa_client_composite_operations.py @@ -51,8 +51,9 @@ def change_web_app_acceleration_compartment_and_wait_for_state(self, web_app_acc operation_result = self.client.change_web_app_acceleration_compartment(web_app_acceleration_id, change_web_app_acceleration_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: @@ -94,8 +95,9 @@ def change_web_app_acceleration_policy_compartment_and_wait_for_state(self, web_ operation_result = self.client.change_web_app_acceleration_policy_compartment(web_app_acceleration_policy_id, change_web_app_acceleration_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: @@ -132,8 +134,9 @@ def create_web_app_acceleration_and_wait_for_state(self, create_web_app_accelera operation_result = self.client.create_web_app_acceleration(create_web_app_acceleration_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: @@ -170,8 +173,9 @@ def create_web_app_acceleration_policy_and_wait_for_state(self, create_web_app_a operation_result = self.client.create_web_app_acceleration_policy(create_web_app_acceleration_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: @@ -218,8 +222,9 @@ def delete_web_app_acceleration_and_wait_for_state(self, web_app_acceleration_id 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: @@ -266,8 +271,9 @@ def delete_web_app_acceleration_policy_and_wait_for_state(self, web_app_accelera 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: @@ -309,8 +315,9 @@ def purge_web_app_acceleration_cache_and_wait_for_state(self, web_app_accelerati operation_result = self.client.purge_web_app_acceleration_cache(web_app_acceleration_id, purge_web_app_acceleration_cache_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: @@ -352,8 +359,9 @@ def update_web_app_acceleration_and_wait_for_state(self, web_app_acceleration_id operation_result = self.client.update_web_app_acceleration(web_app_acceleration_id, update_web_app_acceleration_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: @@ -395,8 +403,9 @@ def update_web_app_acceleration_policy_and_wait_for_state(self, web_app_accelera operation_result = self.client.update_web_app_acceleration_policy(web_app_acceleration_policy_id, update_web_app_acceleration_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: diff --git a/src/oci/waas/redirect_client_composite_operations.py b/src/oci/waas/redirect_client_composite_operations.py index 04d1d779f..2c50b02b0 100644 --- a/src/oci/waas/redirect_client_composite_operations.py +++ b/src/oci/waas/redirect_client_composite_operations.py @@ -46,8 +46,9 @@ def create_http_redirect_and_wait_for_state(self, create_http_redirect_details, operation_result = self.client.create_http_redirect(create_http_redirect_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: @@ -94,8 +95,9 @@ def delete_http_redirect_and_wait_for_state(self, http_redirect_id, wait_for_sta 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: @@ -137,8 +139,9 @@ def update_http_redirect_and_wait_for_state(self, http_redirect_id, update_http_ operation_result = self.client.update_http_redirect(http_redirect_id, update_http_redirect_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: diff --git a/src/oci/waas/waas_client_composite_operations.py b/src/oci/waas/waas_client_composite_operations.py index 576742a80..67c114fea 100644 --- a/src/oci/waas/waas_client_composite_operations.py +++ b/src/oci/waas/waas_client_composite_operations.py @@ -50,8 +50,9 @@ def accept_recommendations_and_wait_for_state(self, waas_policy_id, protection_r operation_result = self.client.accept_recommendations(waas_policy_id, protection_rule_keys, **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: @@ -88,7 +89,6 @@ def create_address_list_and_wait_for_state(self, create_address_list_details, wa operation_result = self.client.create_address_list(create_address_list_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] address_list_id = operation_result.data.id @@ -131,7 +131,6 @@ def create_certificate_and_wait_for_state(self, create_certificate_details, wait operation_result = self.client.create_certificate(create_certificate_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] certificate_id = operation_result.data.id @@ -174,7 +173,6 @@ def create_custom_protection_rule_and_wait_for_state(self, create_custom_protect operation_result = self.client.create_custom_protection_rule(create_custom_protection_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] custom_protection_rule_id = operation_result.data.id @@ -217,8 +215,9 @@ def create_waas_policy_and_wait_for_state(self, create_waas_policy_details, wait operation_result = self.client.create_waas_policy(create_waas_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: @@ -266,7 +265,6 @@ def delete_address_list_and_wait_for_state(self, address_list_id, wait_for_state if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -328,7 +326,6 @@ def delete_certificate_and_wait_for_state(self, certificate_id, wait_for_states= if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -390,7 +387,6 @@ def delete_custom_protection_rule_and_wait_for_state(self, custom_protection_rul if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] try: @@ -451,8 +447,9 @@ def delete_waas_policy_and_wait_for_state(self, waas_policy_id, wait_for_states= 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: @@ -491,8 +488,9 @@ def purge_cache_and_wait_for_state(self, waas_policy_id, wait_for_states=[], ope operation_result = self.client.purge_cache(waas_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: @@ -533,8 +531,9 @@ def update_access_rules_and_wait_for_state(self, waas_policy_id, access_rules, w operation_result = self.client.update_access_rules(waas_policy_id, access_rules, **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: @@ -573,7 +572,6 @@ def update_address_list_and_wait_for_state(self, address_list_id, wait_for_state operation_result = self.client.update_address_list(address_list_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] address_list_id = operation_result.data.id @@ -620,8 +618,9 @@ def update_caching_rules_and_wait_for_state(self, waas_policy_id, caching_rules_ operation_result = self.client.update_caching_rules(waas_policy_id, caching_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: @@ -663,8 +662,9 @@ def update_captchas_and_wait_for_state(self, waas_policy_id, captchas, wait_for_ operation_result = self.client.update_captchas(waas_policy_id, captchas, **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: @@ -703,7 +703,6 @@ def update_certificate_and_wait_for_state(self, certificate_id, wait_for_states= operation_result = self.client.update_certificate(certificate_id, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] certificate_id = operation_result.data.id @@ -751,7 +750,6 @@ def update_custom_protection_rule_and_wait_for_state(self, custom_protection_rul operation_result = self.client.update_custom_protection_rule(custom_protection_rule_id, update_custom_protection_rule_details, **operation_kwargs) if not wait_for_states: return operation_result - lowered_wait_for_states = [w.lower() for w in wait_for_states] custom_protection_rule_id = operation_result.data.id @@ -799,8 +797,9 @@ def update_device_fingerprint_challenge_and_wait_for_state(self, waas_policy_id, operation_result = self.client.update_device_fingerprint_challenge(waas_policy_id, update_device_fingerprint_challenge_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: @@ -841,8 +840,9 @@ def update_good_bots_and_wait_for_state(self, waas_policy_id, good_bots, wait_fo operation_result = self.client.update_good_bots(waas_policy_id, good_bots, **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: @@ -884,8 +884,9 @@ def update_human_interaction_challenge_and_wait_for_state(self, waas_policy_id, operation_result = self.client.update_human_interaction_challenge(waas_policy_id, update_human_interaction_challenge_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: @@ -927,8 +928,9 @@ def update_js_challenge_and_wait_for_state(self, waas_policy_id, update_js_chall operation_result = self.client.update_js_challenge(waas_policy_id, update_js_challenge_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: @@ -970,8 +972,9 @@ def update_policy_config_and_wait_for_state(self, waas_policy_id, update_policy_ operation_result = self.client.update_policy_config(waas_policy_id, update_policy_config_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: @@ -1012,8 +1015,9 @@ def update_protection_rules_and_wait_for_state(self, waas_policy_id, protection_ operation_result = self.client.update_protection_rules(waas_policy_id, protection_rules, **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: @@ -1055,8 +1059,9 @@ def update_protection_settings_and_wait_for_state(self, waas_policy_id, update_p operation_result = self.client.update_protection_settings(waas_policy_id, update_protection_settings_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: @@ -1098,8 +1103,9 @@ def update_threat_feeds_and_wait_for_state(self, waas_policy_id, threat_feeds, w operation_result = self.client.update_threat_feeds(waas_policy_id, threat_feeds, **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: @@ -1141,8 +1147,9 @@ def update_waas_policy_and_wait_for_state(self, waas_policy_id, update_waas_poli operation_result = self.client.update_waas_policy(waas_policy_id, update_waas_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: @@ -1183,8 +1190,9 @@ def update_waas_policy_custom_protection_rules_and_wait_for_state(self, waas_pol operation_result = self.client.update_waas_policy_custom_protection_rules(waas_policy_id, update_custom_protection_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: @@ -1226,8 +1234,9 @@ def update_waf_address_rate_limiting_and_wait_for_state(self, waas_policy_id, up operation_result = self.client.update_waf_address_rate_limiting(waas_policy_id, update_waf_address_rate_limiting_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: @@ -1269,8 +1278,9 @@ def update_waf_config_and_wait_for_state(self, waas_policy_id, update_waf_config operation_result = self.client.update_waf_config(waas_policy_id, update_waf_config_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: @@ -1311,8 +1321,9 @@ def update_whitelists_and_wait_for_state(self, waas_policy_id, whitelists, wait_ operation_result = self.client.update_whitelists(waas_policy_id, whitelists, **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: diff --git a/src/oci/waf/waf_client_composite_operations.py b/src/oci/waf/waf_client_composite_operations.py index 3ed0ccd36..514b1a222 100644 --- a/src/oci/waf/waf_client_composite_operations.py +++ b/src/oci/waf/waf_client_composite_operations.py @@ -51,8 +51,9 @@ def change_network_address_list_compartment_and_wait_for_state(self, network_add operation_result = self.client.change_network_address_list_compartment(network_address_list_id, change_network_address_list_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: @@ -94,8 +95,9 @@ def change_web_app_firewall_compartment_and_wait_for_state(self, web_app_firewal operation_result = self.client.change_web_app_firewall_compartment(web_app_firewall_id, change_web_app_firewall_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: @@ -137,8 +139,9 @@ def change_web_app_firewall_policy_compartment_and_wait_for_state(self, web_app_ operation_result = self.client.change_web_app_firewall_policy_compartment(web_app_firewall_policy_id, change_web_app_firewall_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: @@ -175,8 +178,9 @@ def create_network_address_list_and_wait_for_state(self, create_network_address_ operation_result = self.client.create_network_address_list(create_network_address_list_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: @@ -213,8 +217,9 @@ def create_web_app_firewall_and_wait_for_state(self, create_web_app_firewall_det operation_result = self.client.create_web_app_firewall(create_web_app_firewall_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: @@ -251,8 +256,9 @@ def create_web_app_firewall_policy_and_wait_for_state(self, create_web_app_firew operation_result = self.client.create_web_app_firewall_policy(create_web_app_firewall_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: @@ -299,8 +305,9 @@ def delete_network_address_list_and_wait_for_state(self, network_address_list_id 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: @@ -347,8 +354,9 @@ def delete_web_app_firewall_and_wait_for_state(self, web_app_firewall_id, wait_f 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: @@ -395,8 +403,9 @@ def delete_web_app_firewall_policy_and_wait_for_state(self, web_app_firewall_pol 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: @@ -438,8 +447,9 @@ def update_network_address_list_and_wait_for_state(self, network_address_list_id operation_result = self.client.update_network_address_list(network_address_list_id, update_network_address_list_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: @@ -481,8 +491,9 @@ def update_web_app_firewall_and_wait_for_state(self, web_app_firewall_id, update operation_result = self.client.update_web_app_firewall(web_app_firewall_id, update_web_app_firewall_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: @@ -524,8 +535,9 @@ def update_web_app_firewall_policy_and_wait_for_state(self, web_app_firewall_pol operation_result = self.client.update_web_app_firewall_policy(web_app_firewall_policy_id, update_web_app_firewall_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: